Date: Wed, 13 May 2009 10:03:16 -0400 From: John Baldwin <jhb@freebsd.org> To: freebsd-embedded@freebsd.org Subject: Re: nanobsd boot slice selection does not work Message-ID: <200905131003.16938.jhb@freebsd.org> In-Reply-To: <20090512221342.GA9393@psconsult.nl> References: <200904201535.21191.nick@van-laarhoven.org> <200905121445.27090.jhb@freebsd.org> <20090512221342.GA9393@psconsult.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday 12 May 2009 6:13:42 pm Paul Schenkeveld wrote: > During reboot, boot0 suggests that slice 2 is default: > > 1 Seconds to automatic boot. Press Ctrl-P for entering Monitor. > > 1 FreeBSD > 2 FreeBSD > 5 Drive 1 > > Boot: 2 > > It looks like the kernel on ad0s1a gets loaded however. To be sure I > upgraded the kernel on ad0s2a with a newer one, still the same behaviour. Can you do boot0cfg -v after you have rebooted in this case? I want to see if the active flag is set to slice 2. > To summarize 7.2 boot0 behaviour: > > - Pressing [F]1 or [F]2 at the boot0 prompt selects slice 1 or 2 and > boots off that slice. If the update option is on, default_selection > is set in sector0, the active flage is set on the requested slice > and cleared from the other slice. Ok, so pressing the key always works? > - Boot0cfg -s N sets default_selection to N and does not affect the > active flag in MBR record. Right, the way this works at least in <= 7.1 is that boot0 changes the active flag based on 'default_selection' and then writes the new MBR back out to disk. > - Boot0 does not look at default_selection at all, the slice marked > active is booted, if no slice is marked active, slice 1 is booted. Well, boot1 does not look at default_selection at all. I think boot0 is still honoring it, but what happens is that boot0 loads boot1 from slice 2, but that boot1 doesn't find the active flag set, so it uses the first FreeBSD slice (slice 1) to load boot2, the loader, and the kernel. -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905131003.16938.jhb>