bug-parted
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug resizing FAT32 filesystems?


From: Timshel Knoll
Subject: Re: Bug resizing FAT32 filesystems?
Date: Fri, 21 Jun 2002 20:43:24 +1000
User-agent: Mutt/1.4i

On Thu, Jun 20, 2002 at 09:28:08AM +1000, Andrew Clausen wrote:
> On Wed, Jun 19, 2002 at 11:55:22PM +1000, Timshel Knoll wrote:
> > Using parted 1.6.1 I reduced the size of my FAT32 filesystem from ~13GB
> > to ~5GB. However, df on the mounted filesystem now reports:
> > 
> > Filesystem           1k-blocks      Used Available Use% Mounted on
> > /dev/hda1              5232828 -73786976294834094080   9347780 101% /win
> 
> Eeek.
> 
> Could you run parted's check on it?  Could you set a break point
> somewhere after ped_file_system_open(), and print out
> (FatSpecific*) fs->fs_info?
> 
> Thanks,
> Andrew

Check outputs:

(parted) check 1
Warning: File system is reporting the free space as 2489969 clusters,
not 391055
clusters.
Ignore/Cancel? i
(parted) 

gdb print of FatSpecific for filesystem:

I assume you meant (FatSpecific*) fs->type_specific ...

$ libtool gdb parted/parted
(gdb) list do_check

[ ... ]

(gdb) 
314                     goto error_destroy_disk;
315     
316             fs = ped_file_system_open (&part->geom);
317             if (!fs)
318                     goto error_destroy_disk;
319             if (!ped_file_system_check (fs, timer))
320                     goto error_close_fs;
321             ped_file_system_close (fs);
322             ped_disk_destroy (disk);
323             return 1;
(gdb) break 318
Breakpoint 1 at 0x804ad61: file ../../parted/parted.c, line 318.
(gdb) run /dev/hda
Starting program:
/home/timshel/src/debian/parted1.6/build/parted/.libs/lt-parted /dev/hda
GNU Parted 1.6.1

[ ... ]

Using /dev/ide/host0/bus0/target0/lun0/disc
Warning: Unable to align partition properly.  This probably means that
another
partitioning tool generated an incorrect partition table, because it
didn't have
the correct BIOS geometry.  It is safe to ignore,but ignoring may cause
(fixable) problems with some boot loaders.
Ignore/Cancel? i
(parted) check 1

Breakpoint 1, do_check (dev=0xbffff838) at ../../parted/parted.c:319
319             if (!ped_file_system_check (fs, timer))
(gdb) print *(FatSpecific*) fs->type_specific
$1 = {boot_sector = {boot_jump = "?X\220", system_id = "MSWIN4.1", 
    sector_size = 512, cluster_size = 8 '\b', reserved = 36, fats = 2 '\002', 
    dir_entries = 0, sectors = 0, media = 248 '?', fat_length = 0, 
    secs_track = 63, heads = 16, hidden = 63, sector_count = 10486161, u = {
      fat16 = {drive_num = 247 '?', empty_1 = 39 '\'', ext_signature = 0 '\0', 
        serial_number = 0, volume_name = "\0\036\020\0\0\001\0\006\0\0", 
        fat_name = "\0\0\0\0\0\0\0", 
        boot_code = "\0\0\200\0)????NO NAME    FAT32
3?\216???{\216?\216??\0|address@hidden@f\017??\200????\206???\006Af\017??f??f\211F?\203~\026\0u8\203~*\0w2f\213F\034f\203?\f?\0\200?\001\0?+\0?H\003??}?}\213??\204?t\027<?t\t?\016?\a\0?\020????}????}??\230?\026?\031f`f;F?\017\202J\0fj\0fP\006Sfh\020\0\001\0\200~\002\0\017\205
\0?A??U\212V"...}, fat32 = {
        fat_length = 10231, flags = 0, version = 0, root_dir_cluster = 4126, 
        info_sector = 1, backup_sector = 6, empty_1 = '\0' <repeats 11 times>, 
        drive_num = 128, ext_signature = 41 ')', serial_number = 4294967295, 
        volume_name = "NO NAME    ", fat_name = "FAT32   ", boot_code =
"3?\216???{\216?\216??\0|address@hidden@f\017??\200????\206???\006Af\017??f??f\211F?\203~\026\0u8\203~*\0w2f\213F\034f\203?\f?\0\200?\001\0?+\0?H\003??}?}\213??\204?t\027<?t\t?\016?\a\0?\020????}????}??\230?\026?\031f`f;F?\017\202J\0fj\0fP\006Sfh\020\0\001\0\200~\002\0\017\205
address@hidden"...}}, boot_sign = 43605}, info_sector = {signature_1 = 
1096897106, 
    unused = '\0' <repeats 479 times>, signature_2 = 1631679090, 
    free_clusters = 2489969, next_cluster = 1, 
    unused2 = '\0' <repeats 13 times>, signature_3 = 43605}, 
  logical_sector_size = 1, sector_count = 10486161, cluster_size = 4096, 
  cluster_sectors = 8, cluster_count = 1308207, dir_entries_per_cluster = 128, 
  fat_type = FAT_TYPE_FAT32, fat_table_count = 2, fat_sectors = 10231, 
  serial_number = 4294967295, info_sector_offset = 1, fat_offset = 36, 
  root_dir_offset = 0, cluster_offset = 20498, boot_sector_backup_offset = 6, 
  root_cluster = 4126, root_dir_entry_count = 0, root_dir_sector_count = 0, 
  total_dir_clusters = 1832, fat = 0x80602e8, cluster_info = 0x40772008, 
  buffer_sectors = 1024, buffer = 0x406f1008 '?' <repeats 200 times>..., 
  frag_size = -1, frag_sectors = -1, frag_count = -1, buffer_frags = -1, 
  cluster_frags = -1}
(gdb) 

So check seems to find the problem ...

I want to re-format the entire partition, so please let me know ASAP if
you need any more information.

Cheers,

Timshel

-- 
Timshel Knoll <address@hidden>, Debian email: <address@hidden>
Debian GNU/Linux developer: http://people.debian.org/~timshel/
GnuPG public key: finger address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]