[Pkg-sysvinit-devel] need advice: best place to mount /dev/pts early to allow startpar boot concurrency

Kel Modderman kel at otaku42.de
Wed Dec 31 15:51:33 UTC 2008


Hi sysvinit maintainers and maks,

I want to ask your advice about a technical improvement to allow startpar(8)
to be functional early in earliest parts of local boot in runlevel S.

startpar calls getpt(2) which requires that /dev/pts be mounted. /dev/pts
is currently mounted by /etc/init.d/mountdevsubfs.sh after udev has run on
local system. That is too late for startpar, as it wants to be the executor
of all boot scripts. See #457896 for more details.

So, initramfs is one possible place where /dev/pts can be mounted before
root init takes over, and this works. I confirmed this by modifying
/usr/share/initramfs-tools/scripts/init-bottom/udev to mount /dev/pts
after moving /dev/ tmpfs to $rootmnt and rebuilding initrramfs cpio.

---
# move the /dev tmpfs to the rootfs
mount -n -o move /dev $rootmnt/dev

# mount /dev/pts so that startpar can getpt() ealry in boot
mkdir -m 0755 $rootmnt/dev/pts
mount -t devpts -o noexec,nosuid,gid=5,mode=620 devpts $rootmnt/dev/pts
---

The question I would like to ask is, where in your opinion is the best place
to mount /dev/pts:

1) by the udev init-bottom script
2) by a new script which is run in init-bottom after the udev script
3) somewhere else, maybe /etc/init.d/rcS

One thing to consider is that variables for mount options are currently
configurable via /etc/default/devpts, and /etc/init.d/mountdevsubfs.sh
sources this file to get the options. This would need to be preserved
if we change time at which /dev/pts is prepared.

Thanks, Kel.



More information about the Pkg-sysvinit-devel mailing list