"Diskless Nodes with Gentoo", September 16, 2005 version: Code listing 2.13 says to create certain directories in the slave filesystem. The directory /sys must be added here. (Failure to include /sys causes a boot screen warning, and the boot process hangs. The hang occurs a couple of lines after the warning for missing /sys.)
not really if your system is hanging at boot, it's unrelated to /sys this feature is completely optional in Gentoo
I went back and double-checked what difference pre-creation of /sys makes. My setup is a DHCP/TFTP/NFS server and a diskless node on a private network (Pentium-III boxes, one of them with a PXE NIC). I have tried to set up everything as simple as possible, following the x86 Quick Install Guide and the Diskless Nodes with Gentoo guide. I have a script that creates the /diskless/192.168.1.21/ tree from scratch. When I exclude creation of /diskless/192.168.1.21/sys I get the following screen messages on the diskless node trying to boot: * Mounting proc at /proc ... * No /sys to mount sysfs needed in 2.6 and later kernels! * Mounting /dev for udev ... * Configuring system to use udev ... * Populating /dev with device nodes ... * Setting /sbin/udevsend as hotplug agent ... * Mounting devpts at /dev/pts ... * Activating (possible) swap ... * Remounting root filesystem read/write ... * Setting hostname to h21 ... * Calculating module dependencies ... * Mounting local filesystems ... * Activating (possibly) more swap ... * Setting system clock to hardware clock [Local Time] ... * Caching service dependencies ... After that point the diskless machine hangs. It responds to ping but not ssh (sshd would be started in the default runlevel). Regenerating the /diskless/192.168.1.21/ tree with /diskless/192.168.1.21/sys cures the problem: bootup completes and I get a login prompt on the console. It is interesting to note that the second message above (No /sys ..) is now replaced by * Mounting sysfs at /sys The messages are issued by /sbin/rc. From looking at the code I get the impression that the "happy case" occurs when /sys is present.
that looks like some dependency on the utils (prob udev/hotplug ?) which search for sysfs or some device node no way to say for sure w/out being able to debug it locally ... if you added a call to startup sshd in the boot runlevel you could probably ssh in and find out whats up
(In reply to comment #3) > that looks like some dependency on the utils (prob udev/hotplug ?) which search > for sysfs or some device node > > no way to say for sure w/out being able to debug it locally ... if you added a > call to startup sshd in the boot runlevel you could probably ssh in and find out > whats up I still think that the "Diskless Nodes with Gentoo" should advise to pre-create /sys, unless there is some reason where it would actually be harmful. I took me considerable effort to carefully test the two scenarios on a minimal system: with /sys pre-created, and without. In the latter case bootup fails as described in Comment #2. It may of course be argued that there is some different underlying problem and that we should sort that out instead. But in the meantime my suggestion is to accept pre-creation of /sys as a solution for now, and then optionally file another bug reporting that diskless boot fails if /sys is not pre-created even though it ought to work (I am not claiming that but someone might). Then when that bug is solved the document may again be adjusted, removing the advice to pre-create /sys. IMHO, with the current version (6th October 2005) of the Diskless Nodes paper everyone is likely to run into this problem.
Well, from the docs-team POV: I've added the mkdir call for the /sys directory, but if its lack stops the boot process, you should bug baselayout folks. Please open separate bugreport for the maintainer of apropriate init script.