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! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
03-01-2005, 09:32 PM
|
#1
|
LQ Newbie
Registered: Mar 2005
Posts: 13
Rep:
|
How to backup & restore the MBR in linux?
I am searching a way to backup and restore the MBR of the disk in linux.
who has some good ideas to do it?
you are appreciatedto share your experience!
thx a lot
|
|
|
03-01-2005, 09:35 PM
|
#2
|
LQ Guru
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507
Rep:
|
For a pure backup:
Code:
dd if=/dev/hda of=BACKUPMBR bs=512 count=1
Obviously, replace /dev/hda with the appropriate device for your system.
|
|
|
03-01-2005, 09:39 PM
|
#3
|
Senior Member
Registered: Jul 2003
Location: So. Cal.
Distribution: Slack 11
Posts: 1,737
Rep:
|
Matir, Could you break down that line and tell us what each of those commands do? Thanks.
|
|
|
03-01-2005, 09:57 PM
|
#4
|
LQ Guru
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507
Rep:
|
Hehe, sure.
[code]dd if=/dev/hda of=BACKUPMBR bs=512 count=1[/count] - dd: program to perform bit-by-bit copying.
- if: input file (or device) to read from
- of: output file (or device) to write to
- bs: block size, in bytes
- count: number of blocks to read/write
This will copy the first 512 bytes of the /dev/hda (which is the Master Boot Record) to the file "BACKUPMBR".
Hope this helps.
|
|
|
03-01-2005, 11:09 PM
|
#5
|
Senior Member
Registered: Jul 2003
Location: So. Cal.
Distribution: Slack 11
Posts: 1,737
Rep:
|
Cool, Thanks.
|
|
|
03-01-2005, 11:25 PM
|
#6
|
Senior Member
Registered: Jun 2004
Location: Australia
Distribution: Mandriva/Slack - KDE
Posts: 1,672
Rep:
|
If you do a man dd you get lots of this cool info...
|
|
|
03-02-2005, 09:33 AM
|
#7
|
LQ Guru
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507
Rep:
|
You can do almost anything with dd! It even makes pancakes (ok, not really).
dd if= /dev/hda of= BACKUPMBR bs= 512 count= 1 means to copy 1 block of 512 bytes from /dev/hda to BACKUPMBR.
Hope that helps. The formatting was fun anyway.
|
|
|
03-02-2005, 09:07 PM
|
#8
|
Senior Member
Registered: Jul 2003
Location: So. Cal.
Distribution: Slack 11
Posts: 1,737
Rep:
|
Quote:
Originally posted by amosf
If you do a man dd you get lots of this cool info...
|
I did that right after the last post.
|
|
|
All times are GMT -5. The time now is 03:29 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|