LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 03-25-2011, 03:32 AM   #1
harryhaller
Member
 
Registered: Sep 2004
Distribution: Slackware-14.0
Posts: 444

Rep: Reputation: Disabled
cfdisk doesn't like the partition layout of my disk


I have put in a new 500gb disk as my second IDE disk. The partitions were created by Gparted, though to get the disk initially formatted, I connected the disk as an external drive to my netbook and only Win7 would do the honours of recognising it and creating the initial "disk wide" partition.

This seems to be an issue with the external drive adapters I am using, which are of various brands, but basically seem pretty cheap in the worst sense of the word. But that is probably a distraction from the issue.

The disk is now installed in my PC - an old Fujitsu-Siemens Scenic-L with a P4 processor.

The drive works. But I now want to install another 500gb disk as my primary disk. Hence I have a brand new disk which means, using it as a external drive, I can fix the secondary disk so that cfdisk can read it, and then after that is fixed, format the external disk again correctly and install it as my primary disk.

Both disks are IDE, but since Slackware 13.1 are "seen" as scsii disks. I.e in Slackware 13.0 they were "seen" as /dev/hda and /dev/hdb, but now they are "seen" as /dev/sda and /dev/sdb.

The current primary disk is seen ok by cfdisk. Its partions were created by the Ranish Partition Manager and I made sure that all partitions started at the beginning of a cylinder and finished at the end of a cylinder - good old Ranish, which, unfortunately is now no longer maintained and is hence obsolete.

All of the above is probably just a distraction - i.e. just background info, so here goes..


cfdisk says that there is something wrong with my secondary IDE disk, /dev/sdb:

Quote:
cfdisk /dev/sdb

FATAL ERROR: Bad primary partition 1: Partition ends in the final partial cylinder
parted, using:

Code:
sudo /usr/sbin/parted /dev/sdb unit chs print
shows:


Quote:
Model: ATA WDC WD5000AAKB-0 (scsi)
Disk /dev/sdb: 60801,80,62
Sector size (logical/physical): 512B/512B
BIOS cylinder,head,sector geometry: 60801,255,63. Each cylinder is 8225kB.
Partition Table: msdos

Number Start End Type File system Flags
1 0,32,32 6374,59,20 primary ext2
2 6374,59,21 60801,80,14 extended
5 6374,91,53 12868,11,6 logical ext2
6 12868,43,39 19242,70,27 logical ext2
7 19242,102,60 25616,129,48 logical ext2
8 25616,162,18 31990,189,6 logical ext2
Question: what is wrong and how can I fix it and avoid it in the future?
 
Old 03-25-2011, 05:30 AM   #2
Larry Webb
LQ Veteran
 
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
Blog Entries: 7

Rep: Reputation: 229Reputation: 229Reputation: 229
I am not sure if this will work but try deleting all the partitions with fdisk. Then create one primary partition for default size with fdisk then go to cfdisk if you wish.
 
1 members found this post helpful.
Old 03-25-2011, 12:15 PM   #3
harryhaller
Member
 
Registered: Sep 2004
Distribution: Slackware-14.0
Posts: 444

Original Poster
Rep: Reputation: Disabled
Thanks, Larry. That is indeed the common-sense, practical approach.

All the same, I would still like to know why cfdisk brings that error, when the end of the first partition is, obviously, just before the second, extended partition.

In the man page, it says quite clearly that cfdisk accepts partitions which are not aligned on cylinder boundaries - it even flags them with an asterisk to show that.

I have forgotten one, it appears to me now, important piece of information: I left "space" at the end of the disk. In other words, I have not allocated all of the disk into partitions.

But, surely, it should recognise that for what it is - unallocated space?
 
Old 03-25-2011, 12:38 PM   #4
Larry Webb
LQ Veteran
 
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
Blog Entries: 7

Rep: Reputation: 229Reputation: 229Reputation: 229
I can not answer your question, I have noticed that same issue where a graphical partitioner was used. I now always used fdisk or cfdisk myself.
 
1 members found this post helpful.
Old 03-25-2011, 02:44 PM   #5
harryhaller
Member
 
Registered: Sep 2004
Distribution: Slackware-14.0
Posts: 444

Original Poster
Rep: Reputation: Disabled
I started using cfdisk to format the new disk, then realised that it doesn't give any options for cylinder alignment nor for labelling the partions - which with my set-up I need to avoid confusion.

So, I used gparted, disciplining it to align partitions to cylinders. Ran cfdisk - it's happy now, and parted showed that indeed the partitions are aligned to cylinders.

Quote:
Model: WDC WD50 00AAKB-00H8A0 (scsi)
Disk /dev/sdc: 60801,80,62
Sector size (logical/physical): 512B/512B
BIOS cylinder,head,sector geometry: 60801,255,63. Each cylinder is 8225kB.
Partition Table: msdos

Number Start End Type File system Flags
1 0,1,0 6373,254,62 primary ext2
2 6374,0,0 60800,254,62 extended
5 6374,1,0 12747,254,62 logical ext2
6 12748,1,0 19121,254,62 logical ext2
7 19122,1,0 25495,254,62 logical ext2
8 25496,1,0 31869,254,62 logical ext2
Note the end address of the extended partition (2) and compare with previous in the earlier post. It now does not end in the last and only partial cylinder of the disk. I think it was that which cfdisk was complaining about - saying that it was Partition 1 that was in error is a bug - I believe but, of course, I don't know.

Last edited by harryhaller; 03-25-2011 at 02:47 PM.
 
  


Reply

Tags
cfdisk, parted, partitioning


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Partition layout for XP, Centos3 & Centos4 on same disk jorgeluis Red Hat 4 11-26-2007 12:29 AM
Modifying partition layout & partition order rm_-rf_windows Linux - General 3 06-28-2007 05:16 AM
Fatal error when cfdisk reads partition table on 160GB disk glasisch Linux - Newbie 1 05-22-2005 10:44 AM
Cant get fdisk or cfdisk to partition my 20gig Bytes disk Heath Linux - Newbie 3 05-19-2004 05:08 AM


All times are GMT -5. The time now is 08:31 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration