Error booting from live usb linux : failure reading sector 0x0 from 'cd0'

6,340

Use your friend's Ubuntu live USB to chroot into your Ubuntu live USB and repair its GRUB bootloader by running update-grub.

  1. Boot from the other working Ubuntu live USB.
  2. Determine the partition number of your main partition. GParted (which should already be installed, by default, on the live session) can help you here. I'm going to assume in this answer that it's /dev/sda2, but make sure you use the correct partition number for your own original Ubuntu live USB!
  3. Mount your partition:

    sudo mount /dev/sda2 /mnt  # Replace sda2 with your partition number
    
  4. Bind mount some other necessary stuff:

    for i in /sys /proc /run /dev; do sudo mount --bind "$i" "/mnt$i"; done
    
  5. If Ubuntu is installed in EFI mode (see this answer if you're unsure), use GParted to find your EFI partition. It will have a label of EFI. Mount this partition, replacing sdXY with the actual partition number for your system:

    sudo mount /dev/sdXY /mnt/boot/efi
    
  6. chroot into your Ubuntu install:

    sudo chroot /mnt
    
  7. At this point, you're in your install, not the live session, and running as root. Update grub:

    update-grub
    

    If you get errors or if going up to step 7 didn't fix your problem, go to step 8. (Otherwise, it is optional.)

  8. Depending on your situation, you might have to reinstall grub:

    grub-install /dev/sda
    update-grub # In order to find and add windows to grub menu.
    
  9. If everything worked without errors, then you're all set:

    exit
    sudo reboot 
    

Source: https://askubuntu.com/questions/88384/how-can-i-repair-grub-how-to-get-ubuntu-back-after-installing-windows/88432#88432

Share:
6,340

Related videos on Youtube

Bhavik
Author by

Bhavik

Updated on September 18, 2022

Comments

  • Bhavik
    Bhavik over 1 year

    I created a persistent storage live USB with Ubuntu and used for some days and it worked perfectly.

    Now I created another such live USB on Ubuntu for my friend on my PC so that he can do the same on his PC.

    His USB works fine, but now I am not able to boot from my original USB on my PC. I can only boot in from my friend's USB. When I boot in from my USB, grub gives me error: error: failure reading sector 0x0 from 'cd0'.

    I can always use it from a different PC, but I need to work on my PC. Any suggestions?

    Looks like grub has overridden my previous ubuntu boot loader configuration with new one. How do I recover previous one which was working with my USB ?

  • Bhavik
    Bhavik about 7 years
    There is no "Try Ubuntu" option! I installed persistent ubuntu on the USB using another bootable usb
  • Blaizz
    Blaizz about 7 years
    That's OK, you can also boot the USB normally without the "Try Ubuntu" option and install GParted on it, or else make your own Ubuntu live USB and select the "Try Ubuntu" option, in which case GParted will already be installed and ready to use.
  • Bhavik
    Bhavik about 7 years
    Okay. I will try that