From owner-freebsd-questions@FreeBSD.ORG Mon May 13 21:31:23 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 95C182E9 for ; Mon, 13 May 2013 21:31:23 +0000 (UTC) (envelope-from ralf.mardorf@rocketmail.com) Received: from nm12.bullet.mail.ird.yahoo.com (nm12.bullet.mail.ird.yahoo.com [77.238.189.65]) by mx1.freebsd.org (Postfix) with SMTP id E8385B57 for ; Mon, 13 May 2013 21:31:22 +0000 (UTC) Received: from [77.238.189.234] by nm12.bullet.mail.ird.yahoo.com with NNFMP; 13 May 2013 21:31:21 -0000 Received: from [217.146.189.66] by tm15.bullet.mail.ird.yahoo.com with NNFMP; 13 May 2013 21:31:20 -0000 Received: from [127.0.0.1] by smtp146.mail.ird.yahoo.com with NNFMP; 13 May 2013 21:31:20 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rocketmail.com; s=s1024; t=1368480680; bh=yCTykpj5yZ/NxwaF4Ey4Le4mqVhIRjw0hCvhhQZsi1Y=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:Message-ID:Subject:From:To:Date:In-Reply-To:References:Content-Type:X-Mailer:Mime-Version:Content-Transfer-Encoding; b=mWP+s9TAGM065vgB8FFuqPq3JZBviK/0FG5Fcm+Nq16uTlbcVi1uGJcSqydzJwc7CyLiToZw60VKehGbVRKspkbDHqm6ryGewDFRbkg7XqZOqUFopAU2yj6WViVXUqDetHpNGUUQHCKSduuNjFB9UIwWZS3BNsermtfIbQxrPTU= X-Yahoo-Newman-Id: 831689.42848.bm@smtp146.mail.ird.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: eMhf3R4VM1li9j.FZNeXzZdAb6MU_Nq.Q5f_.DM.Gb0OzS3 QBvs5GGobnuvAa1x9ajNJQ3Bduh5szKXCfEp0qCbneApXyxIk_nuvRN1fsqw Xx6e7dh5.qOAG48plJ23cxh3rmjBQLck4VClYBn1WJ4QyiV_oKrnHEGLZDOm bfesk3jBVxAXTx39dbZ9QaATCFEKIUvK256ELxV3T4HsHdae_46uV0XeMdjZ tue7H8fXJdJb.Cz9Xrvd54PvWGRkOvfC56PSTExRXIfcskdJS3aGZ1qYWd8c 6u2wNQcf1pE0lOJMjmxm64D4YPq7WoCY4_0BKJ_ZpRw9pYkyOTRK0kuyjtr2 4Q.sh3tDCHuYmKq9eap2J3ydXXRbEetMGTdwHXVv7BBGpsPrjQtAerEftVA3 THiuDoNxIlGVXu3Rcu3.dBdibzq9b2omPhdU7DTUgjW07oUQvuV1HSkWMlTQ o3l4mkznwrjSAMhE_KhEZRaNCigLGz_6Q1oPk6WUFV.EKWduvuQgmT8FM34E 469985NhfWtTe9GVfrL_rCxvm5g-- X-Yahoo-SMTP: BeMCPs2swBABTJ3kAeEiC_hE0mz8jRexLddJfD8pI2j32fOacjBmXg-- X-Rocket-Received: from [92.224.208.207] (ralf.mardorf@92.224.208.207 with login) by smtp146.mail.ird.yahoo.com with SMTP; 13 May 2013 14:31:20 -0700 PDT Message-ID: <1368480675.684.11.camel@archlinux> Subject: Re: Bootloader/Replace GRUB From: Ralf Mardorf To: freebsd-questions@freebsd.org Date: Mon, 13 May 2013 23:31:15 +0200 In-Reply-To: <1368464749.668.30.camel@archlinux> References: <1368464749.668.30.camel@archlinux> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.8.2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 May 2013 21:31:23 -0000 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]