How to recover Ubuntu after installing Windows using Ubuntu live cd

How to recover Ubuntu after installing Windows using Ubuntu live cd

1. Boot from Ubuntu live cd and open console

2. Be administrator

sudo -i

3. Find linux partition (/dev/sda7 4409 6435 16273408 83 Linux)

fdisk -l

4. Create a mount directory

mkdir /media/root

5. Mount linux partition to this directory

mount /dev/sda7 /media/root

6. Confirm that you can reach linux directories

ls /media/root

7. Install grub2

sudo grub-install --root-directory=/media/root /dev/sda

8. Reboot Ubuntu without live cd

9. Update grub to see other operating systems

sudo update-grub2

Alternatives

3. sudo gparted
9. update-grub


added 5 years ago

- What is x-ray?
- The Wink home automation
- Skype works, shows I have internet, but browser wont go online
- If LED lights are so efficient then why do they get almost as hot as incandescents?
- How to correctly optimize your SSD for windows 10
- WAMP Mysqli: Your password has expired
- MySQL Dump/Restore, Dumping MySQL Database and Tables using MysqlDump command
- Source Code of Matrix Multiplication
- How to create your own PHP caching system? A simple example
- Domain Life Cycle
- Comparison of Random Functions According to their Exploration Performance (STL, .NET, Java)
- How to draw double buffered in C# or Java using GDI+
- How to recover Ubuntu after installing Windows using Ubuntu live cd
2
1