Find the answer to your Linux question:
Results 1 to 5 of 5
I'm somewhat experienced in linux, since I have been using ubuntu for about a month and a half now, but I have no idea how to fix this problem. I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2006
    Posts
    4

    Restore/Fix MBR and/or Grub..? Both? Confused


    I'm somewhat experienced in linux, since I have been using ubuntu for about a month and a half now, but I have no idea how to fix this problem. I thought I knew what was wrong, but I can't exactly pin point what the problem is.

    Here's how I screwed this up:
    I was installing rockbox on my ipod from linux (I do not own a copy of windows. I do not use windows on this computer). Since the ipod has a boot sector and firmware, I backed those up so that I could use them to modify the firmware and boot sector to put back on the ipod to boot rockbox. I accidentally slipped and copied the ipod boot sector to my first hard drive (sda) which I believe corrupted the MBR.

    I've tried a few different methods to fix the mbr, but I'm not quite sure how to do it. Is there a tutorial that is well written and explained?

    Here's the output when I start up the computer:
    Verifying DMI Pool.....

    In knoppix I did "su -" to get into super user. From there I did this:
    -Mounted my linux(ubuntu) partition (on hdd2)
    -chroot into my linux parition
    -grub-install /dev/sda (contrains /boot and MBR)

    I was returned this message:
    Probing devices to gues BIOS drives. This may take a long time.
    The file /boot/grub/stage2 not read correctly

    I'm not quite sure where I'm at on this, could someone please help me out?

  2. #2
    Linux Engineer rcgreen's Avatar
    Join Date
    May 2006
    Location
    the hills
    Posts
    1,134
    The MBR has two portions, the bootloader, and the partition
    table. If only the bootloader is damaged, there is probably
    a way to fix it. You would most likely need to boot from
    a live cd distro, edit your bootloader config and reinstall
    the bootloader. I've never done this. Maybe someone else can
    help here.

    If the partition table is changed/corrupted, the only way to
    fix it is if you had backed up that sector and saved it,
    or remembered exactly the size of your partitions.
    Again, you could boot the live cd, run fdisk on the hard drive.
    create the partitions with the exact same numbers
    (cylinders, heads, sectors) as the original.

    Otherwise you are out of luck. Reinstall the OS and chalk
    it up to experience.

  3. #3
    Just Joined!
    Join Date
    May 2006
    Posts
    4
    I'm not affraid to reformat my linux or boot partition. I've already attempted this once and had run into the same problem. Is there another method? I had only used the ubuntu installer to format and re-install. Is there a deeper way to reformat and get things in order or what?

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Engineer rcgreen's Avatar
    Join Date
    May 2006
    Location
    the hills
    Posts
    1,134
    If you were able to mount the partition from knoppix, the
    partition info is ok, in fact, this is hdd, and it was sda that
    you said was the problem, so it's gotta be a bootloader
    issue, not a partition issue. That's the good news.
    I am not an expert on repairing the bootloader though.

    Now if the partition table of /dev/sda is damaged, that
    explains why grub-install can't read the files in /boot.

  6. #5
    Just Joined!
    Join Date
    May 2006
    Posts
    4
    ahh.. good. Thanks for clearing that up... But I still need to find a way to fix 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
  •