Skip to contentSkip to conversation

fdisk oddities

DISCUSSION Brian K. Michalk 2 participants 2 messages Dec 28, 1999 – Jan 24, 2000 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

I have been having some problems (still). I thought I would sit back and listen, but it's been quiet lately.

It seems as though the doc2000 is not storing cylinders, sectors or heads after fdisk exits. I manually set them, and used very small values just in case there was some sort of problem with the 72 MB doc I have. Here is the script:

Script started on Mon Dec 27 23:49:09 1999

embed:~/mtd-19991025/kernel# fdisk /dev/nftla1
You must set heads sectors and cylinders.
You can do this from the extra functions menu.

Command (m for help): p

Disk /dev/nftla1: 0 heads, 0 sectors, 0 cylinders
Units = cylinders of 1 * 512 bytes

       Device Boot    Start       End    Blocks   Id  System
/dev/nftla1p1            10      2304      1147+  83  Linux native

Command (m for help): x

Expert command (m for help): c
Number of cylinders (1-65535): 16

Expert command (m for help): h
Number of heads (1-256): 16

Expert command (m for help): s
Number of sectors (1-63): 9
Warning: setting sector offset for DOS compatiblity

Expert command (m for help): r

Command (m for help): p

Disk /dev/nftla1: 16 heads, 9 sectors, 16 cylinders Units = cylinders of 144 * 512 bytes

       Device Boot    Start       End    Blocks   Id  System
/dev/nftla1p1             1        16      1147+  83  Linux native

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table. Syncing disks.
Re-read table failed with error 22: Invalid argument. Reboot your system to ensure the partition table is updated.

WARNING: If you have created or modified any DOS 6.x partitions, please see the fdisk manual page for additional information.

Signature · 7 lines
Brian Michalk  <http://www.awpi.com/michalk>
Life is what you make of it ... never wish you had done something.
Aviator, experimental aircraft builder, motorcyclist, SCUBA diver
musician, home-brewer, entrepreneur and SINGLE!


To unsubscribe, send "unsubscribe mtd" to [email protected]
#1 lore raw
Quoted 4 lines · [email protected] said:

It seems as though the doc2000 is not storing cylinders, sectors or
heads after fdisk exits. I manually set them, and used very small values just in case there was some sort of problem with the 72 MB doc I have. Here is the script:

I get this on hard drives. They make up the geometry on boot, and I believe that they only read it from the partition table if they're _really_ confused and can't work out what it ought to be.

If you _really_ want to do it, you can alter the NFTL code so that you can tell it what the geometry should be - just like you can tell the kernel on its command line. But it shouldn't really help. If there are problems with the 72 Mb device, they're not going to go away if you tell it the physical geometry is different - it'll still use all the flash anyway.

--
dwmw2

To unsubscribe, send "unsubscribe mtd" to [email protected]