How NOT to have a disk recognized by grub?

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



Michael wrote:
> Greetings:
> 
> I'm upgrading a fileserver running 3.4 (upgrade to a larger disk).  I 
> backed up the data from the "old" disk and slapped in a newer, larger 
> disk and installed Centos-3.4.  No problems.
> 
> Now, there are some files on the "old" disk that I forgot to move to the 
> back-up disk, so I'd like to mount the "old" disk as /dev/hdd and reboot 
> the system and transfer the files [hdd (old disk) --> hda (new disk)].
> 
> However, the old disk still has Grub on the MBR and when I boot, the 
> system tries to mount the "/boot" and "/" partitions from BOTH disks!  I 
> get errors about duplicate partitions and that those dups won't get 
> mounted.The fileserver does boot but with a configuration combination of 
> both systems.
> 
> Question: Grub is correctly installed and configured on hda.  How do I 
> get the boot process to ignore the old disk (and MBR) on hdd???
> 
> I tried google but I can't seem to find this fix.

You have several problems here with various things.  Not just the Grub.

First, are you sure BIOS is booting the right disk?  If yes, it should 
load Grub from correct MBR.

Second, you can select which disk Grub will use by modifying "root 
(hd0,0)" (or whatever numbers are in your config file).  That way, 
correct kernel and initrd will be loaded.  Also make sure root option in 
kernel line points to correct root partition.

Third, what is in your /etc/fstab file?  If you are using labels, and 
they are not uniq, you have problem.  The easy way aruond it is to wipe 
out file system labels from old partitions.  For example in Rescue mode:

# e2label /dev/hdd0 ""

(giving the empty string will wipe out the label).

Fourth, if your boot disk is not at the same device name as when you 
installed the system, you'll need to rebuild initrd image.  From what 
you described you haven't moved the new disk, so most likely you don't 
need to do this.  Also, if you moved disks around, you might need to 
reinstall Grub (probably not applicable in your case).

-- 
Aleksandar Milivojevic <amilivojevic@xxxxxx>    Pollard Banknote Limited
Systems Administrator                           1499 Buffalo Place
Tel: (204) 474-2323 ext 276                     Winnipeg, MB  R3T 1L7

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux