1

This question already has an answer here:

I had a dual boot system with Ubuntu and Windows 7 ultimate. Windows 7 got corrupted so I had to reinstall Windows 7.

When I had the system dual booting when Windows wasn't corrupted, it used to ask me what OS to boot.

Before reinstalling Windows 7 I installed Ubuntu and moved my important files from windows to Ubuntu. I made a bootable windows 7 USB.

I inserted the USB into the machine, and I started reinstalling Windows 7. I formatted the partitions (didn't format Ubuntu's) and installed it from USB.

After reinstalling Windows 7, I restarted the computer so I can choose which OS to boot, but the boot options never showed up -- it only boots up from Windows.

How can I boot back into Ubuntu so I can move the files back or at least take them out?

marked as duplicate by David Foerster, Pilot6, Anwar, Eric Carvalho, amc Jul 19 '16 at 1:47

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

0

You will probably find that the re-installation of windows has wiped GRUB, you will need to reinstall GRUB in order to boot into Ubuntu.

There is a guide here showing how this can be achieved, your first port of call should probably be the section entitled Boot repair after a Windows Upgrade on Ubuntu 14.04 (non-RAID)

If you want to back up your files or get at them urgently you could always access them directly from the live media, either set up live media with write space and save them there, or you should be able to move them back to your windows partition before attempting to restore GRUB.

EDIT : I have pasted the relevant section below

Boot repair after a Windows Upgrade on Ubuntu 14.04 (non-RAID)

Boot repair may be required when updating Windows (e.g. Windows 8 to Windows 8.1). This will be required for example if the computer has been configured such that Windows/Ubuntu is selected by entering the bios and changing the boot mode between "secure boot"/UEFI and CMS respectively. To manually repair grub (http://howtoubuntu.org/how-to-repair-restore-reinstall-grub-2-with-a-ubuntu-live-cd / How can I repair grub? (How to get Ubuntu back after installing Windows?) );

  1. Insert Ubuntu installation media (e.g. Ubuntu 14.04 LTS 64 bit DVD)

  2. Ensure the bios boot order is set to read the media first (consult your motherboard/computer manual) and restart the computer

  3. Select Ubuntu Live/Try mode (do not install)
  4. Click on the purple Ubuntu search button - enter "gparted" and click on its icon
  5. Determine the name of your linux partition (/dev/sdXY) - you should be able to identify it by recognising its format (most likely ext4) and size (number of GB)
  6. Click on purple Ubuntu search button - enter "gnome-terminal" and click on its icon
  7. sudo mount /dev/sdXY /mnt [where sdXY has previously been identified using gparted]
  8. for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done
  9. sudo chroot /mnt
  10. sudo grub-install /dev/sdX [note this is sdX not sdXY!]
  11. update-grub
  12. exit
  13. restart PC and remove Ubuntu installation media

If you would like the code explained or you have installed Ubuntu in EFI mode (if you aren't sure about EFI see here) see the top answer here How can I repair grub? (How to get Ubuntu back after installing Windows?)

  • Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. – cat Jul 16 '16 at 23:09

Not the answer you're looking for? Browse other questions tagged or ask your own question.