parted -a optimal /dev/sda mkpart primary 0% 4096MB
unit MB
mkpart primary 10001 10100
set 2 bios_grub on
mkfs.ext3 /dev/sdb1
mount /dev/sdb1 /mnt
chroot /mnt
apt-get install linux-image-2.6.32-5-686
apt-get install grub2
passwd root
exit
mount -o bind /dev/ /mnt/dev/
mount -o bind /proc/ /mnt/proc/
mount -o bind /sys/ /mnt/sys/
chroot /mnt
grub-install /dev/sdb
umount /mnt/proc
umount /mnt/dev
umount /mnt/sys
umount /mnt
Zbootować z tego dysku:
GNU GRUB version 1.98 […]
grub> root (hd0,gpt1)
(hd0, 1): Filesystem is ext2.
grub> linux (hd0,gpt1)/boot/vmlinuz-2.6.32-5-686 root=/dev/sdb1
grub> initrd (hd0,gpt1)/boot/initrd.img-2.6.32-5-686
grub> boot
Lub po uruchomieniu systemu:
# grub-mkconfig -o /boot/grub/grub.cfg