Results 1 to 3 of 3

Thread: mkfs.ext3 corrupting the partition table - bug?

  1. #1
    Junior Member
    Join Date
    Jan 2008
    Posts
    2

    mkfs.ext3 corrupting the partition table - bug?

    Hi,

    I'm having problem with the mkfs.ext3. It looks like that it corrupts the partition table of my compactFlash disks connected thru the USB. Here's my test sequence:

    - connect a 128MB compactFlash thru USB
    - execute fdisk to print the partition table => there's a primary partition
    - execute mkfs.ext3 to format the disk => seems OK but ...
    - execute fdisk to check and verify => partition table corrupted.

    I've done this sequence repeatly, and tried with several compactFlash disks. Same result with all the compactFlash disks that i tried. For information, the compactFlash is a ScanDisk 128MB.

    See trace below.

    Any ideas?

    Kind regards,
    Shaofeng


    <Beginning of trace>
    ------------------------

    sh-3.00# fdisk /dev/sda1

    Command (m for help): p

    Disk /dev/sda1: 128 MB, 128450048 bytes
    8 heads, 32 sectors/track, 979 cylinders
    Units = cylinders of 256 * 512 = 131072 bytes

    Device Boot Start End Blocks Id System
    /dev/sda1p1 1 979 125296 83 Linux

    Command (m for help): q

    sh-3.00#
    sh-3.00# mkfs.ext3 /dev/sda1
    mke2fs 1.38 (30-Jun-2005)
    Filesystem label=
    OS type: Linux
    Block size=1024 (log=0)
    Fragment size=1024 (log=0)
    31360 inodes, 125436 blocks
    6271 blocks (5.00%) reserved for the super user
    First data block=1
    16 block groups
    8192 blocks per group, 8192 fragments per group
    1960 inodes per group
    Superblock backups stored on blocks:
    8193, 24577, 40961, 57345, 73729

    Writing inode tables: done
    Creating journal (4096 blocks): done
    Writing superblocks and filesystem accounting information: done

    This filesystem will be automatically checked every 29 mounts or
    180 days, whichever comes first. Use tune2fs -c or -i to override.
    sh-3.00#
    sh-3.00#
    sh-3.00# fdisk /dev/sda1
    Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
    Building a new DOS disklabel. Changes will remain in memory only,
    until you decide to write them. After that, of course, the previous
    content won't be recoverable.

    Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

    Command (m for help): q

    <End of trace>
    -----------------

  2. #2
    Senior Member registered user
    Join Date
    Jan 2005
    Location
    UK
    Posts
    282
    As this is your first post, I'm not sure how much linux experience you have.
    Chance are your compact flash card came preformatted with a fat32 filesystem,
    was that the case?

    If so then you can use fdisk to verify the partition table, then change the filesystem
    type, write the changes, them use mkfs.ext3.


    As your filesystem seems corrupted, can you create a new primary partition and
    use all available flash drive space?
    You need to write the table before you use format the partition as ext3.

    The only thing I see missing from your initial post is using fdisk and writing
    the changes, youve either omitted this step (but know about it) or missed
    it out completely.

  3. #3
    Junior Member
    Join Date
    Jan 2008
    Posts
    2
    Actually i already found the problem: fdisk should be done on /dev/sda instead of an existing partition /dev/sda1.

    Thanks anyway for the help.

Similar Threads

  1. Mount Partition from drive with corrupt partition table
    By Nevermore in forum MS Windows & New to Linux
    Replies: 1
    Last Post: 07-17-2009, 01:59 PM
  2. Mandrake rescue partition table
    By adamherb in forum MS Windows & New to Linux
    Replies: 0
    Last Post: 08-06-2005, 03:24 PM
  3. What is wrong with my partition table?
    By yonatan in forum Hardware & Booting
    Replies: 9
    Last Post: 02-17-2005, 02:00 AM
  4. Repairing of corrupt partition table
    By NormanBates in forum Hdd Install / Debian / Apt
    Replies: 7
    Last Post: 08-21-2004, 06:46 AM
  5. Partition table change in linboot.img
    By Canis in forum Hdd Install / Debian / Apt
    Replies: 0
    Last Post: 11-13-2003, 07:52 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


TP-Link TL-SG105 5-Port Gigabit Ethernet Unmanaged Metal Desktop Network Switch picture

TP-Link TL-SG105 5-Port Gigabit Ethernet Unmanaged Metal Desktop Network Switch

$19.99



Cisco WS-C3650-12X48UR-L 48-Port Stackable Layer 3 8x10G SFP+ Port Switch picture

Cisco WS-C3650-12X48UR-L 48-Port Stackable Layer 3 8x10G SFP+ Port Switch

$129.99



NETGEAR GS308EP Essential Series 8-Port Gigabit PoE+ Unmanaged Switch picture

NETGEAR GS308EP Essential Series 8-Port Gigabit PoE+ Unmanaged Switch

$49.99



TP-Link TL-SG1048 48-Port Gigabit Rackmount Switch New Factory Sealed picture

TP-Link TL-SG1048 48-Port Gigabit Rackmount Switch New Factory Sealed

$199.99



10-Port Gigabit PoE Network Switch with 8 PoE+ Ports with 2 Combo SFP Slots 125W picture

10-Port Gigabit PoE Network Switch with 8 PoE+ Ports with 2 Combo SFP Slots 125W

$39.99



TP-Link TL-SG2210P 10-Port Gigabit Smart Switch w/ 8-Port PoE+ NO AC SKU 25597 picture

TP-Link TL-SG2210P 10-Port Gigabit Smart Switch w/ 8-Port PoE+ NO AC SKU 25597

$36.98



Arista DCS-7050SX-64-R 48P 10GbE SFP+ 4P 40GbE QSFP+ RA Switch picture

Arista DCS-7050SX-64-R 48P 10GbE SFP+ 4P 40GbE QSFP+ RA Switch

$115.00



Arista DCS-7010T-48-R 48P 1GbE 4P 10GbE SFP+ RA Switch with rack mounts picture

Arista DCS-7010T-48-R 48P 1GbE 4P 10GbE SFP+ RA Switch with rack mounts

$69.00



Linksys LGS328MPC 24-Port Managed Gigabit PoE+ Switch with 4 10G SFP+ Uplinks picture

Linksys LGS328MPC 24-Port Managed Gigabit PoE+ Switch with 4 10G SFP+ Uplinks

$224.95



5Ports Gigabit Network Switch w/ 4 PoE+ Ports Total 52W each port 30W Plug&Play picture

5Ports Gigabit Network Switch w/ 4 PoE+ Ports Total 52W each port 30W Plug&Play

$31.99