FreeBSD 5, chroot and /dev

Hanspeter Roth hampi at rootshell.be
Thu Aug 12 07:00:01 PDT 2004


  On Aug 11 at 17:33, Henrik W Lund spoke:

> I may be wrong here, but I think that in the 5.x system, /dev is 
> populated at boottime, courtesy of the GEOM layer and the devfs 
> filesystem. These two operate together, GEOM detecting hardware and 
> giving it proper device nodes in the special devfs filesystem (which is 
> mounted under /dev, if you check your fstab).

Greetings!

ok, I have shown the "short" paths as of the mounted harddisk. They
should all be prefixed with /mnt/ufs.1/. So when a filesystem
usually containing /dev is mounted the /dev directory becomes
/mnt/ufs.1/dev. So this directory had no entries. A had then tried
to create a few entries by hand which are then visible after `chroot
/mnt/ufs.1'.

> So, messing with device nodes in a chrooted 5.x system is not possible 
> (someone correct me here, if I'm wrong). What happens when you try to 
> boot it normally?

Well, I had specified the wrong cpu type in the kernel konfig. I
encountered some page fault and dropped to the debugger.
I'm now about to 'upgrade' to 5.2.1-release and shall retry with the
proper cpu type.

-Hanspeter


More information about the freebsd-questions mailing list