Re: FreeBSD, boot environments and /dev
Date: Wed, 11 May 2022 14:58:27 UTC
On Mon, May 9, 2022 at 10:04 AM Dave Cottlehuber <dch@skunkwerks.at> wrote: > > On Mon, 9 May 2022, at 06:25, Michael Schuster wrote: > > On Fri, May 6, 2022 at 12:15 AM Wes Maag <jwmaag@gmail.com> wrote: > >> > >> > >> On Thu, May 5, 2022 at 4:10 PM Michael Schuster <michaelsprivate@gmail.com> wrote: > >>> Hi all, > >>> > >>> while still working (slowly) on an answer to my own question on the > >>> right workflow to keep current up to date reliably with boot > >>> environments, I noticed that after creating and mounting a new BE, > >>> that new BE's /dev (eg /mnt/dev) is very sparsely populated: > > This is expected; /dev would usually be empty until devfs is mounted. You're right - I have a few "historical" BEs lying around, and for most of them, /dev/ is empty. As you guess (below), for the others, they're most likely remnants of the first time I tried to do "pkg -c /mnt" without /mnt/dev being mounted. (as an aside: when was that changed? I know for sure that this hasn't always been necessary) I then created a new BE, mounted it on /mnt, removed /mnt/dev/* (only regular files and empty directories). Booting into that BE didn't work either, I got errors about missing "/dev/" files (can't recall the exact names). What do you guys (plural ;-)) think? Thx Michael > > Looking into the unmounted /dev via the last zfs snapshot of your > / filesystem should also be empty: > > $ ls -AFGhl /.zfs/snapshot/$(ls -rt /.zfs/snapshot/ | tail -1)/dev > total 0 > > If it's not I'd guess these are stray garbage from BE experiments > where /dev wasn't mounted and various scripts & tools tried to pipe > via /dev/{fd,zero,null,...}. > > If you created a hypothetical "empty" BE from scratch, unpacked > src tarballs into it, it would also be empty. > > A+ > Dave -- Michael Schuster http://recursiveramblings.wordpress.com/ recursion, n: see 'recursion'