text 25 Jun Dual boot Linux SATA HD and Windows IDE HD with GRUB2

Ok vediamo come fare: Creiamo un file /etc/grub.d/11_windows come segue:

#!/bin/sh -e
echo "Found Windows XP" >&2
cat << EOF
menuentry "Window XP" {
drivemap (hd0) (hd1)
drivemap (hd1) (hd0)
set root=(hd1,1)
chainloader +1
}
EOF

Ricordate che in grub2 la mappatura degli HD e delle partizioni e` cambiata:

  • sda1 => hd0,1
  • sda2 => hd0,2
  • sdb1 => hd1,1
  • sdc2 => hd2,2

Ora aggiorniamo il grub.cfg con il comando

sudo update-grub

Dovremmo vedere un output del genere:

Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.38-10-generic
Found initrd image: /boot/initrd.img-2.6.38-10-generic
Found linux image: /boot/vmlinuz-2.6.38-8-generic
Found initrd image: /boot/initrd.img-2.6.38-8-generic
Found Windows XP
Found memtest86+ image: /boot/memtest86+.bin
done

Reboot e viaaa…


blog comments powered by Disqus