[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Assertion (ped_partition_is_active (part)) failed
From: |
Håkon Løvdal |
Subject: |
Re: Assertion (ped_partition_is_active (part)) failed |
Date: |
Sat, 4 Sep 2004 03:28:22 +0200 |
User-agent: |
Internet Messaging Program (IMP) 3.1 |
Quoting Andrew Clausen <address@hidden>:
> This bug has been fixed in CVS.
Speaking of which, I tried to check out as described on
http://savannah.gnu.org/cvs/?group=parted, but cvs did not
fetch anything. Is that information outdated or something else?
> I still can't reproduce the overlapping partitions bug.
I also get the error message
"Error: Can't have overlapping partitions" on my disk.
I am looking into it but has not come up with a solution yet.
If I insert calls to ped_partition_print and ped_disk_print
I get the followin output:
---BEGIN---
Using /dev/hda
(parted) p
Error: Can't have overlapping partitions
<_check_partition>
metadata -1 (19535040->19541087)
metadata -1 (0->62)
primary 01 (63->1028159)
primary 02 (1028160->18491759)
primary 03 (18491760->19540079)
</_check_partition>
<do_print>
metadata -1 (0->62)
primary 01 (63->1028159)
primary 02 (1028160->18491759)
primary 03 (18491760->19540079)
free -1 (19540080->19541087)
</do_print>
Disk geometry for /dev/hda: 0.000-9541.546 megabytes
Disk label type: msdos
Minor Start End Type Filesystem Flags
1 0.031 502.031 primary fat16 boot
2 502.031 9029.179 primary ext3
3 9029.180 9541.054 primary linux-swap
(parted) q
---END---
The offending partition is this metadata partition starting at 19535040
which is inside primary 03.
Callstack from where the error message is printed:
Breakpoint 1, _check_partition (disk=0xa0362f0, part=0xa036488) at
disk.c:1408
(gdb) bt
#0 _check_partition (disk=0xa0362f0, part=0xa036488) at disk.c:1408
#1 0x009ad421 in ped_disk_add_partition (disk=0xa0362f0,
part=0xa036488, constraint=0x0) at disk.c:1459
#2 0x009bae3e in add_metadata_part (disk=0xa0362f0,
type=PED_PARTITION_NORMAL, start=19535040, end=19541087) at disk_dos.c:1701
#3 0x009bb312 in msdos_alloc_metadata (disk=0xa0362f0) at disk_dos.c:1780
#4 0x009aa91e in _disk_alloc_metadata (disk=0xa0362f0) at disk.c:615
#5 0x009aae1d in _disk_pop_update_mode (disk=0xa0362f0) at disk.c:763
#6 0x009ad460 in ped_disk_add_partition (disk=0xa0362f0,
part=0xa036980, constraint=0xa036940) at disk.c:1466
#7 0x009b7f8e in read_table (disk=0xa0362f0, sector=0,
is_extended_table=0) at disk_dos.c:737
#8 0x009b81be in msdos_read (disk=0xa0362f0) at disk_dos.c:779
#9 0x009a9472 in ped_disk_new (dev=0xa037088) at disk.c:148
#10 0x0804c4be in do_print (dev=0xfef72be4) at parted.c:843
#11 0x0804a93e in command_run (cmd=0xa034df0, dev=0xfef72be4) at
command.c:129
#12 0x080510a0 in interactive_mode (dev=0xfef72be4, cmd_list=0x8053420)
at ui.c:1001
#13 0x0804e7d2 in main (argc=0, argv=0xfef72c7c) at parted.c:1644
(gdb)
Now the question is why this metadata partition gets start on 19535040
and not 19540080 like it ought to.
The answer to that is as far as I have figured out that for some
of the partition variables created, the bios_geomerty is set to
CHS=1216/255/63 instead of CHS=19386/16/63, and this becomes a problem
in _alloc_metadata:
if (ped_round_down_to (dev->length, cyl_size) != dev->length) {
if (!add_metadata_part (
disk,
PED_PARTITION_NORMAL,
ped_round_down_to (dev->length, cyl_size),
dev->length - 1))
return 0;
}
Here the start of the partition is rounded down with ped_round_down_to
using a bios_geom that is not compatible with the disk.
As far as I have understood the purpose of the metadata partitions is
it not an error to force the partition to the start of an cylinder?
If you should have a normal partition that say ends in the midle
of a cylinder then the following metadata partition should just start
where the preceeding partition ends, right?
The partition table of my disk is the following:
########################################################################
# #
# Partition table printout for /dev/hda (CHS=19386/16/63) #
# generated 2004-09-04 01:14 by printpar version 1.1.3 #
# #
########################################################################
Partition table at Master Boot Record (CHS=0/0/1) offset 0x1BE
+------+-----+--------------+-----+--------------+----------+----------+
| | | Start | | End | Relative |Number of |
| Part |boot |Head Cyl Sect.|syst |Head Cyl Sect.|Start Sect| Sectors |
+------+-----+--------------+-----+--------------+----------+----------+
| hda1 | 0x80| 1 0 1 | 0x06| 15 1019 63 | 63 | 1028097 |
| hda2 | 0x00| 0 1020 1 | 0x83| 15 1023 63 | 1028160 | 17463600 |
| hda3 | 0x00| 15 1023 63 | 0x82| 15 1023 63 | 18491760 | 1048320 |
| hda4 | 0| 0 0 0 | 0| 0 0 0 | 0 | 0 |
+------+-----+--------------+-----+--------------+----------+----------+
BR Håkon Løvdal
--
Linux - The Choice of a GNU Generation