0

I already had RHEL 7 on my HDD(I have only one) and now recently installed Ubuntu 14.04. I am unable to create Grub2 entry so that I can use both OS, currently I can only use Ubuntu.

The result for #fdisk -l is :

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00098227

 Device    Boot   Start       End         Blocks    Id  System
/dev/sda1   *   314574848   524290046   104857599+  83  Linux
/dev/sda2       524292094   976771071   226239489    f  W95 Ext'd (LBA)
/dev/sda5       524292096   874369023   175038464    7  HPFS/NTFS/exFAT
/dev/sda6       875397120   976771071    50686976   8e  Linux LVM 

Disk /dev/mapper/rhel-swap: 4043 MB, 4043309056 bytes
255 heads, 63 sectors/track, 491 cylinders, total 7897088 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/rhel-swap doesn't contain a valid partition table

Disk /dev/mapper/rhel-root: 47.9 GB, 47857008640 bytes
255 heads, 63 sectors/track, 5818 cylinders, total 93470720 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/rhel-root doesn't contain a valid partition table

1 Answers1

2

Normally Red Hat and related distributions use an LVM configuration in which there's an LVM partition (which you've got) with at least a couple of logical volumes (which you've got) and a separate /boot partition (which you don't seem to have). Without the /boot partition, you won't be able to boot RHEL, since your system won't have a kernel, which is absolutely essential for booting. My suspicion is that you accidentally deleted your RHEL /boot partition when you installed Ubuntu, which I suspect exists on your /dev/sda1. I can't be 100% positive of this diagnosis, though.

There is one small glimmer of hope: Your /dev/sda1 starts at sector 314,574,848, which means there's about 150 GiB of unallocated space at the start of the disk. If /boot was originally in that space, then it may be possible to recover it with TestDisk. You may want to look into that possibility:

A caveat: If I'm right, changing your disk's partition layout runs the risk of creating new problems or making your current problem worse. Doing a low-level backup of the entire disk is a wise precaution. You'd do that with something like:

sudo dd if=/dev/sda of=/path/to/lots/of/space/sda-backup/img

This command is likely to take several hours to complete. You'll need another disk that's at least a little bit larger than your current /dev/sda, mounted somewhere so that /path/to/lots/of/space will reside on that larger disk.

Rod Smith
  • 45,120
  • 7
  • 66
  • 108