:: Re: [Dng] vdev status update
Page principale
Supprimer ce message
Répondre à ce message
Auteur: Isaac Dunham
Date:  
À: Jude Nelson
CC: dng@lists.dyne.org
Sujet: Re: [Dng] vdev status update
On Sun, Feb 22, 2015 at 08:00:58PM -0500, Jude Nelson wrote:
> I consider vdev closer to being done than closer to having been just
> started, and it's mature enough that early testers can start experimenting
> with using it to boot Devuan in a VM (maybe even on real hardware, if
> you're the adventurous type). Not only does it create all device files in
> /dev that you'd expect, but also it set up and maintains the directories
> and symlinks for:
> * /dev/block
> * /dev/char
> * /dev/bus
> * /dev/bsg
> * /dev/cpu
> * /dev/disk/by-id
> * /dev/disk/by-uuid
> * /dev/dri
> * /dev/cdrom, /dev/cdrw, /dev/dvd, /dev/dvdrw
> * /dev/input/by-path
> * /dev/mapper
> * /dev/net
> * /dev/rtc
> * /dev/snd/by-path
> * /dev/v4l


I had just been wondering how to set up /dev/disk/by-id;
I have a helper for mdev that will set up /dev/disk/by-uuid/ and
/dev/disk/by-label/ symlinks (by parsing the output of 'blkid'):
https://github.com/idunham/mdev/blob/master/helpers/disk_link.sh
It's released into the public domain via the unlicense.

<snip>
> === TODO ===
> There's still a few major shortcomings before I'm comfortable tagging an
> alpha release, which I list below:
> * vdevd needs an accompanying init script to mount devtmpfs and set up:
> -- /dev/stdout
> -- /dev/stderr
> -- /dev/stdin
> -- /dev/core
> -- /dev/shm
> -- /dev/MAKEDEV
> -- /dev/fd
> -- /dev/log
> -- /dev/xconsole
> -- and probably others


ln -s /proc/kcore     /dev/core
ln -s /proc/self/fd   /dev/fd
ln -s /proc/self/fd/0 /dev/stdin
ln -s /proc/self/fd/1 /dev/stdout
ln -s /proc/self/fd/2 /dev/stderr
# MAKEDEV is part of package makedevs;
# it should be copied to /dev if it exists 
[ -x /sbin/MAKEDEV ] && cp /sbin/MAKEDEV /dev/MAKEDEV || \
 ln -s /bin/true /dev/MAKEDEV


/dev/log is the responsibity of the syslog implementation, which is not
started by the device manager.

/dev/xconsole is not something I have on my main (udev-based) partition -
I think it's the result of running xconsole?
/dev/shm is either a mountpoint for a tmpfs filesystem or a link to one.
An old FHS-style system will do:

mkdir /dev/shm && mount -t tmpfs shm /dev/shm

On systemd-influenced systems, it's instead roughly:
# in mountdevsubfs.sh, from initscripts
mount -t tmpfs tmpfs /run
mkdir -p /run/lock /run/shm
mount -t tmpfs tmpfs /run/lock
mount -t tmpfs tmpfs /run/shm

#in udev, which runs before mountdevsubfs.sh
mountpoint -q /dev/shm/ && umount /dev/shm/
mountpoint -q /dev/pts/ && umount /dev/pts/
#(re)mount /dev and populate it
mkdir -p /dev/pts && mount -t devpts devpts /dev/pts

#I'm not sure where this is.
ln -s /run/shm /dev/shm

HTH,
Isaac Dunham