1 (edited by antiaircraft 2009-11-22 14:06:59)

Topic: [SOLVED] Can't boot GParted from hard disk partition

Hi there,

I've recently run into a bit of trouble tweaking the partitions on my laptop's hard drive. In a nutshell:
- Faulty CD drive = can't use LiveCD
- System is really old = no USB boot support
- I'm a total sysadmin n00b = not sure about setting up a PXE server

So I've been trying to follow the steps in the "GParted Live on harddisk" guide to get GParted to boot from a small ext3 partition. The guide works - to a point. When I actually try to boot GParted Live, it runs through some initial stuff for about five seconds and then hangs (apparently right after running /scripts/live-premount). Eventually, it displays a boot failure message and tells me that it was "Unable to find a medium containing a live file system" (or something along those lines).

I've tried Googling around and searching this forum to no avail, so I'd really appreciate any insights on what the problem is and how to fix it.

My menu.lst entry for GParted is as follows:

title GParted Live
    root (hd0,0)
    kernel /live/vmlinuz1 toram=filesystem.squashfs boot=live union=aufs noswap noprompt vga=788 ip=frommedia
    initrd /live/initrd1.img

I'd post the full log file generated by a boot with the 'debug' option, but I can't figure out how to copy live.log onto a usable medium electronically, and I'm inclined to think that copying so many screens of text by hand would be... inefficient. tongue

Anyway, thanks in advance!

2

Re: [SOLVED] Can't boot GParted from hard disk partition

Hello antiaircraft,

antiaircraft wrote:

Eventually, it displays a boot failure message and tells me that it was "Unable to find a medium containing a live file system" (or something along those lines).

You are very close to success.The above message means, that "filesystem.squashfs" is not at the expected location : folder "live", where "vmlinuz" and "initrd1.img" also reside. Or you renamed folder "live" (which your "menu.lst" seems to exclude). Further note, that Linux is case-sensitive. File "Filesystem.squashfs" would NOT be used !

Regards
cmdr

3

Re: [SOLVED] Can't boot GParted from hard disk partition

That's odd, because the file seems to be at /live/filesystem.squashfs like it should be. Should I be specifying this at some point in the menu.lst entry?

4

Re: [SOLVED] Can't boot GParted from hard disk partition

antiaircraft wrote:

Should I be specifying this at some point in the menu.lst entry?

You may do it with "live-media-path=live", but this is the default value. "Grub" tolerates path "Live" /"live"/"LIVE", script "init" (within "initrd1.img") does NOT. Given this case, you had to use parameter "live-media-path".

Regards
cmdr

5 (edited by antiaircraft 2009-11-18 15:37:20)

Re: [SOLVED] Can't boot GParted from hard disk partition

Well unfortunately booting with the menu entry

title GParted Live
    root (hd0,0)
    kernel /live/vmlinuz1 toram=filesystem.squashfs boot=live union=aufs noswap noprompt vga=788 ip=frommedia live-media-path=live
    initrd /live/initrd1.img

doesn't seem to have worked. It still fails with the same error. So what am I doing wrong? tongue

6 (edited by cmdr 2009-11-18 17:39:51)

Re: [SOLVED] Can't boot GParted from hard disk partition

Are you sure, that your ext3 partition is first primary partition (hd0,0) ?.  You don't work from a filesystem image or a virtual machine, do you ? Could you start a "Grub" commandline to check, whether you actually "see" filesystem.squashfs ( ls /live/ )?

There is also a parameter "live-media", where you can define another drive for filesystem.squashfs :
live-media=/dev/sda2

Or replace "root (hd0,0)" by "find --set-root /live/filesystem.squashfs" within "menu.lst".

Regards
cmdr

7

Re: [SOLVED] Can't boot GParted from hard disk partition

cmdr wrote:

Are you sure, that your ext3 partition is first primary partition (hd0,0) ?.  You don't work from a filesystem image or a virtual machine, do you ? Could you start a "Grub" commandline to check, whether you actually "see" filesystem.squashfs ( ls /live/ )?

Well the partition in question is /dev/sda1, so I'm pretty sure (hd0,0) is the right notation. And nope, no virtual machine or anything of the sort here.

The ls command doesn't seem to be available in the GRUB command line (I'm running GRUB 0.97). I did run it from within the BusyBox shell that I was dropped to after the boot failed however, and it seems that in there the /live directory contains one (empty) directory called 'image'.

cmdr wrote:

Or replace "root (hd0,0)" by "find --set-root /live/filesystem.squashfs" within "menu.lst".

Oddly, running this at boot time seems to hang GRUB. hmm I did manage to run 'find /live/filesystem.squashfs' from within a GRUB shell in my normal OS (by invoking 'grub' in a root terminal), and it returns (hd0,0).

8

Re: [SOLVED] Can't boot GParted from hard disk partition

Okay, I noticed that the GParted on HDD guide had been updated recently, so I tried again with the new procedure - and it worked! big_smile With one exception that is...

In the menu entry for GRUB 1, 'bootfrom=/dev/hda' didn't work (for me at least, it resulted in the same hang and error as before). I had to change it to reference the partition which I was trying to boot GParted from: /dev/hda1 in this case. So my working menu.lst entry for GParted now looks like:

title GParted Live
    root (hd0,0)
    kernel /live-hd/vmlinuz1 boot=live union=aufs noswap noprompt vga=788 ip=frommedia live-media-path=/live-hd bootfrom=/dev/hda1 toram=filesystem.squashfs
    initrd /live-hd/initrd1.img

Anyway, this issue is now solved. smile

9

Re: [SOLVED] Can't boot GParted from hard disk partition

Thanks! Yes, it's better to specify the precise partition, i.e. "bootfrom=/dev/hda1". The doc has been updated.

Steven.

10

Re: [SOLVED] Can't boot GParted from hard disk partition

That's good to know. Kudos for explaining a neat way to use GParted! wink