[CentOS] /mnt/sysimage/dev folder in rescue mode

Thu Mar 25 14:23:17 UTC 2010
Dan Burkland <dburklan at NMDP.ORG>

> -----Original Message-----
> From: centos-bounces at centos.org [mailto:centos-bounces at centos.org] On
> Behalf Of Nicolas Thierry-Mieg
> Sent: Thursday, March 25, 2010 8:55 AM
> To: CentOS mailing list
> Subject: Re: [CentOS] /mnt/sysimage/dev folder in rescue mode
> 
> Mogens Kjaer wrote:
> > If I boot C5 from DVD in rescue mode,
> > chroot to /mnt/sysimage, and try to do a
> > grub-install /dev/sda it will fail because
> > the /dev folder is empty (in the chroot environment).
> >
> > Until now I've then created the missing nodes manually,
> > but is there a smarter way of doing this? Some devfs
> > that needs to be mounted on top of /dev?
> >
> 
> won't this work?
> grub-install --root-directory=/mnt/sysimage
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos

Once fully booted into the rescue environment I do the following:

a) mount /dev/sda1 /mnt/sysimage/ (replace /dev/sda1 with your root partition or logvol)
b) mount -o bind /dev /mnt/sysimage/dev
c) mount -o bind /sys /mnt/sysimage/sys
d) mount -o bind /proc /mnt/sysimage/proc
e) chroot /mnt/sysimage

Regards,

Dan