From owner-freebsd-stable@FreeBSD.ORG Thu Aug 22 02:41:07 2013 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C924D64C; Thu, 22 Aug 2013 02:41:07 +0000 (UTC) (envelope-from mueller6721@twc.com) Received: from hrndva-omtalb.mail.rr.com (hrndva-omtalb.mail.rr.com [71.74.56.122]) by mx1.freebsd.org (Postfix) with ESMTP id 6BF962707; Thu, 22 Aug 2013 02:41:06 +0000 (UTC) X-Authority-Analysis: v=2.0 cv=e9yEuNV/ c=1 sm=0 a=68NkTaeYMVLl2m++3813FQ==:17 a=i4YerQ4AwY4A:10 a=G8i6IojVimUA:10 a=DvSzqBOGy98A:10 a=pedpZTtsAAAA:8 a=ayC55rCoAAAA:8 a=KGjhK52YXX0A:10 a=HpvZ2tN2KasA:10 a=Qtdqo1-JAAAA:8 a=bt2C7hpBAAAA:8 a=6I5d2MoRAAAA:8 a=xNf9USuDAAAA:8 a=wvv6jhfMAQebwEzyQXoA:9 a=vGpKUukCtIIA:10 a=tlJW8gxtbz4A:10 a=68NkTaeYMVLl2m++3813FQ==:117 X-Cloudmark-Score: 0 X-Authenticated-User: X-Originating-IP: 74.130.200.176 Received: from [74.130.200.176] ([74.130.200.176:58936] helo=localhost) by hrndva-oedge01.mail.rr.com (envelope-from ) (ecelerity 2.2.3.46 r()) with ESMTP id FA/55-18705-24A75125; Thu, 22 Aug 2013 02:41:06 +0000 Date: Thu, 22 Aug 2013 02:41:06 +0000 Message-ID: From: "Thomas Mueller" To: freebsd-stable@freebsd.org Subject: Re: Change in loader or kernel: won't boot with kfreebsd in grub2 Cc: "Andrey V. Elsukov" , 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: Thu, 22 Aug 2013 02:41:08 -0000 > 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. I think some FreeBSD boot code is in a small boot partition such as I have on the USB-stick installations, installed with gpart. 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 . 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. 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. 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. Tom