Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 May 2013 19:05:49 +0200
From:      Ralf Mardorf <ralf.mardorf@alice-dsl.net>
To:        freebsd-questions@freebsd.org
Subject:   Re: Bootloader/Replace GRUB
Message-ID:  <1368464749.668.30.camel@archlinux>
In-Reply-To: <CAL1yNpyWu4X2j6x2z0TDr=F9ETyumib-v=4_Y4W7Jms8xVizGQ@mail.gmail.com>
References:  <CAL1yNpyWu4X2j6x2z0TDr=F9ETyumib-v=4_Y4W7Jms8xVizGQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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'
}




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1368464749.668.30.camel>