Portál AbcLinuxu, 27. dubna 2024 02:32


Dotaz: Jak zálohovat partition table?

12.11.2005 14:27 Eregon | skóre: 22 | blog: Eregonovy_vymysly | Všudezdejší
Jak zálohovat partition table?
Přečteno: 614×
Odpovědět | Admin
Zdravim, chystam se na nejake experimenty s partition table, ale protoze na disku jsou i data, ktera bych nechtel ztratit a nemam je momentalne kam jinam ulejt, chci si udelat zalohu PT.

Nejak se mi ale nezadarilo najit zadny nastroj, ktery by to udelal nejak automaticky a pak byl schopny PT taky vratit zpet, takze jedina moje zaloha ted prave je papir, na nem vypsane jednotlive particie s poznamkou o tom, ktera data na danem oddilu jsou, a s pocatecnim a koncovym cylindrem, tak jak to vypsal fdisk -l. To mi ale neprijde jako uplne cista cesta, zvlast pote, co jsem zrusil jednu partici, z tehle "zalohy" jsem ji obnovil a fdisk -l zacal hlasit "Partition 1 does not end on cylinder boundary."

Nema nekdo nejaky tip?
~ w w w w (oo)   [oo] w w w w ~
Nástroje: Začni sledovat (0) ?Zašle upozornění na váš email při vložení nového komentáře.

Odpovědi

12.11.2005 14:55 JPetr | skóre: 10
Rozbalit Rozbalit vše Re: Jak zálohovat partition table?
Odpovědět | | Sbalit | Link | Blokovat | Admin
dd if=/dev/hdx of=/cesta_k_souboru bs=512 count=1, kde x je disk, u ktereho chces provest zalohu PT
12.11.2005 15:41 Eregon | skóre: 22 | blog: Eregonovy_vymysly | Všudezdejší
Rozbalit Rozbalit vše Re: Jak zálohovat partition table?
Oki, diky. Jeste technicka - jestli spravne chapu man stranku k dd, tak obnova PT z takhle vytvorene zalohy se udela zamenou parametru of a if. V takovem pripade se z5 na disk zapise jen ten jeden sektor a zbytek zustane nedostceny, chapu spravne?
~ w w w w (oo)   [oo] w w w w ~
12.11.2005 16:19 JPetr | skóre: 10
Rozbalit Rozbalit vše Re: Jak zálohovat partition table?
Jo, chapes to spravne
13.11.2005 00:02 Beda
Rozbalit Rozbalit vše Re: Jak zálohovat partition table?
jen jestli mu dochazi, ze do linuxu k dd na tu partition o ktere bude zaznam v TE partition tabulce s kterou hodla experimentovat se uz nejspis nedostane...
13.11.2005 00:09 Eregon | skóre: 22 | blog: Eregonovy_vymysly | Všudezdejší
Rozbalit Rozbalit vše Re: Jak zálohovat partition table?
No neboj, az zas takovy retard nejsem, a muzes mluvit primo ke mne. Linux uz nejaky ten patek pouzivam, ale kdyz se zabyvam vecmi, kde jde o data, radsi si vsechno overuju. Ono je to lepsi, nez pak v blogu brecet, ze jsem o neco prisel.
~ w w w w (oo)   [oo] w w w w ~
14.11.2005 01:16 trekker.dk | skóre: 72
Rozbalit Rozbalit vše Re: Jak zálohovat partition table?
Ono je to lepsi, nez pak v blogu brecet, ze jsem o neco prisel.
Tak, tak. Třeba jako já zrovna teď. :-(
Quando omni flunkus moritati
12.11.2005 16:11 spectrum | skóre: 29 | blog: spectrumblog
Rozbalit Rozbalit vše Re: Jak zálohovat partition table?
Zdravím,
tahle sranda zálohuje akorát boot sektor příslušného disku. Na zálohování partition table tu je následující:
sfdisk -d /dev/hda > part.table
Pěkný návod naleznete na http://www.linuxnetmag.com/en/issue9/m9recovery1.html a s úspěchem jsem ho již několikrát použil.
12.11.2005 16:18 JPetr | skóre: 10
Rozbalit Rozbalit vše Re: Jak zálohovat partition table?
No, tech prvnich 512 bytu na disku je rozdeleno na zavadeci kod (446 bytu) a dalsich 64 bytu je partition table. Jestli se pletu, tak me prosim opravte
12.11.2005 16:34 David Jaša | skóre: 44 | blog: Dejvův blog
Rozbalit Rozbalit vše Re: Jak zálohovat partition table?
A poslední dva bajty jsou checksum nebo něco na ten způsob.
12.11.2005 16:50 JPetr | skóre: 10
Rozbalit Rozbalit vše Re: Jak zálohovat partition table?
Tak, tak. Jsou 55 AA
13.11.2005 13:13 anonym
Rozbalit Rozbalit vše Re: Jak zálohovat partition table?
Tady je část z : http://www.diydatarecovery.nl/MBRtool_manual.htm _________________________________________________________

A word about the MBR

- introduction

The Master Boot Record (or MBR) is the very first sector of a harddisk. This very important sector contains a number of things that the Operating System and the computer BIOS need to start the system. If the contents of this sector are lost or damaged you can not access the data on the harddisk. Please note that each harddisk has a MBR, so if you have 2 or more harddisks in your computer, each has it's own MBR. If multiple disks are configured as an array there is usually 1 MBR that services the entire array, placed on the 1st disk in the array (there are exceptions to this rule, but that is beyond the scope of this manual). It should be clear that the MBR is one of the most important (and, strangely enough, overlooked) sectors on your harddisk. The following explanation is mainly about using the MBR with Windows or DOS based operating systems. The MBR is somewhat different when used with Unix based systems. I will come back to this later on.

- details

The smallest addressable space on a harddisk is 512 bytes at a time. A harddisk sector is 512 bytes long, so 1 sector is the smallest addressable space on a harddisk. The MBR is 1 sector, so the MBR is 512 bytes long. These 512 bytes are divided into several parts that each have their own function in getting the computer to start. The 4 main parts of the MBR are (in the order they appear in the MBR) :

- the bootcode
- the volume bytes
- the partition table
- the signature bytes
The bootcode : this part of the MBR gets read by the computer BIOS when the computer is started. When the computer finishes it's own startup procedures (getting the disks spinning, doing some checks) and gets ready to start the operating system, the bootcode in the MBR is read first. This allows the computer to interpret the rest of the MBR.

The volume bytes : these are 4 bytes that are located after the bootcode and just before the partition table. Windows 2000 and Windows XP use these 4 bytes to identify the mountable volumes on the harddisk. If these bytes are changed or erased from the MBR, Windows 2000/XP will go through a simple hardware detection round that will re-identify all the volumes on the disk. This is done during the next Windows startup after changing the volume bytes. Driveletters assigned to volumes might change after this. This goes for simple volumes, i have at this point no information on the effect of removing the volume bytes when using dynamic volumes.

The partition table : this is a sequence of 64 bytes (4 x 16) that identify the first 4 (or less) primary partitions on a harddisk. There is space for identifying 4 partitions. Each partition-identification is made up of 16 bytes that describe a number of things about the partition, such as : where it starts, what type it is, how big it is, is it an active partition or not, etc. One of these 4 partition descriptions can be used to describe an extended partition, which itself can then contain logical drives. The logical drives are not described in the MBR. An active partition is the partition from which the Operating System is started. This must be a primary partition, and there can only be 1 primary partition active at any time. If there are for instance only 2 partitions on a harddisk, the first 32 bytes of the partition table (2 x 16) would contain the descriptions of those partitions. The other 32 bytes would contain all zeros. So deleting a partition consists of putting zeros in the chosen partition description.

The signature bytes : these are 2 bytes that are used to signify an important sector. They can be found trailing the MBR, but there are other sectors that contain these bytes as well. If they are not trailing the MBR the computer will not be able to read the MBR (because it will not be recognised as an important sector).

So, the MBR consists of :
- 440 bytes of bootcode, followed by
-   4 bytes with volume information, followed by
-   2 bytes that are (as far as i know) not used, followed by
-  64 bytes that contain the partition descriptions, followed by
-   2 bytes that "close up" the MBR
This makes a total of 512 bytes.

A word about Unix based Operating Systems : The main difference between a Unix based MBR and a Windows based MBR is the bootcode. Unix based bootcode has the ability to look for partition information outside the MBR. So it should be clear that replacing Unix bootcode with Windows bootcode could render a system unstartable.
12.11.2005 19:52 Dejv | skóre: 37 | blog: Jak ten blog nazvat ... ? | Ostrava
Rozbalit Rozbalit vše Re: Jak zálohovat partition table?
Nikoliv checksum, ale signatura.
Pevně věřím, že zkušenější uživatelé mě s mými nápady usměrní a pošlou tam, kam tyto nápady patří...
12.11.2005 19:54 Dejv | skóre: 37 | blog: Jak ten blog nazvat ... ? | Ostrava
Rozbalit Rozbalit vše Re: Jak zálohovat partition table?
Jenze timhle si zazalohuje jen hdx[1-4].
Pevně věřím, že zkušenější uživatelé mě s mými nápady usměrní a pošlou tam, kam tyto nápady patří...
13.11.2005 00:07 Beda
Rozbalit Rozbalit vše Re: Jak zálohovat partition table?
Jenze se taky pta na partition table a ne na extended partition table nebo ldm (ano je tam D) signatury.
13.11.2005 00:14 Eregon | skóre: 22 | blog: Eregonovy_vymysly | Všudezdejší
Rozbalit Rozbalit vše Re: Jak zálohovat partition table?
Ano, ptal jsem se jen na partition table, protoze me zajimala jen partition table. Kazdopadne za vsechny KONSTRUKTIVNI tipy vsem dekuju (zalohoval jsem pres dd, ale ostatni rady se mozna jeste budou hodit).
~ w w w w (oo)   [oo] w w w w ~
13.11.2005 17:39 Feyd | skóre: 1
Rozbalit Rozbalit vše Re: Jak zálohovat partition table?
Extended partition table je taky partition table.. A kdyby vedel o co go a jak je to ulozeny, nebude se nejspis ptat..
14.11.2005 00:16 Eregon | skóre: 22 | blog: Eregonovy_vymysly | Všudezdejší
Rozbalit Rozbalit vše Re: Jak zálohovat partition table?
Nemyslim, ze bych nevedel, o co go, slo mi jen o to, mit vse overene predem, jak jsem psal vyse
~ w w w w (oo)   [oo] w w w w ~

Založit nové vláknoNahoru

Tiskni Sdílej: Linkuj Jaggni to Vybrali.sme.sk Google Del.icio.us Facebook

ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.