Re: [opensuse] RE: Damaged Master Boot Record



On Sat, 04 Aug 2007 11:52:34 +1000
Registration Account <alpha096@xxxxxxxxxx> wrote:

What I need are 2 things.

1. How do I dismount all the drives to run fsck at Xterm?

2. How do I use fdisk to re-write MBR from xterm?


The second one might be difficult as there is plently
of info on re-creating a LiLO MBR but not GRUB on the
internet

The best way is to boot a rescue or disk or live CD, but...
Another way is to shutdown to single user mode. This should unmount all
but the root file system. You can always do a umount -a.

Make sure root is mounted read-only. (If I recall, in SuSE when
shutting down to single-user, it mounts read-only, but Fedora did not.
So, what I do is try to write to root, and if it fails I'm read-only.

The command to mount root readonly is:
mount -o remount,ro /

At this point you can run fsck.
I generally run fsck on a single partition at a time in this mode, but
you can also run multiples.

Probably the simplest way to fix the MBR is to go to YaST/System/Boot
Loader. Stepping through this, should cause the MBR to be rebuilt.
Another way is to use the grub(8) command. Check the grub info page:
info grub
There is a section "3.2 Installing GRUB natively"
This will also rewrite the MBR.


--
Jerry Feldman <gaf@xxxxxxx>
Boston Linux and Unix user group
http://www.blu.org PGP key id:C5061EA9
PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9

Attachment: signature.asc
Description: PGP signature



Relevant Pages

  • Re: OpenSUSE 10.3 new install boot problem
    ... Check, if you boot from a Harddisk, while the old mandrake still ... root ... Re-install MBR using GRUB ...
    (alt.os.linux.suse)
  • Re: cloning a system to another partition - what to change?
    ... > I'll never again root =after a kernel. ... > SECOND specification of hda6 as running root. ... If you want Grub on the _MBR_ to point to the cloned partition and read ...
    (Debian-User)
  • Restore Ubuntu MBR
    ... I found the following below on a Ubuntu site. ... I seem to lose my MBR approx. ... Start grub as root with the following command: ...
    (Ubuntu)
  • RE: Reloading GRUB in MBR
    ... Subject: Reloading GRUB in MBR ... Try booting with the Linux cd to rescue mode, login as root and run ...
    (RedHat)
  • Re: Please Help: system keeps rebooting after installing FC3
    ... writing to the MBR even when i opt not too. ... F8 everytime i boot to toggle BIOS to boot from my hdb. ... get hold of various other boot loaders, grub fail the same way as yours. ... The installation went smooth and at the end I needed ...
    (linux.redhat)