2

Long story short, I installed ubuntu while I was watching netflix and feeling very lazy, and may have lost all my windows 7 files.

Quick summary:

-Windows 7 was installed on Legacy bios and I installed ubuntu on UEFI bios
-ubuntu installer didn't detect any other OS on my computer and wanted to write over the disk, so I had to manually edit the partition

-Despite repeated warnings about partitioning windows in the ubuntu installer, I did this anyway, assigning 140 gigs to ubuntu and 500 to windows
Now, my computer won't boot into anything but Ubuntu

-in Gparted, it still shows that I have two partitions, and windows 7 boot loader
-However, I can't boot into the non-linux partition, and boot loader says I need a recovery disk.

My question is does anyone know if what I've done is fixable? I'm hoping that I can fix it using the way outlined in this thread: Can't boot Windows 7 after installing Ubuntu

Thanks for the help everyone!

Note: gparted shows:

Foudn linux image: /boot/vmlinuz - 3.13.0.30 - generic  
Found linitrd image: /boot/initrd.img - 3.13.0 - 30 - generic  
Found linux image: /boot/vmlinuz - 3.13.0 - 24 generic  
Found  initrd image: /boot/initrd.img - 3.13.0 - 24- generic  
memtest  
memtest  
Found windows 7 (loader) on /dev/sda1
  • guess my questions are
    1. does that show two partitions?
    2. did mixing uefi and legacy screw me?
    3. is the fix in the thread I linked the recommended solution?
    – user306093 Jul 16 '14 at 12:59
  • It's not a duplicate of the "Can't boot Windows 7 after installing Ubuntu" question, because user306093 has clearly stated that this is a mixed-mode EFI/BIOS installation. That is the problem, as elaborated in my answer.... – Rod Smith Jul 17 '14 at 17:27
  • 1
    Maybe this is OOT, but later if you want to install any OS again, do backup first. Backup all datas without exception. With Linux, you have Clonezilla (http://clonezilla.org/) or Redobackup (http://redobackup.org/) as complete total solution like Norton Ghost. – Ade Malsasa Akbar Jul 17 '14 at 17:55

1 Answers1

4

The problem is that you've mixed your installation modes -- Windows in BIOS/CSM/legacy mode and Ubuntu in EFI/UEFI mode. GRUB can't switch between these two boot modes, so you'll need to either re-install one of your OSes so that they both use the same boot mode or find some other way to switch boot modes.

For re-installing, it's likely to be easier to re-install Ubuntu, but you'll need to be sure that the Ubuntu installer is booting in BIOS mode. You can usually select the boot mode of the installer by picking the correct option from your computer's built-in boot manager. There are usually two options for external media, one of which includes the string "EFI" or "UEFI" and the other doesn't. Pick the one that lacks the "EFI"/"UEFI" string to boot in BIOS mode. (In fact, you can get away with installing the BIOS-mode version of GRUB without re-installing all of Ubuntu, but this process is more difficult to explain than just re-installing all of Ubuntu.)

If you want to keep the mixed-mode booting, I know of only two ways to do it:

  • You can use your firmware's built-in boot manager -- the same one you use to select which way to boot an external medium. You'll probably see an option called "ubuntu" to boot Ubuntu in EFI mode and another one that may be named after your hard disk that will boot Windows in BIOS mode. Details vary from one system to another, though, and some don't support switching boot modes at boot time.
  • My rEFInd boot manager can switch boot modes. Boot to Ubuntu and install the rEFInd Debian package, then edit the /boot/efi/EFI/refind/refind.conf file. Look for the scanfor line, uncomment it, and add hdbios to its list of options (leaving the existing ones intact). When you reboot, you should see an option for GRUB, at least one option for booting a Linux kernel directly, and at least one (probably two) options for booting in legacy mode. One of the legacy-mode options should boot Windows. This feature doesn't always work, but it should work on most new computers.
Rod Smith
  • 44,284
  • 7
  • 63
  • 105
  • This is something similar to my problem. someone previously installed windows10, and I recently installed ububtu 22.04 on it. Now I can both windows and ubuntu in grub menu, but only ubuntu is working, windows is returning only black display output – bim May 28 '22 at 15:10