From owner-freebsd-questions@FreeBSD.ORG Mon May 13 17:14:02 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 469B6A95 for ; Mon, 13 May 2013 17:14:02 +0000 (UTC) (envelope-from ralf.mardorf@alice-dsl.net) Received: from smtp-out04.alice-dsl.net (smtp-out04.alice-dsl.net [88.44.63.3]) by mx1.freebsd.org (Postfix) with ESMTP id CF8859FF for ; Mon, 13 May 2013 17:14:01 +0000 (UTC) Received: from out.alice-dsl.de ([192.168.125.61]) by smtp-out04.alice-dsl.net with Microsoft SMTPSVC(6.0.3790.3959); Mon, 13 May 2013 19:06:07 +0200 Received: from [85.182.18.64] ([85.182.18.64]) by out.alice-dsl.de over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Mon, 13 May 2013 19:05:52 +0200 Message-ID: <1368464749.668.30.camel@archlinux> Subject: Re: Bootloader/Replace GRUB From: Ralf Mardorf To: freebsd-questions@freebsd.org Date: Mon, 13 May 2013 19:05:49 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.8.2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 13 May 2013 17:05:52.0930 (UTC) FILETIME=[201AC020:01CE4FFC] 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 17:14:02 -0000 On Mon, 2013-05-13 at 12:41 -0400, Louis Ciotti wrote: > Hello, > > I replaced a Linux partition on my laptop with FreeBSD. Now it will not > but giving me an GRUB error. I assume I have to remove/replace GRUB, as I > will want to dual boot this with a windows partition. > > So being the FreeBSD newbie that I am I am stumped on what to do to correct > this. Unfortunately I need to install Windows to test hardware that is less good supported by Linux and FreeBSD, I guess it should be able to boot Windows by a chainloader. I'm using GRUB2 from Linux to boot between FreeBSD and Linux installs. I converted a GRUB legacy menu.lst to a GRUB 2 grub.cfg using an application doing the work for me, that's why there are strange commands in my grub.cfg [1]. I planned to install Windows first and after that to edit the grub.cfg, but because you need help, I'll google now to help myself too ;). I found this: menuentry "Microsoft Windows XP Home Edition (on /dev/sda1)" { insmod fat set root='(hd0,1)' search --no-floppy --fs-uuid --set 2629-16f0 drivemap -s (hd0) ${root} chainloader +1 } But I guess, it can be written as it's done for my FreeBSD [1], the above entry perhaps is done by this GRUB-auto-thingy, something I don't use. Backup your MBRs (or what ever you're using ;), before you continue ;)! [1] 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 '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' } menuentry 'Ubuntu Quantal, kernel 3.5.0-18-lowlatency threadirqs' { set root='(hd1,9)'; set legacy_hdbias='0' legacy_kernel '/boot/vmlinuz-3.5.0-18-lowlatency' '/boot/vmlinuz-3.5.0-18-lowlatency' 'root=/dev/sdb9' 'ro' 'quiet' 'threadirqs' legacy_initrd '/boot/initrd.img-3.5.0-18-lowlatency' '/boot/initrd.img-3.5.0-18-lowlatency' } menuentry 'Ubuntu Quantal, kernel 3.5.0-18-lowlatency (recovery mode)' { set root='(hd1,9)'; set legacy_hdbias='0' legacy_kernel '/boot/vmlinuz-3.5.0-18-lowlatency' '/boot/vmlinuz-3.5.0-18-lowlatency' 'root=/dev/sdb9' 'ro' 'single' legacy_initrd '/boot/initrd.img-3.5.0-18-lowlatency' '/boot/initrd.img-3.5.0-18-lowlatency' } menuentry 'Ubuntu Studio Quantal, Kernel 3.6.5-rt14' { set root='(hd1,13)'; set legacy_hdbias='0' legacy_kernel '/boot/vmlinuz-3.6.5-rt14' '/boot/vmlinuz-3.6.5-rt14' 'root=/dev/sdb13' 'ro' 'quiet' legacy_initrd '/boot/initrd.img-3.6.5-rt14' '/boot/initrd.img-3.6.5-rt14' } menuentry 'Ubuntu Studio Quantal, Kernel 3.5.0-18-lowlatency threadirqs' { set root='(hd1,13)'; set legacy_hdbias='0' legacy_kernel '/boot/vmlinuz-3.5.0-18-lowlatency' '/boot/vmlinuz-3.5.0-18-lowlatency' 'root=/dev/sdb13' 'ro' 'quiet' 'threadirqs' legacy_initrd '/boot/initrd.img-3.5.0-18-lowlatency' '/boot/initrd.img-3.5.0-18-lowlatency' } menuentry 'Ubuntu Studio Precise, Kernel 3.0.30 threadirqs' { #set root='(hd1,1)'; set legacy_hdbias='0' #legacy_kernel '/boot/vmlinuz-3.0.30' '/boot/vmlinuz-3.0.30' 'root=UUID=338316fb-364e-4a43-8deb-738127f878ce' 'ro' 'quiet' 'threadirqs' set root='(hd2,1)'; set legacy_hdbias='0' legacy_kernel '/boot/vmlinuz-3.0.30' '/boot/vmlinuz-3.0.30' 'root=UUID=948e9fa0-1bb5-4fd4-847c-a7cfbc816a40' 'ro' 'quiet' 'threadirqs' legacy_initrd '/boot/initrd.img-3.0.30' '/boot/initrd.img-3.0.30' } menuentry 'Ubuntu Studio Precise, Kernel 3.2.0-23-lowlatency threadirqs' { #set root='(hd1,1)'; set legacy_hdbias='0' #legacy_kernel '/boot/vmlinuz-3.2.0-23-lowlatency' '/boot/vmlinuz-3.2.0-23-lowlatency' 'root=UUID=338316fb-364e-4a43-8deb-738127f878ce' 'ro' 'quiet' 'threadirqs' set root='(hd2,1)'; set legacy_hdbias='0' legacy_kernel '/boot/vmlinuz-3.2.0-23-lowlatency' '/boot/vmlinuz-3.2.0-23-lowlatency' 'root=UUID=948e9fa0-1bb5-4fd4-847c-a7cfbc816a40' 'ro' 'quiet' 'threadirqs' legacy_initrd '/boot/initrd.img-3.2.0-23-lowlatency' '/boot/initrd.img-3.2.0-23-lowlatency' } menuentry 'AVlinux 5.0.3, Kernel 3.0.23-rt40' { set root='(hd1,11)'; set legacy_hdbias='0' legacy_kernel '/boot/vmlinuz-3.0.23-rt40' '/boot/vmlinuz-3.0.23-rt40' 'root=/dev/sdb11' 'ro' 'quiet' legacy_initrd '/boot/initrd.img-3.0.23-rt40' '/boot/initrd.img-3.0.23-rt40' } menuentry 'AVlinux 5.0.3, Kernel 3.0.23-avl-7-pae threadirqs' { set root='(hd1,11)'; set legacy_hdbias='0' legacy_kernel '/boot/vmlinuz-3.0.23-avl-7-pae' '/boot/vmlinuz-3.0.23-avl-7-pae' 'root=/dev/sdb11' 'ro' 'threadirqs' 'quiet' legacy_initrd '/boot/initrd.img-3.0.23-avl-7-pae' '/boot/initrd.img-3.0.23-avl-7-pae' } menuentry 'Edubuntu 10.10, Kernel 2.6.33.9-rt31' { set root='(hd1,8)'; set legacy_hdbias='0' legacy_kernel '/boot/vmlinuz-2.6.33.9-rt31' '/boot/vmlinuz-2.6.33.9-rt31' 'root=UUID=ded93dfb-37ae-48cf-a3a3-b613aa5704fd' 'ro' legacy_initrd '/boot/initrd.img-2.6.33.9-rt31' '/boot/initrd.img-2.6.33.9-rt31' } menuentry 'Ubuntu Studio Oz, Kernel 3.0.0-17-generic' { set root='(hd1,6)'; set legacy_hdbias='0' legacy_kernel '/boot/vmlinuz-3.0.0-17-generic' '/boot/vmlinuz-3.0.0-17-generic' 'root=UUID=0241b2ac-a0ab-44de-8d73-0ed084e152e6' legacy_initrd '/boot/initrd.img-3.0.0-17-generic' '/boot/initrd.img-3.0.0-17-generic' } menuentry 'Ubuntu Studio Oz, Kernel 3.0.0-20-generic' { set root='(hd1,6)'; set legacy_hdbias='0' legacy_kernel '/boot/vmlinuz-3.0.0-20-generic' '/boot/vmlinuz-3.0.0-20-generic' 'root=UUID=0241b2ac-a0ab-44de-8d73-0ed084e152e6' legacy_initrd '/boot/initrd.img-3.0.0-20-generic' '/boot/initrd.img-3.0.0-20-generic' } menuentry 'Arch Linux Rt' { set root='(hd0,9)'; set legacy_hdbias='0' legacy_kernel '/boot/vmlinuz-linux-rt' '/boot/vmlinuz-linux-rt' 'root=/dev/sda9' 'ro' legacy_initrd '/boot/initramfs-linux-rt.img' '/boot/initramfs-linux-rt.img' } menuentry 'Arch Linux' { set root='(hd0,9)'; set legacy_hdbias='0' legacy_kernel '/boot/vmlinuz-linux' '/boot/vmlinuz-linux' 'root=/dev/sda9' 'ro' legacy_initrd '/boot/initramfs-linux.img' '/boot/initramfs-linux.img' } menuentry 'Arch Linux Fallback' { set root='(hd0,9)'; set legacy_hdbias='0' legacy_kernel '/boot/vmlinuz-linux' '/boot/vmlinuz-linux' 'root=/dev/sda9' 'ro' legacy_initrd '/boot/initramfs-linux-fallback.img' '/boot/initramfs-linux-fallback.img' } menuentry 'openSUSE 11.2, Kernel 2.6.31.6-rt19' { set root='(hd0,7)'; set legacy_hdbias='0' legacy_kernel '/boot/vmlinuz-2.6.31.6-rt19' '/boot/vmlinuz-2.6.31.6-rt19' 'root=/dev/sda7' legacy_initrd '/boot/initrd-2.6.31.6-rt19' '/boot/initrd-2.6.31.6-rt19' }