Re: Specifying root device in /etc/fstab

2018-10-02 Thread Michael van Elst
On Tue, Oct 02, 2018 at 11:05:56PM +0700, Robert Elz wrote: > Date:Tue, 2 Oct 2018 11:28:59 - (UTC) > From:mlel...@serpens.de (Michael van Elst) > Message-ID: > > | Can you please check, you are misquoting, reversing the sense what I > wrote. > > This is what

Re: Specifying root device in /etc/fstab

2018-10-02 Thread Robert Elz
Date:Tue, 2 Oct 2018 11:28:59 - (UTC) From:mlel...@serpens.de (Michael van Elst) Message-ID: | Can you please check, you are misquoting, reversing the sense what I wrote. This is what Jared said in the original message... I came up with this simple pat

Re: Specifying root device in /etc/fstab

2018-10-02 Thread Michael van Elst
k...@munnari.oz.au (Robert Elz) writes: >Date:Tue, 2 Oct 2018 05:13:13 - (UTC) >From:mlel...@serpens.de (Michael van Elst) >Message-ID: > | >Yes, that is what we need - but without knowing what the drive name is, as > | >that can vary. > | > | But you are not

Re: Specifying root device in /etc/fstab

2018-10-02 Thread Robert Elz
Date:Tue, 2 Oct 2018 05:13:13 - (UTC) From:mlel...@serpens.de (Michael van Elst) Message-ID: | >Yes, that is what we need - but without knowing what the drive name is, as | >that can vary. | | But you are not asking for that. It wasn't me doing the asking

Re: Specifying root device in /etc/fstab

2018-10-01 Thread Michael van Elst
k...@munnari.oz.au (Robert Elz) writes: > | In every case the kernel finally selects a root partition to be mounted and > | exactly that partition should be referenced in fstab, what is written there > | will be remounted read-write during the boot process. >Yes, that is what we need - but wit

Re: Specifying root device in /etc/fstab

2018-10-01 Thread Robert Elz
Date:Mon, 1 Oct 2018 17:52:15 - (UTC) From:mlel...@serpens.de (Michael van Elst) Message-ID: | The device doesn't know anything about it. The device, obviously not, the filesystem on the device does though, at least when it is using disklabel type partitioning,

Re: Specifying root device in /etc/fstab

2018-10-01 Thread Michael van Elst
k...@munnari.oz.au (Robert Elz) writes: >Better than what is currently available, perhaps, better than what >Jared proposed, I doubt, that's full of needless noise, just to >essentially make something which looks like a double mapping, from >device into fake wedge label, and then from that back to

Re: Specifying root device in /etc/fstab

2018-10-01 Thread Michael van Elst
an...@smutek.pl (Piotr Meyer) writes: >In fstab(5)[1] I found something like: > To use ``NAME'' on a non-GPT disk, use: > NAME=sb2k5Root/a/ ffs rw,log 1 1 > NAME=sb2k5Root/bnoneswapsw,dp0 0 That's a wedge construct. Currently th

Re: Specifying root device in /etc/fstab

2018-10-01 Thread Michael van Elst
k...@munnari.oz.au (Robert Elz) writes: >I don't see the lack of the ability to specify the partition in the same was >as nearly as big an issue - the device knows which of its partitions is >the root, The device doesn't know anything about it. You may chose a convention like using the first part

Re: Specifying root device in /etc/fstab

2018-10-01 Thread Robert Elz
Date:Mon, 1 Oct 2018 12:59:37 +0200 From:Piotr Meyer Message-ID: <20181001105936.ga31...@czajka.smutek.pl> | Maybe something like this will be better: | | NAME=@root/a/ ffs rw,log 1 1 | or even: | NAME=@kern.root_device/

Re: Specifying root device in /etc/fstab

2018-10-01 Thread Piotr Meyer
On Mon, Oct 01, 2018 at 04:50:21PM +0700, Robert Elz wrote: > From:mlel...@serpens.de (Michael van Elst) > | With wedges you would just reference them by name. > > Yes, of course, that's better, when it is possible, but to work usefully > (as opposed to simply substituting a dkN device

Re: Specifying root device in /etc/fstab

2018-10-01 Thread Robert Elz
Date:Mon, 1 Oct 2018 06:49:55 - (UTC) From:mlel...@serpens.de (Michael van Elst) Message-ID: | With wedges you would just reference them by name. Yes, of course, that's better, when it is possible, but to work usefully (as opposed to simply substituting a dkN

Re: Specifying root device in /etc/fstab

2018-10-01 Thread Jared McNeill
On Mon, 1 Oct 2018, Michael van Elst wrote: ROOT= only works for your special case where you know the root partition. An alias that represents device+partition would be more versatile. The whole point of this is that the device is not known. Of course the partition layout is known, as the sam

Re: Specifying root device in /etc/fstab

2018-10-01 Thread Jared McNeill
On Mon, 1 Oct 2018, Robert Elz wrote: the sysctl is working of course). My only concern would be the amount it adds to libc (in terms of file size) as this is something that would be FWIW this is a patch to libutil, not libc.

Re: Specifying root device in /etc/fstab

2018-09-30 Thread Michael van Elst
g...@gson.org (Andreas Gustafsson) writes: >Could this also be leveraged to fix PR 51503, and/or to eliminate the need >for the amd64 live-image target to build both NetBSD-N.M-amd64-live-wd0root.img >and NetBSD-N.M-amd64-live-sd0root.img? Not fully. It might help for a specific live image, but d

Re: Specifying root device in /etc/fstab

2018-09-30 Thread Michael van Elst
k...@munnari.oz.au (Robert Elz) writes: >The proposed change looks fine to me - I tried to think of any cases >where it wouldn't work properly, and could not come up with any (provided >the sysctl is working of course). My only concern would be the amount >it adds to libc (in terms of file size)

Re: Specifying root device in /etc/fstab

2018-09-30 Thread Michael van Elst
jmcne...@invisible.ca (Jared McNeill) writes: >I came up with this simple patch to getfsspecname that allows ROOT= ROOT= only works for your special case where you know the root partition. An alias that represents device+partition would be more versatile. For that DEV_USES_PARTITIONS (from kern

Re: Specifying root device in /etc/fstab

2018-09-30 Thread Andreas Gustafsson
Jared McNeill wrote: > The ARM images currently contain an fstab entry that points to ld0. I want > to make this more generic as we may have different root devices and/or > root device units may not be consistent across reboots. > > I came up with this simple patch to getfsspecname that allows R

Re: Specifying root device in /etc/fstab

2018-09-30 Thread Robert Elz
Date:Sun, 30 Sep 2018 17:39:47 -0500 From:=?utf-8?B?Q8OhZw==?= Message-ID: <20180930223947.sfc8-%c...@bitmessage.ch> | It'd be more consistent with the rest of the file. More consistent with a file that contains NAME=thing ... ? The proposed change looks fine to

Re: Specifying root device in /etc/fstab

2018-09-30 Thread Cág
Jared McNeill wrote: > I came up with this simple patch to getfsspecname that allows ROOT= > syntax for fs_spec. It uses the value of the kern.root_device sysctl to > construct a device path, so my fstab can have entries like this: > >ROOT=a / ffs rw,noatime