[arch-general] fdisk vs cfdisk... And is my drive borked or what?

Linas linas_fi at ymail.com
Wed Mar 17 23:45:20 CET 2010


Joe(theWordy)Philbrook wrote:
> Any way I only mention it because When I got around to installing Arch on
> one of the two partitions I recovered from Sabayon, I skipped the
> installation step of letting cfdisk touch my partitions and simply selected
> the partition I previously prepared for it with mkfs.ext3. But later as
> working my way through the beginners guide in the wiki, the clear
> explanation of why distro's like to use UUID instead of /dev/Xdx# sold me
> on using persistent (BUT HUMAN READABLE!!!) entries like:
> "/dev/disk/by-label/Arch_lap-7"&  "/dev/disk/by-label/SWP_lap-12"
> Especially since there was a wealth of how-to info right there in the
> wiki... But in the process I happened to do an:
> fdisk /dev/sda
>
> Which complained about a dos compatibility flag and that I should
> change the display/entry units to sectors. This showed me a small bit of unused
> space above my last logical partition (/dev/sda12)...
>    
It shows those two warnings with the default call. AFAIK it is unrelated 
to your
actual partition contents.

> Anyway I decided to look at it with cfdisk (which I haven't used in years
> but remembered as being easier to work with than fdisk...) But all I got
> from cfdisk was.
>
> =>  FATAL ERROR: Bad primary partition 3: Partition ends after end-of-disk
> =>                                   Press any key to exit cfdisk
>
> Which considering the recent "testdisk" repair, frightened be a bit. But it
> also frustrated me. Especially since fdisk didn't show anything like that...
>
> Unless maybe: When "cfdisk /dev/sda" says "partition 3:" is it counting from 0?
> That is, does it mean "/dev/sda4" ???
>
> Because that's my extended partition... And a close look at the ending
> cylinder/sector of /dev/sda4 is a slightly higher number than it reports
> the total cylinders/sectors to be...
>    
Could be.

> I've pasted both the sector and cylinder views of my part table below, Is
> this anything I should be worried about??? Is there a way to fix this
> without destroying everything in the extended partition??? (That's a LOT of
> backing up to dvd, and I don't have room anyplace else...)
>    
Caveat emptor: you should have a backup before touching partitions :)
That said, you only want to "truncate" the partitions, and since your last
partition is the swap, that should be pretty safe. The process of unmounting
  swap partition, delete partition with fdisk, create with fdisk, 
reformat swap
/shouldn't/ affect your data.

I find an oddity on your paritition table, though. You say that 
/dev/sda4 is an
extended partition (and you do have logical partitions) but it is listed 
by fdisk as
having type 0xf (W95 Ext'd (LBA)) instead of 0x5 (Extended). I suspect 
that after
testdisk restoring, some old entries got loaded?
If that's really a wrong entry, you can do the fdisk delete/recreate tip 
to force its
length to be inside the disk limits. However, fdisk won't allow you to 
set a partition
type of 5, which is a pity when you *really* know what you are doing.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the arch-general mailing list