[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: chroot problem with grub



On Thu, 2006-04-13 at 12:13 -0600, Justin Guerin wrote:
> Hi,
> 
> I've had to move my install to a new physical disk.  I made an image of my 
> two partitions (/boot and /), and they restored properly.  Now, I only need 
> to run grub-install to install the boot loader.  
> 
> When I boot from Knoppix, I can mount the / to /mnt/target, then mount /boot 
> to /mnt/target/boot, and /proc to /mnt/target/proc, but I can't get 
> grub-install to work properly.  When I chroot /mnt/target, and run grub, 
> grub can't see the drives (error 21).  However, when I back out of the 
> chroot, grub sees the drives just fine.
> 
> Can anyone tell me how grub accesses the bios to find out information about 
> drives?  I'm not passing something through the chroot, but I have no idea 
> what.  The device nodes are available in the chroot, and so is proc.  I'm 
> running as root, and I know I have access to the device nodes.
> 
> Any help is appreciated.
> 
> Justin

Justin,

I don't think it is necessary to chroot at all. The knoppix disk has
grub on board, so you can use that command. The command also has a
command line switch to specify a device (/dev/hda for instance) and you
can also specify a root-dir. If you specify as root-dir the mount point
of your system (/mnt/target) grub will take the config file
from /mnt/target/boot/...) and everything should work just fine.

If you search the internet (or the manual perhaps) for this specific
info you'll find a lot more.

Good luck

Philippe De Ryck



Reply to: