bug-parted
[Top][All Lists]
Advanced

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

Re: Bug?


From: Klaus Maisinger
Subject: Re: Bug?
Date: Tue, 16 Jan 2001 12:26:00 +0000 (GMT)

On Mon, 15 Jan 2001, Andrew Clausen wrote:

> Could you please compile parted with debug info, and run gdb:
>
>       $ CFLAGS=-g ./configure && make clean && make
>       $ cd parted
>       $ su
>       # libtool gdb parted
>       (gdb) set args /dev/hda
>       (gdb) run
>       (parted) [hit CTRL-C]
>       SIGINT
>       (gdb) break fat_calc_sizes
>       (gdb) cont
>       (parted) check 1
>       Breakpoint 1
>       (gdb) up
>       (gdb) print *fs_info
>
> And send the output after the last command.  (you can then quit
> gdb with "quit")
>

I did this with version 1.2.14 instead of 1.2.12 as previously. However,
the break point was never triggered using the prescription you gave. I
decided to set another one in the routine which I thought to
print out the error message. Here's a transcript:

-----------------------------------------------------------------------

(gdb) set args /dev/hda
(gdb) run
Starting program: /home/maising/parted/parted-1.2.14/parted/.libs/lt-parted 
/dev/hda
GNU Parted 1.2.14
Copyright (C) 1998-2000 Free Software Foundation, Inc.
This program is free software, covered by the GNU General Public License.

This program is distributed in the hope that it will be useful, but WITHOUT ANY 
WARRANTY; without eventhe implied warranty of MERCHANTABILITY or FITNESS FOR A 
PARTICULAR PURPOSE.  See the GNU General
Public License for more details.

GNU Parted's development is supported by Conectiva, www.conectiva.com

Using /dev/hda
Warning: The operating system thinks the geometry on /dev/hda is 1232/255/63.  
You should check that
this matches the BIOS geometry before using this program.
(parted)
Program received signal SIGINT, Interrupt.
0x4019a0a4 in __libc_read () from /lib/libc.so.6
(gdb) break fat_calc_sizes
Breakpoint 1 at 0x400b257d: file calc.c, line 181.
(gdb) cont
Continuing.
check 1
Error: The FATs aren't big enough to describe all clusters!  Each FAT is 200 
sectors.  There are 51199clusters, which would require each FAT to be 200 
sectors.  This is REALLY weird.  You might want to
write us an email: address@hidden
(parted)
Program received signal SIGINT, Interrupt.
0x4019a0a4 in __libc_read () from /lib/libc.so.6
(gdb) break bootsector.c:225
Breakpoint 2 at 0x400b14b3: file bootsector.c, line 225.
(gdb) cont
Continuing.
check 1

Breakpoint 2, fat_boot_sector_analyse (bs=0x8080a48, fs=0x8080610) at 
bootsector.c:225
225             if (fs_info->cluster_count + 2
(gdb) print *fs_info
$1 = {boot_sector = {boot_jump = "?>\220", system_id = "MSWIN4.0", sector_size 
= 512,
    cluster_size = 64 '@', reserved = 1, fats = 2 '\002', dir_entries = 512, 
sectors = 0,
    media = 248 '?', fat_length = 200, secs_track = 63, heads = 255, hidden = 
63,
    sector_count = 3277197, u = {fat16 = {drive_num = 128 '\200', empty_1 = 0 
'\000',
        ext_signature = 41 ')', serial_number = 644191214, volume_name = ' ' 
<repeats 11 times>,
        fat_name = "FAT16   ",
        boot_code = 
"?}?3?\216???{\026\a?x\000?v\000\036V\026U?\"\005\211~\000\211N\002?\013???\006\037?\000|?E?\017\213F\030\210E??8f$|\004?\023r<\212F\020\230?f\026\003F\034\023V\036\003F\016\023?PR\211F?\211V??
 
\000\213v\021??\213^\013\003?H??\001F?\021N?ZX?\000\a\213??\001?\224\000rG8-t\031?\013V\213v>??^tJNt\013\003?\203?\025;?r???+???}\207F><?u\231?\200}?\230\003??\204?t\027<?t\t?\016?\a\000?\020???\203}???\201}??3"...},
 fat32 = {fat_length = 3995664512, flags = 26003, version = 8230,
        root_dir_cluster = 538976288, info_sector = 8224, backup_sector = 8224,
        empty_1 = "  FAT16   ?}", drive_num = 13306, ext_signature = 201 '?',
        serial_number = 4240232846, volume_name = "{\026\a?x\000?v\000\036V",
        fat_name = "\026U?\"\005\211~",
        boot_code = 
"\211N\002?\013???\006\037?\000|?E?\017\213F\030\210E??8f$|\004?\023r<\212F\020\230?f\026\003F\034\023V\036\003F\016\023?PR\211F?\211V??
 
\000\213v\021??\213^\013\003?H??\001F?\021N?ZX?\000\a\213??\001?\224\000rG8-t\031?\013V\213v>??^tJNt\013\003?\203?\025;?r???+???}\207F><?u\231?\200}?\230\003??\204?t\027<?t\t?\016?\a\000?\020???\203}???\201}??3??\026^\037\217\004\217D\002?\031?\202}\213}\017\203?\002r?\213?HH\212"...}},
 boot_sign = 43605}, info_sector = {signature_1 = 4294967295,
    unused = '?' <repeats 480 times>, signature_2 = 4294967295, free_clusters = 
4294967295,
    next_cluster = 4294967295, unused2 = '?' <repeats 14 times>, signature_3 = 
65535},
  logical_sector_size = 1, sector_count = 3277197, cluster_size = 32768, 
cluster_sectors = 64,
  cluster_count = 51199, dir_entries_per_cluster = -1, fat_type = 
FAT_TYPE_FAT16,
  fat_table_count = 2, fat_sectors = 200, info_sector_offset = -1, fat_offset = 
1,
  root_dir_offset = 401, cluster_offset = 433, boot_sector_backup_offset = -1, 
root_cluster = 0,
---Type <return> to continue, or q <return> to quit---
  root_dir_entry_count = 512, root_dir_sector_count = 32, total_dir_clusters = 
-1, fat = 0xffffffff,
  cluster_info = 0xffffffff, buffer_sectors = -1,
  buffer = 0xffffffff <Address 0xffffffff out of bounds>, frag_size = -1, 
frag_sectors = -1,
  frag_count = -1, buffer_frags = -1, cluster_frags = -1}
(gdb) cont
Continuing.
Error: The FATs aren't big enough to describe all clusters!  Each FAT is
200 sectors.  There are 51199clusters, which would require each FAT to be
200 sectors.  This is REALLY weird.  You might want to
write us an email: address@hidden
(parted) print
Disk geometry for /dev/hda: 0-9671.5 megabytes
Minor   Start     End    Type            Filesystem     Flags
1          0.0   1600.2  primary         FAT
2       1600.2   1725.7  primary         linux-swap
3       1725.7   9248.4  extended                       boot
5       1725.8   1882.6  logical         ext2           boot
6       1882.6   4384.9  logical         ext2
7       4385.0   6385.2  logical         ext2
8       6385.2   8997.3  logical         ext2
9       8997.4   9248.4  logical         ext2
4       9248.4   9664.1  primary         linux-swap

---------------------------------------------------------------------------

>
> > The hard drive's history:
> >
> > If I remember this correctly, I used parted successfully a while ago to
> > decrease hda1 to make more space for the swap partition.
> > Since then I also ran Win95's disk fragmenter on hda1.
>
> Interesting... this is worth investigating... (we'll look at the
> other stuff first though, ok? ;-)
>
Thinking about it, I'm not so sure anymore if I ever resized hda1
with parted, even though I definitely used it on hda4, hda5 and hda8. (And
I actually ran a disk defragmenter and not a fragmenter. ;-) )

I also ran Win95's scandisk on hda1 and gathered the following
information:

           32-bit filesystem
1,677,656,064 bytes total disk space
       32,768 bytes in each allocation unit
       51,198 total allocation units on disk

The last number doesn't quite match the number of clusters reported by
parted, but I don't know if that is relevant.

Let me know if you need any other information.

Cheers,
Klaus

PS: What's the difference between parted 1.2 and 1.4? Does this follow the
Linux kernels?




reply via email to

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