From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 27 07:45:49 2010 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8031910656C8 for ; Fri, 27 Aug 2010 07:45:49 +0000 (UTC) (envelope-from scdbackup@gmx.net) Received: from mail.gmx.net (mailout-de.gmx.net [213.165.64.23]) by mx1.freebsd.org (Postfix) with SMTP id EBC728FC17 for ; Fri, 27 Aug 2010 07:45:48 +0000 (UTC) Received: (qmail invoked by alias); 27 Aug 2010 07:19:08 -0000 Received: from 165.126.46.212.adsl.ncore.de (HELO 192.168.2.69) [212.46.126.165] by mail.gmx.net (mp071) with SMTP; 27 Aug 2010 09:19:08 +0200 X-Authenticated: #2145628 X-Provags-ID: V01U2FsdGVkX19BXKhruzxBqOhiA2J+1O0CKwscTpD/JBNrCxz8S0 V/bhrEDrVk1tYb Date: Fri, 27 Aug 2010 09:18:52 +0200 From: "Thomas Schmitt" To: freebsd-hackers@FreeBSD.org References: <4C771653.1060004@FreeBSD.org> In-Reply-To: <4C771653.1060004@FreeBSD.org> Message-Id: <95330659210611@192.168.2.69> X-Y-GMX-Trusted: 0 Cc: dougb@FreeBSD.org Subject: Re: Is there a boot manager that can handle this? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Aug 2010 07:45:49 -0000 Hi, > Primary partitions: > Windows XP, FreeBSD 9-current, FreeBSD 7-stable > Extended partition: > FAT32 data volume, Ubuntu Linux > menuentry "FreeBSD 9-Current amd64" { > set root=(hd0,3) > chainloader +1 > } Did you already try : set root=(hd0,3,a) freebsd /boot/loader I have a machine with primary partitions FreeBSD, FreeBSD, Solaris, and on extended partition Debian Lenny 5.01 Booting is done by the GRUB2 1.98 which came with Debian. In Debian's /boot/grub/grub.cfg i have these entries (which all work for me): ------------------------------------------------ menuentry "Debian GNU/Linux, linux 2.6.26-2-amd64, eSATA 1.5Gbps" { set root=(hd0,5) search --fs-uuid --set 5badec4b-751e-47e1-a3c5-f8555d680cc4 linux /boot/vmlinuz-2.6.26-2-amd64 root=UUID=5badec4b-751e-47e1-a3c5-f8555d680cc4 ro initrd /boot/initrd.img-ts } menuentry "FreeBSD-8.0 STABLE on Partition 1" { set root=(hd0,1,a) freebsd /boot/loader } menuentry "FreeBSD-8.0 RELEASE on Partition 2" { set root=(hd0,2,a) freebsd /boot/loader } menuentry "Solaris snv 134 on Partition 3" { set root=(hd0,3) chainloader +1 } ------------------------------------------------ Despite fat warnings # DO NOT EDIT THIS FILE it is well recommended by GRUB2 developers to do experiments directly in /boot/grub/grub.cfg and to fiddle with the generator scripts only later. This removes one potential level of error. Just do _not_ run update-grub while the changes are not yet in the scripts. ------------------------------------------------ A general method to boot systems before they get in reach of GRUB2 is: - Install the desired system - Boot rescue system (in my case RIP Linux CD). - Backup to removable media the "invisible" blocks which sit before the start of the first partition dd if=/dev/sda of=... bs=512 count=31 (Address /dev/sda depends on the booted rescue system. Number 31 was learned from the partitioning tool. Maybe it suffices to copy just the first block of /dev/sda.) To boot a particular system: - Boot rescue system - Copy backuped blocks to disk dd if=... of=/dev/sda bs=512 count=31 - Reboot will bring up the originally installed boot loader of the desired system. I did this with FreeBSD and Solaris before i found the necessary GRUB2 menu examples. Have a nice day :) Thomas