[K12OSN] Moving the /boot partition

Les Mikesell les at futuresource.com
Wed Jun 7 19:23:53 UTC 2006


On Wed, 2006-06-07 at 13:58 -0500, Jim Kronebusch wrote:
> I am upgrading one of our servers.  I currently am running an internal SATA
> RAID 5 with 6 drives.  I have a /boot, /, /home and swap on a single container
> all with their own partitions.  Everything except for /boot is managed with
> LVM.  I have now purchased a Powervault 220s and have setup two external
> containers.  Container 1 consists of 4 300GB SCSI's striped and container 2
> consists of 2 36GB SCSI's mirrored.  Container 1 will be /home and container 2
> will be /boot, /, and swap all on their own partitions.
> 
> I have mounted container 1 as /powervault and issued "rsync -av /home/
> /powervault".  I have mounted / as /mirror and issued "rsync -av
> --exclude=/home --exclude=/powervault --exclude=/boot / /mirror".  And have
> mounted the new boot partion as /mirror/boot and issued "rsync -av /boot/
> /mirror/boot".
> 
> I have also modified my /mirror/etc/fstab to read as follows:
> ---------start fstab---------------
> # This file is edited by fstab-sync - see 'man fstab-sync' for details
> #/dev/VolGroup00/LogVol00 /                       ext3    defaults        1 1
> /dev/sdc3 /                       ext3    defaults        1 1
> #/dev/sda1  /boot  ext3  suid,dev,exec  0  2
> /dev/sdc1  /boot  ext3  suid,dev,exec  0  2
> /dev/devpts             /dev/pts                devpts  gid=5,mode=620  0 0
> /dev/shm                /dev/shm                tmpfs   defaults        0 0
> #/dev/VolGroup00/LogVol02  /home  ext3  grpquota,suid,dev,usrquota,exec  0  2
> /dev/sdb1  /home  ext3  grpquota,suid,dev,usrquota,exec  0  2
> /dev/proc               /proc                   proc    defaults        0 0
> /dev/sys                /sys                    sysfs   defaults        0 0
> #/dev/VolGroup00/LogVol01 swap                    swap    defaults        0 0
> /dev/sdc2 swap                    swap    defaults        0 0
> /dev/fd0                /media/floppy           auto   
> pamconsole,exec,noauto,managed 0 0
> /dev/hda                /media/cdrom            auto   
> pamconsole,exec,noauto,managed 0 0
> #/dev/sdb1  /powervault  ext3  suid,dev,exec  0  0
> #/dev/sdc3  /mirror  ext3  suid,dev,exec  0  0
> #/dev/sdc1  /mirror/boot  ext3  suid,dev,exec  0  0
> ------------end fstab------------
> 
> The comments represent what the previous running configuration was, the new
> changes for the next reboot are under them.
> 
> I have also modified /mirror/boot/grub/grub.conf as follows:
> -----------start grub.conf------------
> # grub.conf generated by anaconda
> #
> # Note that you do not have to rerun grub after making changes to this file
> # NOTICE:  You have a /boot partition.  This means that
> #          all kernel and initrd paths are relative to /boot/, eg.
> #          root (hd0,0)
> #          kernel /vmlinuz-version ro root=/dev/sdc3
> #          initrd /initrd-version.img
> #boot=/dev/sdc
> default=0
> timeout=5
> splashimage=(hd0,0)/grub/splash.xpm.gz
> hiddenmenu
> title Fedora Core (2.6.14-1.1637_FC4smp)
>         root (hd0,0)
>         kernel /vmlinuz-2.6.14-1.1637_FC4smp ro root=/dev/sdc3 rhgb quiet
>         initrd /initrd-2.6.14-1.1637_FC4smp.img
> title Fedora Core (2.6.14-1.1637_FC4)
>         root (hd0,0)
>         kernel /vmlinuz-2.6.14-1.1637_FC4 ro root=/dev/sdc3 rhgb quiet
>         initrd /initrd-2.6.14-1.1637_FC4.img
> ---------------end grub.conf---------------
> 
> Everything that refers to /dev/sdc3 referred to /dev/VolGroup00/LogVol00.
> 
> So when I make the changes to the above files shutdown the machine, take out
> the SATA card to remove the old RAID, change the bios to boot first from the
> PERC SCSI card that the new PowerVault is on, and set the PERC to boot from
> container 2, the machine does not boot.  It gets just past loading all devices
> in the bios but does not continue, I receive no errors but the machine just
> waits.  I never get to the grub menu.  
> 
> So my question is, what do I have to do beyond what I have done already?  Do I
> need to run a command to write a new boot sector?

Try booting the install CD with 'linux rescue' at the boot prompt.
If your fstab matches the copied partitions, it will find the
system, mount it under /mnt/sysinstall and suggest that you
'chroot /mnt/sysinstall'
after which you should able to do 
/sbin/grub-install
If that doesn't work you may have to mount and fix things by
hand.  You'll also have to edit /etc/grub.conf if the new partitions
have different names. Just exit (twice if you did the chroot) to
reboot cleanly.

If the stock kernel doesn't have the driver for your new controller
you may have to add it to /etc/modules.conf and build a new
initrd with /sbin/mkinitrd.  I think you can do this while in the
rescue chroot environment.

-- 
  Les Mikesell
   les at futuresource.com





More information about the K12OSN mailing list