[Yaird-devel] Yaird and empty /dev/ on root FS

Erik van Konijnenburg ekonijn at xs4all.nl
Wed Dec 14 14:30:24 UTC 2005


On Wed, Dec 14, 2005 at 01:35:55PM +0200, Wladimir Mutel wrote:
> 	Hi,
> 
> 	I have a sample Debian-unstable system and my own scripts to 
> 	install it on various hardware by cloning 
> 	(mkfs, tar c...|tar x..., set root pw, hostname, 
> 	regenerate sshd keys, etc)
> 
> 	After introduction of udev, my /dev stopped to be copied, as tar
> 	in my clone scripts did not traverse mount points. So once I
> 	created a system clone with empty /dev and then learned in
> 	painful way that there should be at least "null" and "console"
> 	files or else init would not start.
> 
> 	I think it would be useful that Yaird enforce some requirements
> 	on initial /dev	content (f.e. report about missing null,
> 	console, whatever and offer user a way to create them). This
> 	would improve its survivability in some situations that are 
> 	still unusual to it.

Point taken; building a test file system that fails to boot due to the
absense of /dev/null has bitten me occasionally as well.

However, the /dev that exists just after the real root is activated
is not the one you see on a running system; often a tmpfs is mounted over it.

And I'm reluctant to pry underneath a mounted filesystem looking for
possibly absent files when running yaird: the balance between effort,
problems prevented while booting and problems introduced when builing
the image does not seem right.

Creating /dev/null from within the ramfs is tricky: the root file system
is still read only.  Switching to the real root with a mounted tmpfs as /dev/
is an option; I'm not sure it's the best approach, but it seems to become
more common these days.

> 	Btw, I would appreciate if you direct me to the information on
> 	mandatory initial /dev content. May be I should just create them
> 	in cloned filesystem by my script.

So far, just /dev/null and /dev/console seems exactly right.

Regards,
Erik



More information about the Yaird-devel mailing list