I am expanding my rescue usb flash disk. The USB's partition is bootable, and I have installed GRUB to the MBR of the jump drive. It works pretty well - I can boot Freedos and run some utilities,and I can boot PING.
I would like to add the Ubuntu 9.10 LiveCD to this rescue usb drive. I have a working jumpdrive, so I can pretty easily copy over the files. I could hunt down the needed menu.lst
entries needed for GRUB, but the Ubuntu LiveUSB uses a fairly complicated syslinux configuration. Besides, I would like to keep as much of the current LiveCD/LiveUSB look-n-feel without porting the syslinux config over to GRUB.
At the suggestion of ~quack I tried a menu.lst
entry of:
title Ubuntu 9.10 LiveCD
root=(hd0,0)
kernel /ubuntu-9.10/syslinux/isolinux.bin
but GRUB responded with an Error 13: Invalid or unsupported executable format
. At the GRUB commandline I then tried:
grub> root=(hd0,0)
grub> kernel /syslinux/isolinux.bin
because I have a second isolinux.bin
file in that location, but GRUB responded with the same error. I also tried:
grub> chainloader /syslinux/isolinux.bin
and once again received the Error 13. Finally, I tried at the GRUB command line:
grub> root=(hd0,0)
grub> kernel /ubuntu-9.10/install/mt86plus
grub> boot
and that worked
What I would really like is a way to have GRUB call syslinux/isolinux bootloader. Then syslinux could load its own menu and whatnot.
Anyone know how to do this?
Update: Based on your entry, I found the article "Grub chainloads syslinux and back", which basically says "patch grub":
The patch page mentions a similar patch was posted to grub-devel for Grub v2; this post may be that patch. Or this message, which points to this bug report (dated Nov.2009, so it's very recent) for a Grub v2 patch.
To use one of the patches, you'd need to download the Grub source code for your preferred Grub version, check that it doesn't include the patch already, try applying the patch, and recompile and reinstall your new Grub.
Original answer:
I'd try testing a simple Grub entry first. This is a standard Grub entry for the Memtest86+ utility on a Debian system:
Just try tweaking those with your values (change the root partition or kernel path as necessary):
I don't think you'd need the
chainloader+
command for this task.title UBUNTU 9.1 ISO Boot
find --set-root /ubuntu9.1.iso
map /ubuntu9.1.iso (hd32)
map --hook
root (hd32)
chainloader (hd32)
add this to ur menu.lst, and copy ubuntu9.1.iso to the drive on which menu.lst exists.
You can definitely chainload syslinux easily from grub2. The easiest and most general way would be:
Hit 'c' at the grub menu to get a command line.
where 'hd1,msdos1' is a common-enough value booting off USB, but you can search most filesystems with
ls
, e.g.,ls (hd1,msdos1)
will tell you about the part, thenls (hd1,msdos1)/
will show you files. If it's a filesystem that grubnormal
doesn't recognize, then you may have to install an fs module withinsmod
. You can use grub'ssearch
command to find it.search --no-floppy --set=root
However, you likely don't need to chainload syslinux (or anything else). grub is flexible. For example, on my alpine USB stick, I often just do this:
Which goes right into a menu. Of course, that's with a grub cfg on it. You can also manually setup the boot from grub w/o syslinux or grub on the disk.
For me, I can even do something like this on my Xen'd up Alpine USB stick
But, that's basically what's in the
/boot/grub.cfg
that seems to come with Alpine now. The point is that it could point do different and varying OS, initramfs and kernels. I think you can also directly load the syslinux binary withchainloader $path_to_bin
and my grub actually has asyslinux_configfile
andsyslinux_source
commands, so this seems to work, too:Hope one of those works for you. Learning my way around grub has been a life-saver so many times. I have saved a linux install with a corrupt config or a moved/changed HDD on a remote machine in Amsterdam from the US by hitting grub-rescue> over serial and loading modules off the existing HDD and booting into the old partition/OS in order to fix/reconfigure it.
Using YUMI on a windows system seems to be about the easiest way to do this.
http://www.pendrivelinux.com/yumi-multiboot-usb-creator