Friday, November 10, 2017

centos fail to install bootloader, solution

installing centos 6.3  and at the final step, 'installing boot loader ' and it stuck in the step and when force reboot, it won't boot.

1- boot with ubuntu live cd and mount the first partition to /mnt, then install grub2 with the comment below

$ sudo grub-install --target=i386-pc --boot-directory=/mnt /dev/sda

2- after create file grub.cfg (/mnt/grub/grub.cfg) with content below

menuentry 'CentOS (2.6.32-279.el6.x86_64)'{
    set root='(hd0,msdos1)'
    linux /vmlinuz-2.6.32-279.el6.x86_64 ro root=/dev/mapper/vg_centos63-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_LVM_LV=vg_centos63/lv_swap rd_LVM_LV=vg_centos63/lv_root rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
    initrd /initramfs-2.6.32-279.el6.x86_64.img

3- then reboot to local hardisk, the centos will come up .

if  it is stuck in grub  console and what to load config to test ue

grub> configfile (hd0,msdos1)/boot/grub/grub.cfg


grub> configfile /boot/grub/grub.cfg

No comments:

Post a Comment