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

Re: Theoretical drive swapidge.



jeremy jozwik wrote at 2010-03-28 10:42 -0500:
> On Sat, Mar 20, 2010 at 8:30 AM, Sjoerd Hardeman
> <sjoerd@lorentz.leidenuniv.nl> wrote:
> > Finally, chroot to /media/newdrive, do a grub-install /dev/sda (or
> > whatever other device your new drive is mounted on),
> 
> everything is copied over to the new drive. grub-install is kicking me however.
> 
> # grub-install /dev/sdb1
> grub-probe: error: Cannot find a GRUB drive for /dev/sdb1.  Check your
> device.map.

Sjoerd mentioned using chroot; are you?  Hmm, maybe you need to bind mount 
proc, sys, and dev also...

# mount /dev/sdb1 /mnt/somewhere
# mount --bind /proc /mnt/somewhere/proc
# mount --bind /sys /mnt/somewhere/sys
# mount --bind /dev /mnt/somewhere/dev
# chroot /mnt/somewhere
# grub-install /dev/sdb1

"Check your device.map" means look at /boot/grub/device.map.  It should look 
something like this:
(hd0)	/dev/sda

I think device.map maps BIOS drives (basically boot order in BIOS) to Linux 
devices.

Perhaps if your new drive is connected externally you should change that to 
sdb, run grub-install, and then change it back...  I really am not sure about 
that.

> also, if all of the grub files are located in /boot/grub, and all the
> kernels are the same, and the new larger drive has the boot flag, why
> is it that the disk will not boot?

grub is the bootloader, and runs soon after the BIOS; without it installed your 
system will not boot.

Also, your laptop might not support booting from USB and booting likely will 
not work through the adapter interface anyway.  Of course you might have 
installed the disk in the laptop, in which case the previous paragraph applies.

Attachment: signature.asc
Description: Digital signature


Reply to: