Re: Boot loaders for Linux that can also boot FreeBSD
- To: Debian User <debian-user@lists.debian.org>
- Subject: Re: Boot loaders for Linux that can also boot FreeBSD
- From: Tom H <tomh0665@gmail.com>
- Date: Thu, 29 Nov 2012 13:37:17 -0500
- Message-id: <[🔎] CAOdo=Sz85L5+RER5EAH1+mDn5oR-+pVu=eQrfrEQcQRP6pr6iQ@mail.gmail.com>
- In-reply-to: <[🔎] 1354197485.2351.36.camel@q>
- References: <1353795280.2662.12.camel@q> <20121124233520.7ad4b4be.freebsd@edvax.de> <1353798889.2662.46.camel@q> <20121125002717.11a61c8d.freebsd@edvax.de> <1353807268.2773.16.camel@q> <20121125131908.671f6d31.freebsd@edvax.de> <1353846552.2508.23.camel@q> <alpine.BSF.2.00.1211251322500.23965@wonkity.com> <1353877782.2508.225.camel@q> <alpine.BSF.2.00.1211251421160.23965@wonkity.com> <1354029192.2827.11.camel@q> <alpine.BSF.2.00.1211270901130.56247@wonkity.com> <1354046327.2528.15.camel@q> <alpine.BSF.2.00.1211271653330.60249@wonkity.com> <1354086404.2528.89.camel@q> <1354119648.3152.4.camel@q> <alpine.BSF.2.00.1211280923390.66068@wonkity.com> <1354156932.2393.22.camel@q> <87fw3tj9m1.fsf@oak.localnet> <[🔎] 1354197485.2351.36.camel@q>
On Thu, Nov 29, 2012 at 8:58 AM, Ralf Mardorf
<ralf.mardorf@alice-dsl.net> wrote:
>
> I need a boot loader for Linux, that is comfortable to use for my needs,
> a Linux multi-boot with
> trillions of Linux installs,
> trillions ^ 2 kernels and
> (trillions ^ 2) * 1024 entries with different boot options, so something
> as GRUB 2 is unusable for my needs.
>
> Until now I was comfortable with GRUB legacy, but now I add a FreeBSD
> install to my machine and against the claims at
>
> http://en.wikipedia.org/wiki/Comparison_of_boot_loaders
>
> GRUB legacy does not boot FreeBSD (until now). I was thinking of
> SYSLINUX, perhaps the most popular bootloader by Linux experts, but the
> Wiki says it doesn't support booting BSD.
>
> Since access to the freebsd-ufs partition by Linux is a PITA and Linux
> is most important for me, I wont use a FreeBSD bootloader. I need easy
> access to the bootloader's configuration file.
>
> On a FreeBSD mailing list somebody wrote:
>>
>> You might want to try a chainloader boot from grub. The following is a
>> chainloader rule that I have used, as well as a normal loader boot. I
>> use the loader boot, but I also tested the chainloader boot. You will
>> need a ufs2_stage1_5 file in your grub directory for a loader boot, and
>> linux grub might not have it available.
>>
>> title FreeBSD, sda3 (oak) chainloader
>> root (hd1,2)
>> chainloader +1
>> boot
>>
>> title FreeBSD, sda3 (oak) /boot/loader
>> root (hd1,2,a)
>> kernel /boot/loader
>> boot
>
> Yes, ufs2_stage1_5 is missing, so when I tested
>
> #title FreeBSD
> #root (hd0,a)
> #kernel /boot/loader
>
> title FreeBSD
> rootnoverify (hd0,1)
> chainloader +1
> boot
>
> there was no error, but nothing happened, without the chainloader an
> error 17, cannot mount selected partition appeared.
I'm sure that I'm going to regret asking however here goes: why is
grub2 unsuitable?
With grub2:
1) Multiboot from [a]:
menuentry "FreeBSD" {
insmod zfs
search --set=root --label freepool --hint hd0,msdos7
kfreebsd /freebsd@/boot/kernel/kernel
kfreebsd_module_elf /freebsd@/boot/kernel/opensolaris.ko
kfreebsd_module_elf /freebsd@/boot/kernel/zfs.ko
kfreebsd_module /freebsd@/boot/zfs/zpool.cache type=/boot/zfs/zpool.cache
set kFreeBSD.vfs.root.mountfrom=zfs:freepool/freebsd
set kFreeBSD.hw.psm.synaptics_support=1
}
2) Multiboot from notes that I saved:
(get the uuid of the bsd boot slice with grub-probe)
menuentry "FreeBSD" {
insmod part_msdos
insmod part_bsd
insmod ufs2
search --no-floppy --set=root --fs-uuid <uuid>
kfreebsd /boot/kernel/kernel
kfreebsd_loadenv /boot/device.hints
set FreeBSD.vfs.root.mountfrom=ufs:ufsid/<uuid>
set FreeBSD.vfs.root.mountfrom.options=rw
}
You can also use "set FreeBSD.vfs.root.mountfrom=ufs:/dev/adXsYZ"
2) Chainload
(get the uuid of the bsd boot slice with grub-probe)
menuentry "FreeBSD" {
insmod part_msdos
insmod part_bsd
insmod ufs2
search --no-floppy --set=root --fs-uuid <uuid>
kfreebsd /boot/loader
}
menuentry "FreeBSD" {
insmod part_msdos
insmod part_bsd
insmod ufs2
search --no-floppy --set=root --fs-uuid <uuid>
chainloader +1
}
a. http://www.gnu.org/software/grub/manual/html_node/Multi_002dboot-manual-config.html#Multi_002dboot-manual-config
Reply to: