Change in loader or kernel: won't boot with kfreebsd in grub2
Juergen Lock
nox at jelal.kn-bremen.de
Sun Aug 11 23:12:35 UTC 2013
On Sun, Aug 11, 2013 at 05:31:10PM +0000, Thomas Mueller wrote:
> Has there been a change in loader or kernel format recently?
>
> Through FreeBSD 9.1 postrelease, I was able to boot with grub2 (Super Grub Disk) on the System Rescue CD (sysresccd.org) by
>
> set root=(hd0,gpt3)
> insmod ufs2
> kfreebsd /boot/loader
> boot
>
> but that no longer works.
>
> That was the method suggested in $PORTSDIR/sysutils/grub2/pkg-message
>
> I just source-upgraded from 9.2-BETA2 to what is now called 9.2-PRERELEASE
>
> uname -a shows
>
>
> FreeBSD amelia2 9.2-PRERELEASE FreeBSD 9.2-PRERELEASE #17 r254196: Sun Aug 11 00:36:49 UTC 2013 root at amelia2:/usr/obj/usr/src/sys/SANDY amd64
>
> Fortunately, I also installed to a USB stick, GPT-partitioned with the first partition being freebsd-boot, so I boot with that, and to get the hard-drive installation, escape to loader prompt and type
>
> set boot_askname
>
> and then ufs:/dev/ada0p3
>
> at the mountroot> prompt.
>
> I want to use the hard drive for more than one OS: FreeBSD and Linux.
>
> For forensic, testing purposes, I tested and was able to boot the old 9.0-BETA1 installation by
>
> set root=(hd0,gpt9)
> insmod ufs2
> kfreebsd /boot/loader
> boot
>
> which is why I think there was possibly a change in loader or kernel format.
>
> I was worried that my Western Digital Caviar Green 3 TB hard drive was starting to go bad, but now it looks like maybe a change in FreeBSD loader or kernel format.
>
Hmm I just tested super_grub2_disk_hybrid_2.00s1-beta5.iso from
http://www.supergrubdisk.org/category/download/supergrub2diskdownload/
if it can boot FreeBSD-9.2-RC1-amd64-memstick.img in qemu and I
had to fix "kfreebsd" spelled as "freebsd" and "kfreebsd_loadenv"
spelled as "frebsd_loadenv", replace /boot/kernel/kernel with
/boot/loader, and I in the loader I then had to set currdev=disk1a
(shown by lsdev) and load /boot/kernel/kernel. qemu was started
like this:
qemu-system-x86_64 -cdrom super_grub2_disk_hybrid_2.00s1-beta5.iso -hda FreeBSD-9.2-RC1-amd64-memstick.img -m 512 -boot d -monitor stdio
Letting super_grub2_disk_hybrid_2.00s1-beta5.iso boot the kernel
directly via kfreebsd /boot/kernel/kernel fails tho because of a this
bug in the vanilla grub 2.00 code:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=699002
(The fix for that bug now is in our sysutils/grub2 port as well as
in debian's grub 2.00 but apparently not yet in the super grub disk
isos.)
So maybe your problem is that loader needs currdev set at least
in this case and in your old 9.0 installation it didn't?
HTH, :)
Juergen
More information about the freebsd-stable
mailing list