Accidentally corrupted MBR - how to restore it on Suse 9.1
Hi, I'm Linux newbie, tried to install Windows uncusessfully, but it also messed my MBR (temporarily during install that hasn't ended). I'm curious how to restore my MBR (I don't have a floppy drive - could use Knoppix CD I guess) ? Thanks in advance, Robert.
On Saturday 21 August 2004 06:32 pm, Robert Rozman wrote:
I'm Linux newbie, tried to install Windows uncusessfully, but it also messed my MBR (temporarily during install that hasn't ended).
I'm curious how to restore my MBR (I don't have a floppy drive - could use Knoppix CD I guess) ?
Thanks in advance,
Robert, There was a thread in the past week or so discussing this issue and the different ways to recover If you have a windows bootable cd around, boot from it to the command line and do: fdisk /mbr that will restore the mbr to the winstuff thing it had, then you need to redo grub. In a nutshell, the easiest way for me is to boot from the SuSE CD/dvd tell it to do an installation -- But you wont do an installation- then a couple of dialogs in, you are offered several choices, one being to boot an installed linux. That election that will look at your hd and boot up the linux it found there. When it finally gets booted up, I then use YAST>System>Boot Loader Configuration to redo grub. Mine has the following Values in the Boot loader Setup page: Boot Loader Location = /dev/hda2 # Yours witll vary depending on where your boot partiton is, Disk Order = /dev/hda, /dev/hdb Available Sections = Linux (default), Windows, Failsafe Activate Boot loader Partiton = No Replace Code in MBR = Leave Untouched Back up Affected Disk Areas = No Add Saved MBR to Boot Loader Menu = No Save Method = Save only changed files. On Finishing it is ready to boot as before. If you look up the tread I referred you will find several different suggestions on how to do this. I choose the GUI cause it's easiest for me, There are command line versions that work equally well, but you can see my typing sucks. Hope that helps a bit, Richard
Hi,
I'm Linux newbie, tried to install Windows uncusessfully, but it also messed my MBR (temporarily during install that hasn't ended).
I'm curious how to restore my MBR (I don't have a floppy drive - could use Knoppix CD I guess) ?
I presume that you have SuSE installed already? If so, boot from the installation cd/dvd, choose "manual installation," then "boot installed system." You can then use YaST to restore your mbr. David
I presume that you have SuSE installed already? If so, boot from the installation cd/dvd, choose "manual installation," then "boot installed system." You can then use YaST to restore your mbr. Now I am confused. Wouldn't it be easier to just choose the repair
David Robertson wrote: option? I had a similar problem and I just used the repair option. Damon Register
David Robertson wrote:
I presume that you have SuSE installed already? If so, boot from the installation cd/dvd, choose "manual installation," then "boot installed system." You can then use YaST to restore your mbr. Now I am confused. Wouldn't it be easier to just choose the repair option? I had a similar problem and I just used the repair option.
Do you mean "rescue" mode? Yes, you could use that, but if someone isn't too familiar with a CLI, then booting the installed system and using YaST might be easier (I thought............) David
David Robertson wrote:
Do you mean "rescue" mode? Yes, you could use that, but if No, not rescue mode
someone isn't too familiar with a CLI, then booting the Neither am I. That is how I found the easier way. Some weeks ago I had the same problem. I messed up the mbr so grub didn't work. I have fixed this before using the rescue system and a solution from the SuSE book. When I had the most recent problem, I couldn't find my SuSE book so I decided to try the repair option that I had seen during installation.
1. Boot with installation CD1 or DVD 2. choose Installation 3. choose language 4. choose repair installed system Since I already knew what I wanted to fix, I didn't choose the auto method. My philosophy about software is that one can fake his/her way through well written software without books or previous knowledge of that program. SuSE installation seems to be well written so I could pick obvious options without needing my book or help from this list. Damon Register
David Robertson wrote:
Do you mean "rescue" mode? Yes, you could use that, but if No, not rescue mode
someone isn't too familiar with a CLI, then booting the Neither am I. That is how I found the easier way. Some weeks ago I had the same problem. I messed up the mbr so grub didn't work. I have fixed this before using the rescue system and a solution from the SuSE book. When I had the most recent problem, I couldn't find my SuSE book so I decided to try the repair option that I had seen during installation.
1. Boot with installation CD1 or DVD 2. choose Installation 3. choose language 4. choose repair installed system
Since I already knew what I wanted to fix, I didn't choose the auto method. My philosophy about software is that one can fake his/her way through well written software without books or previous knowledge of that program. SuSE installation seems to be well written so I could pick obvious options without needing my book or help from this list.
You're right - it is easier. Missed that one! David
Robert Rozman wrote:
Hi,
I'm Linux newbie, tried to install Windows uncusessfully, but it also messed my MBR (temporarily during install that hasn't ended).
I'm curious how to restore my MBR (I don't have a floppy drive - could use Knoppix CD I guess) ?
Thanks in advance,
Robert.
You have a lot of options: 1. If you use *only* windows, you have 2 sub-options: 1.1. go to http://www.bootdisk.com/ and grab a Win98SE boot disk image; boot your computer and issue 'fdisk /mbr' 1.2. Win2K and XP: you can also boot the installation CD and choose repair and console repair; in the console itself type 'fixmbr' (the same as fdisk /mbr - win2k and XP don't have fdisk.exe anymore) 2. With linux, you can use lilo or grub. 2.1. lilo: * boot with a CD (knoppix, suse, etc). mount the partition, use chroot to change the root dir of you shell to the mounted partition, run 'lilo -t' to check the config, 'lilo' to install the bootloader and cross your fingers. Sometimes big differences into the libs prevents lilo to run correctly. If possible, try to use the install CD in rescue mode to do this. 2.2. grub: * see http://lists.suse.com/archive/suse-linux-e/2004-Aug/2444.html Using knoppix with these approach is very risky, since it will install grub from the CD, not of your already installed OS. Different versions do not work, possible due to binary differences. I've tried before with grub 0.93 and 0.94 and got no boot-menu, just b black screen. Use your distro-CD. Distribution-specific methods exists, and the folks here already gave some hints how to do this with SuSE. The fdisk /mbr way is a 'intelligent' approach if you don't have linux, otherwise you still have to restore lilo or grub to boot linux, doubling your work. Someone sent a message suggesting a backup of the MBR. It is a good idea, for sure. As a suggestion, take advantage and sent the command line; if someone is asking how to restore the MBR, probably he doesn't know how to backup the MBR using 'dd'. I never did it this kind of backup, and I really don't recommend someone to learn 'dd' by trial-and-error.
participants (5)
-
Damon Register
-
David Robertson
-
Marcos Vinicius Lazarini
-
Richard
-
Robert Rozman