From owner-freebsd-stable@FreeBSD.ORG Mon Aug 12 19:08:18 2013 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AD40E321 for ; Mon, 12 Aug 2013 19:08:18 +0000 (UTC) (envelope-from nox@jelal.kn-bremen.de) Received: from smtp.kn-bremen.de (gelbbaer.kn-bremen.de [78.46.108.116]) by mx1.freebsd.org (Postfix) with ESMTP id 2F7D924BF for ; Mon, 12 Aug 2013 19:08:17 +0000 (UTC) Received: by smtp.kn-bremen.de (Postfix, from userid 10) id 0C0B41E000D7; Mon, 12 Aug 2013 21:08:15 +0200 (CEST) Received: from triton8.kn-bremen.de (noident@localhost [127.0.0.1]) by triton8.kn-bremen.de (8.14.5/8.14.4) with ESMTP id r7CJ5CMl060664; Mon, 12 Aug 2013 21:05:12 +0200 (CEST) (envelope-from nox@triton8.kn-bremen.de) Received: (from nox@localhost) by triton8.kn-bremen.de (8.14.5/8.14.3/Submit) id r7CJ5BOX060663; Mon, 12 Aug 2013 21:05:11 +0200 (CEST) (envelope-from nox) From: Juergen Lock Date: Mon, 12 Aug 2013 21:05:11 +0200 To: Thomas Mueller Subject: Re: Change in loader or kernel: won't boot with kfreebsd in grub2 Message-ID: <20130812190511.GA59809@triton8.kn-bremen.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-stable@freebsd.org, Juergen Lock X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Aug 2013 19:08:18 -0000 On Mon, Aug 12, 2013 at 03:39:45PM +0000, Thomas Mueller wrote: > > 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 > > I still wonder why Super Grub Disk kfreebsd worked until recently. > > I figure something must have changed in FreeBSD loader or kernel structure since the Super Grub Disk didn't change in that time. > > For currdev, apparently the big hard drive is just recognized as one big drive with no reference to partitions (lsdev). > Hmm that sounds like a problem and would explain why loader cannot boot that install, when it doesn't find the partition... Maybe this is another case of confusion caused by leftover partition table data? In that case you probably can fix this by backing up what you want to keep from that disk, dd'ing /dev/zero over beginning and end of it and then reinstalling everything... (What does gpart show say about that disk now when run from a booted system and also from the 9.2 live system?) > I could try building grub2 from ports on both the hard-drive installation and the USB-stick amd64 installation, see what possibilities are then available. > > FreeBSD gpart can create a boot partition, but then the question is how to boot that when there is more than one OS partition. > > I can't simply put the FreeBSD boot partition at the start of the hard drive as I did with the USB sticks. > > I had a FreeDOS installation with syslinux on a USB stick that went bad (the USB stick hardware). That would permit me to have various boot images including grub4dos and Super Grub Disk to boot with syslinux without booting into FreeDOS. I'd re-create that, but the FreeDOS installer has proven tricky. > I talked to the super grub disk people yesterday and they want to prepare an updated iso using debian's grub 2.00 (that has the kfreebsd >= 9.1 kernel fix), and with the FreeBSD templates fixed also, _maybe_ that would then help you as well... Good luck, :) Juergen