Gnome Partition Editor
Custom Search

GParted Live on Hard Disk

Besides GParted Live CD and Live USB, we can also put GParted Live on harddisk.

In this example we use the grub boot loader. You have to put the GParted live files in a FAT, ext2, ext3, reiserfs or some other grub supported partition.

If you do not have such a partition, you can use gparted to resize an existing partition to free up space and then create another partition to put GParted Live. From this point on we assume you already have a FAT partition /dev/hda4 to put GParted live. Following are the set up steps:

  1. Boot the OS in the hard drive. Let's assume it is GNU/Linux.
  2. Mount /dev/hda4 as /mnt, you can manually mount it by issuing a command like: "mount /dev/hda4 /mnt"
  3. Download GParted live zip file, and unzip all the files in /mnt, make sure you put all the files in /mnt, say, COPYING is in /mnt/, not in any subdir. You can do this with a command such as: "unzip gparted-live-*.zip -d /mnt" (Replace gparted-live-*.zip with the file name you just downloaded).
  4. Change the dir name "live" under /mnt to another name, say "live-hd". You can do this with a command like: "cd /mnt; mv live live-hd"
  5. If your grub is version 1.x, edit your grub config file /boot/grub/menu.lst, and append the following:
        title     GParted live
        root      (hd0,3)
        kernel    /live-hd/vmlinuz boot=live config union=aufs noswap noprompt vga=788 ip=frommedia live-media-path=/live-hd bootfrom=/dev/hda4 toram=filesystem.squashfs
        initrd    /live-hd/initrd.img
        boot
        
    In grub version 1 syntax, /dev/hda4 is (hd0,3).
  6. If your grub is 2.x (grub-pc), e.g. on Debian Squeeze or Ubuntu 9.10, edit /etc/grub.d/40_custom, make it like:
        menuentry "GParted live" {
          set root=(hd0,4)
          linux /live-hd/vmlinuz boot=live config union=aufs noswap noprompt vga=788 ip=frommedia live-media-path=/live-hd bootfrom=/dev/hda4 toram=filesystem.squashfs
          initrd /live-hd/initrd.img
        }
        
    NOTE: In grub2, (hd0,4) means the first hard drive and the 4th partition. It's different from that in grub version 1. Then run "update-grub2" to update your grub2 config. (Thanks to Louie Chen for providing this).

    Alternatively from GParted live version 0.4.8-7 onwards, you can use only the GParted live iso file in grub2 (Thanks to the patches files from grml). For example, put gparted-live-0.5.2-9.iso in dir /home/isos/, then make the grub2 custom file /etc/grub.d/40_custom like:
        menuentry "Gparted live" {
          set isofile="/home/isos/gparted-live-0.5.2-9.iso"
          loopback loop $isofile
          linux (loop)/live/vmlinuz boot=live config union=aufs noswap noprompt vga=788 ip=frommedia toram=filesystem.squashfs findiso=$isofile
          initrd (loop)/live/initrd.img
        }
        
    Then run "update-grub2" to update your grub2 config.

NOTE1: In the above examples we added an extra parameter "toram=filesystem.squashfs" so that the partition /dev/hda4 won't be locked after booting GParted Live from hard disk.
NOTE2: Remember to check parameters in syslinux/syslinux.cfg from the zip file, copy them to here. It might be different from here, say vmlinuz path maybe different.

For more information on grub you can refer to the GNU GRUB web site.

Documentation   FAQ   Forum   Bugs   Features   Screenshots   Contact

Get GParted at SourceForge.net. Fast, secure and Free
	Open Source software downloads Valid HTML 4.01! Correct CSS! Privacy policy