Date: Mon, 13 May 2013 23:31:15 +0200 From: Ralf Mardorf <ralf.mardorf@rocketmail.com> To: freebsd-questions@freebsd.org Subject: Re: Bootloader/Replace GRUB Message-ID: <1368480675.684.11.camel@archlinux> In-Reply-To: <1368464749.668.30.camel@archlinux> References: <CAL1yNpyWu4X2j6x2z0TDr=F9ETyumib-v=4_Y4W7Jms8xVizGQ@mail.gmail.com> <1368464749.668.30.camel@archlinux>
next in thread | previous in thread | raw e-mail | index | archive | help
This one is tricky, but it does work. I've got two SATA HDDs, Linux names are sda and sdb. /dev/sda1 is ufs including my FreeBSD and /dev/sdb1 is ntfs including the Windows XP install, there are many other installs, all of them are Linux distros. To install XP on /dev/sdb1 I had to disconnect /dev/sda1. "With Windows This assumes that your Windows partition is sda3. Remember you need to point set root and chainloader to the system reserve partition that windows made when it installed, not the actual partition windows is on. This example works if your system reserve partition is sda3. # (2) Windows XP menuentry "Windows XP" { set root=(hd0,3) chainloader (hd0,3)+1 } If the Windows bootloader is on an entirely different hard drive than GRUB, it may be necessary to trick Windows into believing that it is the first hard drive. This was possible with drivemap. Assuming GRUB is on hd0 and Windows is on hd2, you need to add the following after set root: drivemap -s hd0 hd2" - https://wiki.archlinux.org/index.php/Grub#Dual-booting So for my grub.cfg on a Linux on /dev/sdb9, resp. inside the MBR of sda, I need to add a chainloader. [rocketmouse@archlinux ~]$ cat /mnt/q/boot/grub/grub.cfg set timeout=8 set default='0'; if [ x"$default" = xsaved ]; then load_env; set default="$saved_entry"; fi set color_normal='light-blue/black'; set color_highlight='light-cyan/blue' menuentry "FreeBSD"{ set root=(hd0,msdos1) chainloader +1 } menuentry "XP"{ set root=(hd1,1) drivemap -s hd0 hd1 chainloader +1 } menuentry 'Ubuntu Quantal, kernel 3.6.5-rt14' { set root='(hd1,9)'; set legacy_hdbias='0' legacy_kernel '/boot/vmlinuz-3.6.5-rt14' '/boot/vmlinuz-3.6.5-rt14' 'root=/dev/sdb9' 'ro' 'quiet' '' legacy_initrd '/boot/initrd.img-3.6.5-rt14' '/boot/initrd.img-3.6.5-rt14' } [snip]
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1368480675.684.11.camel>