User Tools

Site Tools


Sidebar

**INDEX:** {{indexmenu>:}} {{ :a-r.png?nolink&200 |}}

A PCRE internal error occured. This might be caused by a faulty plugin
backup_and_restore_mbr

Linking to a good howto first: [[https://www.cyberciti.biz/faq/howto-copy-mbr/|https://www.cyberciti.biz/faq/howto-copy-mbr/]] The MBR is all total 512 bytes on the very first section on a harddisk on * 446 bytes – Bootstrap. * 64 bytes – Partition table. * 2 bytes – Signature. The first 440 bytes of MBR are **bootstrap code area**. On BIOS systems it usually contains the first stage of the boot loader. **GUID Partition Table (GPT)** is an alternative, contemporary, partitioning style; it is intended to replace the old **Master Boot Record (MBR)** system. GPT has several advantages over MBR which has quirks dating back to **MS-DOS** times. So this howto is only for **BIOS** based **MBR** partition schemes!!! **NOT** for GUID Partition Table (GPT) ! To backup the full MBR including partition scheme: <code> sudo dd if=/dev/sdX of=mbr-sdX.bak bs=512 count=1 </code> To play it back on the same disk with the same partition scheme: <code> sudo dd if=mbr-sdX.bak of=/dev/sdX bs=512 count=1 </code> This is usefull as a MBR-backup for a dual-boot system with Antergos and Windows on the same disk. As we all know with installed grub on the MBR Windows 10 get problems on updates, and with a backup of the original MBR from WIndows you can write it back, proceeed the updates and write grub back then. To write back only the **bootstrap code area **without may changed partition scheme: <code> sudo dd if=mbr-sdX.bak of=/dev/sdX bs=446 count=1 </code> \\ The above commands will preserve the partitioning schema. An all this you will need to change sd<del>X</del> to the disk letter of your harddisk. you can watch the scheme with: <code> sudo fdisk -l </code> this will look like this: <code> Disk /dev/sda: 149 GiB, 160000000000 bytes, 312500000 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x89809807 Device Boot Start End Sectors Size Id Type /dev/sda1 2048 1026047 1024000 500M 7 HPFS/NTFS/exFAT /dev/sda2 * 1488896 187825238 186336343 88.9G 7 HPFS/NTFS/exFAT /dev/sda3 187826176 189618175 1792000 875M 27 Hidden NTFS WinRE /dev/sda4 189618176 312498175 122880000 58.6G 5 Extended /dev/sda5 189620224 294477823 104857600 50G 83 Linux /dev/sda6 294479872 312498175 18018304 8.6G 82 Linux swap / Solaris </code> Your disk letter is **a** here so it would be** /dev/sda …** **or use ** <code>''lsblk -f'' </code> <code> NAME FSTYPE LABEL UUID MOUNTPOINT sdc ├─sdc1 ntfs System-reserved D4A274198756403F0 ├─sdc2 ntfs 70S6554T8887C77E ├─sdc3 ntfs 264070S6554T8881 ├─sdc4 ├─sdc5 ext4 root 5acb7147-e063fa-70S6554T-7C77E [/] └─sdc6 swap swap 87zz787633-541-4b51-bg656-6545431 [SWAP] </code> **[[:custom_grub_cfg_generator|Custom Grub cfg Generator]]**

backup_and_restore_mbr.txt · Last modified: 2019/06/05 21:47 (external edit)