Grub2 fails to install to the MBR of /dev/sdb [SOLVED]

Lester M Petrie lmpetrie at bellsouth.net
Sat Jan 14 22:00:47 UTC 2012


On 01/13/2012 08:17 PM, Itamar Reis Peixoto wrote:
>
> On Jan 13, 2012 10:29 PM, "Lester M Petrie" <lmpetrie at bellsouth.net
> <mailto:lmpetrie at bellsouth.net>> wrote:
............................>
> cp -a /boot /root
> umount /boot
>
> Fdisk cfdisk parted gparted etc
>
> After created mount it again and
>
> Cp -a /root/boot /
>
> Grub install now
>
> And youre done
>

OK, what I did, and a couple of steps that I should have done

#cp -a /boot /root

#umount /boot

#gparted
 > delete /dev/sdb3 (/boot, physically 1st partiton on disk)
 > create a new /dev/sdb3 (starts at 1Mib by default)
 > turn on boot flag for new partition
 > quit

#cp -a /root/boot /

#grub2-install /dev/sdb

At this point there are 2 more steps I should have done

#grub2-mkconfig -o /boot/grub2/grub.cfg

edit /etc/fstab to replace the UUID for mounting /boot

Somewhere in what I did or had to do in rescue mode messed up the 
SELinux labeling, and one of the reboots relabeled.  Overall it should 
have been about a 10 minute procedure, but it took me about an hour.  If 
the partition that had to be shrunk was not boot, but something larger, 
backing it up and restoring it might be more difficult and time consuming.

-- 
Lester M Petrie


More information about the users mailing list