Page 7 of 26 FirstFirst ... 5678917 ... LastLast
Results 61 to 70 of 253

Thread: HOWTO: Restore GRUB (if your MBR is messed up)

  1. #61
    Join Date
    Feb 2006
    Beans
    116
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: HOWTO: Restore GRUB (if your MBR is messed up)

    here is my problem now, I reinstalled Ubuntu, I hit the "Install GRUB" it installed to the "MBR" or whatever the default is. For some reason, it is still booting to lilo, and I can not even get back to vista. here is my partition tables

    Disk /dev/hdc: 250.0 GB, 250059350016 bytes
    255 heads, 63 sectors/track, 30401 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Device Boot Start End Blocks Id System
    /dev/hdc1 * 1 30402 244204033+ 7 HPFS/NTFS

    Disk /dev/hdd: 80.0 GB, 80026361856 bytes
    16 heads, 63 sectors/track, 155061 cylinders
    Units = cylinders of 1008 * 512 = 516096 bytes

    Device Boot Start End Blocks Id System
    Windows Vista is Install here/dev/hdd1 3 79889 40262656 7 HPFS/NTFS
    Partition 1 does not end on cylinder boundary.
    Ubuntu is here /dev/hdd2 * 79895 151933 36306900 83 Linux
    Partition 2 does not end on cylinder boundary.
    /dev/hdd3 151933 155056 1574370 5 Extended
    Partition 3 does not end on cylinder boundary.
    /dev/hdd5 151933 155056 1574338+ 82 Linux swap / Solaris

    Disk /dev/sda: 37.0 GB, 37019566080 bytes
    255 heads, 63 sectors/track, 4500 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Device Boot Start End Blocks Id System
    /dev/sda1 * 1 4499 36138186 7 HPFS/NTFS

    At this point i have no idea what is going on,
    I can't even find lilo anymore, where is it? where did grub go? How can I get my to normal lol. I use Ubuntu as a main OS but I still need vista to report bugs.

  2. #62
    Join Date
    Mar 2006
    Location
    San Diego Calif
    Beans
    651
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: HOWTO: Restore GRUB (if your MBR is messed up)

    This thread was very helpful but I had a slightly different wrenkel that I discovered. I lost my motherboard in a brown-out durning a thunderstorm. After installing a new Asus P4v8x-mx I could boot into windows as normal but not Ubuntu. So I deleted the Ubuntu partitions on my secondary SATA drive and proceeded to reinstall. When finished and trying to reboot to Ubuntu I got the dreaded Error 22 and the previous error mentioned when trying to boot into windows. After rebooting with the Ubuntu install disk and going through the install several times I started looking a the drive designations during the partion process. What I discovered was my primary boot/windows drive was being listed as Sdb instead of Sda. A quick swap of the cables on the motherboard and following the previous instructions fixed everything! I couldn't have done it without reading this thread and a little investigation. Thanks!

  3. #63
    Join Date
    Nov 2005
    Beans
    2

    Re: HOWTO: Restore GRUB (if your MBR is messed up)

    Quote Originally Posted by remmelt
    Isn't it easier to do this:

    1. Pop in the Live CD, boot from it until you reach the desktop.
    2. Open a terminal window or switch to a tty.
    3. Type "grub"
    4. Type "root (hd0,6)", or whatever your harddisk + boot partition numbers are (my /boot is at /dev/sda7, which translates to hd0,6 for grub).
    5. Type "setup (hd0)", ot whatever your harddisk nr is.
    6. Quit grub by typing "quit".
    7. Reboot.
    This did work wonder in restoring the MBR of my Compaq Armada 1750 after I restored the laptop from Ghost. Yet the laptop's special partitition, where the BIOS tools are located, is no longer accessible through pressing F10 duing POST.

    I can live with this as I still can access the BIOS settings through using a floppy. Yet I wonder if there is a way to have both Grub and the easy F10 access to the BIOS tools.

    I suspect that the original Compaq MBR is Windows-compatible. I may be able to Windows' boot.ini to access the Linux partitions and still keep the original BIOS access intact.

    Thanks.

  4. #64
    Join Date
    Feb 2006
    Beans
    6

    Re: HOWTO: Restore GRUB (if your MBR is messed up)

    I'm missing one small piece.
    When I boot to live CD, how do I become superuser?

  5. #65
    Join Date
    Oct 2005
    Location
    Den Haag
    Beans
    42
    Distro
    Ubuntu 6.06

    Question Re: HOWTO: Restore GRUB (if your MBR is messed up)

    Just sudo I guess?


    Here's my little problem.

    Recently I installed Dapper flight 6 from a Live CD (via espresso) next to my XP install. It booted all fine and wonderful and both OS's worked well. After a while I have the brilliant thought of reinstalling dapper using the same Live CD as before, and this is something I wish I'd never done. During this install, it failed to install Grub. I've tried this over and over and over and over, and grub will not ever install to my PC at all.

    Now I'm stuck with a PC that has (presumably) 2 working OS's on it, and no way to get to either of them.

    I do have the Live CD. I have all my partitions mounted. Now how do I go about installing grub to the PC while I'm booted on the live disk??


    Any help would be appreciated

  6. #66
    Join Date
    Aug 2005
    Location
    New Jersey, USA
    Beans
    120
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: HOWTO: Restore GRUB (if your MBR is messed up)

    I have followed all the steps on two identical laptops, one of which has the grub MBR messed up. The messed up laptop is my daughter's and I am communicating via phone with her (I hate being a help desk! ).

    We are stuck on step 4.
    When we sudo chroot /mnt/ubuntu , we get this:

    Code:
    chroot: cannot run command `/bin/bash': No such file or directory
    This really confuses me. On my good laptop everything is fine.

    The only difference in the setups is that I am using a Live Ubuntu CD burned from a downloaded ISO file. My daughter is using a factory Ubuntu Live CD.

    Any ideas?
    Dell 530N Hardy
    Inspiron 8600: 1GB, Feisty

  7. #67
    Join Date
    May 2006
    Beans
    29

    Re: HOWTO: Restore GRUB (if your MBR is messed up)

    thanks mate

  8. #68
    Join Date
    Jan 2006
    Beans
    19

    Re: HOWTO: Restore GRUB (if your MBR is messed up)

    Quote Originally Posted by remmelt
    Isn't it easier to do this:

    1. Pop in the Live CD, boot from it until you reach the desktop.
    2. Open a terminal window or switch to a tty.
    3. Type "grub"
    4. Type "root (hd0,6)", or whatever your harddisk + boot partition numbers are (my /boot is at /dev/sda7, which translates to hd0,6 for grub).
    5. Type "setup (hd0)", ot whatever your harddisk nr is.
    6. Quit grub by typing "quit".
    7. Reboot.

    I may be missing your point though, if so, please forgive me

    This method did bring back my grub, however I get an error when I boot.
    My partition list is:
    /dev/hda1 Windows NTFS (Has my XP Pro on it)
    /dev/hda2 Extended 3 (Has my Ubuntu on it, and I can mount and look at all my data)
    /dev/hda5 Swap
    /dev/hda4 Unformatted

    I opened a terminal window and did the following:

    Code:
    grub> root (hd0,1)
     Filesystem type is ext2fs, partition type 0x83
    
    grub> setup (hd0)
     Checking if "/boot/grub/stage1" exists... yes
     Checking if "/boot/grub/stage2" exists... yes
     Checking if "/boot/grub/e2fs_stage_5" exisits... yes
     Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 16 sectors are embedded. succeeded
     Running "install /boot/grub/stage1 (hd0) (hd0)1+16 p (hd0,1)/boot/grub/stage2 /boot/grub/menu.list"... succeeded
    Done.
    The first time I ran this command I did get errors, but it said they were not fatal. I do not know what they where, but now it seems to succeed just fine.


    But when I boot my screen looks like:
    Code:
      Booting 'Ubuntu. kernel 2.6.12-10-386 '
    
    root (hd0,2)
     Filesystem type unknow, partition type 0x5
    kernel /boot/vmlinuz-2.6.12-10-386 root=dev/hda3 ro quiet splash
    
    Error 17: Connot mount selected partition
    
    Press any key to continue...
    Also when I boot using the the rescue option and then type:

    Code:
    sh-3.00# grub-install /dev/hda2
    I get:

    Code:
    The file /boot/grub/stage1 is not read correctly.
    So now I am not sure what I should do.... My linux is on hda2. I have very little knowledge of linux. The menu still boot my Windows XP. I wish it was there other way around.

    Thanks for your help.

  9. #69
    Join Date
    Jan 2006
    Beans
    19

    Re: HOWTO: Restore GRUB (if your MBR is messed up)

    If anyone caree, I was able to fix my problem by editing the menu.lst file in /boot/grub. I changed the file to read:

    root (hd0,2)
    kernel /boot/vmlinuz-2.6.12-10-386 root=dev/hda3 ro quiet splash

    to

    root (hd0,1)
    kernel /boot/vmlinuz-2.6.12-10-386 root=dev/hda2 ro quiet splash

    and all works fine now. This thread helped alot. Thanks.

  10. #70
    Join Date
    Apr 2006
    Beans
    140

    Re: HOWTO: Restore GRUB (if your MBR is messed up)

    I want to thank "remmelt" for his great tip, how to handle grub.

    this helped me a lot.

Page 7 of 26 FirstFirst ... 5678917 ... LastLast

Bookmarks

Posting Permissions

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