[Mageia-dev] GRUB can't see HD from chroot unless parent /dev is bind-mounted in chroot ?

Colin Guthrie mageia at colin.guthr.ie
Wed Jan 16 17:24:50 CET 2013


'Twas brillig, and Frank Griffin at 16/01/13 16:03 did gyre and gimble:
> I've been re-running /boot/grub/install.sh from within chroots for years
> with no problem.  But today when I tried doing this, I consistently got
> Error 21: no such device.  After googling a bit, I noticed that if I
> started grub in the rescue system and did "grub> geometry (hd0)", I got
> a correct response, but when I did the same thing from a chroot, it got
> Error 21.
> 
> If I bind-mount the rescue system's /dev to the chroot's /dev, it works
> fine.
> 
> This makes perfect sense, except for the fact that I've never had to do
> it before.  Any idea what changed ?  This has the potential to screw up
> a lot of folks who were used to the old way.
> 
> Maybe /dev/sdX entries are no longer static, and so don't exist on the
> root partition unless it is the booted system ?

It's quite possible that the lack of static nodes is what's messing
things up.

Personally I've been bind mounting /dev, /proc and /sys for years
whenever doing any rescuecd etc. stuff. Partly because I have several
LVM volumes where a static /dev/ wouldn't help anyway...

But bind mounting /dev has just been part of my chroot routine for as
long as I remember.

Col


-- 

Colin Guthrie
colin(at)mageia.org
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited http://www.tribalogic.net/
Open Source:
  Mageia Contributor http://www.mageia.org/
  PulseAudio Hacker http://www.pulseaudio.org/
  Trac Hacker http://trac.edgewall.org/


More information about the Mageia-dev mailing list