[ros-kernel] bug in partition code

Hartmut Birr Hartmut.Birr at gmx.de
Mon May 17 02:33:55 CEST 2004


Hi,

it seems there is a bug in our partition read/write code in
ntoskrnl\io\xhaldrv.c. I've installed ros in a new created extended
partition. There was no problem. But booting from this partition fails. I
can access this partition from ros (booting from an other partition) and
from WinXP. I've printed the layout of the partitions from xhaldrv.c.

(io/xhaldrv.c:801) RealPartitionOffset: 0
(io/xhaldrv.c:842)   0: flags:80 type:6 start:1:1:0 end:254:63:129 stblk:63
count:2088387
(io/xhaldrv.c:842)   1: flags: 0 type:f start:0:1:130 end:254:63:1023
stblk:2088450 count:239143590
(io/xhaldrv.c:842)   2: flags: 0 type:0 start:0:0:0 end:0:0:0 stblk:0
count:0
(io/xhaldrv.c:842)   3: flags: 0 type:0 start:0:0:0 end:0:0:0 stblk:0
count:0
(io/xhaldrv.c:801) RealPartitionOffset: 2088450
(io/xhaldrv.c:842)   0: flags: 0 type:7 start:1:1:130 end:254:63:1023
stblk:63 count:40965687
(io/xhaldrv.c:842)   1: flags: 0 type:5 start:0:1:1023 end:254:63:1023
stblk:40965750 count:163846935
(io/xhaldrv.c:842)   2: flags: 0 type:0 start:0:0:0 end:0:0:0 stblk:0
count:0
(io/xhaldrv.c:842)   3: flags: 0 type:0 start:0:0:0 end:0:0:0 stblk:0
count:0
(io/xhaldrv.c:801) RealPartitionOffset: 43054200
(io/xhaldrv.c:842)   0: flags: 0 type:7 start:1:1:1023 end:254:63:1023
stblk:63 count:163846872
(io/xhaldrv.c:842)   1: flags: 0 type:5 start:0:1:1023 end:254:63:1023
stblk:204812685 count:4192965
(io/xhaldrv.c:842)   2: flags: 0 type:0 start:0:0:0 end:0:0:0 stblk:0
count:0
(io/xhaldrv.c:842)   3: flags: 0 type:0 start:0:0:0 end:0:0:0 stblk:0
count:0
(io/xhaldrv.c:801) RealPartitionOffset: 206901135
(io/xhaldrv.c:842)   0: flags: 0 type:b start:1:1:1023 end:254:63:1023
stblk:63 count:4192902
(io/xhaldrv.c:842)   1: flags: 0 type:0 start:0:0:0 end:0:0:0 stblk:0
count:0
(io/xhaldrv.c:842)   2: flags: 0 type:0 start:0:0:0 end:0:0:0 stblk:0
count:0
(io/xhaldrv.c:842)   3: flags: 0 type:0 start:0:0:0 end:0:0:0 stblk:0
count:0

The start block value from the 3th extended partition is wrong. In
xHalIoReadPartitionTable and xHalIoWritePartitionTable is a variable
ContainerOffset, which is only set for the first extended partition. If the
disk is used with different OS, it is possible that the higher partitions
would scrambled.

- Hartmut 



More information about the Ros-kernel mailing list