remake /dev

Bryn M. Reeves bmr at redhat.com
Mon Jul 30 08:30:41 UTC 2012


On Sat, 2012-07-28 at 15:50 +0300, Veli-Pekka Kestilä wrote:
> On 28.7.2012 15:07, Patrick Dupre wrote:
> > My idea what to repair the installation from another installation.
> > So, I mounted the defectuous installation, and I did a chroot to it.
> > It works except that I have an error message:
> > so such file or directory : /dev/urandom
> >
> > Same thing when I make a yum --version
> > There is no files in /dev, I though that I should rebuild it
> 
> If you really need some device nodes in chroot environment you can run 
> after chroot,  "MAKEDEV /dev/urandom" it should just create the device 
> (presuming the defective installation does still have MAKEDEV command in 
> sbin)

Or just bind mount the parent environment's file systems into the target
system before chrooting:

mount --bind /dev /mnt/sysimage/dev
mount --bind /proc /mnt/sysimage/proc
mount --bind /sys /mnt/sysimage/sys

Regards,
Bryn.




More information about the users mailing list