Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Jul 2014 17:51:59 +1000
From:      Noel Hunt <noel.hunt@gmail.com>
To:        freebsd-questions@freebsd.org
Subject:   FreeBSD 10.0, booting with grub (grub2)
Message-ID:  <CAGfO01wAqgv2srhaOuQYTdqV1F8nXFqRMGZ6Z2c9HUG%2BVpk8zw@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
I have a FreeBSD 10.0/Solaris 11.1 dual-boot machine. Solaris was
installed after FreeBSD and since it uses grub by default I am using
that to boot. Currently I am just invoking /boot/loader from grub.cfg
in Solaris, but I would like to boot directly. This just doesn't work.

I have installed grub2 on FreeBSD via ports, and run `grub-mkconfig'
to get some entries for grub.cfg which I have simply applied to the
Solaris installation (via the custom.cfg script).

But, these entries just don't work. I have tried running each command
by hand at the grub CLI with debugging but after all the debug output
is printed the screen goes black and the machine reverts to the
normal power-on screen, and the boot selection process starts all
over again.

This is the entry:

menuentry 'FreeBSD, with kFreeBSD kernel' {
        insmod part_gpt
        insmod ufs2
        search --no-floppy --fs-uuid --set=root 53a87fa1e9b6256d
        echo 'Loading kernel of FreeBSD kernel ...'
        kfreebsd  /boot/kernel/kernel
        kfreebsd_loadenv   /boot/device.hints
        kfreebsd_module_elf     /boot/kernel/ufs.ko
        set kFreeBSD.vfs.root.mountfrom=ufs:ufsid/53a87fa1e9b6256d
        set kFreeBSD.vfs.root.mountfrom.options=rw
}

There is a similar entry for single-user boot with the appropriate flag
for the kernel.

If I could see what actually happens at the grub `boot' I might be
able to fix this, but it doesn't look like there are any other debug
mechanisms for grub apart from `set debug=all'.

I tried to add different flags to the kernel invocation, -v and -d but
nothing happened. The screen goes black and reverts to a normal
grub boot menu.

I was wondering if there may be problems with 32-bit versus 64-bit
binaries here. All the grub modules are 32-bit ELF.

Or are there other modules that need to be loaded?

Any help would be much appreciated.

Noel Hunt



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGfO01wAqgv2srhaOuQYTdqV1F8nXFqRMGZ6Z2c9HUG%2BVpk8zw>