[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#534887: live-initramfs: Loop mounting .iso for booting from multi-purpose USB stick?



Philip Hands a écrit :
Package: live-initramfs
Severity: wishlist


Hi,

I've been trying to build a versatile USB stick, with the imntent that
it be able to choose between various images at a grub prompt.
I also have a versatile USB stick with 10 live-OSes to choose from at boot-time. But I don't use the .iso loopback support, even when it is possible.

For instance it is possible to use Grub2 which has loopback support with all the many live-OSes which have .iso loopback support. But there is one layer that will never have loopback support, it is the stage1 bootloader. This result in an inconfortable situation:

-1- A direct jump from grub2 to Linux kernel bypassing all the choices offered by the genuine stage2 bootloader of the liveCD you have chosen to emulate.

-2- A huge Grub2 grub.cfg where you have to manually copy all menus entries from all live OSes

I prefer this way: all liveOSes on the same ext2 partition, each one with their own filesystems *and* bootloader. I just add a *first* bootloader which is Extlinux with a very simple menu: one line per LiveOS to choose from. Choosing a line from this menu, doesn't trigger the loading of a LiveOS but the loading of the *bootloader* of the LiveCD, which gives the user the same splash screen and menu choices as if he had really boot from the physical CD.

Having the choice of many bootloaders on the same partition is very easy: install each bootloader as usual, (extlinux uses the same config files as isolinux, just do "ln -s isolinux.cfg extlinux.conf"), but after each install copy the partition boot sector in a file. To jump from one bootloader A to bootloader B just ask bootloader A to load the partition bootsector you have saved when you installed bootloader B. It is that simple. It works very well for jumping from EXTLINUX to EXTLINUX or GRUB, but jumping from GRUB to another bootloader is not always that easy. I found that the only reliable way is asking GRUB to load the physical boot sector.

This way the user can navigate between as many booloaders he wants ( going back to the first bootloader w/o power on/off is possible by typing 'x' at the boot prompt because I saved the first bootloader boot sector as file 'x.bs' and copied it in each isolinux directory)

This is so simple that I have fully automated the process with a handfull of shell functions.

Ph.L.



Reply to: