Instruction to recover Ubuntu grub from Live CD

If your Grub is missing after installing Ubuntu and screen is showing Grub Rescue.Then Ubuntu grub rescue or restore can be done through Ubuntu Server CD or Ubuntu Desktop CD. At system start up you might seeing the option Grub Rescue or Grub missing.

This article will show how to do Ubuntu grub rescue with screen shots using Ubuntu Desktop CD. These screenshoats of Ubuntu grub rescue has been taken on Ubuntu 11.04. The very same method can be used to repair grub mint Debian.
If you don't have the desktop CD then Ubuntu Grub can also be rescue from Ubuntu server CD or USB. See here for Ubuntu Grub rescue or restore from Ubuntu server CD.  
To do grub rescue through Ubuntu Server CD see 
"Install Grub from Ubuntu server CD".

NOTE:  You will get  /usr/sbin/grub-probe: error: cannot stat 'aufs'   error if  you didn't follow the commands listed below. Specifically you did not do chroot,
ie  sudo chroot /mnt .  

For Ubuntu grub rescue follow these steps:
1.Boot from the Ubuntu Desktop live CD



Ubuntu grub rescue-1

                          Select Try Ubuntu.     


2.In Live Desktop session open terminal. 
  Application ->Accessories->Terminal.


3. In Terminal tpye sudo fdisk -l   
    It will display all partiton of the disk.
Ubuntu grub rescue screenshot-2
  
The partation which have Linux under System column is your drive in which ubuntu linux is installed. In screenshot ubuntu partition drive is /dev/sda11.


4. Mount the ubuntu partition drive
        sudo mount /dev/sdXX /mnt   (example 'sudo mount /dev/sda11 /mnt' ,don't miss the spaces.)


5. Only if you have a separate boot partition: 
             sudo mount /dev/sdYY /mnt/boot.
 6.   Mount the virtual filesystems: 
            
            sudo mount --bind /dev /mnt/dev
            sudo mount --bind /proc /mnt/proc 
            sudo mount --bind /sys /mnt/sys

7.  To ensure that only the grub utilities from the LiveCD get executed, mount /usr      
     sudo mount --bind /usr/ /mnt/usr 
     sudo chroot /mnt   

8. If there is no /boot/grub/grub.cfg or it's not correct, create one using  
           update-grub 
      or  update-grub2
9.Now reinstall Grub  
         grub-install /dev/sdX  (eg. grub-install  /dev/sdaDo not specify the partition number.    
 10. Verify the install 
        sudo grub-install --recheck /dev/sdX
11. Exit chroot : CTRL-D on keyboard.
12.  Unmount virtual filesystems:   
           sudo umount /mnt/dev 
           sudo umount /mnt/proc
           sudo umount /mnt/sys  

If you mounted a separate /boot partition:   
           sudo umount /mnt/boot 

13. Unmount the LiveCD's /usr directory:  
          sudo umount /mnt/usr

14. Unmount last device: 
           sudo umount /mnt
15. Reboot. 
         sudo reboot.

NOTE: If you are getting  /usr/sbin/grub-probe: error: cannot stat 'aufs'   error then the possible reason is that you didn't follow the commands listed above. Specifically you did not do chroot,
ie  sudo chroot /mnt.
Follow the above steps correctly and you are done. 

Recommended Posts
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值