1 (edited by mokrton 2011-09-06 07:51:00)

Topic: [SOLVED] Ubuntu11.04-Ext4-Gparted0.6.2 block count error

I have a very similar error to this post: http://gparted-forum.surf4.info/viewtopic.php?id=14172
After posting in the sticky, I was told to make a new thread.

I followed through the same steps of soupcan and have the following results:

dmesg | tail

[  362.599624] EXT4-fs (sda1): bad geometry: block count 13478144 exceeds size of device (13478136 blocks)

fdisk -l -u /dev/sda

Disk /dev/sda: 146.8 GB, 146815737856 bytes
255 heads, 63 sectors/track, 17849 cylinders, total 286749488 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: 0x0001b233

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1              63   107825151    53912544+  83  Linux
/dev/sda2       131840000   286744575    77452288    5  Extended
/dev/sda3       128305152   131839999     1767424   82  Linux swap / Solaris
/dev/sda4   *   107825152   128305151    10240000   83  Linux
/dev/sda5       275016798   286744184     5863693+  83  Linux
/dev/sda6       177020361   272076839    47528239+  83  Linux
/dev/sda7       272076903   275016734     1469916   82  Linux swap / Solaris
/dev/sda8       131844096   152324095    10240000   83  Linux

Partition table entries are not in disk order

parted /dev/sda unit s print
Model: SEAGATE ST3146807LW (scsi)
Disk /dev/sda: 286749488s
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start       End         Size        Type      File system     Flags
1      63s         107825151s  107825089s  primary   ext4
4      107825152s  128305151s  20480000s   primary   ext4            boot
3      128305152s  131839999s  3534848s    primary   linux-swap(v1)
2      131840000s  286744575s  154904576s  extended
8      131844096s  152324095s  20480000s   logical   ext4
6      177020361s  272076839s  95056479s   logical   ext3
7      272076903s  275016734s  2939832s    logical   linux-swap(v1)
5      275016798s  286744184s  11727387s   logical   ext3

sfdisk -d /dev/sda

# partition table of /dev/sda
unit: sectors

/dev/sda1 : start=       63, size=107825089, Id=83
/dev/sda2 : start=131840000, size=154904576, Id= 5
/dev/sda3 : start=128305152, size=  3534848, Id=82
/dev/sda4 : start=107825152, size= 20480000, Id=83, bootable
/dev/sda5 : start=275016798, size= 11727387, Id=83
/dev/sda6 : start=177020361, size= 95056479, Id=83
/dev/sda7 : start=272076903, size=  2939832, Id=82
/dev/sda8 : start=131844096, size= 20480000, Id=83


Last bit of information:
13478144 * 8 = 107825152

I think I have compiled all the information and am ready to try something similar to soupcan. My only qualm is that the size I would change /dev/sda1 to would seem to conflict with the location of /dev/sda4. Any advice?

2

Re: [SOLVED] Ubuntu11.04-Ext4-Gparted0.6.2 block count error

I went ahead and attempted to recover. I ran into a lot of issues. My hard drive is very old, and in addition I did not have the luxury of using a second hard drive while modifying partitions on the first. One of the issues had to do with rounding to cylinders. This caused sfdisk to fail many times, while I tweaked the partition locations in gparted. Another issue was with hidden extended partitions not aligning properly; this caused another error message. Luckily, the partition in question was just a swap partition. Since there was already another swap partition available, I was able to get away with deleting the "vestigial" swap partition. After that, I was able to run sfdisk -f without failures preventing its progress. Due to the hard drive being active, this caused another error message when it completed successfully, but after a reboot all is fine and working and the corrupted partition has been successfully restored.

3

Re: [SOLVED] Ubuntu11.04-Ext4-Gparted0.6.2 block count error

If I understand your second post, it appears that you were able to overcome the difficulties that you encountered.  Good work!  :-)

4

Re: [SOLVED] Ubuntu11.04-Ext4-Gparted0.6.2 block count error

Yes, it seemed that after reading some of your other posts and explanations and after a lot of messing around with sfdisk, I got something to work. In the process I learned a little, but it opened up room for many more questions. For instance, what really is sfdisk? There seem to be so many programs, like fdisk, cfdisk, sfdisk, parted that all naively serve the same purpose. Is there some sort of comprehensive reference guide that clearly delineates the functions and contrasts between these programs? While it was clear that many steps along the way could cause damage, what exactly is that damage? To summarize, I have so many more questions now compared to when I was blissfully ignorant.

Lastly, how do I mark this topic as [SOLVED]?

5

Re: [SOLVED] Ubuntu11.04-Ext4-Gparted0.6.2 block count error

I am not aware of any comprehensive summary of all the different disk partition software.  All I can suggest is to read the man page for each partition tool to see each description.

To mark a topic as solved, simply edit the initial post and prefix SOLVED in front of the title.   wink

6

Re: [SOLVED] Ubuntu11.04-Ext4-Gparted0.6.2 block count error

Nothing beyond the man pages? Oh well, so much for wishful thinking. As the main developer of gparted, do you remember the process by which you became acquainted with the necessary tools and concepts while coding?

7

Re: [SOLVED] Ubuntu11.04-Ext4-Gparted0.6.2 block count error

mokrton wrote:

Nothing beyond the man pages? Oh well, so much for wishful thinking. As the main developer of gparted, do you remember the process by which you became acquainted with the necessary tools and concepts while coding?

'Just lots of time and patience spent searching and reading on the internet.  :-)