![]() |
|
|
|||
|
dd on MBR strange behavior
Hi,
I've made a copy of the MBR between two machines. Obviously the system crash but the strange behavior is that tehorically I've broken the partition table with this operation The operations I've committed are # dd if=/dev/sda of=/tmp/boot.img bs=512 count=1 and then # dd if=/mnt/tmp/boot.img of=/dev/sda bs=512 count=1 I think in the first 512 bytes of the disk there was the boot loader or the address of the bootloader. Why I've broken also the partition table? Thanks Gio |
|
|||
|
Re: dd on MBR strange behavior
AnticitizenOne wrote:
> Hi, > I've made a copy of the MBR between two machines. > Obviously the system crash but the strange behavior is that > tehorically I've broken the partition table with this operation > The operations I've committed are > # dd if=/dev/sda of=/tmp/boot.img bs=512 count=1 > and then > # dd if=/mnt/tmp/boot.img of=/dev/sda bs=512 count=1 > > I think in the first 512 bytes of the disk there was the boot loader > or the address of the bootloader. > Why I've broken also the partition table? Because the partition table is also located in the first sector (a.k.a MBR) of the disk. The first 446 byte of the MBR contain the bootstrap code. The next 64 bytes contain the partition table (actually only the entries for the four primary partitions you can have). The last two bytes of the MBR contain a "magic number" indicating an initialized boot sector. Regards, Kees. -- Kees Theunissen. |
|
|||
|
Re: dd on MBR strange behavior
On 16 Lug, 10:29, Kees Theunissen <theun...@rijnh.nl> wrote:
> AnticitizenOne wrote: > > Hi, > > I've made a copy of the MBR between two machines. > > Obviously the system crash but the strange behavior is that > > tehorically I've broken the partition table with this operation > > The operations I've committed are > > # dd if=/dev/sda of=/tmp/boot.img bs=512 count=1 > > and then > > # dd if=/mnt/tmp/boot.img of=/dev/sda bs=512 count=1 > > > I think in the first 512 bytes of the disk there was the boot loader > > or the address of the bootloader. > > Why I've broken also the partition table? > > Because the partition table is also located in the first sector > (a.k.a MBR) of the disk. > > The first 446 byte of the MBR contain the bootstrap code. > The next 64 bytes contain the partition table (actually only > the entries for the four primary partitions you can have). > The last two bytes of the MBR contain a "magic number" > indicating an initialized boot sector. > > Regards, > > Kees. > > -- > Kees Theunissen. thanks a lot! I committed a stupid error :-) Really don't know why, I think the pt was located after the MBR. Doh! |
![]() |
|
| Thread Tools | Search this Thread |
| Display Modes | |
|
|