Hello Everyone
I have a remote CentOS 6.4 server (with KVM access), when I received the server it was running with LVM on single disk (sda)
I managed to remove LVM and install raid 1 in sda and sdb disks
the mirroring is working fine, my only issue now is that everytime I reboot the server I got the grub command line and I have manually boot using comand
grub> configfile (hd1,0)/grub/grub.conf
OR
grub> configfile (hd0,0)/grub/grub.conf
then it will boot fine without any error.
Any idea how can I make it auto boot ?
I tried almost everything I can find in the internet.
Note: each disk (sda & sdb) is 2TB size, could this be the problem?
. # df -h Filesystem Size Used Avail Use% Mounted on /dev/md2 1.8T 1.1G 1.7T 1% / tmpfs 16G 0 16G 0% /dev/shm /dev/md0 1.9G 69M 1.8G 4% /boot
# cat /proc/mdstat
Personalities : [raid1] md2 : active raid1 sda3[2] sdb3[0] 1940882240 blocks super 1.2 [2/2] [UU]
md1 : active raid1 sdb2[0] sda2[2] 10482176 blocks super 1.2 [2/2] [UU]
md0 : active raid1 sdb1[0] sda1[1] 2008000 blocks [2/2] [UU]
unused devices: <none>
# fdisk -l /dev/sda
Disk /dev/sda: 2000.4 GB, 2000398934016 bytes 255 heads, 63 sectors/track, 243201 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x000b0530
Device Boot Start End Blocks Id System /dev/sda1 * 1 250 2008093+ 83 Linux /dev/sda2 251 1556 10490445 82 Linux swap / Solaris /dev/sda3 1557 243201 1941013462+ fd Linux raid autodetect
# fdisk -l /dev/sdb
Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes 255 heads, 63 sectors/track, 243201 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0xadb3bd62
Device Boot Start End Blocks Id System /dev/sdb1 * 1 250 2008093+ fd Linux raid autodetect /dev/sdb2 251 1556 10490445 82 Linux swap / Solaris /dev/sdb3 1557 243201 1941013462+ fd Linux raid autodetect
# cat 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/mapper/vg_srv6953-lv_root # initrd /initrd-[generic-]version.img #boot=/dev/sda default=0 timeout=5 splashimage=(hd1,0)/grub/splash.xpm.gz hiddenmenu title CentOS (2.6.32-358.18.1.el6.x86_64) root (hd1,0) kernel /vmlinuz-2.6.32-358.18.1.el6.x86_64 ro root=/dev/md2 KEYBOARDTYPE=pc KEYTABLE=us LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 crashkernel=auto rhgb quiet rd_retry=20 initrd /initramfs-2.6.32-358.18.1.el6.x86_64.img title CentOS (2.6.32-358.el6.x86_64) root (hd1,0) kernel /vmlinuz-2.6.32-358.el6.x86_64 ro root=/dev/md2 KEYBOARDTYPE=pc KEYTABLE=us LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 crashkernel=auto rhgb quiet initrd /initramfs-2.6.32-358.el6.x86_64.img
On 15.Sep.2013, at 11:37, Ahmad AlTwaijiry wrote:
Hello Everyone
I have a remote CentOS 6.4 server (with KVM access), when I received the server it was running with LVM on single disk (sda)
I managed to remove LVM and install raid 1 in sda and sdb disks
the mirroring is working fine, my only issue now is that everytime I reboot the server I got the grub command line and I have manually boot using comand
...
I tried almost everything I can find in the internet.
You did reinstall grub? Something like (or similar)
$ grub-install /dev/sda $ grub-install /dev/sdb
Note: each disk (sda & sdb) is 2TB size, could this be the problem?
No. I do not think so.
OK
I did the following:
1. Remove sda from raid (using mdadm) 2. Run dd (dd if=/dev/zero of=/dev/sda bs=512 count=1000) 3. Copy the current disk partition table (sfdisk -d /dev/sdb | sfdisk /dev/sda) 4. add disk to raid (using mdadm) 5. reinstall grub (using grub command) 6. run grub-install /dev/sda 7. Reboot
and now it's working :)
I did all the above steps before except step 2, it seems I need to clear the disk with dd
Thank you Markus for your reply.
echo "Hello World :)"
On Sun, Sep 15, 2013 at 8:28 PM, Markus Falb wnefal@gmail.com wrote:
On 15.Sep.2013, at 11:37, Ahmad AlTwaijiry wrote:
Hello Everyone
I have a remote CentOS 6.4 server (with KVM access), when I received the server it was running with LVM on single disk (sda)
I managed to remove LVM and install raid 1 in sda and sdb disks
the mirroring is working fine, my only issue now is that everytime I reboot the server I got the grub command line and I have manually boot using comand
...
I tried almost everything I can find in the internet.
You did reinstall grub? Something like (or similar)
$ grub-install /dev/sda $ grub-install /dev/sdb
Note: each disk (sda & sdb) is 2TB size, could this be the problem?
No. I do not think so.
-- Markus
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos