You are not logged in.
Minor progress -- see https://forums.bunsenlabs.org/viewtopic … 751#p62751
Offline
Hi. I'm running Bunsen Hydrogen on x86-64, and I would like to make a customized live CD for one of my computers that's getting a little flaky. Do you have the modified version of crunchmaster anywhere, and would I have to use the 32 bit version, or can it be used for x86-64?
(I also figured that while I'm at it, I'd suggest a name change... it seems kind of obvious to call it 'bunsenburner.'
Just an idea.
Offline
I used this method to remaster our ISO image:
https://wiki.archlinux.org/index.php/Re … nstall_ISO
For BunsenLabs, the filesystem tree is at live/filesystem.squashfs and the label can be found by using `blkid` on our image.
Offline
I'm in touch with phil_in_la and will (not quite immediately I'm afraid) take a look at the archlinux item.
Suggest phil and I (and anyone who wishes to join in) share ideas and that when the dust settles we write up our experiences and recommendations to help others.
JN
Offline
OK, here is how I did it...
Dependencies:
sudo apt install squashfs-tools genisoimage syslinux-utils
First download the ISO image and mount it somewhere convenient:
sudo mount bl*.img /mnt
Then copy the contents to "$HOME":
mkdir -p ~/iso
cp -a /mnt ~/iso/remix
Now we need to unpack the root filesystem used in the live environment:
cd ~/iso/remix/live
sudo unsquashfs filesystem.squashfs
The tree is expanded in the squashfs-root directory and we need to chroot into it to change it:
for i in proc sys dev dev/pts; do sudo mount --bind /$i squashfs-root/$i; done
sudo chroot squashfs-root /bin/bash
Any desired alterations can then be carried out from the chroot environment — install or remove packages and make configuration file changes as desired.
Remember to source the shell configuration files to get $PATH &c working:
. /etc/profile && . ~/.bashrc
For the BunsenLabs live desktop, modify the files in /usr/share/bunsen/skel to change tint2, openbox and all the others
Once the changes are done, exit the chroot and re-pack the filesystem:
exit # or <Ctrl+d>
sudo rm filesystem.squashfs
sudo mksquashfs squashfs-root filesystem.squashfs
If the kernel has been updated or changed, copy the new version to ~/iso/remix/live/ along with the associated initial ramdisk:
sudo cp squashfs-root/{vmlinuz,boot/initrd*.img} .
And then clean up:
sudo rm -r squashfs-root
Finally, generate the new ISO image:
cd ~/iso/remix
genisoimage -l -r -J -V "BUNSENLABS_HYDROGEN" -b isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table -c isolinux/boot.cat -o ../remix.img ./
The resulting image can be burned directly to a CD or DVD but it needs to be "treated" before flashing to a USB stick:
isohybrid ~/iso/remix.img
With the usual method for the transfer:
sudo cp ~/iso/remix.img /dev/sdX
All done!
hth
Last edited by Head_on_a_Stick (2017-11-17 23:26:52)
Offline
Hmm. Would it be possible to "ghost" an already built system into an install iso using some variant of this? Like copy / recursively into squashfs-root, then build the iso? That would be extremely handy.
Offline
^ Oooh, interesting question 8)
The only problem with that would be the way the live system creates the user on-the-fly so I think any pre-existing users might b0rk things somewhat.
My method is a complete hack, to create installable live ISO images see the official Debian documentation:
Offline
Random (and untested) thought about installing from a live usb to hdd. Perhaps dd command to copy from t-drive to partition or rsync, as per the way I now tend to backup and/or move a gnu/Nix OS around on the partitions. A bit of fiddling required but seems to get the job done fine. ie: Changing a couple of the relevant files grub.cfg and /etc/fstab to the correct partition layout. Not really seeing why it wouldn't work for installing to disk from t-drive.
Vll!
PS, just something that came to mind while reading over the thread and seeing lack of installer mentioned. Also not likely the easiest or best method. And remembered this assuming someone REALLY wanted to remaster whichever gnu/Linux and did want to include an installer along with it.
Last edited by BLizgreat! (2017-11-11 18:02:39)
Offline
lack of installer mentioned
The installer is still present on the image and it might still manage to function but I think the changes wrought in the live environment would probably mess things up later in the installed system (if it actually completed).
Offline
...to create installable live ISO images see the official Debian documentation:
BL are using the live-build described there, which used to be the software used to build Debian images too. Now they are built using live-wrapper, which is distinguished by its wonderful lack of documentation. Some day, maybe they'll release something which we can use...
...but live-build continues to be maintained (by Raphael Herzog) so it's still a good option.
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
@John, what is the average build time for a distro like Bunsenlabs. I recently tried lfs out but my computer is not powerful enough to be a) everyday driver b) build environment, the laptop just became unresponsive using only 4 cores from 8 building gcc so decided to can it. Just curious.
Offline
^ On a four core laptop, live-build would take an hour to an hour and a half to build a very basic system up. Once you have the configuration setup correctly, most of it is pretty straight-forward, with apt-get doing a lot of work in the chroot environment.
I always had to worry about heat in the makesquashfs stage, however, because it will take whatever cpu it can get to run it., i.e all 4 cores on my laptop would run at 100%. Live-build is definitely not something you want to run if heat is a worry. It has been awhile since I did my last build. I am pretty sure my desktop could handle the stress and make that hour to hour and a half significantly less painful.
Last edited by tknomanzr (2017-11-15 13:22:46)
Offline
This desktop is pretty old (4 cores Intel i3 3.2GHz, 4GB RAM) but the last Deuterium isos built in just under an hour I seem to remember. The only time when the whole machine was taken over was making the squashfs at the end, as tk mentioned.
I found a big reduction in the time came by setting the best local mirror for package downloads: '--mirror-bootstrap' in live-build's auto/config. This doesn't affect the mirror set in the final iso.
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
This is in regard to Head_on_a_Stick recipe Nov 10.
I already have the filesystem.squashfs (from my crunchmaster run) so did not do any chroot.
Did all the other steps. Tried both dd and cp to load 2 different sticks.
Both sticks boot on Asus UL30A. Neither recognized on Asus UX303L, which is a surprise as the
original bl-Deuterium (April version) does boot. Wondering if it could be something to do with
specifying filesystem.squashfs size and related files.
I've managed to get an EFI bootable stick (using an Arch recipe), with no legacy boot. Sigh.
My plan is to carefully try the latter again making more extensive notes. Also to research the extra files related to the squashfs image a bit more. I'd really like boot on both.
One note: I'm using an i386 base because I've some old hardware that is of interest for my project. Maybe that is part of the issue?
Cheers, JN
Offline
Further follow-up on the recipe by Head_on_a_Stick:
I decided to try just unpacking and repacking the distribution iso. Here is a script taken from the recipe.
#!/bin/bash
# remixscrip1.sh JN 171117# sudo apt install squashfs-tools genisoimage syslinux-utils
# sudo mount bl*.img /mnt
# But site only contains iso
sudo mount ~/Downloads/bl-Deuterium-i386_20170429.iso /mnt
mkdir -p ~/iso
cp -a /mnt ~/iso/remix
cd ~/iso/remix/live
sudo unsquashfs filesystem.squashfs
## for i in proc sys dev dev/pts; do sudo mount --bind /$i squashfs-root/$i; done
## sudo chroot squashfs-root /bin/bash## . /etc/profile && . ~/.bashrc
## exit # or <Ctrl+d>
# unmount proc?? JN addn
## for i in proc sys dev dev/pts; do sudo umount squashfs-root/$i; done
sudo rm filesystem.squashfs
## typo??
##sudo mksquashfs squahsfs-root filesystem.squashfs
sudo mksquashfs squashfs-root filesystem.squashfs
# If the kernel has been updated or changed,
# copy the new version to ~/iso/remix/live/ along
# with the associated initial ramdisk:
## sudo cp squashfs-root/{vmlinuz,boot/initrd*.img} .
# And then clean up:
sudo rm -r squashfs-root
# Finally, generate the new ISO image:
cd ~/iso/remix
## ?? sudo JN
sudo genisoimage -l -r -J -V "BUNSENLABS_HYDROGEN" -b isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table -c isolinux/boot.cat -o ../remix.img ./# The resulting image can be burned directly to a CD or DVD
# but it needs to be "treated" before flashing to a USB stick:
# ??sudo
sudo isohybrid ~/iso/remix.img
# With the usual method for the transfer:
## sudo cp ~/iso/remix.img /dev/sdX
Note that I fixed some minor typos and missing "sudo" elements.
So this should give back a bootable thumb drive. As a test, I formatted a 2GB drive, did the
last (commented out) line above, with sdX changed to sde for my system using the ORIGINAL bl iso (not img). This boots fine on UX303L and UL30A i.e., EFI and legacy. Then I ran the script, reformatted drive, and did the copy of the remix.img. Boots legacy on UL30A, not EFI on UX303L.
I'm thinking there's some parameter missing somewhere in the genisoimage line, or else I'm missing a step.
Ideas welcome.
JN
Offline
I fixed some minor typos
Thanks! (But it was only a single typo, surely?)
missing "sudo" elements
I'm pretty sure that my steps are correct but you may have to `chmod +w isolinux/isolinux.bin` before running `genisoimage` as your normal user.
I formatted a 2GB drive, did the last (commented out) line above, with sdX changed to sde for my system using the ORIGINAL bl iso (not img). This boots fine on UX303L and UL30A i.e., EFI and legacy. Then I ran the script, reformatted drive, and did the copy of the remix.img. Boots legacy on UL30A, not EFI on UX303L
I haven't looked at UEFI support (yet) but I know that my tweaked images do not support it, I think this is because a special type of image is needed to boot in UEFI mode and the `genisoimage` command does not produce this.
All UEFI machines should have a firmware ("BIOS") option to boot in Legacy mode but some motherboard manufacturers are happy to ship broken implementations of the UEFI standard, unfortunately.
Check the official Debian Live Build Manual for instructions on how to build an image correctly from scratch:
Offline
Thanks. Will keep at it on a slow and steady pace. It's already close enough to be usable for many machines,
but will be a big step up if user doesn't have to think about EFI/Legacy.
Cheers, JN
Offline
Found this:
https://stackoverflow.com/questions/318 … e-and-uefi
I will be trying that myself at some point, I will post back then.
Offline
I'm doing all this from Arch and the -eltorito-boot option won't accept -e as a flag in their package so I've made this function using `xorriso` instead:
function burn {
xorriso -as mkisofs -iso-level 3 -full-iso9660-filenames -volid "$1" -eltorito-boot isolinux/isolinux.bin -eltorito-catalog isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -output ../"$2" ./
}
It can be called from the top of the ISO filesystem tree with the name of the image volume as the first argument and the name of the actual file to be output as the second argument, like this:
burn BUNSENLABS_HYDROGEN sharpbang-stretch.img
This seems to create a hybrid partition table on the image (as required for UEFI booting) but my (broken) UEFI laptop still won't boot it
The search continues...
Offline
Refined version of my ISO making function (with a name change and an added `isohybdrid` line):
function mkiso {
xorriso -as mkisofs \
-iso-level 3 \
-full-iso9660-filenames \
-volid "$1" \
-eltorito-boot isolinux/isolinux.bin \
-eltorito-catalog isolinux/boot.cat \
-no-emul-boot -boot-load-size 4 -boot-info-table \
-eltorito-alt-boot \
-e boot/grub/efi.img \
-no-emul-boot -isohybrid-gpt-basdat \
-output ../"$2" ./
isohybrid ../"$2"
}
As before, run the function from the top of the ISO tree and pass the label to be applied as the first argument and the image name as the second argument, for example:
mkiso BUNSENLABS_HYDROGEN custom.img
The resulting images still will not boot on my UEFI machine though (unless Legacy mode is enabled), perhaps you will have more luck.
Offline