Guess Partition Table-BOH8EIA!!
Nicholas Christopoulos
wired_gr at yahoo.com
Tue Jan 23 02:21:01 EET 2001
"root" <sinovia at TUXSina.home.gr> wrote in message
news:slrn96n2qe.2pl.sinovia at TUXSina.home.gr...
> Geia sas.
>
> Poios mporei na me boh8hsei sto na anakthsw
> thn domh twn partition enos hdd prin trella8w?
>
> O diskos exei mesa sxedon olh moy thn zwh :-)
>
> ... enas allos diskos ston opoio eixa ta pio basika backup
> prepei na xalase prin 10 meres giati den ton
> anagnwrizei kan to bios :-(
>
> Loipon o diskos eixe kammia dekaria partitions.
> Moy ftanei na anakthsw estw tis prwtes treis!
> Mexri twra katafera na dw to periexomeno ths prwths
> partition dhlwnontas oti o diskos exei mono mia...
>
> Ena epipleon problhma (isws) einai oti oi ypoloipes
> -ektos apo thn prwth dhladh- einai se reiserfs.
An diorthoseis TA partition tables tote mporeis na ta deis (ef' oson
ypostirizetai apo to kernel sou) alla ayto fysika to ksereis. Yparxei omos
kai enas allos (xrisimos gia dokimes). Antegrapse to partition (se allo
disko fysika) san arxeio kai prospathise na to kaneis mount me -o loop. An
thimame kala tha prepei na antigrapseis apo to boot sector. Kero oti sto
DOS/WinXX o boot sector arxizei me ena jmp (EB xx xx) kai akoloythei ena
signature (p.x. PCDOS4.0, MSDOS3.3, MSWIN4.1 (WinME)).
Diladi esto oti psaxnoume gia ena DOS partition se MSDOS 3.30, tha kaname
search sto fysiko disko gia ta bytes 'MSDOS3.3' kai gia epibebaiosh tha
kytagame an to proto byte tou sector exei timi EB.
Sto Linux tora... den ksero pola, psaxnontas omos ta dika mou partitions sta
grigora den ebgala akrh. Kapoios pou exei asxoleithei me ta ext2fs kai
reiserfs tha mporouse na mas boithisei.
Ksero omos pos tha breis ta partition tables (an yparxoun akoma kai den ta
patises me tipota allo).
Prota h theoria
---------------
To proto partition table brisketai sto (o legomenos partition sector) 0,0,1
(cyl,head,sec) sthn thesi 0x1BE. Ta partition tables exoun xoro gia 4
partition. Kathe mia tetoia eggrafi exei megethos 16 bytes.
Partition table record:
Offset Size
0 1 Boot flag (times 0x80 `h 0x00)
1 1 head arxis tou partition
2 2 (word) sector & cylinder arxis tou partition (psakse sto internet
gia na breis to sosto format tou sygkekrimenou word)
4 1 Partition type (0x5=EXTENDED, 0x6 = DOS > 32MB, 0xDB =
???DOS???, 0xC = FAT32x, 0x82 = linux swap, 0x83 = linux ext2fs)
5 1 head telous tou partition
6 1 (word) sector & cylinder telous tou partition
8 4 (dword) ???boot-sector offset???
C 4 (dword) number of sectors
Ena akoma symantiko pragma einai oti ta partition-tables teleionoun me
0x55AA (opou einai kai ta teleytaia bytes tou sector).
Gia na exoume pano apo 4 partition (opos esy) egine h eksis prosthiki apo
thn M$ (DOS 3.3 an thymame kala). Ta extended partitions.
Ta extended partitions einai san ta kanonika alla einai apothikeumena se
diaforetikous sectors me syndeseis metaksy tous san dynamiki lista
(single-linked fysika :).
Asxeta posa partitions exeis to proto prepei na exei 2 partitions (sto linux
mporeis na kaneis kai allous syndiasmous (px 2 kanonika kai 1 extended) alla
elpizo na mhn exei ginei etsi).
Typiko proto partition table me extended-record
offset
0x1BE [boot partition record]
0x1CE [extended partition record]
0x1DE [16 midenika]
0x1EE [16 midenika]
0x1FE [55AA]
To record tou extended (partition type = 5) tha deixnei san arxi toy
partition to epomeno partition-sector.
Protos extended partition-sector
offset
0x000 [midenika mexri to 0x1BE --- alla den einai sigouro]
0x1BE [partition record]
0x1CE [extended partition record]
0x1DE [16 midenika]
0x1EE [16 midenika]
0x1FE [55AA]
To record tou extended (partition type = 5) tha deixnei san arxi toy
partition to epomeno partition-sector.
Deyteros extended partition-sector
offset
0x000 [midenika mexri to 0x1BE --- alla den einai sigouro]
0x1BE [partition record]
0x1CE [16 midenika]
0x1DE [16 midenika]
0x1EE [16 midenika]
0x1FE [55AA]
Den yparxei allo extended opote teleiosame
Dyladi metrisame 3 pragmatika partiotions
Shmeiosi: ta partitions poy briskontai se extended partition, sto linux
symbolizontai me arithmous >5
p.x. sto parapano paradeigma ua eixame
/dev/hda1 --- proto
/dev/hda5 --- deytero
/dev/hda6 --- trito
Psaxnontas gia ta xamena ... partitions
---------------------------------------
Apo oti tha katalabes psaxnoume gia sectors opou periexoun sta teleytaia
bytes tis times 0x55,0xAA eno oi prohgoumenes 32 times einai 0.
An xrhsimopoieis to diskedit:
Tools->Find sto "Hex" dose 00 00 00 00 00 00 55 AA (an biazese dose ligotera
midenika), frontise episis na einai unchecked to "ignore case". Pata "find"
kai ksekinas.
Prosekse giati tha breis kai kapoious allous sectors oi opoioi den einai
partition-sectors, opote kane sygkrish me ta stoixeia pou sou edosa.
H kalyterh lysh einai na ftiakseis kana programma gi' ayth ti douleia...
Alla an thes na to kaneis me to xeri, tote, kathe fora pou briskeis ena
tetoio sector na ton typoneis (apo thn thesi 0x1BE). Meta na koitakseis
poios sector syndeetai me poion kai telos ftiakse sto arxiko table ena
extended partition (me to diskedit fysika) opou tha deixnei ton proto ths
listas...
Tip: Ctrl+G = find again
>
> Mia prospa8eia poy ekana me ena programmataki (gpart)
> eidiko giayth thn doyleia, den blepw na boh8hse poly..
>
> Ti lete loipon na kanw, prin katsw kai arxisw na
> manteyw enan ena ton ari8mo twn kylindrwn? ...Pragma poy
> sigoyra 8a diarkesei mexri thn Deyt.Paroysia "-( ...
Bres h ftiakse mia DOS system disk, bres to diskedit apo ta norton utilities
gia dos h gia win9x (periexoun kai dos ekdosh) kai ksekina. Shmeiosh: To
diskedit xora se mia disketa (kai einai to agapimeno mou ergaleio gia
tetoies doyleies).
>
> Me ligh tyxh ama psa3w kai to brw prepei na exw se kapoia disketta
> to $ df toy sygkekrimenoy diskoy... Mporw na kanw kati me
> ayto? Na pw thn alh8eia ekei basizw pia oles moy tis elpides...
>
> 8a sas eygnwmonw mia zwh gia thn doh8eia sas..
>
> Plz.. mh sthlete proswpiko -den exw kan mailclient mia ki
> o xwros poy, eixa eftane mono gia mia mini-egkatastash twn
> basikwn wste na er8w se epikoinwnia mazi sas..
>
> Epeishs mh grapsete -gia toys parapanw logoys- sta ellhnika
> giati den 8a mporw apo thn konsola na sas diabasw..
>
> Eyxaristw
> sina
___________________________________________
Nicholas Christopoulos (wired_gr at yahoo.com)
More information about the Linux-greek-users
mailing list