HOWTO: separate boot partition with PartedMagic and Clonezilla (dedicated GRUB2 partition)

From Sabayon Wiki
Revision as of 15:37, 9 May 2010 by Fitzcarraldo (Talk | contribs) (Removed "emerge portage" in last step as this could break Entropy. Replaced it with "layman -S" which is what should be done in combination with "emerge --sync".)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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

$ 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.

# mv /media/sda1/live /media/sda1/live-hd
# rm -rf /media/sda1/tmp*

2. Add PartedMagic and Clonezilla to bootloader

File: (/etc/grub.d/40_custom)
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 to MBR and copy its files to boot partition, generate a new grub.cfg

# grub2-install --root-directory=/media/sda1 /dev/sda
# grub-mkconfig -o /media/sda1/boot/grub/grub.cfg

4. Test changes using QEMU

# sync ; echo 3 > /proc/sys/vm/drop_caches ; qemu -hda /dev/sda

If QEMU does not work as needed, remove it and then install it via Portage

# equo remove qemu --nodeps
# emerge --sync && layman -S && emerge qemu

--donnie