Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 08-24-2012, 01:19 AM   #1
Registered: Jul 2012
Distribution: Arch, Kubuntu
Posts: 76

Rep: Reputation: Disabled
How to fix mbr in linux or gparted, etc. (for a mbr partitioned disk)

I am used to using gpt disks, therefore I was using gptsync to fix mbr.

I do not know if gptsync can fix mbr in mbr disks, which I think not.

I am wondering if there is any command that I can use like gptsync to fix mbr of mbr disks.

sudo gptsync /dev/sdX
has always solved my problems on gpt disks.
But I don't know what can solve my problems in mbr disks.

And gptsync works if there is any grub or not in the drive.
That is the kind of solution I am looking for, even if there is no grub, can mbr be updated?
In gpt disks, whenever I have a problem, I can easily delete the first 200 MB Protective Partition and run gptsync, and everything would be fine.
Is there any solution like this for MBR disks?


Last edited by imayneed; 08-24-2012 at 01:34 AM.
Old 08-26-2012, 10:37 AM   #2
LQ Guru
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
there is grub-install. if you got a backup of the partition table this mite work:
dd if=mbr.bak of=/dev/sdb bs=512 count=1
Old 08-26-2012, 10:50 AM   #3
Senior Member
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,120

Rep: Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259
Surely this can't be a common problem. What the heck are you doing that you need to recreate the mbr that often?

Anyway, the disk label can be written with parted. If you need a boot loader as well, then use grub-install.

gptsync creates a disk label (mbr partition table) from a gpt. If you don't have a gpt, and your mbr is corrupted, parted can find your partitions with "rescue" mode.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Linux's fdisk to erase or fix a MBR? Comatose51 Linux - Software 29 03-24-2014 06:31 PM
How to fix MBR Renu Shah Linux - Newbie 8 07-12-2012 05:04 PM
Gparted Error/HD Fix Ritzbitts Linux - General 7 01-01-2012 02:46 AM
can Knoppix fix the MBR for a Linux partition? joshknape Linux - Newbie 2 03-07-2006 12:38 AM
by tring to fix the MBR i damage the MBR that was help... AKAKAK Fedora 4 03-21-2005 09:18 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:49 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration