LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-05-2004, 04:05 AM   #1
perry
Member
 
Registered: Sep 2003
Location: USA & Canada
Distribution: Slackware 12.0
Posts: 978

Rep: Reputation: 30
Partition Problem....


Mandrake 10.0 Pre-release nailed my parition table in such a way that it still works yet i can't make changes to it....

here's the message i get from cfdisk:

Code:
 FATAL ERROR: Bad primary partition 0: Partition ends in the final partial cylinder
fdisk reports the following:

Code:
Disk /dev/hda: 12.0 GB, 12072517632 bytes
240 heads, 63 sectors/track, 1559 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1             695        1560     6542928    f  W95 Ext'd (LBA)
/dev/hda2   *           1         694     5246608+   b  W95 FAT32
/dev/hda5   *         695         763      520096+  83  Linux
/dev/hda6             763         869      799312+  82  Linux swap
/dev/hda7             869        1284     3134344+  83  Linux
/dev/hda8            1284        1338      412240+  83  Linux
/dev/hda9            1338        1477     1052320+  83  Linux
/dev/hda10           1477        1547      525136+  83  Linux
/dev/hda11           1547        1560       99256+  83  Linux
now is it normal to have partition 0 as the extended partition, my extended partition should only be for partitions 5 thru 11, partition is suppose to be outside of if and it seems to specify that.

only an expert can interperate what i got here, all i know is that i can use the machine but there's space on partition 1 (hda2) that i'd like to make use of.

here's some extended info from fdisk (the only program that works on it even though it won't allow me to change the CHS values...

Code:
Disk /dev/hda: 240 heads, 63 sectors, 1559 cylinders

Nr AF  Hd Sec  Cyl  Hd Sec  Cyl     Start      Size ID
 1 00   0   1  694 239  63 1023   10493280   13085856 0f
 2 80   1   1    0 239  63  693         63   10493217 0b
 3 00   0   0    0   0   0    0          0          0 00
 4 00   0   0    0   0   0    0          0          0 00
 5 80   1   1  694 191  63  762         63    1040193 83
 6 00 193   1  762 127  63  868         63    1598625 82
 7 00 129   1  868 239  63 1023         63    6268689 83
 8 00 239  63 1023 239  63 1023         63     824481 83
 9 00 239  63 1023 239  63 1023         63    2104641 83
10 00 239  63 1023 239  63 1023         63    1050273 83
11 00 239  63 1023 239  63 1023         63     198513 83
incidentally, this second listing looks quite odd....

further, i checked the internet on the number of cylinders that i'm suppose to have, it's different from what my setup is telling me:

what others are saying:

Code:
hda: FUJITSU MHK2120AT, ATA DISK drive
hdc: TEAC CD-ROM CD-224E, ATAPI CD/DVD-ROM drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
hda: 23579136 sectors (12073 MB) w/512KiB Cache, CHS=1467/255/63, UDMA(33)
hdc: ATAPI 24X CD-ROM drive, 128kB Cache, UDMA(33)
Uniform CD-ROM driver Revision: 3.12
Partition check:
 /dev/ide/host0/bus0/target0/lun0: p1 p2 p3
what mine is saying

Code:
hda: FUJITSU MHK2120AT, ATA DISK drive
blk: queue c03e27c0, I/O limit 4095Mb (mask 0xffffffff)
hdc: TOSHIBA DVD-ROM SD-C2302, ATAPI CD/DVD-ROM drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
hda: attached ide-disk driver.
hda: host protected area => 1
hda: 23579136 sectors (12073 MB) w/512KiB Cache, CHS=1559/240/63, UDMA(33)
hdc: attached ide-cdrom driver.
hdc: ATAPI 24X DVD-ROM drive, 128kB Cache, UDMA(33)
Uniform CD-ROM driver Revision: 3.12
Partition check:
 hda: hda1 < hda5 hda6 hda7 hda8 hda9 hda10 hda11 > hda2
now i'm aware of fdisk reporting problems with >1024 but is this related to the problem, and why would my CHS be different if i got the same make of hard disk.... i tried several searches and all report the correct value to be 1467 & 255, however even though fdisk says it changes it for me, it's never changed. some documentation said to ignore this as CHS values are largely either ignored or mocked up by the kernal just to satisfy it....

any help would be appreciated, if i can't the partition fixed, i'll have to try a erasing off all partitions and a rebuilding from scratch in order to fix this problem.... however as i don't know for sure what the problem is, i don't know if such an effort is worth it....

cheers

- perry

Last edited by perry; 08-05-2004 at 04:15 AM.
 
Old 08-05-2004, 04:37 AM   #2
amosf
Senior Member
 
Registered: Jun 2004
Location: Australia
Distribution: Mandriva/Slack - KDE
Posts: 1,672

Rep: Reputation: 46
Shouldn't be a problem in itself having hda1 as the extended partition and hda2 as the first actual partition on the drive. I'e had that sort of thing before plenty of times. I don't see anything wrong jumping out at me here, but I'm looking

With LBA any CHS combo can be made up to fit AFAIK.

So do you get any errors during boot up or with fdisk, or is it just cfdisk? fdisk will usually tell you if there is something really wrong with the partitions.
 
Old 08-05-2004, 04:56 AM   #3
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 42.1_64+Tumbleweed-KDE, Mint 17.3
Posts: 3,986

Rep: Reputation: Disabled
You could want to try this:

http://www.cgsecurity.org/index.html?testdisk.html
 
Old 08-05-2004, 05:01 AM   #4
perry
Member
 
Registered: Sep 2003
Location: USA & Canada
Distribution: Slackware 12.0
Posts: 978

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by amosf
Shouldn't be a problem in itself having hda1 as the extended partition and hda2 as the first actual partition on the drive. I'e had that sort of thing before plenty of times. I don't see anything wrong jumping out at me here, but I'm looking

With LBA any CHS combo can be made up to fit AFAIK.

So do you get any errors during boot up or with fdisk, or is it just cfdisk? fdisk will usually tell you if there is something really wrong with the partitions.
fdisk reports:

Code:
root@slackware:/home/perry# fdisk /dev/hda

The number of cylinders for this disk is set to 1559.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help):
but i'm told this is normal with drives > 8 Gig.

neither cfdisk nor another program, system commander, will touch the drive, however both will tell me that it's really wacked out... in looking at it myself, i can't understand how partitions 8 to 11 can all be saying the same values in fdisks extended partition listing.... maybe this is the problem?

the only other thing i can think of is meddle with the parition information whereby i sustitude hda1 with hda2, seems logical to do that, but if what i have now is a typical arrangement, then both cfdisk and system commander would be ok with it.

lilo however runs flawlessly. no problem. it's in the mbr. and both linux and windows (two versions, 98 & 2k) boot up ok.

with the ghost in the machine allowing me to use it as is, what i wanted to do origionally was resize the windows partition from 5 gig to 3 or even 2.... not crucial but it's an annoyance....

what on earth could have mandrake 10 done on it's install attempt ????

- perry
 
Old 08-05-2004, 05:41 AM   #5
amosf
Senior Member
 
Registered: Jun 2004
Location: Australia
Distribution: Mandriva/Slack - KDE
Posts: 1,672

Rep: Reputation: 46
okay, sorry I was digesting it and having trouble with the small print on my monitor. Missed that

To me, partitions 8-11 don't exist. I'd like to see the output of

df

but my suggestion at this stage would be to use fdisk to delete the partitions 8-11 and see how things are then...

df might tell us if linux is trying to use these partitions, but I can't see how. Once they are removed you can probably create a hda3 linux partiton to use the space.

Will fdisk allow you to remove the partitions?
 
Old 08-05-2004, 08:36 AM   #6
perry
Member
 
Registered: Sep 2003
Location: USA & Canada
Distribution: Slackware 12.0
Posts: 978

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by amosf
okay, sorry I was digesting it and having trouble with the small print on my monitor. Missed that

To me, partitions 8-11 don't exist. I'd like to see the output of

df

but my suggestion at this stage would be to use fdisk to delete the partitions 8-11 and see how things are then...

df might tell us if linux is trying to use these partitions, but I can't see how. Once they are removed you can probably create a hda3 linux partiton to use the space.

Will fdisk allow you to remove the partitions?
i'm in the process of backing up my /home directory, it's taken every bit of 3 hours to compress 600 mb which is really wierd... but i think that that's on a side note....

as astounding as it seems here's the output from df...

Code:
root@slackware:/home/perry# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/hda5               520076    182152    337924  36% /
tmpfs                   257628        32    257596   1% /tmp
/dev/hda10              525112    443200     81912  85% /opt
/dev/hda11               96110      5536     85612   7% /var/www
/dev/hda7              3134244   2442984    691260  78% /usr
/dev/hda9              1019304    778636    188052  81% /home
tmpfs                   257628         8    257620   1% /home/guest
/dev/hda2              5236364   5035848    200516  97% /mnt/windows
/dev/sda1             39017920   3914432  35103488  11% /mnt/maxtor

root@slackware:/home/perry# cat /etc/fstab
/dev/hda6        swap             swap        defaults         0   0
#/dev/hda8        /tmp             ext2        defaults         1   2
tmpfs            /tmp             tmpfs       auto,rw
tmpfs            /home/guest      tmpfs       auto,rw
/dev/hda5        /                reiserfs    defaults         1   1
/dev/hda10       /opt             reiserfs    defaults         1   2
/dev/hda11       /var/www         ext2        defaults         1   2
/dev/hda7        /usr             reiserfs    defaults         1   2
/dev/hda9        /home            ext2        defaults         1   2
/dev/hda2        /mnt/windows     vfat        noauto,users     1   0
/dev/sda1        /mnt/maxtor      vfat        noauto,users     1   0
/dev/sdb1        /mnt/flashcard   vfat        noauto,users     1   0
/dev/cdrom       /mnt/cdrom       iso9660     users,noauto,ro  0   0
/dev/backpack    /mnt/backpack    iso9660     users,noauto,rw  0   0
/dev/fd0         /mnt/floppy      auto        noauto,owner     0   0
devpts           /dev/pts         devpts      gid=5,mode=620   0   0
proc             /proc            proc        defaults         0   0
further, your testdisk looks like it rocks, after the backup, i'll be sure to check it out...

thanks

- perry

Last edited by perry; 08-05-2004 at 08:45 AM.
 
Old 08-05-2004, 09:05 AM   #7
amosf
Senior Member
 
Registered: Jun 2004
Location: Australia
Distribution: Mandriva/Slack - KDE
Posts: 1,672

Rep: Reputation: 46
okay, that's pretty screwed up. Yep, back up /home. Not sure what is in /opt?

I'd get my data off and clean it up and start fresh. Or at least get rid of /home and /opt and /var/www and such out of the fstab and just use local directories in / and then remove those partitions 8-11 and rebuild a new /home and whatever other partition you want.

Never seen a drive get quite that screwed up!
 
Old 08-05-2004, 09:36 AM   #8
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 42.1_64+Tumbleweed-KDE, Mint 17.3
Posts: 3,986

Rep: Reputation: Disabled
Quote:
Originally posted by amosf
... Never seen a drive get quite that screwed up!
You haven't seen mine . No really, the partitions are just not in numerical order in /etc/fstab, else I see no obvious obstacle to their functioning as they should...

You have got me intrigued though:
Code:
...
tmpfs            /tmp             tmpfs       auto,rw
tmpfs            /home/guest      tmpfs       auto,rw
...
seems to assign two temp spaces? And a temp file system as well?!? Have you any (distro specific?) references were I could read up on those (except in Google, of course )?

Last edited by JZL240I-U; 08-05-2004 at 09:37 AM.
 
Old 08-05-2004, 09:39 AM   #9
perry
Member
 
Registered: Sep 2003
Location: USA & Canada
Distribution: Slackware 12.0
Posts: 978

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by amosf
okay, that's pretty screwed up. Yep, back up /home. Not sure what is in /opt?

Never seen a drive get quite that screwed up!
wow, that seems to be quite the compliment!

/opt was a place where slackware needed to install the kdebase, i'd back that up too except, it seems thats like asking for 4 hours of compression as my external 40 gig hd is in vfat format so it seems to get upset about that...

would like to complete redu the system but thats like a 4 day operation, i'm going to try my luck with the testdisk first, it's the first thing i've seen that mentions my situation:

http://www.cgsecurity.org/testdisk_doc/examples.html

thanks for your help though!

- perry
 
Old 08-05-2004, 09:49 AM   #10
amosf
Senior Member
 
Registered: Jun 2004
Location: Australia
Distribution: Mandriva/Slack - KDE
Posts: 1,672

Rep: Reputation: 46
If /opt is just kde, I wouldn't worry too much. Mainly backup the data in home. Hopefully testdisk will fix it. Obviously linux knows where the partitions are and is using them, so you just need to fix the partition entries - which get complex as the logical entries aren't stored in the MBR, rather throughout the disk itself... So don't know what's going on there... It's quite a weird problem that I've never seen, that's for sure.
 
Old 08-05-2004, 09:52 AM   #11
amosf
Senior Member
 
Registered: Jun 2004
Location: Australia
Distribution: Mandriva/Slack - KDE
Posts: 1,672

Rep: Reputation: 46
To JZL240I-U: The df results don't look too bad until you look close at the fdisk results that say that hda8-11 have zero size. And yet the install is apparently running fine and using /opt and /home...
 
Old 08-05-2004, 10:00 AM   #12
perry
Member
 
Registered: Sep 2003
Location: USA & Canada
Distribution: Slackware 12.0
Posts: 978

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by amosf
If /opt is just kde, I wouldn't worry too much. Mainly backup the data in home. Hopefully testdisk will fix it. Obviously linux knows where the partitions are and is using them, so you just need to fix the partition entries - which get complex as the logical entries aren't stored in the MBR, rather throughout the disk itself... So don't know what's going on there... It's quite a weird problem that I've never seen, that's for sure.
wow, i didn't know that about the partition table, i was wondering where it was stored.

i don't know what kind of number the mandrake 10 pre-release was trying to do on my system but i haven't looked back since. i said to hell with it and went slackware 10 but could never figure out how it could see my systtem despite the madness...

i'm hoping testdisk will work out, otherwise i'll zero everything (maybe even with a shred -n1 -z operation as per some of the testdisk documentation)

- perry
 
Old 08-05-2004, 10:01 AM   #13
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 42.1_64+Tumbleweed-KDE, Mint 17.3
Posts: 3,986

Rep: Reputation: Disabled
@amosf

Yeah well, but fdisk is contradicting itself anyhow, since it finds different values in the simple output:

Code:
...
/dev/hda8            1284        1338      412240+  83  Linux
/dev/hda9            1338        1477     1052320+  83  Linux
/dev/hda10           1477        1547      525136+  83  Linux
/dev/hda11           1547        1560       99256+  83  Linux
...
On my drive the beginning of the next partition (block number) is never identical with the end of the previous one ... but I have only 10 GB drives, perhaps they are too small...

Last edited by JZL240I-U; 08-05-2004 at 10:03 AM.
 
Old 08-05-2004, 10:14 AM   #14
amosf
Senior Member
 
Registered: Jun 2004
Location: Australia
Distribution: Mandriva/Slack - KDE
Posts: 1,672

Rep: Reputation: 46
Yep. Obviously the partition info is there as fdisk can pick it up and linux picks it up, but it's screwed up somehow such that the detailed fdisk has it wrong and things like cfdisk don't like it much... Hopefully it something that can be sorted out as the install seems to work more or less...

And yep to perry. The trouble is that there's only room for 4 partitions in the MBR and the rest have to be chained elsewhere... It's a hangover from less complex times
 
Old 08-05-2004, 10:40 AM   #15
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 42.1_64+Tumbleweed-KDE, Mint 17.3
Posts: 3,986

Rep: Reputation: Disabled
Quote:
Originally posted by perry
wow, i didn't know that about the partition table, i was wondering where it was stored.
...
I just don't find the bookmark of a site where you can find a very good explanation, will post it if I re-find it .

But look also here for a partition recovery
 
  


Reply


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 problem with Qtparted in Knoppix variety & mp3 support problem in FC3 eypros Linux - Software 1 06-01-2005 08:12 PM
boot problem/ partition problem? ian sil Linux - General 1 05-10-2005 07:08 PM
Problem Resizing Linux Partition From Partition magic John_Emad SUSE / openSUSE 5 02-16-2005 01:42 PM
partition problem!! maseby Red Hat 3 06-10-2004 10:43 PM
What the... ??? (RH 7.3 Partition Problem) zeky Linux - General 7 07-24-2002 04:26 PM


All times are GMT -5. The time now is 08:49 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration