Re: FreeBSD 5, chroot and /dev

2004-08-12 Thread Hanspeter Roth
  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
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


FreeBSD 5, chroot and /dev

2004-08-11 Thread Hanspeter Roth
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
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: FreeBSD 5, chroot and /dev

2004-08-11 Thread Bill Moran
Hanspeter Roth [EMAIL PROTECTED] 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?

This isn't a direct answer to your question, but it should help you
work around your problem.

After booting the CD, look in the /boot directory on the HDD.  If you
move the contents of /boot/kernel.old to /boot/kernel, you'll have
restored your previous kernel, and can then reboot off the HDD to
attempt to build a working kernel again.

-- 
Bill Moran
Potential Technologies
http://www.potentialtech.com
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: FreeBSD 5, chroot and /dev

2004-08-11 Thread Henrik W Lund
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
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: FreeBSD 5, chroot and /dev

2004-08-11 Thread Hanspeter Roth
  On Aug 11 at 11:25, Bill Moran spoke:

 Hanspeter Roth [EMAIL PROTECTED] wrote:
 
  What is the recommended way to create the device nodes in /dev in a
  chroot environment?
 
 This isn't a direct answer to your question, but it should help you
 work around your problem.
 
 After booting the CD, look in the /boot directory on the HDD.  If you
 move the contents of /boot/kernel.old to /boot/kernel, you'll have
 restored your previous kernel, and can then reboot off the HDD to
 attempt to build a working kernel again.

Ok. Thanks.
I have now created /mnt/ufs.1/dev/fd/[012] by mknod and the links
/mnt/ufs.1/dev/std{err,in,out}.
Another build is now in progress which has come further than the
first one.
If this fails too I'll move /boot/kernel.old to /boot/kernel.

Thanks.

-Hanspeter
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: FreeBSD 5, chroot and /dev

2004-08-11 Thread Peter Risdon
Henrik W Lund wrote:
Hanspeter Roth wrote:
[...]
What is the recommended way to create the device nodes in /dev in a
chroot environment?
-Hanspeter
 
[...]
So, messing with device nodes in a chrooted 5.x system is not possible 
(someone correct me here, if I'm wrong). 
It is possible to customise it, by adding things like links for palm 
pilots, cds and so on. Look at /etc/devfs.conf

Peter.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]