Good Morning, Afternoon, Evening... delete as appropriate
I was hoping someone might take a look at a problem I'm having with an old drive I re-purposed to shuffle some data around on. Sadly it won't mount as it did before and disk utility (Palimpsest) is saying there is just free space, no partition. I've been reading up on this stuff myself, but, I think I'm missing something, or I'm out of luck.
Not sure how this has happened, drive was formatted with a guid table and a single ext4 partition created on it, all within disk utility (Palimpsest). I moved the data over to it, powered down, moved drive to new machine, booted, partition gone, returned to first machine, still missing.
Note this isn't the boot disk.
The following sums up my attempts so far (not including my fruitless foray with testdisk)
gdisk (gpt fdisk) and fdisk with the following results:
Delving further into gdisk and following its suggestion I selected the 'v' (verify) option:Code:dan@zeus:~$ sudo gdisk -l /dev/sda [sudo] password for dan: GPT fdisk (gdisk) version 0.8.4 Warning! Disk size is smaller than the main header indicates! Loading secondary header from the last sector of the disk! You should use 'v' to verify disk integrity, and perhaps options on the experts' menu to repair the disk. Caution: invalid backup GPT header, but valid main header; regenerating backup header from main header. Warning! One or more CRCs don't match. You should repair the disk! Partition table scan: MBR: protective BSD: not present APM: not present GPT: damaged **************************************************************************** Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk verification and recovery are STRONGLY recommended. **************************************************************************** Disk /dev/sda: 625140335 sectors, 298.1 GiB Logical sector size: 512 bytes Disk identifier (GUID): 4FF348B9-D041-49A6-AD98-18C15F055F2D Partition table holds up to 128 entries First usable sector is 34, last usable sector is 625142414 Partitions will be aligned on 8-sector boundaries Total free space is 0 sectors (0 bytes) Number Start (sector) End (sector) Size Code Name 1 34 625142414 298.1 GiB 0700 dan@zeus:~$ sudo fdisk -lu /dev/sda WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted. Disk /dev/sda: 320.1 GB, 320071851520 bytes 255 heads, 63 sectors/track, 38913 cylinders, total 625140335 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 Device Boot Start End Blocks Id System /dev/sda1 1 625142447 312571223+ ee GPT
Its clearly a mess, for more info I've used the 'i' and 'p' options:Code:Command (? for help): v Caution: The CRC for the backup partition table is invalid. This table may be corrupt. This program will automatically create a new backup partition table when you save your partitions. Problem: The secondary header's self-pointer indicates that it doesn't reside at the end of the disk. If you've added a disk to a RAID array, use the 'e' option on the experts' menu to adjust the secondary header's and partition table's locations. Problem: Disk is too small to hold all the data! (Disk size is 625140335 sectors, needs to be 625142448 sectors.) The 'e' option on the experts' menu may fix this problem. Problem: partition 1 is too big for the disk. Caution: Partition 1 doesn't begin on a 8-sector boundary. This may result in degraded performance on some modern (2009 and later) hard disks. Consult http://www.ibm.com/developerworks/linux/library/l-4kb-sector-disks/ for information on disk alignment. Identified 4 problems!
Following the suggestion of the 'v' (verify) command which said to use the 'e' option from the experts menu:Code:Command (? for help): i Using 1 Partition GUID code: EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 (Microsoft basic data) Partition unique GUID: 9E79F802-02B9-4097-8CD2-F9FFE96136BD First sector: 34 (at 17.0 KiB) Last sector: 625142414 (at 298.1 GiB) Partition size: 625142381 sectors (298.1 GiB) Attribute flags: 0000000000000000 Partition name: '' Command (? for help): p Disk /dev/sda: 625140335 sectors, 298.1 GiB Logical sector size: 512 bytes Disk identifier (GUID): 4FF348B9-D041-49A6-AD98-18C15F055F2D Partition table holds up to 128 entries First usable sector is 34, last usable sector is 625142414 Partitions will be aligned on 8-sector boundaries Total free space is 0 sectors (0 bytes) Number Start (sector) End (sector) Size Code Name 1 34 625142414 298.1 GiB 0700
Since I'm not going to follow the advice to delete the partition (I need the data) I'll have a go at resizing it:Code:Command (? for help): x Expert command (? for help): e Relocating backup data structures to the end of the disk Expert command (? for help): w Warning! Secondary partition table overlaps the last partition by 2113 blocks! You will need to delete this partition or resize it in another utility. Problem: partition 1 is too big for the disk. Aborting write operation! Aborting write of new partition table.
Which causes parted to crash. Now I'm stuck, I also tried testdisk, and am willing to try anything to get this solved. I can see that the partition seems to be too big for the disk, so if I could just chop it smaller? I don't mind if that loses the files at the end as long as I get some of them back.Code:root@zeus:/home/brendan# parted /dev/sda GNU Parted 2.3 Using /dev/sda Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) print Error: Invalid argument during seek for read on /dev/sda Retry/Ignore/Cancel? R Error: Invalid argument during seek for read on /dev/sda Retry/Ignore/Cancel? R Error: Invalid argument during seek for read on /dev/sda Retry/Ignore/Cancel? I Error: The backup GPT table is corrupt, but the primary appears OK, so that will be used. OK/Cancel? OK Backtrace has 8 calls on stack: 8: /lib/libparted.so.0(ped_assert+0x31) [0x7f8e8fe0c351] 7: /lib/libparted.so.0(+0x444c1) [0x7f8e8fe3d4c1] 6: /lib/libparted.so.0(ped_disk_new+0x75) [0x7f8e8fe13505] 5: parted() [0x4070de] 4: parted(interactive_mode+0xf3) [0x40e183] 3: parted(main+0x8f) [0x40b1df] 2: /lib/libc.so.6(__libc_start_main+0xfd) [0x7f8e8f62bc8d] 1: parted() [0x405709] You found a bug in GNU Parted! Here's what you have to do: Don't panic! The bug has most likely not affected any of your data. Help us to fix this bug by doing the following: Check whether the bug has already been fixed by checking the last version of GNU Parted that you can find at: http://ftp.gnu.org/gnu/parted/ Please check this version prior to bug reporting. If this has not been fixed yet or if you don't know how to check, please visit the GNU Parted website: http://www.gnu.org/software/parted for further information. Your report should contain the version of this release (2.3) along with the error message below, the output of parted DEVICE unit co print unit s print and the following history of commands you entered. Also include any additional information about your setup you consider important. Assertion (last_usable <= disk->dev->length) at ../../../libparted/labels/gpt.c:718 in function _parse_header() failed. Aborted



Adv Reply
...............
Bookmarks