1

Topic: calling gparted from grub2

Hello,

gparted is already shipped with syslinux hence no problem to make a bootable usb with gparted. But I like call gparted from grub2 which is already installed in my multi-boot usb stick. grub2 has a nice feature to boot iso image if kernel and initrd is supplied.  Anyways First thing first. I like to call the gparted extracted from the iso image

menuentry "gparted"
{
set root (hd0,2)
linux /live/vmlinuz1 union=aufs boot=live noswap noprompt vga=791 toram ip=frommedia nolocales 
initrd /live/initrd1.img
}

the partition is reiserfs.  gparted is booting and checking the H/W..... but when It sense the partition is reiserfs; it continuously reports trying to match r5 hash and goes in a loop. What might be the problem here ?
Please suggest.
Thanks

2

Re: calling gparted from grub2

Hello jb1,

What might be the problem here ?

I'm not quite sure (have no experiences with your special environment), but it might be the way "GParted" is looking for "filesystem.squashfs".  I experimented with a modified "initrd1.img" to get the ISO image directly started by "Grub4DOS" (no unpacking, but mounting temporarily) and know,  that there are some pitfalls, concerning the way "GParted" finds "filesystem.squashfs". I solved one problem and found another, so it doesn't work yet.-

If I remember correctly, there is a test anywhere within the script code for a md5 hash, but I couldn't find the file with the hash within "initrd1.img".

Parameter "toram" transfers the total CDROM content or  - in your case - the total content of your stick partition to RAM. Try "toram=filesystem.squashfs" instead, which needs less RAM space. But  - to be honest - I don't think, it will solve your problem.

A solution might be to create additionally an appropriate FAT partition for "GParted" on your stick. This works flawlessly. I always use "GParted" this way.

Regards
cmdr

3

Re: calling gparted from grub2

Hello cmdr,

Thanks for your attention. Well I am bulding a usb-stick with some good toolkit and gparted is in my list. To load different toolkit I prefer grub. You know grub2 has a great feature to call iso image directly. So I first tried to do

menuentry "gparted"
{
loopback loop (hd0,2)/gparted-live-0.4.5-2.iso
linux (loop)/live/vmlinuz1 union=aufs boot=live noswap noprompt vga=791 toram ip=frommedia nolocales isofrom=/gparted-live-0.4.5-2.iso
initrd (loop)/live/initrd1.img

But it did not work and I have no clue of its failure. So I am trying to call the kernel in conventional method without loopback device and I have sent the configuration in my previous post. If you think it should work with fat filesystem then I'll give it a try  but the doc says if you filesystem is different you need grub to call it and I just did it.

If it is to "filesystem.squashfs" then I like to know how gparted like to call it and how can I do the same with grub2. I have still not found anything specific to it in syslinux.cfg

thanks

4

Re: calling gparted from grub2

Hello jb1

You know grub2 has a great feature to call iso image directly. So I first tried to do ...
...But it did not work and I have no clue of its failure.

One of the initial scripts tests, if "initrd1.img" is run from a real device, if not, it aborts to an infinite loop. This is necessary, because "filesystem.squashfs" would not be found. If you "map" (Grub4DOS) or "loop" (Grub2) an ISO image, you only get access to the files that are immediately started by the boot manager. There is no automatic information (argument from the bootmanager) possible for "initrd1.img", where to find "filesystem.squashfs" on an ISO image. With my experimental "initrd1.img", I used the existing parameter "bootfrom" with new argument "iso=gparted-x.y-z.iso" and searched it on all block devices (root folder only). If it's found, the image gets mounted temporarily and "filesystem.squashfs" copied. The installation of the system continues, until the system wants to switch to the new filesystem. Kernel complains about a "non-empty directory" and panics.

If it is to "filesystem.squashfs" then I like to know how gparted like to call it and how can I do the same with grub2. I have still not found anything specific to it in syslinux.cfg

"GParted" wants a filesystem on a real block device. "filesystem.squashfs" is seeked in folder "/live", if you don't specify "live-media-path=mynewfolder". Calling "GParted" the "conventional way" with GRUB2 should practically work; AFAIK, there are no restrictions to any of the supported DOS and Linux filesystems.

Regards
cmdr

5

Re: calling gparted from grub2

Hello cmdr,

Thanks or your response. I had a discussion with grub2 developer regarding this very issue i.e. calling gparted through iso. They have suggested to include the lopback support in the gparted initrd image. You can find my discussion at

http://www.mail-archive.com/grub-devel@ … 11957.html
http://www.mail-archive.com/grub-devel@ … 11942.html

could you kindly have a look and share your thought ?
Thanks

6

Re: calling gparted from grub2

Hello jb1,

Vladimir 'phcoder' Serbinenko (Grub2) wrote:

It's not a question about grub but about initrd being or not being
able to loopmount. Ask gparted live guys to add this feature to their
scripts

See here !