From owner-freebsd-hackers@FreeBSD.ORG Tue May 31 23:45:17 2011 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 423AE106566B for ; Tue, 31 May 2011 23:45:17 +0000 (UTC) (envelope-from dieterbsd@engineer.com) Received: from mailout-us.gmx.com (mailout-us.gmx.com [74.208.5.67]) by mx1.freebsd.org (Postfix) with SMTP id 06D378FC23 for ; Tue, 31 May 2011 23:45:16 +0000 (UTC) Received: (qmail 8013 invoked by uid 0); 31 May 2011 23:45:16 -0000 Received: from 67.206.163.29 by rms-us013.v300.gmx.net with HTTP Content-Type: text/plain; charset="utf-8" Date: Tue, 31 May 2011 23:45:13 +0000 From: "Dieter BSD" Message-ID: <20110531234514.95200@gmx.com> MIME-Version: 1.0 To: hackers@freebsd.org X-Authenticated: #74169980 X-Flags: 0001 X-Mailer: GMX.com Web Mailer x-registered: 0 Content-Transfer-Encoding: 8bit X-GMX-UID: uUrXfAQNhTXpb1nbH2Nr4+5Sa2FkZtUX Cc: Subject: Re: Active slice, only for a next boot X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 May 2011 23:45:17 -0000 Peter writes: >> A better approach is to be able to boot whatever slice you >> want without having to change the active slice. >> >> NetBSD can do this. The MBR puts up a menu of the bootable >> slices on the disk being booted. You can allow the timer >> to time out and boot the default. Or you can enter the number >> of the slice you want to boot. Or you can type a function key >> F1 F2 ... to boot a different disk, and it will load the MBR >> from that disk and run it. There is an alternative for keyboards >> without function keys. > So can FreeBSD - though only for MBR If so, the documentation could use improvement. Examples would be great. > - this functionality doesn't seem > to have made it into the GPT bootcode. Is anyone working on this?  MBR is only good for 2 TB and the 3 TB disks are becoming cost competitive.  I've switched over to GPT for everything except boot disks, as it is less brain damaged than MBR. >> And it works great. Except that one of the 27 stages of boot >> code that FreeBSD uses INSISTS on booting the active slice, >> so you can tell the MBR to boot slice 3 and slice 3's boot >> code sees that slice 4 is active and boots slice 4. > > Multibooting worked correctly when I last used it (a few years ago). > Have you raised this as a PR? No, partly because I haven't had much luck with PRs.  Mainly because I'd rather spend my time trying to migrate to GPT than improving MBR. So many bugs/misfeatures so little time, >> RS-232 console + hardware modem + POTS = remote console > > And even that doesn't fully work unless you have a serial-aware BIOS. Real computers have RS-232 consoles. If you neglected to specify RS-232 console in the requirements, there is this thing.  I haven't tried it. http://www.realweasel.com/ Somebody probably sells a KVM-over-IP box. You could see if openbios supports your mainboard. John writes: >> And it works great.  Except that one of the 27 stages of boot >> code that FreeBSD uses INSISTS on booting the active slice, >> so you can tell the MBR to boot slice 3 and slice 3's boot >> code sees that slice 4 is active and boots slice 4. > > There are only 3 stages, It feels like more.  :-) > and boot1.S is what looks at the active slice.   > Unfortunately it doesn't have a better way to do this as the only input it > gets from boot0 or any other MBR boot loader is the BIOS drive number in %dl. > I'm not sure how else you would detect that a non-active slice was booted from > when that is your only input. The NetBSD boot code manages to do it.