0

I was changing my HD with a (Windows Program for Partitions), now I can't start the server, CentOS.

enter image description here

I remember this:

/etc/grub.conf &
default=1
timeout=10
splashimage=(hd0,4)/grub/splash.xpm.gz
#hiddenmenu

How can I recover the system?

Can I to map the HD?

Here using Disk Utility of DVDLive

-------------------------------------------------------------------------------------
| System Reserved |    Windows    |         Extended  W95 Ext d(LBA)(0x0f)          |
|      NTFS       |      NTFS     |                  /dev/sdb3                      |
|    Bootable     |               |-------------------------------------------------|
|   /dev/sdb1     |   /dev/sdb2   |     (fat32)  |  Linux (0x83) | Linux LVM (0x8e) |
|                 |               |   /dev/sdb4  |   /dev/sdb5   |   /dev/sdb6      |
-------------------------------------------------------------------------------------

I get access to grub.conf with:

$ su
# mkdir /mnt/drv
# mount -t ext4 /dev/sdb5 /mnt/drv
# gedit /mnt/drv/grub/grub.conf

using parted (The Start, End and Size are no exact)

# parted /dev/sdb

Number Start   End       Size     Type     File system    Flags
 1     1049kB  106MB     105MB    primary   ntfs          boot  
 2     xxxMB   yy.yGB    zz.zGB   primary   ntfs            
 3     xxxMB   yy.yGB    zz.zGB   extended
 4     xxxMB   yy.yGB    zz.zGB   logical   fat32
 5     xxxMB   yy.yGB    zz.zGB   logical   ext4
 6     xxxMB   yy.yGB    zz.zGB   logical                 lvm

The logical lvm

Now, I'm confused to edit grub.conf file. And I'm suspecting that some partition (3, 4, 5, 6) must be Primary, but I don't know what it should be.

1
  • In the future please post your screen as text.
    – jc__
    Commented Jul 14, 2016 at 13:19

2 Answers 2

0

It looks like the grub boot loader IS installed on the HD, BUT grub cannot find the grub.cfg file, or there is an error in the file.

The easiest way to replace the grub.cfg file would be to boot from an CD or USB with Super Grub Disk. This will allow you to boot into the server OS where you are most comfortable and run the grub-mkconfig command to replace your grub.cfg file.

You could use almost any 'live' linux OS to boot into to do the same but be mindful of the server OS location and use the correct switches in grub-mkconfig.

Looks like a good inclusive How To here.

1
  • trying with: grub-mkconfig but it was not recognized!. Later: I burn a LiveDVD 6.8, and I gain access to /grub/grub.conf, but I'm changing this file and the results are equals...
    – QA_Col
    Commented Jul 14, 2016 at 18:14
0

Thank you...

I solved my problem

Using LiveDVD of CentOS-6.8-i386, I Opened Disk Utility

Reviewing the Hard Disk Distribution... I see the Partition sdb4 maybe is not correct for Linux, and maybe is "hidden (is front of sdb5 Swap Partition) the corrects sdb5 and sdb6"...

I deleted the sdb4 (fat32) partition, Restored the initial Settings of grub.conf with:

$ su
# mkdir /mnt/drv
# mount -t ext4 /dev/sdb5 /mnt/drv
# gedit /mnt/drv/grub/grub.conf

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .