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.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
By aus9 at 2004-10-29 02:48
Backing up or Restoring MBR on floppy
1) Assuming your system is booted. I don't think you would be saving a normal MBR by a rescue system. Insert a mdos or ext2 formatted floppy and mount it.
2) Open a terminal and type su to get root access then
dd if=/dev/hda of=/home/your name/mbrhda bs=512 count=1
This creates a file in your home directory. If your system has some umask permissions that don't allow automatic file creation the use the touch command first like this
touch /home/your name/mbrhda
Also, hda is for first IDE drive, change it to sda for SCSI or SATA or hdb sdb etc
3) Test it with dd if=/home/your name/mbrhda bs=512 count=1
There is no need for of=.....as we print to screen and the output will have squiggles and lilo or grub and Geom .
4)Once you see the output, save that file to floppy any way you fancy or
cp /home/your name/mbrhda /mnt/floppy
1) Although you can test this on a booted system you are more likely going to try this on a non-booted system. Restore your mbr you will need a rescue floppy such as TOMS or a rescue cd such as from www.sysresccd.org or Knoppix cd.
2) I am using TOM's floppy as if you are reading this may have problems with your cd drive.
Toms is in root mode upon booting. www.toms.net
3) Rescue cd's may need to be put into su mode such as Knoppix cd.
4) Because your rescue floppy or cd creates a ram drive you create a false /mnt to mount your floppy.
The restore commands may need a little more explaining?
mkdir /3 is a directory in the ramdrive and it is NOT writing to any hard drive. I chose a number which is not normally a part of real hard drive linux file system. So you know it is a ram drive folder. ie a false folder that disappears upon reboot to hard drive.
The next command mounts a msdos floppy from the first floppy hardware controller to ramdrive folder /3
The last command you need to take care in case you muck up more than you should. Please limit it to 512 bytes even tho you saved the file as a max of 512 b.
Before reboot test it
dd if=/dev/hda bs=512 count=1 and hope its what it should be.
However, I noticed some character distortion in my first terminal so I had to open a new terminal by pressing ALT and the number 2 or number 3 key etc.