Find the answer to your Linux question:
Results 1 to 8 of 8
Can please someone tell me, how can I restore mbr from recovery console of suse 10.2. Accidentally I have overwriten mbr with windows xp and now I want to get ...
  1. #1
    Linux Newbie
    Join Date
    Feb 2006
    Location
    Slovenia
    Posts
    162

    How to restore MBR?

    Can please someone tell me, how can I restore mbr from recovery console of suse 10.2. Accidentally I have overwriten mbr with windows xp and now I want to get my suse bootloader back.The option is to run the installation of suse again and then choose update option, but I would rather do it from comand line, if that is possible.

  2. #2
    JHB
    JHB is offline
    Just Joined!
    Join Date
    Jan 2007
    Location
    South Africa
    Posts
    22
    Try using
    #grub-install /dev/hda
    Just replace hda with the device of your harddisk

  3. #3
    Linux Newbie
    Join Date
    Feb 2006
    Location
    Slovenia
    Posts
    162
    Thanx, I'll give it a try. Do you know if there could be a problem, because I use LVM partitioning.

  4. #4
    Just Joined!
    Join Date
    Feb 2007
    Posts
    20
    I doubt there'd be much difference/problem of what disk you use. LX simply consider IDE disks versus SCSI/SATA disks.

  5. #5
    Linux Newbie
    Join Date
    Feb 2006
    Location
    Slovenia
    Posts
    162
    OK, thanx again guys

  6. #6
    Linux Newbie
    Join Date
    Jan 2007
    Posts
    110
    It may be late but I have documented different methods with different tools for restoring the MBR for

    (1) Grub

    (2) Lilo

    (3) MS systems (Dos and Windows)

    in this tread


    You may like to know the other methods besides using the recovery console of the original installation CD.

  7. #7
    Linux Newbie
    Join Date
    Feb 2006
    Location
    Slovenia
    Posts
    162
    Thanx saikee, very educational

  8. #8
    Linux Newbie
    Join Date
    Jan 2007
    Posts
    110
    I think so too but the moderator deleted it from my signature thinking it is an advert for another forum. I have to mention it this way to avoid typing out the instructions every time.

    I notice you use LVM which I don't use myself.

    As far as I am aware Linux boot loader Grub or Lilo can't read a LVM and so you would have to created a separate partition in Ext2/3 to host the /boot directory. Thus the methods of restoring would still work as the restoration is called out on the /boot. LVM itself is not bootable and requires a driver for a Linux just to recognise it. It needs special commands to access and mount. The extra layer of management hassle can hardy justify its use when RAIDS, huge disks and large partitions are available nowadays. I doubt if you have derived any benefit from it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...