GNOME Partition Editor

GParted Live on Hard Disk

In addition to writing the GParted Live image to CD and to USB media, the GParted Live image can also be placed on a hard disk drive. The following sections describe how to do this for the GRUB and LILO boot loaders.

Contents

GParted Live on Hard Disk using GRUB

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/sda4 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/sda4 as /mnt, you can manually mount it by issuing a command like: "mount /dev/sda4 /mnt"
  3. Download GParted live zip file, and unzip all the files in /mnt, make sure you put all the files in /mnt, say, file "GPL" 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. Add the appropriate menu entry for your version of GRand Unified Bootloader (GRUB):
    • GRUB 1.x (Legacy)
      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=overlay username=user components noswap noeject vga=788 ip= net.ifnames=0 live-media-path=/live-hd bootfrom=/dev/sda4 toram=filesystem.squashfs
          initrd    /live-hd/initrd.img
          boot
              
      In grub version 1 syntax, /dev/sda4 is (hd0,3).
    • GRUB 2.x (and 1.9x)
      If your grub is 2.x (grub-pc), e.g. on Debian Jessie or Ubuntu 16.04, edit /etc/grub.d/40_custom, make it like:
          menuentry "GParted live" {
            set root=(hd0,4)
            linux /live-hd/vmlinuz boot=live config union=overlay username=user components noswap noeject vga=788 ip= net.ifnames=0 live-media-path=/live-hd bootfrom=/dev/sda4 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.28.1-1-i686.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.28.1-1-i686.iso"
            loopback loop $isofile
            linux (loop)/live/vmlinuz boot=live config union=overlay username=user components noswap noeject vga=788 ip= net.ifnames=0 toram=filesystem.squashfs findiso=$isofile
            initrd (loop)/live/initrd.img
          }
              
      Then run "update-grub2" to update your grub2 config.
    • GRUB4DOS and WINGRUB
      If your grub is grub4dos, edit your grub config file menu.lst, and append the following:
          title gparted 28.1 live
          find --set-root /gparted-live-0.28.1-1-i686.iso
          map /gparted-live-0.28.1-1-i686.iso (0xff) || map --mem /gparted-live-0.28.1-1-i686.iso (0xff)
          map --hook
          root (0xff)
          kernel /live/vmlinuz  boot=live union=overlay username=user components noeject vga=788 ip= findiso=/gparted-live-0.28.1-1-i686.iso toram=filesystem.squashfs
          initrd /live/initrd.img
              
      (Thanks to Frank Breitling for pointing out this sample menu entry. See Bug #682160 - GParted Live on Hard Disk from Windows)
    NOTE1: In the above examples we added an extra parameter "toram=filesystem.squashfs" so that the partition /dev/sda4 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.
For more information on grub4dos, see the GRUB for DOS web site.

GParted Live on Hard Disk using LILO

The following instructions can be used to set up the GParted Live image on a hard disk drive using the LILO boot loader.

  1. Download the GParted Live zip file
  2. Create a /gparted-live directory:

        mkdir /gparted-live
        
  3. Unzip the gparted download file into the /gparted-live directory:

        cd     /gparted-live
        unzip   gparted-live-{...}.zip
        
  4. Edit the /etc/lilo.conf file and add a section for gparted.

    For this example, let us assume that the /gparted-live directory resides on the /dev/sda4 partition.
        # GParted bootable partition config begins
    
        image  = /gparted-live/live/vmlinuz
        root   = /dev/sda4  # make sure this matches the bootfrom= below ...
        label  = gparted
        append = "boot=live config union=overlay username=user components noswap noeject ip= live-media-path=/gparted-live/live bootfrom=/dev/sda4 toram=filesystem.squashfs" vga=788
        initrd = /gparted-live/live/initrd.img
    
        # GParted bootable partition config ends
        
  5. Optionally add a section for memtest86+:
        # memtest86+ bootable partition config begins
    
        image = /gparted-live/live/memtest
        label = memtest
    
        # memtest86+ bootable partition config ends
        
  6. Run lilo:
        lilo
        

These LILO instructions were adapted from the following forum post.

For more information on lilo, see the LILO (boot loader) web site.

Documentation   FAQ   Forum   Bugs   Features   Screenshots   Articles   Contact

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