You will need GRUB2 installed (equo install grub), a separate partition (here: /dev/sda1), .zip file of PartedMagic (USB version, here: pmagic-usb-4.10.zip), .zip file of Clonezilla (stable 486 version recommended, here: clonezilla-live-1.2.4-28-486.zip).
You will get a separate boot partition, with ext3 file system compatible with Windows operation systems, from which you can boot to GRUB2 (for sure!), to PartedMagic running from RAM (if some partitioning is needed), or to Clonezilla running from RAM (to make backup/restore).
0. Prepare partition
- Code: Select all
$ su
# mkdir /media/sda1
# mkfs.ext3 -I 128 /dev/sda1
# mount /dev/sda1 /media/sda1
1. Unzip PartedMagic and Clonezilla
Unzip PartedMagic to /media/sda1/tmp1. Find directory called "pmagic", containing files bzImage and initramfs, move it to /media/sda1.
Unzip Clonezilla to /media/sda1/tmp2. Find directory called "live", move it to /media/sda1.
- Code: Select all
# mv /media/sda1/live /media/sda1/live-hd
# rm -rf /media/sda1/tmp*
2. Add PartedMagic and Clonezilla to bootloader
- Code: Select all
# vim /etc/grub.d/40_custom
- Code: Select all
menuentry "PartedMagic" {
set root=(hd0,1)
linux /pmagic/bzImage edd=off noapic load_ramdisk=1 prompt_ramdisk=0 rw vga=791
loglevel=0 max_loop=256 keymap=us
initrd /pmagic/initramfs
}
menuentry "Clonezilla" {
set root=(hd0,1)
linux /live-hd/vmlinuz boot=live union=aufs vga=788 ip=frommedia
live-media-path=/live-hd bootfrom=/dev/hda1 toram=filesystem.squashfs
initrd /live-hd/initrd.img
}
3. Install bootloader
- Code: Select all
# grub2-install --root-directory=/media/sda1 /dev/sda
# grub-mkconfig -o /media/sda1/boot/grub/grub.cfg
4. Test changes using QEMU
- Code: Select all
# sync ; echo 3 > /proc/sys/vm/drop_caches ; qemu -hda /dev/sda
If QEMU does not work as needed, remove it and then emerge:
- Code: Select all
# equo remove qemu --nodeps
# emerge qemu


