FreeBSD 5, chroot and /dev
Henrik W Lund
henrik.w.lund at broadpark.no
Wed Aug 11 08:34:25 PDT 2004
Hanspeter Roth wrote:
>Hello,
>
>I have built a new kernel on a FreeBSD 5.2 system which doesn't boot
>anymore. So I took a Freesbee and mounted the filesystems from the
>harddisk and changed root to the harddisk's one. But there were no
>devices in /dev. I tried some of /etc/rc.d/dev*. This only created a
>/dev/null.
>Trying to build the kernel (with a different configuration) fails.
>A regular file /dev/stdout has been created.
>
>What is the recommended way to create the device nodes in /dev in a
>chroot environment?
>
>-Hanspeter
>
>
Greetings!
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).
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?
-Henrik W Lund
More information about the freebsd-questions
mailing list