1 (edited by gedakc 2016-05-04 22:20:59)

Topic: [SOLVED] enhancement in initrd image

Hello Gparted developers,

I am trying to call gparted iso through grub2. I have also discussed with grub2 list about this and I have come to know that the initrd image of gparted is lacking the loopback mounting which is required to be there to allow grub2 using iso. You can also have a look at

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

It would be great if the option is included in initrd image.

Thanks

2

Re: [SOLVED] enhancement in initrd image

Hello jb1,

your wish was my command, I forced my programming efforts and here it is : gparted-live-0.4.5-3test.zip, a zipped ISO file (because of space restriction at my file sharing site). Sorry for the slow download, it might take an hour. I added  md5sum hash for both ZIP and ISO.

Here are the menu items (use a folder "/gparted_iso" for the image; this is fixed within the ISO image !)

A. For "Grub4DOS"

title GParted 0.4.5-3test (Boot ISO-Image via chainloading)
 map --unhook
 rootnoverify (hd0,0)
 find --set-root /gparted_iso/gparted-live-0.4.5-3test.iso
 map --heads=0 --sectors-per-track=0 /gparted_iso/gparted-live-0.4.5-3test.iso (hd32)
 map --hook
 map (hd32) (hd0)
 map (hd0) (hd32)
 map --hook
 chainloader +1

title GPartEd 0.4.5-3test (Boot ISO Image via external Bootmanager)
 map --unhook
 rootnoverify (hd0,0)
 find --set-root /gparted_iso/gparted-live-0.4.5-3test.iso
 map --heads=0 --sectors-per-track=0 /gparted_iso/gparted-live-0.4.5-3test.iso (hd32)
 map --hook
 root (hd32)
 kernel /live/vmlinuz1 live-media=iso=/gparted_iso/*.iso keyb=us gl_kbd=us gl_lang=en_US gl_numlk=off gl_batch  boot=live union=aufs  toram=filesystem.squashfs noswap noprompt vga=791
 initrd /live/initrd1.img

B. For "Grub2"

menuentry "gparted (Boot ISO Image via Grub2) "
{
loopback loop (hd0,2)/gparted_iso/gparted-live-0.4.5-3test.iso
linux (loop)/live/vmlinuz1 live-media=iso=/gparted_iso/*.iso keyb=us gl_kbd=us gl_lang=en_US gl_numlk=off gl_batch  boot=live union=aufs  toram=filesystem.squashfs noswap noprompt vga=791
initrd (loop)/live/initrd1.img
}

This variant should meet your needs ... and might be interesting for others, too
Details will follow in a few days. I'm on holiday now.

Regards
cmdr

3

Re: [SOLVED] enhancement in initrd image

Hello cmdr,

this is a great news. You are a hero. This enhancement is really make gparted very flexible. Hope to get the 0.4.5 in stable soon.
Wish you a very nice time and obviously have a nice holiday :-)

4

Re: [SOLVED] enhancement in initrd image

Hello cmdr,

I have followed your link but there is no gparted to download. By the way, when can this gparted be released as stable ?

Thanks

5

Re: [SOLVED] enhancement in initrd image

I think the next "stable" version will be some 0.4.6-x, because GParted 0.4.6 is already released on 5 August 2009. There is already 0.4.6-1 testing in the download server.

*** It is highly recommended to backup any important files before doing resize/move operations. ***

6

Re: [SOLVED] enhancement in initrd image

Thanks, I have already downloaded and tested latest stable but the grub2 can't mount and used .iso image.  Has the feature included in this stable release ?

thanks

7

Re: [SOLVED] enhancement in initrd image

Hello jb1,
I'm sorry for the wrong link, it's obviously private for me. These links are public :

gparted-live-0.4.5-3test.iso
md5sum.txt

Note :
This is NOT an official release of  "GParted LIve"... and I'm not a developer for "GParted", but a forum member like you.  To make this clear, I used a former version. But it would surely be possible to integrate it to future releases, if the community finds it useful. I agree to use my scripting for this purpose. It's only a tiny supplement to "initrd1.img"; it does NOT concern "filesystem.squashfs", where "GParted's" core components are located.

Regards
cmdr

8

Re: [SOLVED] enhancement in initrd image

Hello cmdr,

Nice to see your coming back. I am afraid that though this time the link was correct; still the download was not successful. My internet bandwidth is 1MB ( Theoritically )  and the server where you uploaded the file was not happy with that internet connection. So the download was not completed even after some repeated try :-(

Two request
--------------

Request to cmdr > Could you please tell us how to enable the mount loopback support in the initrd image ? Then I can also port the same in the latest gparted.

Request to gparted core developers> Could you please import the addon which cmdr has achieved into the official gparted release ? It would be really nice to call gparted from its .iso with grub2.

9

Re: [SOLVED] enhancement in initrd image

jb1 wrote:

Request to cmdr > Could you please tell us how to enable the mount loopback support in the initrd image ? Then I can also port the same in the latest gparted.

Here it is (but it's not quite simple):

Download my "initrd1.img" (8.5 MB; for "GParted" 0.4.5-3) from here (md5sum : 729F439C3F752BE662079031935B5097).
Copy it to the root directory of a USB stick, and boot "GParted Live"
from another medium with the attached USB stick.
Note the stick's device name (first primary partition) after "GParted" stopped scanning. Close "GParted". Then type at the prompt of a "Terminal" window and confirm each line with [Enter].
Omit comment lines, starting with "#".

#mount your USB stick, e.g. sdb1. Replace it with YOUR actual device name
mkdir /mnt/usb
mount /dev/sdb1 /mnt/usb
cd /mnt/usb

#Create new folders and copy/rename "initrd1.img" to folder "initrd1"
mkdir -p /mnt/usb/initrd1/cpio
cp ./initrd1.img  /mnt/usb/initrd1/initrd1.gz
cd /mnt/usb/initrd1
#Unzip it
gzip -d ./initrd1.gz
#unpack cpio package
cd cpio
cpio -i --file=../initrd1
cd scripts
#open "live" with "nano" editor
nano ./live
#alternative, see below

As a (better) alternative to "nano", I prefer the built-in ASCII-Editor of
"mc"("Midnight Commander"), which is NOT activated by default. Activate it
within "mc" ([ F9 ] -> [ O ] -> [ Enter ] - [ I ] - [ Enter ]). Highlight file "live"
and press [ F4 ] to open it.

Here is "my work" :

Extract of (supplemental) code in "live" script (between "#***..." and "#---...).
Single line corrections were made to enable "mc"-editor's syntax checking,
which was corrupted by these lines before (a quotation mark issue).
BTW, the script "live" is selected by the initrd argument "boot=live".

...
copy_live_to ()
{
    copyfrom="${1}"
    copytodev="${2}"
    copyto="${copyfrom}_swap"

    if [ -z "${MODULETORAM}" ]
    then
        size=$(fs_size "" ${copyfrom} "used")
    else
        MODULETORAMFILE="${copyfrom}/${LIVE_MEDIA_PATH}/${MODULETORAM}"

        if [ -f "${MODULETORAMFILE}" ]
        then
            size=$( expr $(ls -la ${MODULETORAMFILE} | awk '{print $5}') / 1024 + 5000 )
        else
            log_warning_msg "Error: toram-module ${MODULETORAM} (${MODULETORAMFILE}) could not be read."
            return 1
        fi
    fi

    if [ "${copytodev}" = "ram" ]
    then
        # copying to ram:
        freespace=$( expr $(awk '/MemFree/{print $2}' /proc/meminfo) + $( awk '/\<Cached/{print $2}' /proc/meminfo ) )
        mount_options="-o size=${size}k"
        free_string="memory"
        fstype="tmpfs"
        dev="/dev/shm"
    else
        # it should be a writable block device
        if [ -b "${copytodev}" ]
        then
            dev="${copytodev}"
            free_string="space"
            fstype=$(get_fstype "${dev}")
            freespace=$(fs_size "${dev}")
        else
            log_warning_msg "${copytodev} is not a block device."
            return 1
        fi
    fi

    if [ "${freespace}" -lt "${size}" ]
    then
        log_warning_msg "Not enough free ${free_string} (${freespace}k free, ${size}k needed) to copy live media in ${copytodev}."
        return 1
    fi

    # begin copying (or uncompressing)
    mkdir "${copyto}"
    echo "mount -t ${fstype} ${mount_options} ${dev} ${copyto}"
    mount -t "${fstype}" ${mount_options} "${dev}" "${copyto}"

    if [ "${extension}" = "tgz" ]
    then
        cd "${copyto}"
        tar zxf "${copyfrom}/${LIVE_MEDIA_PATH}/$(basename ${FETCH})"
        rm -f "${copyfrom}/${LIVE_MEDIA_PATH}/$(basename ${FETCH})"
        mount -r -o move "${copyto}" "${rootmnt}"
        cd "${OLDPWD}"
    else
        if [ -n "${MODULETORAMFILE}" ]
        then
            cp ${MODULETORAMFILE} ${copyto} # copy only the filesystem module
        else
            cp -a ${copyfrom}/* ${copyto}   # "cp -a" from busybox also copies hidden files
        fi
        #Unmounting the source device
        umount ${copyfrom}
#******************************************************************************
        #Unmounting all helper devices for ISO image
        if [ -d /mnt/iso ]; then
            cd /
            umount -l /mnt/iso > /dev/null 2>&1
            umount -l /mnt/vol > /dev/null 2>&1
            #Important: removing helper directories
            rmdir /mnt/iso /mnt/vol /mnt
        fi
#------------------------------------------------------------------------------
        mount -r -o move ${copyto} ${copyfrom}
    fi
    rmdir ${copyto}
    return 0
}
...
find_livefs ()
{
    timeout="${1}"

    # don't start autodetection before timeout has expired
    if [ -n "${LIVE_MEDIA_TIMEOUT}" ]
    then
        if [ "${timeout}" -lt "${LIVE_MEDIA_TIMEOUT}" ]
        then
            return 1
        fi
    fi

    # first look at the one specified in the command line
    case "${LIVE_MEDIA}" in
        removable-usb)
#*******************************************************************************        
            for sysblock in `echo /sys/block/* | tr ' ' '\n' | grep -vE "/(loop|ram|dm-|fd)`; do
#-------------------------------------------------------------------------------            
                if [ "$(cat ${sysblock}/removable)" = "1" ]
                then
                    if readlink ${sysblock}/device | grep -q usb
                    then
                        for dev in $(subdevices "${sysblock}")
                        do
                            if check_dev "${dev}"
                            then
                                return 0
                            fi
                        done
                    fi
                fi
            done
            ;;

        removable)
#*******************************************************************************
            for sysblock in `echo /sys/block/* | tr ' ' '\n' | grep -vE '/(loop|ram|dm-|fd)'`; do
#-------------------------------------------------------------------------------            
                if [ "$(cat ${sysblock}/removable)" = "1" ]
                then
                    for dev in $(subdevices "${sysblock}")
                    do
                        if check_dev "${dev}"
                        then
                            return 0
                        fi
                    done
                fi
            done
            ;;

        iso=*)
#*******************************************************************************
            #e.g. live-media=iso=/gparted.iso
            ISO=${LIVE_MEDIA#iso=}
            mpt1="/mnt/vol"
            mpt2="/mnt/iso"
            #loop not yet installed; we need it here
            [ ! -d /dev/loop0 ] && modprobe loop
            mkdir -p ${mpt1} ${mpt2}
            devm=""
            #Filter (physical) Block Devices and add partitions
            for dev in `echo /sys/block/* | tr ' ' '\n' | grep -vE '/(loop|ram|dm-|fd)' | sed -e 's#.*\/##'`; do
                devm=${devm}`echo /dev/${dev}* | sed -e 's#\/dev\/##g'`" "
            done
            devn=""
            for dev in ${devm}; do
                dev1=`echo $dev | cut -c -3`
                if [ "$dev1" = "$dev" ]; then
                    if [ `echo /dev/${dev1}* | wc -w` -eq 1 ]; then
                        #Non-partitioned device, e.g. CDROM
                        devn=${devn}/dev/${dev}" "
                    fi
                    continue
                  else
                    #Exclude extended partitions (size=2)
                    [ $(( `cat /sys/block/${dev1}/$dev/size` )) -lt 10 ] && continue
                fi    
                devn=${devn}/dev/${dev}" "
            done
            for devv in ${devn}; do
                mount "${devv}" ${mpt1} > /dev/null 2>&1 || continue
                #Placeholder * possible; last file of multiple gets detected
                ISO1="${mpt1}${ISO}"
                ISO1=`echo ${ISO1} | grep -ve '*' | sed -e 's#.*\ ##g'`
                if [ -f ${ISO1} ]; then
                    mount -t iso9660 -o loop ${ISO1} ${mpt2} > /dev/null 2>&1
                    ii=0; ft=1
                    while [ ${ii} -le 5 ]; do
                        sleep 1
                        ii=$(( $ii + 1 ))
                        if [ `mount | grep -e ${mpt2} | wc -l` -ne 0 ]; then
                            ft=0
                            break
                        fi
                    done 
                    if [ ${ft} -ne 0 ]; then
                        umount ${mpt2} > /dev/null 2>&1
                        umount ${mpt1} > /dev/null 2>&1
                        continue
                    fi
                    #Very important !
                    mount -o bind "${mpt2}" $mountpoint
                    if [ $? -ne 0 ]; then
                        umount ${mpt2} > /dev/null 2>&1
                        umount ${mpt1} > /dev/null 2>&1
                        continue
                    fi
                    if is_live_path ${mountpoint}; then
                        #Output !
                        echo "${mountpoint}"
                        #No unmounting here !
                        return 0
                      else
                        umount $mountpoint > /dev/null 2>&1
                        umount ${mpt2} > /dev/null 2>&1
                        umount ${mpt1} > /dev/null 2>&1
                    fi
                  else
                    umount ${mpt1} > /dev/null 2>&1
                fi
            done
            cd /
            rmdir ${mpt1} ${mpt2} /mnt
#------------------------------------------------------------------------------
            ;;

        *)
            if [ ! -z "${LIVE_MEDIA}" ]
            then
                if check_dev "null" "${LIVE_MEDIA}" "skip_uuid_check"
                then
                    return 0
                fi
            fi
            ;;
    esac

    # or do the scan of block devices
#*******************************************************************************    
    for sysblock in `echo /sys/block/* | tr ' ' '\n' | grep -vE "/(loop|ram|dm-|fd)`; do
#-------------------------------------------------------------------------------
        devname=$(sys2dev "${sysblock}")
        fstype=$(get_fstype "${devname}")

        if /lib/udev/cdrom_id ${devname} > /dev/null
        then
            if check_dev "null" "${devname}"
            then
                return 0
            fi
        elif is_nice_device "${sysblock}"
        then
            for dev in $(subdevices "${sysblock}")
            do
                if check_dev "${dev}"
                then
                    return 0
                fi
            done
        elif [ "${fstype}" = "squashfs" -o \
            "${fstype}" = "ext2" -o \
            "${fstype}" = "ext3" -o \
            "${fstype}" = "ext4" -o \
            "${fstype}" = "jffs2" ]
        then
            # This is an ugly hack situation, the block device has
            # an image directly on it.  It's hopefully
            # live-initramfs, so take it and run with it.
            ln -s "${devname}" "${devname}.${fstype}"
            echo "${devname}.${fstype}"
            return 0
        fi
    done

    return 1
}
...

What you ought to know for understanding the initial startup is, that script "init" (one folder level above) is the primary starting script. It calls "live" process "mountroot()", which then uses "find_livefs()" and "copy_live_to()". Finally "init" switches to the filesystem contained in "filesystem.squashfs". An important key to understanding is commandline processing in "init" (main) and "live" (minor). Maybe you miss a parameter for your purposes ? Here are the locations to introduce one or more!

And now the "way back" (packing a new "initrd1.img"):
Hint: You may also use a (non-formatting) windows editor to work on "live" or "init", we automatically convert the text back to Unix style.

#mount your stick, e.g sdb1
mkdir /mnt/usb
mount /dev/sdb1 /mnt/usb
cd /mnt/usb/initrd1
#Delete old (unzipped) file
rm ./initrd1
cd cpio
#Convert "live" to Unix style (provided you edited the original file at its normal place or copied it there)
busybox dos2unix ./scripts/live
#Same conversion for "init"; commented out here
#busybox dos2unix ./init
#Create cpio package
#If we created it in the same folder, it would be packed, too !
#Now it's clear, why we use subfolders.
find | cpio -o --format=newc --file=../initrd1
cd ..
#Zip it
gzip -9 -S .img ./initrd1
#You find the usable file "initrd1.img" in folder /initrd1 of your stick.

Perhaps you also have to adapt "isolinux.cfg", if you introduced a new parameter ?
It's a plain Linux text file. No problem therefore.

How do we get "the toothpaste back to the tube" (initrd1.img to the ISO image) ?
Well, you could unpack the whole ISO image, exchange "initrd1.img" and create a new ISO with "mkisofs/genisoimage", which is NOT contained in GPL and needs a whole lot of parameters. Most of all -  you have to use the right "syslinux/isolinux" version and do a "post-processing" to get it "isohybrided" again. Very complex, much parameters, much possible faults !

I chose a simpler way. I used a Windows hexadecimal editor (HxD), loaded the ISO image and exchanged the file(s) directly.
This is possible because involved files are contiguous (not fragmented) and differ very little in size ( well, "isolinux.cfg" might not be much bigger than it is now !). Of course, you have to correct file size in FAT, too.
What you ought to know is, that CDROMs use a sector size of 2048 Bytes(= 0x800 hexadecimal).

How to proceed ?
At first let the hexadecimal editor search for the FAT entry, e.g. initrd1.img.
You see :
http://www.mediafire.com/imgbnc.php/b0f16c351a14a2e88e6ad75965a3b49c5g.jpg
To find the file location, multiply sector value with sector size. Since nearly all hex editors use hexadecimal addresses, do calculation in hexadecimal. Files always start at sector borders and don't fill sectors to the last Byte.
So you should see zero Bytes (00) in front of your calculated address. If not, look for calculation faults ! You should also inspect the file's end by adding file size to the start address. Again you should see zero Bytes past this address.
Scroll down the zero Bytes until you reach the next file to get an impression, how much space is "in reserve". Next load your "initrd1.img" file additionally to a new tab of the hex editor. Select "copy all" . You now see the end of the file and may read file size in hexadecimal (one Byte more than the last used, since it starts with Byte 0). Copy it and select other tab again. Be sure to "write" your new "initrd1.img" to the ISO image and NOT to "paste" it, which would add new size to the image, thus corrupting it ! Store the new Iso image and load it again to correct the FAT entry. Search it and correct values. Most often this is only one Byte, NEVER more than two ! Of course, you always correct both Little and Big Endian values. Don't forget to store ISO image again. Repeat this procedure for "isolinux.cfg" or other altered files. I do NOT recommend to do all corrections in one step and store the new ISO file once at the end, because it's not loaded totally to memory and might "forget" corrections, which are too far away from each other.

To just test your new changes, you don't need to create a new ISO image each time; you don't even need to "zip" "initrd1.img". Just rename the (big) new cpio file and put it in a /live folder together with "vmlinuz1" and "filesystem.squashfs", adapt your bootmenu entry (Grub2 or Grub4DOS) and run it. This works, even if you try to get "filesystem.squashfs" from an (unaltered!) ISO file. Just rename "filesystem.squashfs" within "live" folder, so that it gets out of focus. That's what I did to eliminate my programming faults faster.

Regards
cmdr

10 (edited by jb1 2009-08-26 07:53:46)

Re: [SOLVED] enhancement in initrd image

Hello cmdr,

I like to do it at this week-end. It could be a very good experiment. Though it could be nice if gparted team import the feature in their official release.  Hope your file is also downloadable from the link.

One more good idea is to exploit your coding knowledge :-) What about making a shell script and let it do all these ?

11 (edited by cmdr 2009-08-26 14:18:00)

Re: [SOLVED] enhancement in initrd image

Hello jb1,

One more good idea is to exploit your coding knowledge :-) What about making a shell script and let it do all these ?

No problem  : Copy the code sections (NOT the excerpt of "live" script) to two Linux textfiles (comments included), add as first line #!/bin/sh (for "GParted"; other distros might use bash instead of sh), store the files and make them executable with chmod +x /filepath/filename.

Hope your file is also downloadable from the link.

I tested it, of course. Download speed was approx. 30-35 KB/s => 5 min.  If you already have a working "GParted Live ISO", you could also extract "initrd1.img" from it, look for the location of the two involved subroutines within "live" and add my supplemental code directly.

Regards
cmdr

12

Re: [SOLVED] enhancement in initrd image

mediafire supports free downloading in more than one segments in parallel, using download managers like flashget. 30-35 KB/s is rather a speed for peak hours, otherwise you can expect up to 70 KB/s per segment.

*** It is highly recommended to backup any important files before doing resize/move operations. ***

13 (edited by jb1 2009-08-28 09:16:22)

Re: [SOLVED] enhancement in initrd image

cmdr wrote:

If you already have a working "GParted Live ISO", you could also extract "initrd1.img" from it, look for the location of the two involved subroutines within "live" and add my supplemental code directly.

This one is the best for me. thanks

14

Re: [SOLVED] enhancement in initrd image

cmdr,

        Hello, could I trouble you with a couple of questions? I am trying to do your fix for the latest gparted version out there. I got to the part where one has to modify the iso image to introduce the new initrd1.img. This is where it gets a bit weird for me. I am using ghex -ubuntu. I assume that if I click on the very first byte of the file (to localize the pointer) and then do a search for "initrd1.img", the first match to come up is the one laying out the file address and file size WITHIN the FAT table, right?? Assuming this is correct, I am curious as to how do you know how many lines (or bytes) to go back to read the address and size?? Further more, how do you know why to read the sector address from left to right (litle endian) and take into account only the last two bytes?? Same question goes for the file size?? If I lookup the file size on the new initrd1.img and convert to hex, is this where I should type it (On the green box you highlighted above)??
    On the other hand, could you elaborate a bit more on "writing" the new file vs "pasting" it? Are you refering to the overwrite mode of the hex editor?? Lastly, after these fixes I shouldnt place the new iso under "/gparted_iso", right?? I can just place the iso on the root directory of a USB and call it with grub2 (assuming it is installed).


    Thank you in advanced cmdr...

15 (edited by cmdr 2009-10-23 19:20:11)

Re: [SOLVED] enhancement in initrd image

Hello cejay,

cejay wrote:

I am trying to do your fix for the latest gparted version out there.

You didn't use my initrd1.img (from GParted 0.4.5.3), but "unpacked" the appropriate file from the latest stable release, inserted my script-code to script "live" and "packed" it again ? This is the only possible way.

I am using ghex -ubuntu. I assume that if I click on the very first byte of the file (to localize the pointer) and then do a search for "initrd1.img", the first match to come up is the one laying out the file address and file size WITHIN the FAT table, right??

Yes, "initrd1.img" exists only once on the whole drive image.

Assuming this is correct, I am curious as to how do you know how many lines (or bytes) to go back to read the address and size??

I didn't know it in advance, but I'm pretty good in pattern recognition. I immediately saw "TF" as delimiter between different records, noticed the mirror-inverted byte pattern (Little / Big Endian) ... and tried out successfully. Address and file size preceed the file name (starting 31 bytes before the first letter of the file name, written in capital letters). Probably you find an explanation of every file record byte on the Web, but I didn't need it.

Further more, how do you know why to read the sector address from left to right (litle endian) and take into account only the last two bytes?? Same question goes for the file size??

I did NOT ignore the other bytes. I noticed, that 4 Bytes (two double-words) are used for address and file size, but of course ignored preceeding zeros. The order is "Little Endian -- Big Endian" for both address and file size.

If I lookup the file size on the new initrd1.img and convert to hex, is this where I should type it (On the green box you highlighted above)??

Exactly, you use the same address, but change the file's size. And you have to correct both "Endians".

On the other hand, could you elaborate a bit more on "writing" the new file vs "pasting" it? Are you refering to the overwrite mode of the hex editor??

As you might have noticed, I used a Windows hexeditor ("HxD"), which uses this term ("write" and not "overwrite" in my natural language) to distinguish the process from "pasting". It might be a little bit sophisticated, since "writing" is also possible to an empty new file, where nothing gets "overwritten". It's clear, that your new "initrd1.img" should "overwrite" the old one (and, since its bigger, some unused space behind) and NOT increase the size of the whole ISO image ( keeping the old "initrd1.img"), which would happen, if you "paste" it.

Lastly, after these fixes I shouldnt place the new iso under "/gparted_iso", right?? I can just place the iso on the root directory of a USB and call it with grub2 (assuming it is installed).

Principally, you are free to place the ISO image wherever you want it , in root directory or any folder / subfolders. You just have to give the right path to (external !) "vmlinuz" and "initrd1.img", which might be at the same location or elsewhere,as well as parameter "live-media=iso=/MyFolderAnywhere/*.iso". If you want to "chainload" the ISO-Image directly, you have to edit "isolinux.cfg" within the ISO Image and introduce "live-media=iso=..." to one of the menu items, so that "filesystem.squashfs" gets found. Then you are bound to a certain folder name... or the root directory.
Be careful NOT to inflate "isolinux.cfg" too much, since there is not much free space behind at the old place. Of course you might use a new location at the end of the ISO Image, where there is enough unused space. Be sure to use a sector border as starting point. You don't even need to delete the old file; it just gets out of focus.

Good luck
cmdr

16

Re: [SOLVED] enhancement in initrd image

cmdr wrote:

Good luck
cmdr


   Success with the latest version. Works like a charm. Yeup, I unpacked the "live" that came with the version I tweaked with. The corrected "initrd1.img" comes out a smaller than the original though. If I only had a place where to up load it I would put it up...

   Muchas gracias cmdr, eres cabron...

17 (edited by cheefy 2009-11-09 10:33:33)

Re: [SOLVED] enhancement in initrd image

Hei guys,
which version you tweaked last?
to be honest it's a little bit too complicated for me.
i would offer you a little piece of webspace where we can upload the isofile so everyone can use this great enhancement.
please contact me ...

thanks in advance for your great work...


P.S.: Now i got Parted Magic. Its not really easy to loopback the iso, but you can extract the pmagic-directory and call it directly...

18

Re: [SOLVED] enhancement in initrd image

Hello cheefy,

i would offer you a little piece of webspace where we can upload the isofile so everyone can use this great enhancement.

many thanks for your offer, but I think, the best way would be to interest the maintainer of the "GParted" project,  Mr. Steven Shiau, for our "toy", so that it gets integrated to all further versions of "GParted". Of course, the focus is always on the partitioning program and not on the auxiliary tools. Otherwise it would be a very minor change with a big new benefit. You DID understand, that it's useful, others will do soon, if they get the option with every new version.

Regards
cmdr

19

Re: [SOLVED] enhancement in initrd image

Hi guys,
Sorry I did not read these discussions until Curtis told me today.
cmdr, could you please provide the patch file based on the GParted live 0.4.8-1 so that I can include it in the future release?
Thanks.

Steven.

20

Re: [SOLVED] enhancement in initrd image

BTW, please email me at (steven _at_ nchc org tw) in case I do not follow this.
Thanks.

Steven.

21

Re: [SOLVED] enhancement in initrd image

Hello Steven,

stevenshiau wrote:

cmdr, could you please provide the patch file based on the GParted live 0.4.8-1 so that I can include it in the future release?

Here it is : http://www.mediafire.com/download.php?zzzzmymkyjg

There is a "readme.txt" included in the TAR.GZ file, which gives the necessary explanations.

Let me express my personal deference to Mr. Gedak and you for managing the "crisis" with version 0.4.8-1. I regret, that i don't have enough knowledge of the internal Linux processes to contribute anything on this issue. But I admire the brilliant analysis and fast solution.

Regards
cmdr

22

Re: [SOLVED] enhancement in initrd image

Thank you cmdr for the compliment.  smile

I know that both Steven and myself have been grateful for the help you have provided to users of GParted.  You have solved many problems and enabled me to focus on fixing and improving the code.  In fact solving this crisis started with me reviewing a post in which you helped a user fix one of the first reported problems.

Please know that your contributions are greatly appreciated.

Sincerely,
Curtis Gedak

23

Re: [SOLVED] enhancement in initrd image

Hi cmdr,
Before I read this post, I have tried to implemented this function from yesterday. Now I believe I have made it. I used the patches file from grml.org because I found it before reading this post. Therefore from GParted live version 0.4.8-7, you can use the iso file in grub2.
I have updated the doc in the website, please check it. i.e.:
http://gparted.sourceforge.net/livehd.php

Thanks for this idea, and yes, as Curtis mentioned, you have solved a lot problems for the GParted users so that we can more focus on fixing and improving GParted. Thanks for all your efforts.

Regards,
Steven.