Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Aug 2013 01:10:46 +0200
From:      Juergen Lock <nox@jelal.kn-bremen.de>
To:        Thomas Mueller <mueller6724@bellsouth.net>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: Change in loader or kernel: won't boot with kfreebsd in grub2
Message-ID:  <20130811231046.GA9852@triton8.kn-bremen.de>
In-Reply-To: <475633.68200.bm@smtp117.sbc.mail.gq1.yahoo.com>
References:  <475633.68200.bm@smtp117.sbc.mail.gq1.yahoo.com>

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



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