[Prev][Index][Thread]

disk partition table,blkio_read and systid.






Hi

on studing the example/x86/linux_fs_com.c, i found that there maybe some 
thing incomplete in the source:

in the main partition table(sector 0) of my computer, the systid of the 
sencond entry is 0FH (15), i learned from elsewhere that it also stands for 
extended partition. but in the source(20020317 
oskit/diskpart/find_pcbios.c). it checks for extended partitions only when 
systid = 5 (DOS_EXTENDED). if so, my extended partitions will not be 
checked. 

another thing is :
the mechanism of finding next extended partition in the source(also in 
find_pcbios.c) is different from the one used in winxp(dskprob.exe) :

in oskit source:
   use the extended partition table's second entry's offset to locate the 
next partition table.
in dskprob.exe:
   use the extended partition table's sector No. + 63 + the first entry's 
n_sector.

e.g:
my main partition table:
80 01 01 00 07 f3 bf 09 3f 00 00 00 4b f5 7f 00   (NTFS)
                                    ~~~~~~~~~~~
00 00 81 20 0f fe ff ff 8a f5 7f 00 1b f6 ec 01
                        ~~~~~~~~~~~
use both way. the result is the same : 7ff54b + 3f + 0 = 7ff58a (8385930)

the first of by extened partition table is:
00 01 81 0A 82 FE BF 2A 3F 00 00 00 A2 16 08 00   (linux swap)
                                    ~~~~~~~~~~~  
00 00 C1 92 05 FE FF FF 88 17 60 00 C3 1C 20 00   (DOS_EXTENDED)
                        ~~~~~~~~~~~
use the dskprob way : 7ff58a + 816a2 + 3f = 880c6b (8916075)
use the oskit way:    0(mystart) + 601788(entry->offset) = 601788h(6297480)

i can find the next partition table using dskprobe.exe in sector 8916075
but can not find it in both 8916075 & 6297480 with the oskit_blkio_read().
curiously enough,it can read out the first partition table at 8385930 !!! 
???

how can i get the next partition table!!!! my linux ext2 system is just 
there !
...... 

thanks very much !

cxlin

 


_________________________________________________________________
享用世界上最大的电子邮件系统— MSN Hotmail。  http://www.hotmail.com