NetBSD-Users archive

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

Re: Using NAME= as file system specification?



> mueller23%insightbb.com@localhost ("Thomas Mueller") writes:

> >I see something about a new feature in HEAD branch, using
> >NAME=<partition-label> in /etc/fstab .  Would this also work with mount
> >command, like
> >mount NAME=nb6i386root /mnt ?

> The functionality is so far in the following commands:

> dump
> fsck
> mount
> swapctl
> tunefs
> dumpfs
> edquota
> quotacheck
> quotaon

> >Simpler in FreeBSD, like
> >mount /dev/gpt/<partition-label> /mnt (or whatever mount point).

> NetBSD doesn't have a device filesystem, the NAME= feature is strictly
> userland and implemented in the getfsspecname() function. The kernel still
> sees only the /dev/dkXX wedge devices and e.g. mount or df will report only
> those.

> # dkctl sd0 listwedges
> /dev/rsd0d: 3 wedges:
> dk5: 72a45a52-09c5-11df-bed3-001cc4d779ed, 16000000 blocks at 18, type: swap
> dk6: 72a45a70-09c5-11df-bed3-001cc4d779ed, 200000000 blocks at 16000018, 
> type: ffs
> dk7: bla bla, 28198549 blocks at 216000018, type: lfs
> # mount NAME="bla bla" /mnt
> # df /mnt
> Filesystem   512-blocks       Used      Avail %Cap Mounted on
> /dev/dk7       53143578   12962576   34866214  27% /mnt
> # mount | grep /mnt
> /dev/dk7 on /mnt type lfs (local)



> >I'm trying to avoid (mis)counting dk-wedges, could, for instance, newfs
> >(which would act as nukefs) the wrong partition.

> newfs doesn't know the NAME= scheme.


> >Does this work only in NetBSD-HEAD (6.99.x), or can I use NAME= in
> >/etc/fstab in NetBSD 6 as well?

> It is only -current.


> >I tried looking through source code, but couldn't find any hint.

> src/lib/libutil/getfsspecname.c and its users.


> >dk-wedge numbering can be disrupted by adding another GPT-partitioned drive,
> >including USB sticks and USB hard drives.

> My test system running -current is using named wedges and also the
> kernel option DKWEDGE_METHOD_BSDLABEL to mix and match traditional
> BSD partitions and GPT partitions.


> --
> --
>                                 Michael van Elst

Thanks for pointers, but there can still be problems keeping track of 
dk-wedges when there is more than one GPT-partitioned disk including 
USB sticks, like how to denote the root disk and partition when booting
from an image file, or how to set up /etc/fstab in NetBSD-6.

Linux and FreeBSD formerly had preassigned device nodes like in NetBSD,
and I think also OpenBSD, but now use devfs.

I've been cross-compiling NetBSD from source from FreeBSD 9.0-STABLE using
usr/src/build.sh: successful with netbsd-5 on i386 and amd64; apparently
successful for netbsd-6 on i386, though I still think I need to make it
bootable; apparently successful for HEAD on i386 (didn't get to amd64 yet),
even built a USB live-image (not yet tested).

I could skip NetBSD 6 amd64 altogether in favor of HEAD, but no assurance 
that will run on my newer computer (Intel Sandy Bridge).

I don't really want to go further with NetBSD 5.x, considering improvements
such as GPT bootability and urtwn wireless support in NetBSD >= 6.

Tom



Home | Main Index | Thread Index | Old Index