1

Topic: Run from HD

Hi

I'm trying to run Gparted from a HD. The reason is simple, the laptop (p150 with 80mb ram) in question will only boot from HD & I need to modify linux partitions in order to install Debian from the network.

My knowledge of linux is only moderate.
I am trying to start Gparted from grub installed in fat32 partition. (the fat32 pattition IS VALUABLE because of the limited boot options)
I have copied the CD contents to a 50mb linux partition on the laptop & set grub up this way

title Gparted
root (hd0,2)                    #this is correct so don't question this line
kernel /isolinux/linux root=/dev/ram0 initrd=initrd.gz ramdisk_size=16384 init=/linuxrc
boot

This all seems to work OK upto a point. The last few lines on the screen read

RAMDISK: Compressed image found at block 0
VFS: Mounted root (ext2 filesystem) readonly.
Freeing unused kernel memory: 200k freed
Input: PS/2 Generic Mouse as /class/input/input1
NoGParted LiveCD found!!
Kernel Panic - not syncing: Attempt to kill init!

Any suggestions?
-Steve

2

Re: Run from HD

Yes this is issue is know : the script search for the cd IN the cdrom drive ! And it cant find it since there is no cd !
Here i dont know, but may be you could try to put the gparted livecd IN your drive, and maybe it could work like this. Well i know this is weird ....

Larry
GParted-project Admin
Former GParted-LiveCD maintainer (2007)

3

Re: Run from HD

Sorry Larry, I neglected to mention the laptop has no CD drive at all. So I just have the hard disk & a floppy that doesn't work.

-Steve

4

Re: Run from HD

All righty then Steve. I worked on this for about 4 hours tonight...

In gparted-livecd-0.3-1-pre3 there is going to be a new entry in the boot menu called "pick boot device". When you select that just enter the device were you put the contents of the iso. It must be in the / of the partition though.

steps:

1) copy the CONTENTS of the iso image to the / of a partiton. (or the liveusb when I get it done because that is just a zip file. Much easier.)
2) set-up grub/lilo to boot the proper initrd.gz.
3) select the proper device with the boot menu.
4) boot!

I'll have it posted on the 23rd. (tomorrow for me)

5

Re: Run from HD

Thanks Patrick for your efforts.
Just a quick question. The way I'm doing things I don't see the boot prompt, so what I'm doing is attempting to boot linux directly. Remember I'm not that good at Linux.
If I was to put this in my grub menu.lst would I get the boot prompt?

Title GParted
root (hd0,3)
initrd /isolinux/initrd.gz
boot

-Steve

6

Re: Run from HD

Maybe...

7

Re: Run from HD

root=/dev/ram0
init=/linuxrc
initrd=/isolinux/initrd.gz

You need these elements for grub or lilo to work. I don't use grub so I don't know exactly. It would be nice if you or Larry could figure it out.

8

Re: Run from HD

root=/dev/ram0 & init=linuxrc have to be on the kernel line as I shown in the first post (as far as grub is concerned) since at boot time the ram drive doesn't exist. I assume initrd.gz creates the structure for it.

My last suggestion didn't work either.

-Steve

9

Re: Run from HD

where are the files located?
are you using the new iso?

10

Re: Run from HD

This works on my system:

mkdir iso
mount -o loop gparted-livecd-0.3-1-pre3.iso iso
mkdir /mnt/windows
mount /dev/hda1 /mnt/windows
cp -a iso/* /mnt/windows

Add this to menu.lst:

title Gparted
root (hd0,0)
kernel /isolinux/linux root=/dev/ram0 initrd=initrd.gz init=/linuxrc ramdisk_size=65000 #make sure this is rapped with the line above.
initrd /isolinux/initrd.gz #this is on a new line.

or lilo.conf:

image= /mnt/windows/isolinux/linux
label = GParted
initrd = /mnt/windows/isolinux/initrd.gz
append = "init=/linuxrc"
root = /dev/ram0
ramdisk=65000

Be sure to run /sbin/lilo!

Reboot and then pick GParted from the grub/lilo boot menu. When the gparted boot menu starts pick "pick boot device" and enter hda1 in the inputbox. Then it goes back to the gparted boot menu again.  Pick "done" and the system boots.

It works and it's really easy to do...

*Use the bigger ram disk because in gparted-livecd-0.3-1-pre4 you can run from ram and the hdd at the same time. That means you can resize or clobber the partition you just booted from. smile

11

Re: Run from HD

Hi Patrick
I've been using an old version of the LiveCD.
I now have V0.2.5-5 & have followed your instructions & there is no "pick boot device" on the "Extra Boot Options" menu.
I tried to obtain the 0.3.pre version (found a link in another thread) but the download keeps crashing.
Is there another download location (other than sourceforge) that I can use?

-Steve
ps V0.2.5-5 crashes out after complaining it cannot find the LiveCD

12

Re: Run from HD

"In gparted-livecd-0.3-1-pre3 there is going to be a new entry in the boot menu called "pick boot device"."

Look a few posts up...:)

See if pre4 will download.

13

Re: Run from HD

I just downloaded it and didn't have any problems...

14

Re: Run from HD

Hey Partrick,

Thanks for all the help with this so far. I'm still having some issues with the usb flash drive. When I go to select the boot device, I have to enter sdb and then go back in and enter sdb1. Then is starts to load. I select the language and keyboard layout. It returns the following error:

SQUASHFS error: zlib_fs returned unexpected result 0xffffffd
SQUASHFS error: Unable to read page, block 409ee2, size 59ae

Is there something else I need to do that I'm missing?

15

Re: Run from HD

Did you try it more than one time? It could have been a fluke. It could be a squashfs bug. Did it download properly? People have been having trouble downloading this file. If the iso is less than 28.4 mb that is the problem.

16

Re: Run from HD

I just tried it on my usb stick and it worked fine.

17

Re: Run from HD

I will have to check the size of the iso when I get back to work. I did try booting it more than one time. Do you have an MD5 for the file?

18

Re: Run from HD

Hi again Patrick
I fixed my problem with not finding the Live CD by getting my nephew to hack the scripts in V0.2.5-5. Now it loads up properly & I don't need to change anything.

Thanks again for all the help
-Steve

19

Re: Run from HD

I just checked my download and it is 28.4 mb. I put all of the files off of the iso in the root of the usb key. You don't think that would be part of the issue do you?

20

Re: Run from HD

What do you have in your menu.lst?

It should be this:

title GParted
root (hd1,0)
kernel /isolinux/linux root=/dev/ram0 initrd=initrd.gz init=/linuxrc ramdisk_size=65000
initrd /isolinux/initrd.gz

21

Re: Run from HD

title Gnome Partition Editor
root (hd0,0)
kernel /isolinux/linux root=/dev/ram0 initrd=initrd.gz init=/linuxrc ramdisk_size=65000
initrd /isolinux/initrd.gz

That is what is in my menu.lst file. It boots just fine. I can drop out to a shell and am not able to mount sda1. sdb is not even in /dev/ so I'm not sure if that is the issue. I have checked the partition table on the usb key and it is fine. I can mount it in another machine.

22

Re: Run from HD

Boot back into it and select "pick boot device" and type sda1. Don't do the sda thing you think you have to do. Why were you doing that anyway?

Then drop into the shell and type:

ls /tmp

Whats in there?

23

Re: Run from HD

When I type sda1 it says no partition found. But when I drop back out to the shell and ls /tmp I get a list of all the files on my usb key.

24

Re: Run from HD

"VFS: no partitions found" is what it said. It is supposed to say that because /dev/sda1 doesn't have any partitions. It is a single partition. Never mind, I'm going to work on hiding that right now. I'm really glad you brought this up because it could mislead people. Thanks!

sda1 is getting mounted. Good.

Did you ever try to boot just entering sda1? Don't enter sda.

25

Re: Run from HD

Yeah I did. It starts to boot Creates the ram disk stuff. I select the Language and Keymap then I get the  error:

SQUASHFS error: zlib_fs returned unexpected result 0xffffffd
SQUASHFS error: Unable to read page, block 409ee2, size 59ae

I'm gonna download the iso again and put the files on the key again see if its something stupid.