Bug 10394 - fdisk creates a partition that fsck complains about
Summary: fdisk creates a partition that fsck complains about
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: util-linux
Version: 6.1
Hardware: i386
OS: Linux
medium
high
Target Milestone: ---
Assignee: Elliot Lee
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-03-28 17:01 UTC by Joe Harrington
Modified: 2007-04-18 16:26 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-04-14 18:42:59 UTC
Embargoed:


Attachments (Terms of Use)

Description Joe Harrington 2000-03-28 17:01:25 UTC
I created a partition table with fdisk that was the size of the disk
(see below).  I created a filesystem on it with mkfs.  fsck thinks the
filesystem is bigger than the partition, and gives horrendous errors.
The machine crashed when writing to the filesystem, so I suspect fsck
is correct.  The output of the relevant commands and some info on the
disk follow.  All of this is on a fully-updated 6.1 Intel machine and
and IDE drive.

--jh--
---------------------------------------------------------------------------
# fdisk /dev/hda

The number of cylinders for this disk is set to 2055.
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., LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/hda: 255 heads, 63 sectors, 2055 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hda1             1      2055  16506756   83  Linux
---------------------------------------------------------------------------
# mkfs -t ext2 -v -m0 /dev/hda1 `fdisk -s /dev/hda1`
mke2fs 1.17, 26-Oct-1999 for EXT2 FS 0.5b, 95/08/09
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
2064384 inodes, 4128697 blocks
0 blocks (0.00%) reserved for the super user
First data block=0
126 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632,
2654208,
        4096000

Writing inode tables:  16/126
 34/126
 53/126
 71/126
 89/126
107/126
done 26

Writing superblocks and filesystem accounting information: done
---------------------------------------------------------------------------
# fsck /dev/hda1
Parallelizing fsck version 1.17 (26-Oct-1999)
e2fsck 1.17, 26-Oct-1999 for EXT2 FS 0.5b, 95/08/09
The filesystem size (according to the superblock) is 4128697 blocks
The physical size of the device is 4126689 blocks
Either the superblock or the partition table is likely to be corrupt!
Abort<y>? yes
---------------------------------------------------------------------------
***HARD DISK DRIVE: received 15jan99
IBM 16.8GB DESKSTAR 16GP ULTRA ATA/DMA
label:
IBM OEM
MODEL:DTTA-351680 E182115 HG
NOV-98
P/N:00K4073     16.8GB
                MLC:F02573
CHS:16383/16/63
LBA:33.022.080 SECTORS
S/N:WKFJ2628
jumpers:        orig    us
1               on      on
2               off     off
3               off     off
4               on      on
16-head device 0 (master)
note: LBA periods should be commas, it's 33 million sectors
---------------------------------------------------------------------------
Some relevant math...
>>> 16383.*16*63*1024
16910401536.0
>>> 255*63*2055
33013575
>>> 255.*63
16065.0
>>> 16383.*16*63*1024/(255.*63*2055* 512)
1.00044081866
>>> 16383.*16*2/(255.*2055)
1.00044081866
>>> 33022080./4126689
8.00207624078
>>> 33022080./4128697
7.99818441508

Comment 1 Jeff Johnson 2000-08-16 16:41:41 UTC
This more likely to be a fdisk problem, although you might want to try to
reproduce the problem with
e2fsprogs-1.1[89]

Comment 2 Elliot Lee 2001-07-17 18:58:32 UTC
What happens if you don't pass `fdisk -s /dev/hda1` to mkfs?

Normally this isn't done...

Comment 3 Joe Harrington 2001-07-17 19:13:32 UTC
Given that this bug was logged 16 months ago, it shouldn't surprise you that I
don't have that OS version running anymore...  I'll see what happens next time I
do a fresh install and don't specify the filesystem size.

--jh--


Comment 4 Jay Turner 2003-04-14 18:42:59 UTC
Closing out due to age.


Note You need to log in before you can comment on or make changes to this bug.