-   Linux - General (
-   -   lost partition, grub loading, but can't see my LVM drive (

craigey1 08-22-2010 03:54 PM

lost partition, grub loading, but can't see my LVM drive
Hi all,

I've resisted the urge to post for as long as I could. I use these forums quite often in finding answers to the numerous linux questions that I've had & found it to be a great resource. However the time has come where I need some more specific help.

For some reason after an innocent reboot of my Fedora 12 Core system, GRUB decided it would no longer load the O/S. I was just getting a flashing _ in the top left of the screen. I thought there must be a problem with the partition table & have used the systemRescueCd to run testdisk (I have made a copy of the disk first to an image file using dd - don't worry I made sure I got the commands around the correct way!).

testdisk shows that I have a partition which is bootable & Primary, which appears to be the grub partition (I can list the files in test disk). However when I search the disk I get the following after it has found a couple of partitions. (it is an 80Gb disk)


Disk /dev/sda - 81 GB / 76 GiB - CHS 9964 255 63

The harddisk (81 GB / 76 GiB) seems too small! (< 118 GB / 110 GiB)
Check the harddisk size: HD jumpers settings, BIOS detection...

The following partition can't be recovered:
    Partition              Start        End    Size in sectors
  Linux                4744  1  1 14425 128 46  155533312

[ Continue ]
EXT4 Large file Sparse superblock Recover, 79 GB / 74 GiB

I've run fdisk -l (which produces)

fdisk -l

Disk /dev/sda: 82.0 GB, 81964302336 bytes
255 heads, 63 sectors/track, 9964 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: 0x8c7f8c7f

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1  *          1          26      208813+  83  Linux

Gparted shows that the disk has 76.14Gb unallocated.

after mounting the /dev/sda1 partition & cd 'ing to grub my menu.lst looks like:


title Fedora (
        root (hd0,0)
        kernel /vmlinuz- ro root=/dev/mapper/vg_shuttle-lv_root  LANG=en_GB.UTF-8 SYSF
ONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=uk rhgb quiet rdblacklist=nouveau vmalloc=256m vga=0x318 selinux=0
        initrd /initramfs-

I hope this is enough information for you to help me to get my system back up & running.

Thanks in advance.

craigey1 08-22-2010 05:30 PM

when I run the command to open the image of the drive - i.e the way it was before I started fiddling:
testdisk /media/tmp/shuttle.image
I select analyze & I can see both partitions, but if I don't make one of them D (for deleted) then testdisk reports the structure is bad.

Disk /media/tmp/shuttle.image - 81 GB / 76 GiB - CHS 10588 240 63
    Partition              Start        End    Size in sectors
D Linux                    0  1  1    27 239 63    423297
L Linux LVM              27  22 38 10586 239 63  159665777

Should I just restore my image back to the drive & attempt to write the partition information as above?

syg00 08-22-2010 07:38 PM

Those partitions overlap - so testdisk is trying to protect you from yourself.
If it were me I'd define the boot as 26 cylinders, as per the second listing, and let testdisk recover the LVM.

Then mount them from the systemrescue to make sure they are o.k.

craigey1 08-23-2010 03:07 AM

sorry, what do you mean by define the boot as 26 cylinders? Should I just select the latter option & set it to bootable?

syg00 08-23-2010 06:28 AM

Presuming /dev/sda1 is indeed your /boot partition (the one containg the grub executables), use fdisk to create a partition that matches that "fdisk -l" listing you have above. No need to worry about the boot flag - grub ignores it.

craigey1 08-23-2010 09:46 AM

Thanks for that.

However I was too impatient & didn't see your reply until I had already restored the disk using the disk image I created previously & ran testdisk to use the Linux LVM partition:


(L Linux LVM              27  22 38 10586 239 63  159665777)
The grub loader still can't see anything, but when I use the live cd I can now mount my partition(s) & see my data. Testdisk now reports that I have the following partitions on the disk.


Select a media (use Arrow keys, then press Enter):
Disk /dev/sda - 81 GB / 76 GiB - ATA Maxtor 6Y080L0
Disk /dev/mapper/vg_shuttle-lv_root - 79 GB / 74 GiB - Maxtor 6Y080L0
Disk /dev/mapper/vg_shuttle-lv_swap - 2113 MB / 2016 MiB - Maxtor 6Y080L0
Disk /dev/sr0 - 272 MB / 260 MiB (RO) - SONY CD-RW CRX320E
Disk /dev/dm-0 - 79 GB / 74 GiB - Maxtor 6Y080L0
Disk /dev/dm-1 - 2113 MB / 2016 MiB - Maxtor 6Y080L0

Just need to get Grub working again. Do I just need to re-install grub? If so how do I do this?


All times are GMT -5. The time now is 07:18 PM.