Re: Lost MBR after windows installed



Robert Taylor <rmtaylor@xxxxxxxxxxx> wrote:
Greetings!
My difficulty is that the SuSE 10.2 MBR was hosed when I
installed Win XP on the first SATA disk (sda1) and the
SuSE partitions are on the second drive (sdb1, sdb2
... sdb5). Since the MBR was originally on what is now
sdb1 and the MBR is on the other drive there seems to be
no way to fix this other than to "update" the system. Is

I can't quite see how that happened. I just installed
WinXp onto a laptop with only a single hard disk, and
after putting WinXP on the first partition, it rebooted
the Linux that was on the other partitions without any
problem at all.

You are saying that putting Win XP on one disk caused the
_other_ disk's data to be lost.

However, it appears there is more to this than you are
saying. "The MBR was originally on what is now sdb1"
suggests that what is now sbd1 used to be something
else?? Such as, perhaps sda1? Did you add a disk, and
move the original?

this correct? Doing a repair from install disk did not
seem to work. The built in script kept telling me that
it was trying to write to a disk that does not exist and
failed during repeated attempts to fix this. Since the
package checks seemed to see everything the original
partitions are intact but the system seemed unable to
rewrite the MBR to sda1.

Has anyone ever seen this before?

I'm not clear on what you had. It appears that what you
currently have is WinXP installed on sda1 (are there
other partitions?) and Linux on sdb with multiple
partitions??.

The problem would be that WinXP has installed a boot loader
into the MBR of sda, and with it you cannot boot Linux on
sdb.

That's relatively easy to fix with a "rescue disk".

Obtain virtually any of the "live CD" distributions of
Linux, and boot Linux from the CD. Get a shell command
line (exactly how depends on which distribution) running
as root. Then do approximately this:

disk -l # just for fun, look at all of your disk partitions
mkdir /u

# Assuming that sdb1 is the root partition of your Linux
# installed on sdb, and that all filesystems are ext3.
# Mount the essential partitions:

mount -t ext3 /dev/sdb1 /u
mount -t ext3 /dev/sdb2 /u/boot
mount -t ext3 /dev/sdb3 /u/usr
mount -t ext3 /dev/sdb4 /u/var

# Now reinstall the lilo boot loader onto sda
#
# This assumes that your live CD distribution has an
# editor (try pico and then vi). You'll need to edit
# /u/etc/lilo.conf to indicate where the linux kernel
# is, e.g. at /u/boot/vmlinuz or whatever. You'll also
# need to edit /u/etc/fstab to show where all the various
# partitions will be mounted when it reboots Linux.
#
lilo -r /u

# Now reboot, and it should come up via the LILO boot loader


--
Floyd L. Davidson <http://www.apaflo.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska) floyd@xxxxxxxxxx
.



Relevant Pages

  • Re: Support HDIO_GETGEO on device-mapper volumes
    ... grub used HDIO_GETGEO when running under Linux. ... There's the translation that the BIOS (and thus DOS, PartitionMagic, ... disk in a compatible way. ... the MBR values are not guaranteed to be correct if you want ...
    (Linux-Kernel)
  • Re: Default support for GPT
    ... The MBR on a disk with GPT is expected to be a protective ... >>not like MBR partitions with GPT, but it could be made less picky. ...
    (freebsd-current)
  • Re: Future of OS/2 : was: ECS questions
    ... partitions as a user, because users don't have admin rights. ... /root password when you install Linux, ... to their physical order on the disk, which can get a little confusing.) ...
    (comp.os.os2.misc)
  • Re: How to rescue RedHat 9 Linux without loosing data
    ... Let me give you the partitions and the way I have Installed Linux on my ... Error mounting file system on hda1: ... That sounds like the partition structure of your disk is damaged. ...
    (RedHat)
  • Re: New Development - Any Ideas???
    ... I was reading about partitions today and decided to manually partition the entire disk myself. ... Canonical will have at least provided me with 10 shiny new ubuntu skeets to blast away with the 12 gauge (whoever said linux was absolutely useless... ... I was seriously interested in linux, but it is quickly becoming apparent that it must be an absolute nightmare to administer for anyone just starting to learn it. ...
    (alt.linux)