Change in loader or kernel: won't boot with kfreebsd in grub2
Juergen Lock
nox at FreeBSD.ORG
Fri Aug 23 21:25:50 UTC 2013
On Thu, Aug 22, 2013 at 02:41:06AM +0000, Thomas Mueller wrote:
> > Not sure about a physical cd but booting an iso should be possible
> > using either memdisk from grub2 like in the posting I linked,
>
> > http://ubuntuforums.org/showthread.php?t=1549847&page=13&p=10818457#post10818457
>
> > _or_ also using grub2's own loopback command like described here:
>
> > http://michael-prokop.at/blog/2009/05/25/boot-an-iso-via-grub2/
>
> > (but btw the super grub disk iso should also boot directly when dd'd
> > to an usb key, not only when burned to a cd/dvd.)
>
> > It could only be that the partition table on your disk is somehow
> > messed up/has leftover data from a previous install that confused
> > loader and might confuse grub2 too so that it doesn't find the
> > FreeBSD install...
>
> > > I also wonder how or if one can boot a FreeBSD partition from GRUB2 or syslinux.
> >
> > That's what super grub disk's autodetection should now detect
> > correctly, if you want to write a grub.cfg entry manually (or type
> > it live from a grub2 rescue shell) an example is also here:
>
> > http://forums.freebsd.org/showthread.php?p=85122#post85122
>
> > but note as I said before if you want to boot a 9.1+ kernel directly
> > w/o loader you need a grub 2.00 version that has the patch mentioned
> > here: (that's now in debian and in FreeBSD ports but might not be
> > in other grub2 versions floating around)
>
> > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=699002
>
> > Tom
> >
> HTH, :)
> > Juergen
>
> I tried to boot the FreeBSD partition directly from Super Grub2 Disk with chainloader +1, but was not successful.
>
Well that just run loader which seems to have issues on your box as you
said. (or does on mbr at least)
> I think some FreeBSD boot code is in a small boot partition such as I have on the USB-stick installations, installed with gpart.
>
...so if this is gpt you may need to chainload that partition in fact, yes.
> I wonder if "linux16 memdisk" from grub2 is the same as "KERNEL memdisk" in syslinux: was planning to try it on FreeDOS 1.1 installation fd11src.iso .
>
They both boot memdisk so kind of similar, yes.
> I also have a memdisk in the latest syslinux installed from FreeBSD ports.
>
> Once FreeBSD boots from the USB stick, it accesses the GPT partitions OK as far as I can tell.
>
Ok so only loader has difficulties... As I said try the latest super grub
disk iso, that might still be able to see the partition and if yes boot the
kernel directly from there w/o loader.
> I could even check with a USB-stick installation of NetBSD, though NetBSD is much less stable than FreeBSD on my modern hardware.
>
> I was even thinking of making a giant floppy image, not to write to an actual disk, but to boot via grub2 or possibly grub4dos.
>
If you already use grub2 then it only needs the mentioned patch (and be able
to see your FreeBSD partition), then it should be able to boot the kernel
directly w/o loader as I said.
> I would copy /boot but not including the modules to another directory, apply makefs, mdconfig, mount this image, and bsdlabel.
>
> I did something like that with NetBSD 5.1_STABLE i386, and it worked with grub4dos.
>
> I would of course have to interrupt the boot to be able to specify the root file system, as I did with NetBSD, or maybe put into loader.conf .
>
> map --mem --heads=16 --sectors-per-track=63 (hd0,2)/boot2/nbffs51c.img (fd0)
> map --hook
> rootnoverify (fd0)
> chainloader (fd0)+1
> boot
>
> and hit the spacebar in time to get the boot menu, so I coulld type
> boot netbsd -a
> to specify the root file system, or I could boot any other kernel present in the 40 MB "floppy" image.
>
> Grub4dos, being born from DOS, requires setting a (fictitious here) disk geometry.
>
..so all that sounds superfluous.
> Tom
>
HTH, :)
Juergen
More information about the freebsd-stable
mailing list