LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-22-2010, 03:54 PM   #1
craigey1
LQ Newbie
 
Registered: Aug 2010
Posts: 5

Rep: Reputation: 0
Unhappy 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)

Code:
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)
Code:
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:

Code:
default=1
timeout=15
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.32.16-150.fc12.i686)
	root (hd0,0)
	kernel /vmlinuz-2.6.32.16-150.fc12.i686.PAE 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-2.6.32.16-150.fc12.i686.PAE.img
I hope this is enough information for you to help me to get my system back up & running.

Thanks in advance.
 
Old 08-22-2010, 05:30 PM   #2
craigey1
LQ Newbie
 
Registered: Aug 2010
Posts: 5

Original Poster
Rep: Reputation: 0
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.
Code:
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?
 
Old 08-22-2010, 07:38 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
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.
 
Old 08-23-2010, 03:07 AM   #4
craigey1
LQ Newbie
 
Registered: Aug 2010
Posts: 5

Original Poster
Rep: Reputation: 0
sorry, what do you mean by define the boot as 26 cylinders? Should I just select the latter option & set it to bootable?
 
Old 08-23-2010, 06:28 AM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
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.
 
Old 08-23-2010, 09:46 AM   #6
craigey1
LQ Newbie
 
Registered: Aug 2010
Posts: 5

Original Poster
Rep: Reputation: 0
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:

Code:
(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.

Code:
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?

Thanks.
 
  


Reply

Tags
grub, lost, lvm, partition



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
tried to delete linux partition. restart grub loading stagel1.5. grub loading, please aknntharnld Linux - Newbie 8 12-04-2009 06:51 PM
LVM partition lost after power outage Dagwyn Linux - Software 3 10-30-2008 06:09 AM
Is it necessary to partition a drive in use w/ LVM? stgrob Linux - Enterprise 7 01-09-2008 05:35 PM
Lost my lvm partition timonvo Linux - Software 1 05-15-2007 10:30 AM
LVM, lost partition table and kernel IS in panic pulassa_aina Fedora 2 06-29-2006 07:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration