Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Gentoo LiveUSB using Grub4Dos

    Hello all,
    I'm feeling like I'm missing something pretty stupid here, but let's see what you think.
    I am using YUMI from Pen Drive Linux to make my USB flash drive hold multiple Linux LiveCDs to cut down on the number of CDs I burn. I have multiple OS's on there just fine, but Gentoo and Sabayon are giving me problems.
    YUMI does not natively support Gentoo, so I need to make a custom boot entry with the pre-installed Grub4Dos utility. I have dumped all of the files from the Gentoo Minimal install ISO into the directory "/multiboot/gentoo". Here is the entry I have for it:

    title Gentoo Minimal x86 2011-03-22
    find --set-root /multiboot/gentoo/isolinux/gentoo.igz
    kernel /multiboot/gentoo/isolinux/gentoo root=/dev/ram0 init=/multiboot/gentoo/linuxrc  dokeymap looptype=squashfs loop=/multiboot/gentoo/image.squashfs  cdroot vga=791 slowusb
    initrd /multiboot/gentoo/isolinux/gentoo.igz
    I have Sabayon's entry set up similarly, but both fail to boot. When it tries to mount the root device (where the 'CD' is), it fails. It asks me for the appropriate block device, and I tell it which one it should be, but it says it's not correct.

    What am I doing wrong? I've Googled it, but I can't seem to find an answer.
    Any help would be deeply appreciated.


  2. #2
    Linux Guru
    Join Date
    Oct 2007
    Tucson AZ
    I've never used Grub4dos so am not familiar with it. Your entry is a Grub2 type entry and generally you need a partition pointed to in the --set-root section. Also, Grub2 doesn't use a title line, it uses menuentry so that won't work. Here's a sample entry for Ubuntu with Grub2 to boot an iso image on DVD:

    menuentry "Ubuntu Live 10.10 32bit" {
        loopback loop /ubuntu-10.10-desktop-i386.iso
        linux (loop)/casper/vmlinuz boot=casper  iso-scan/filename=/ubuntu-10.10-desktop-i386.iso quiet splash --
        initrd (loop)/casper/initrd.lz
    Note the differences from your entry. Also, the Ubuntu referenced above is not extracted but the iso file is simply copied as such to the DVD or USB. I've tried this and it works well with Ubuntu and its derivatives but not with other distributions, at least the few I've tried.

    Is your Grub4dos based on Grub2? Part of the problem is that you are combining a Grub Legacy entry with Grub2. You need to know which to use and whether your Grub4dos is based on Legacy or Grub2. Grub Legacy can and does boot Live CDs and all your need is the stage2_eltorito file and a correct menu.lst in the /boot/grub directory and your appropriate files in the appropriate place.

  3. #3
    I believe it is based on Legacy Grub. The "--set-root" option seems valid, though, as that's how YUMI adds other ISOs. I have a working entry for the Ubuntu Natty Alpha, it looks like this:
    title Ubuntu 11.04 Natty ALPHA
    find --set-root /multiboot/ubunattyalpha/initrd.lz
    kernel /multiboot/ubunattyalpha/vmlinuz boot=casper live-media-path=/multiboot/ubunattyalpha/ ignore_uuid quiet splash
    initrd /multiboot/ubunattyalpha/initrd.lz
    Like I said, this one works just fine, and I tried to tailor the Gentoo entry to mirror the Natty entry.

  4. $spacer_open
  5. #4
    Linux Guru
    Join Date
    Oct 2007
    Tucson AZ
    On the page in the link in your first post, it indicates that YUMI uses syslinux to boot extracted distributions on the device which is what you indicate you have done. It also states it reverts to use Grub to boot multiple iso files. Not sure where Grub4dos comes in?

    The two entries you posted are Grub Legacy entries. Note the difference between your entries and the Ubuntu one I posted. You have a kernel line in each, in the Grub2, the kernel is replaced by linux and it and the initrd have the loop entry.

    I don't know but I suspect that find --set-root" is ignored. You could easily test this by commenting the find line out by placing a hash mark (#) to the left of the line and trying to reboot it.

    Your menu entries are actually Grub Legacy except for the set-root line.

    Have you checked that the kernel and initrd names are correct and are actually where you are pointing to them in your menu entry?

    You might test using "root (hd?,x) below the --set-root line. comment out the set--root line so it isn't read. Replace the ? and x above with whatever the correct drive/partition numbers are. Is this all on one partition on the USB?

  6. #5
    When I boot the USB drive, it offers me a SysLinux menu, where I choose to load the Grub4DOS that YUMI installed.
    After it loads, the top of the screen says:
    GRUB4DOS 0.4.4 2009-06-20 ...
    I commented out the "find" line and replaced it with (hd0,0) (which is appropriate; I explicitly boot from the flash drive, so BIOS labels it as the first drive), and the same thing happens: Gentoo loads modules and attempts to mount a root filesystem. It can't, and gives me this error:
    !! Media not found
    !! Could not find CD to boot, something else needed!
    !! Could not find the root block device in .
    It gives me the option to go to a BusyBox shell, or to put in a valid root device.
    I put in /dev/sdi1, the flash drive in question, and it says:
    The filesystem mounted at /dev/sdi1 does not appear to be a valid /. Try again
    I am able to boot the actual bootloader entry, Gentoo just cannot identify a root device.
    Could it have something to do with the filesystem type? Maybe it's looking for a CD filesystem, and not FAT32?

  7. #6
    Linux Guru
    Join Date
    Oct 2007
    Tucson AZ
    I guess Grub4dos is based on Grub Legacy although I couldn't find anything definitive.

    I commented out the "find" line and replaced it with (hd0,0) (which is appropriate
    On what? Gentoo? The test I meant was to do it with your Ubuntu version since it boots to see if it still boots but, I don't think there is any point in doing that.

    If you extracted the files and are trying to run these systems as Live CDs from your USB, you would need a different entry. Here is an entry I use for Sabayon that boots as a Live/Install from a DVD:

    title Start Sabayon 5.4 XFCE
      kernel /boot/sabayon root=/dev/ram0 aufs init=/linuxrc cdroot looptype=squashfs max_loop=64 loop=/livecd.squashfs splash=silent,theme:sabayon vga=791 console=tty1 quiet -- 
      initrd /boot/sabayon.igz
    If you have Sabayon as a Live CD, the above should work. It is for Sabayon 5.4 so, if you are using 5.5 you would have to look at the isolinux.cfg file of Sabayon to see if there are any changes.

    Do you have only one partition on the USB?
    Is this a Desktop?
    You are booting the machine from this USB? Are you also booting the main hard drive from the USB or are these problems only encountered when you set your USB to boot first and try to boot from it?

    If all the distros are extracted to run as Live CDs and are on one partition, you should not need any root (hd0,0) entry in menu.lst. Probably doesn't matter, don't really know.

    You might boot whichever distro works on your USB and run the geometry commands from grub and compare then to your fdisk output. To do this, just open a terminal, log in as root and type grub (or sudo grub): you should get a grub prompt (grub>) and here you can type: geometry (hd0), hit enter for output then do: geometry (hd1) and so on for however many drives are attached. This should give you output similar to fdisk. Grub doesn't always see the drives the same so you need to compare this output. This works on Grub, don't know if it works on Grub4dos?

    The filesystem mounted at /dev/sdi1 does not appear to be a valid /. Try again
    Don't know what that's about? I assume that /dev/sdi1 is a typo? sda1?

  8. #7
    Could not find CD to boot
    Somewhere in Gentoos boot config or that boots Gentoos live is probably a entry that says media=cdrom. If you can find it. Change that entry to media=usbflash. I ran into a problem similar to this using Unetbootin for a Puppy Linux derivative. At grub prompt for puppy it was

    puppy pmedia=usbflash
    to get it to boot. Not sure about Gentoo boot cheat codes though.


    Maybe there?
    I refuse to let fear and fear of others rule my life. It puts my humanity at risk.
    Accepting Death is the only way to stay alive.

  9. #8
    I seem to have found a workaround:
    I put "real_root=/dev/sdi1" on the kernel line and finally was able to get the root device found.
    For some reason, though, it does not get mounted in /newroot/mnt/cdrom, which causes the next step, finding and mounting the image.squashfs file, to fail.
    It drops me to a terminal, so I can mount the device manually and continue booting.

    So, it mostly works, but if anyone can tell me why /dev/sdi1 isn't mounting in /newroot/mnt/cdrom, it'd be much appreciated!

  10. #9
    Linux Guru
    Join Date
    Oct 2007
    Tucson AZ
    Now I'm not sure what you are trying to do?
    Is sdi1 something used in Grub4dos? certainly not in Grub, or is that a typo?

    Might be a good idea to explain where "/newroot/mnt/cdrom" comes in as this is your first mention of it. You said initially you had extracted the files of the distributions to run as a LiveCD and put them on the USB under a /multiboot directory to boot each distribution from the USB. Have you changed this?

  11. #10
    Is sdi1 something used in Grub4dos?
    /dev/sdi1 is the device node for the flash drive according to Gentoo (and other Linux installations on my computer). It is where all of the Gentoo .iso files are stored, hence, it is the real root.

    Might be a good idea to explain where "/newroot/mnt/cdrom" comes in as this is your first mention of it.
    The /newroot folder is made by Gentoo during the boot process. It appears that the device with the live media should be mounted in /newroot/mnt/cdrom, but it is not, so it fails to find the squashfs file on the flash drive. After I mount my flash drive on /newroot/mnt/cdrom, I can boot successfully into Gentoo using the flash drive.

    How can I ensure the live media device is mounted to /newroot/mnt/cdrom without having to manually do it?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts