Linuz

Just Open Source


Ads

Setting Grub After Install OS Non-Linux

Grub

Grub Loader

If you’re Ubuntu GRUB disappear after install another OS, you can follow this step to recover it :

  1. Boot from Ubuntu Live CD
  2. Open Terminal
    • Run fdisk to view your partitions
      $ sudo fdisk -l
      Disk /dev/sda: 250.1 GB, 250059350016 bytes
      255 heads, 63 sectors/track, 30401 cylinders
      Units = cylinders of 16065 * 512 = 8225280 bytes
      Sector size (logical/physical): 512 bytes / 512 bytes
      I/O size (minimum/optimal): 512 bytes / 512 bytes
      Disk identifier: 0xa27ba27b
       
       Device Boot      Start         End      Blocks   Id  System
      /dev/sda1               1        6079    48827392   83  Linux
      /dev/sda2   *        6079       12621    52549632    7  HPFS/NTFS
      /dev/sda3           12622       12748     1020127+  82  Linux swap / Solaris
      /dev/sda4           12749       30400   141789659+   f  W95 Ext'd (LBA)
      /dev/sda5           12749       25496   102398278+   7  HPFS/NTFS
      /dev/sda6           25497       30400    39391348+   7  HPFS/NTFS
    • Mount you’re Ubuntu root partitions, if you have boot partitions you can mount it too.
      $ sudo mount /dev/sda2 /mnt
      $ sudo mount --bind /dev /mnt/dev
      $ sudo mount --bind /proc /mnt/proc
    • Login to you’re Ubuntu system
      $ sudo chroot /mnt
    • Update you’re GRUB to generate configuration file
      # update-grub2
    • Install GRUB to MBR
      # grub-install /dev/sda
    • If you have any error, you can recheck the installation
      # grub-install recheck /dev/sda
    • Now you can logout from chroot with Ctrl+D and then unmount all partitions
      $ sudo umount /mnt/dev
      $ sudo umount /mnt/proc
      $ sudo umount /mnt
  3. Close Terminal and Restart, now you can see you’re GRUB menu is back
  4. After Restart, linux desktop appears and then you open a terminal:
    $update-grub2
    Adnan @  root-desktop: / home / Adnan # update-grub2
    Generating  grub.cfg ...
    Found linux image: /  boot/vmlinuz-2.6.32-21-generic
    Found  initrd image: / boot/initrd.img-2.6.32-21-generic
    Found memtest86 +  image: / boot/memtest86 +. Bin
    Found Windows 7 (loader) on / dev/sda2
    done

Good Luck, Linux For Human Beings…

Post Metadata

Date
June 3rd, 2010

Author
vmlinuz

Category

Tags

1 to “Setting Grub After Install OS Non-Linux”




Leave a Reply to admin

*