Find the answer to your Linux question:
Results 1 to 6 of 6
These are the facts: 1.- I have Grub legacy correctly installed, and working, to the MBR of my HDD. 2.- From that Grub in my HDD, I can boot Linux ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2009
    Posts
    15

    Is it possible to boot a partitionless drive off Grub legacy?


    These are the facts:

    1.- I have Grub legacy correctly installed, and working, to the MBR of my HDD.

    2.- From that Grub in my HDD, I can boot Linux installed to a pendrive that has a single partition (and filesystem) in it. The corresponding Grub entry is:

    title BlahBlah
    root (hd1,0)
    kernel /boot/kernel root=/dev/sda1
    initrd /boot/initrd


    3.- Now, from that same Grub in my HDD, I want to boot Linux installed to a partitionless pendrive (the filesystem takes the whole drive). To that purpose, I've modified the corresponding Grub entry like this:

    title BlahBlah
    root (hd1)
    kernel /boot/kernel root=/dev/sda
    initrd /boot/initrd


    But it doesn't work. I get the following Grub errors when booting:

    root (hd1)
    Filesystem type unknown, using whole disk

    and then:

    Error 17 : Cannot mount selected partition


    However: I can boot Linux off this partitionless pendrive without any problem by installing Lilo to it (in /dev/sda). ??

    So, my question is:
    Is it possible to boot a partitionless drive off Grub legacy, or on the contrary does Grub legacy need the filesystems to be installed in a partition?

    Please don't reply by suggesting me to use Grub2. It's not the point of this thread. I just would like to know if I can do it with Grub Legacy. Thank you!

  2. #2
    Administrator MikeTbob's Avatar
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    7,864
    My guess would be that you would need a partition..
    I do not respond to private messages asking for Linux help, Please keep it on the forums only.
    All new users please read this.** Forum FAQS. ** Adopt an unanswered post.

    I'd rather be lost at the lake than found at home.

  3. #3
    Just Joined!
    Join Date
    Jul 2009
    Posts
    15
    Yup, that's what it looks like, for all what I'm reading so far. But still, it strikes me that Grub (even the Legacy version) is less capable than the good old Lilo (at least in that respect).

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,190
    I've never tried this so I don't know if it is possible but, the questions I have would be relating to your errors. What filesystem type do you have on the pendrive?

    Interesting that your menu boots with (hd1,0) with root pointing to sda1. The logical would be sdb1 but that varies with circumstances.

    The other thing is, you seem to be saying that you are trying to boot the pendrive with Grub Legacy on the hard drive and it fails with no partition but you can boot with Lilo installed to sda (is that the pen drive) or am I misreading this?

  6. #5
    Just Joined!
    Join Date
    Jul 2009
    Posts
    15
    Well, I'll try to explain myself a bit better. I'm aware that my setup is kind of confusing.

    But first I'll reply your first question: in the partitonless pendrive, I've formatted an ext4 filesystem. Actually, all my filesystems are ext4.

    As to booting a pendrive from Grub in the HDD: it took me a lot of time and try-error to figure out how it works. Finally I found out that, as to the BIOS the pendrive is the "second" drive in thsystem, I have to pass (hd1,0) to Grub because that is how it sees and recognizes the pendrive. However, once the OS starts loading, it sees the pendrive as the "first" drive, and therefore I have to pass to the kernel the boot option "sda1" insteaad of "sdb1". Tricky, huh?


    Now to my issue: with the above setup (remember: Grub legacy installed in the HDD), I can boot the Linux I have in the partitioned pendrive, but I can't boot Linux in a partitionless pendrive (it fails with the aforementioned errors). HOWEVER: I can always boot either of the pendrives installing Lilo to their MBR. So, you got it totally right despite my weak explanation.

    Any suggestion?
    Last edited by zogoibi; 07-12-2011 at 05:18 PM.

  7. #6
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,190
    I've read in numerous places that Grub Legacy doesn't recognize ext4 partitions yet Opensuse, PCLinuxOS and other systems use both ext4 filesystems and Grub Legacy to boot. I suppose the developers must modify the system somehow to enable this. I boot from Grub Legacy to secondary operating systems but find I need to use either chainloader or configfile entries for it to work.
    If I don't use that type of entry, the error messages are the ones you posted.

    I can always boot either of the pendrives installing Lilo to their MBR
    You install Lilo to the mbr of the pendrive? Does this mean you boot first Grub from the hard drive then to the pendrive with Lilo? What happens when you install Grub to the mbr of the pendrive? Also, what happens when you use the chainload or configfile method from Grub Legacy on the hard drive to point to the pendrive?

Posting Permissions

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