jayseye wrote:Thanks Shador, looking forward to your results from testing Live Xfce 13.37 RC1 with SuperGrub2Disk.
Shador wrote:Actually I implemented and tested that file by that "standard definition". But possibly since then something changed in the other grub config files. I'll recheck.
Nothing I can do about that. The loopback.cfg method has one small flaw. It uses the bootloader binaries of the SuperGrub2Disk or what other binaries where used in the first place and just loads the config files of the LiveCD. If those config files where written for a newer version of grub2 in our case 1.99 vs 1.98 on the SuperGrub2Disk, it may fail.
Therefor we can only guarantee that this way of booting the LiveCD works with the grub2 build included in the same version of Salix and it does. It's likely that it works with most 1.99 builds out there though. This is true for anything related to the LiveCD which relies on grub2 binaries installed on the local system (MBR, grub-install, ...). Other examples include update-grub2.sh included on the LiveCD (BTW I opt for a different name here, it's easily confused with the update-grub script in the grub2 package) or directly loading one of the other grub .cfg files with appropriate environment variables set.
So although it doesn't work for SG2D 1.98s, it's likely to work for a 1.99 release of SG2D, if there will ever be one.
Using an older version of grub2 is also no options as new features have been introduced, which we rely on for the LiveCD Boot Menu, and important bugs/problems have been fixed. (e.g. a workaround for a BIOS of mine which prevented earlier versions from booting. SG2D is still affected by that issue.) In any case you can still say you don't need the menu and just want the LiveCD, which the second approach down there is an example for
1. You could start using Salix' Grub2 and add the following to /etc/grub.d/40_custom:
Code: Select all
menuentry "Salix Live" {
iso_path=/salixlive-xfce-13.37-32-rc1.iso
export iso_path
search --set --file $iso_path
loopback loop $iso_path
root=(loop)
configfile /boot/grub/loopback.cfg
}
Adapt the path if necessary.
2. You could write a menuentry for any grub version that supports loopback, which loopback mounts the LiveCD and boots the kernel with the linux and initrd command. Look at boot/grub/boot.cfg on the LiveCD for appropriate kernel parameters.
3. You could explode the LiveCD to a partition root. Then run install-on-USB.sh (ATTENTION! This overwrites your existing MBR/bootloader!) or load the boot/grub2-linux.img from that partition like a linux kernel (no initrd and no parameters) with any bootloader (Important! Use the linux16 command with grub2).
EDIT:
Ok, here's a 4th method:
4. Do the following on a Salix 13.37 system with grub2 1.99 installed. Another distributions grub2 1.99 might work too, but I can't guarantee it. Create a file embed_loop.cfg with the following content:
Code: Select all
echo "Searching the device to boot from..."
set iso_path=/boot-isos/salixlive-xfce-13.37-32-rc1.iso
search --no-floppy --file --set=root $iso_path
loopback loop $iso_path
set root=loop
set prefix=($root)/boot/grub/i386-pc
echo "Using as root device: (${root})"
echo "Now loading the boot menu. This can take a while..."
Change iso_path if you intend to put it into a different directory or change the name of the iso.
Now in the directory where you saved embed_loop.cfg run this:
Code: Select all
grub-mkimage -p /boot/grub/i386-pc -o grub2-core.img -O i386-pc -C none -c embed_loop.cfg biosdisk ext2 fat iso9660 ntfs reiserfs xfs part_msdos part_gpt search echo loopback
cat /usr/lib/grub/i386-pc/lnxboot.img grub2-core.img > grub2-linux-loop.img # use lib64 for 64bit systems
Now you can load the grub2-linux-loop.img from any location with any bootloader like a linux kernel.
For grub2 e.g.:
Code: Select all
linux16 /grub2-linux-loop.img
boot
Alternatively if you stored the iso at "/boot-isos/salixlive-xfce-13.37-32-rc1.iso", you can use this prebuilt file:
http://gaia.homelinux.org/misc/grub2-linux-loop.img