tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Root device independent bootable disk images



Joerg Sonnenberger wrote:
> On Wed, Dec 12, 2018 at 05:18:55PM +0200, Andreas Gustafsson wrote:
> > Since jmcneill's commit of src/lib/libutil/getfsspecname.c 1.5, NetBSD
> > supports the special string "ROOT." as an alias for the root device in
> > /etc/fstab.  This can be used to avoid hard-coding the device name of
> > the root disk on bootable disk images, allowing a single image to be
> > booted from disks having different device names.
> 
> I'd be careful as especially on x86, the boot device detection is
> somewhat flaky. The firmware interface is just too limited.

That may be, but I don't see how the change could make the situation
worse.  If the boot device detection fails, it will cause problems
already at the vfs_mountroot() stage, and we won't even get to the
point in the boot sequence where /etc/fstab is used.

The kernels on the -sd0root and -wd0root images are identical and
configured with "root on ? type ?", only /etc/fstab differs.
-- 
Andreas Gustafsson, gson%gson.org@localhost


Home | Main Index | Thread Index | Old Index