NetBSD-Users archive

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

Re: How to make /etc/fstab "portable"?



Hi,

Thank you very much for your explanation!
It is very interesting.

Could you write this to the NetBSD guide?

Thanks again.

From: mlelstv%serpens.de@localhost (Michael van Elst), Date: Mon, 8 Feb 2016 18:10:29 +0000 (UTC)

> ryo_on%yk.rim.or.jp@localhost (Ryo ONODERA) writes:
> 
>>However I have no experience about non-GPT disk.
>>And I do not understand naming rule about non-GPT disk partitions.
> 
> There are two cases:
> 
> Without DKWEDGE_METHOD_BSDLABEL
> 
>     There are no wedges for this disk, but NAME matches dk_name + partition_character
>     -> wd0a, wd0b, wd0c just refer to /dev/wd0a, /dev/wd0b, ...
> 
> With DKWEDGE_METHOD_BSDLABEL
> 
>     if the d_packname is '' or 'fictitious' then
>          the wedge is named dk_name + partition_character
>          -> wd0a, wd0b, wd0c, ...
> 
>     otherwise
>          the wedge is named d_packname + '/' + partition_character
>          -> label/a, label/b, label/c, ...
> 
> 
> So you can just use something like NAME=wd0a together with a standard
> disklabel (where d_packname == 'fictitious') and it will find the
> same partition, wether your kernel has DKWEDGE_METHOD_BSDLABEL or not.
> 
> 
> This doesn't help for a 'portable' name. You can only have names if you
> use wedges and you must assign a name to be 'portable', i.e. independent
> of the driver name.
> 
> I.e.: you use a kernel with DKWEDGE_METHOD_BSDLABEL, use the disklabel
> program to set the d_packname to something like 'systemdisk' and then use
> NAME=systemdisk/a to refer to the root partition of that disk.
> 
> 
> -- 
> -- 
>                                 Michael van Elst
> Internet: mlelstv%serpens.de@localhost
>                                 "A potential Snark may lurk in every tree."

--
Ryo ONODERA // ryo_on%yk.rim.or.jp@localhost
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Home | Main Index | Thread Index | Old Index