Date: Sat, 15 Dec 2012 12:54:46 -0500 From: "Dieter BSD" <dieterbsd@engineer.com> To: freebsd-hackers@freebsd.org Subject: Re: NetBSD's boot select MBR Message-ID: <20121215175447.310780@gmx.com>
next in thread | raw e-mail | index | archive | help
Domagoj writes: > MBR supports max of 4 slices/partitions. 4 primary partitions, there are the "extended/logical partitions", which allow more. > The '/usr/mdec/mbr_bootsel', which you've mentioned, is equivalent > to FreeBSD's '/boot/boot0', which is tuned via 'boot0cfg' util. > It will also show menu, to choose from, a slice to boot or another > drive OR => 'F6' to choose PXE boot. > If nothing has been selected, it will simply boot an active slice. > So I see FreeBSD's, as superior (additionally supports PXE) => 8.0 onward ... If I understand this correctly FreeBSD's boot0 allows you to set what to boot from the next time and go away while the system reboots. And this method allow booting from not only any slice but any disk, or PXE? But, it does this by writing to the MBR, yes? Some sysadmins want the MBR to be read-only for various reasons. OSes other than FreeBSD aren't going to have boot0cfg. If you're running NetBSD and want to boot Plan 9, do you have to reboot to FreeBSD, run boot0cfg, then reboot to Plan 9? As far as I know, NetBSD's MBR works with any combination of OSes. If the next OS to be booted is on the 1st disk and you don't mind writing to the MBR, you can do the set-and-walk-away thing by setting the active partition. Or you can use something like grub as the next stage and edit grub's default using any text editor, including sed in a script. If you want to boot a slice that is not on the first disk you have to either sit there and type at the menu, or use something like grub. As far as I know, NetBSD's MBR has no support for PXE, but then PXE is intended for diskless machines. > I thought NetBSD's had a MBR code, which could be told via a tool, > from fully booted and running FreeBSD: > "Active slice is 2, but please, boot slice 4 at a next boot". > After that, I would '# reboot' and without any menu, slice 4 > would be booted, for that one time, instaed of an active slice 2. I don't know of a way to do that with just NetBSD's MBR. You could either change the active flag which would remain that way until you changed it again, or sit there and watch for the menu. Given the limited space in the MBR it would be difficult or impossible to add that without giving up something. That feature could be added to a later stage bootstrap. Next time I build a boot disk I'm going to take another shot at multibooting with GPT. I really want to get away from the MBR kludgefest.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20121215175447.310780>