GeneralThis forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!
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.
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.
Does anyone know of a way to save the MBR to a floppy (in either Win or Lin)? I've not got a problem with it at the moment, but fdisk /mbr will only work so many times.
A while ago (before I fully understood about the MBR) I tried to install QNX, it failed. So I tried again (without doing an 'fdisk /mbr'), and it failed again. I removed the remnants of the QNX installation (with a Mandrake 7.1 install CD), and then booted. Couldn't find anything to boot on the bootable partition. Finally did an 'fdisk /mbr' (several times in the end) and still couldn't boot. It seems that doing an 'fdisk /mrb' will only put in place the last used MBR, which happened to be Windows.
The ability to copy the MBR to a floppy could be a god-send for complete newbies that think they've knackered their HD and are about to re-install Windows.
I had always thought that the file in /boot called boot.0300 contained the MBR when you first installed Linux. I would make a copy of this just in case you need it. Not sure how much use this would be?
It's not a question of booting from the floppy. In some of my replies to people that are having problems installing Linux, I have stated that they should do an fdisk /mbrbefore they re-install Linux. I came across a problem with this - installing a new OS overwrites the mbr and only saves 1 copy of the previous record. Thus, if you 'forget' to do an fdisk /mbr a couple of times, you really are in the shit should you want to remove all remnants of an alternative OS and go back to Windows (god forbid!).
Having a safe copy of the MBR on a floppy would give you the opportunity to:
Boot into DOS using a Windows Boot Floppy, replace your current MBR with your 'nice, safe' version, reboot and you should not see any problems.
Like, for example:
Someone wants to try Linux. They install it. It goes wrong (they installed it wrong?). They re-install it, without having done an fdisk /mbr. It goes wrong again. They finally do an fdisk /mbr and hope that all is well. It won't be - they will now be given an 'L' prompt. Nothing works. Typing 'Linux' won't boot. Typing 'windows' won't boot. No matter how many times they type fdisk /mbr, they won't be able to remove LiLo. Thus, being able to copy a 'windows safe' MBR to a floppy should get them out of trouble.
Thanks for the advice guys - anyone know how to do this from DOS/Windows with FDISK?
When you install LILO it automatically make a copy of the current MBR and stores it elsewhere.
I think it is in the /boot directory.
Correct me if I'm wrong but fdisk /mbr (dos fdisk that is) always write back a dos/windows boot block.
Sometimes though it won't help.
Then the only thing that help is to manually write zeros to the MBR wich is the first 512 bytes of the hard disk.
I think the boot.0300 is the LILO back-up of the MBR ugge.
As for a windows backup I also thought that fdisk /mbr did re-write windows boot section. But to be honest I have never tried to use it. (usually just a quick format of the HD would do!).
I don't know how to make a permanent copy through windows though.
Thymox, the way I get around this is to use gdisk instead of fdisk.
For those unfamiliar, gdisk is a handy little DOS utility I'm told was created by Symantec. I have a windoze 98se boot floppy (with cd rom support) that I added the gdisk command to. It's very small and can easily be added to a windoze boot floppy.
gdisk is a life saver. I've installed multiple versions of Linux (and freeBSD) on multiple machines. As you said, at some point the MBR inevitably becomes screwed.
I then boot the machine from the floppy and run:
gdisk 1 /MBR
and it "reinitializes" the MBR.
Also, gdisk will get rid of nasty compressed and/or logical drives that seem impervious to fdisk (under DOS).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.