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:
> > How do I make device nodes in the underlying disk file system?
>
> > How do I access the underlying file system and MAKEDEV?
 
> Normally, /dev is on a disk file system.  However, in your case, I
> think you did not run MAKEDEV at the right point during the
> installation process, so the /dev on disk is missing some entries, or
> perhaps it's almost empty.  When you boot, /sbin/init notices that
> /dev/console is missing, and runs the moral equivalent of (cd /dev ;
> ./MAKEDEV -MM).  That creates a /dev file system in memory (using
> mount_tmpfs(8) or mount_mfs(8)) and populates it.  Anything in the
> memory file system is lost when you reboot.
        
> You can run the "/sbin/mount" command, with no arguments, to check
> whether you have a memory file system mounted on /dev.  If so, then
> there will be a line like "tmpfs on /dev type tmpfs (local)".

>         /sbin/mount | grep /dev

> You can unmount the tmpfs file system:

>         /sbin/umount /dev

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

> Now that the tmpfs file system has been removed, your /dev directory
> should be on the underlying disk.  To make device nodes there, use
> commands like this:

        cd /dev
        ./MAKEDEV all
        ./MAKEDEV dk16 dk17 dk18 dk19

> > Now I don't know if fsck_root would run if root is above the
> > /dev/dk* range.

> I don't know.

> > NetBSD 6.1_STABLE hung on boot on MSI Z77 MPOWER motherboard, every
> > time, most of the time reaching login prompt but hanging there.

> Perhaps that could be fixed.  You could report the problems via
> send-pr.

> > I could run fsck_ffs from FreeBSD.

> There are some differences between NetBSD and FreeBSD's FFS file
> systems.  I would probably not run the fsck from one OS on a disk from
> another OS.

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.

I don't really want to continue with netbsd-5, doubtful about netbsd-6.

> > Most valuable part of this USB-stick NetBSD installation is
> > subversion (svn), which I don't want to disable by high-risk fixes
> > to /dev.

> 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.

> --apb (Alan Barrett)


Tom



Home | Main Index | Thread Index | Old Index