GParted Live on harddisk
http://gparted.sourceforge.net/livehd.phpBesides GParted Live CD and Live USB, we can put GParted Live on harddisk. This is howto:
Here we use grub boot loader as an example. You have to put the GParted live files in a FAT, ext2/3, reiserfs or any grub supported partition.
If you do not have such a partition, you can use gparted to resize your partition and create another partition to put GParted live. Here we assume you already have a FAT partition /dev/hda4 to put GParted live. This is how to do that:
- Boot the OS in the harddrive, saying it's GNU/Linux.
- Mount /dev/hda4 as /mnt, you can make it by: "mount /dev/hda4 /mnt"
- 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 make it by something like: "unzip gparted-live-*.zip -d /mnt" (Replace gparted-live-*.zip with the file name you just downloaded).
- Change the dir name "live" under /mnt as another name, say "live-hd". You can make it by: "cd /mnt; mv live live-hd"
- 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 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). - 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 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 harddrive 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).
Besides, from GParted live version 0.4.8-7, 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 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.
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 info about grub, you can refere to here.
No comments:
Post a Comment