Current-Users archive

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

Re: Creating /dev/dk* nodes so as to be persistent



On Sat, 19 Oct 2013, Thomas Mueller wrote:
You can unmount the tmpfs file system:

        /sbin/umount /dev

I tried that, but /dev/wouldn't umount because device was busy.

Ah, I forgot about that. "/sbin/umount -f /dev" might work, or you can do it in single user mode before the tmpfs /dev is mounted.

I once used NetBSD fsck_ffs on a FreeBSD UFS partition when FreeBSD fsck_ffs didn't work.

That was after building packages in NetBSD with pkgsrc. It was an old FreeBSD 9.0-BETA1 partition which I still use for FreeBSD ports tree, netbsd-5, netbsd-6, netbsd-HEAD and pkgsrc, and the crash occured under NetBSD.

It's nice that using the same file system partition under both FreeBSD and NetBSD usually works, but I'd still be wary of it.

I don't think the /dev fixes are high risk.

My idea was to copy temporary /dev in memory to an outside location, then copy back to the USB stick from FreeBSD.

But I could try from NetBSD-current i386 on another 16 GB USB stick, or from NetBSD 6.1-STABLE on the other computer.

There's not much point in copying from the tempfs /dev and then copying back; it's much easier to just build a new /dev in an empty directory, assuming you haven't done much to customise the permissions or file names or other aspects of /dev. If copying things under some other OS is part of the possible solution, then I'd create and populate a /dev.new directory, and then rename it into place, like this:

    On the NetBSD machine that has the problem:

        mkdir /dev.new;
        cp -p /dev/MAKEDEV* /dev.new/;
        cd /dev.new; ./MAKEDEV ALL; ./MAKEDEV dk16 dk17 dk18 dk19;

    On some other machine that can mount that disk as /mnt:

        mv /mnt/dev /mnt/dev.old;
        mv /mnt/dev.new /mnt/dev;

    Later, delete the /dev.old directory.

--apb (Alan Barrett)


Home | Main Index | Thread Index | Old Index