Current-Users archive

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

Re: repeated failure to properly shutdown




On 7/22/2016 2:41 PM, Martin Husemann wrote:
On Fri, Jul 22, 2016 at 11:37:56AM -0700, bch wrote:
How does that happen, how does one fix it ?
It is created by init if there is no /dev/console.

Boot some install media, mount your root file system (say on /mnt)
then:

	cd /mnt/dev
	sh MAKEDEV all

(hoping there is a MAKEDEV script there, if not: extract it from etc.tgz
from the install sets)

Another way to fix it is to use mount_null to gain access to the hidden /dev directory. Up until a few minutes ago (when I checked in a change to mount_null.c), mount_null would refuse to do this with a error about the paths not being distinct, but you can
build a copy that doesn't have this limitation with:

ftp 'http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sbin/mount_null/mount_null.c'
sed -e's/(subdir.*/(0)/' -I mount_null.c
gcc -o mount_null mount_null.c -lutil

Then:
./mount_null / /mnt
cd /mnt/dev
./MAKEDEV all

You'll still need to reboot to get rid of the tmpfs, but this way you only need to do that once
and you don't need separate media to boot off of.

Eric


Home | Main Index | Thread Index | Old Index