Results 1 to 5 of 5

Thread: How to restore Grub 2?

  1. #1
    Join Date
    Apr 2008
    Location
    London
    Beans
    1,873
    Distro
    Kubuntu 12.04 Precise Pangolin

    How to restore Grub 2?

    Hi,
    I was wondering if the routine of

    find /boot/grub/stage1

    setup (hd0)

    That we have used up until now has changed with Grub 2?

    .

  2. #2
    Join Date
    Jul 2007
    Location
    UK
    Beans
    16,815
    Distro
    Ubuntu Development Release

    Re: How to restore Grub 2?

    Sure has. You need chroot now.

    http://www.ubuntu-inside.me/2009/06/...r-windows.html

    You can do this from another install on same machine. I use the script below to chroot from jaunty on sda1.
    Code:
    #!/bin/sh
    
    ##sudo mkdir /mnt/karmic
    sudo mount /dev/sdb1 /mnt/karmic/
    sudo mount -o bind /proc /mnt/karmic/proc
    sudo mount -o bind /dev /mnt/karmic/dev
    sudo mount -o bind /dev/pts /mnt/karmic/dev/pts
    sudo mount -o bind /sys /mnt/karmic/sys
    sudo cp /etc/resolv.conf /mnt/karmic/etc/resolve.conf
    sudo chroot /mnt/karmic /bin/bash
    
    fi
    [edit] grub2 complains if you install to a partition instead of mbr but it still works.
    Last edited by philinux; October 19th, 2009 at 04:44 PM.

  3. #3
    Join Date
    Apr 2008
    Location
    Southern California, USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: How to restore Grub 2?

    Quote Originally Posted by Sealbhach View Post
    Hi,
    I was wondering if the routine of

    find /boot/grub/stage1

    setup (hd0)

    That we have used up until now has changed with Grub 2?

    .
    find command has been replaced with search. Go here for comparisons.
    boot_info_script | AMD64 Athlon X2 Dual-Core - nVidia Geforce 6150 SE - 4GB DDR3

  4. #4
    Join Date
    Apr 2008
    Location
    London
    Beans
    1,873
    Distro
    Kubuntu 12.04 Precise Pangolin

    Re: How to restore Grub 2?

    Thanks guys, looks a little more complicated.

    .

  5. #5
    Join Date
    Aug 2008
    Location
    South East Montana
    Beans
    6,153

    Re: How to restore Grub 2?

    It is much simpler if all you want to do is change the OS that you are using for boot/root. For that all you haveto do is be able to boot to the chosen OS and run;
    Code:
    sudo grub-install /dev/sda
    with the "sda" edited to match your box conditions.
    Dell 480 XPS 3G ram Quad Core 2.40GHz, Radeon HD 2400 PRO, Audigy1, 3x320G HDD, 320G External, Debian Testing for use, Debian Squeeze for secure use, Debian Sid for FUN

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
  •