I got a Toshiba Sattelite S70-b-110, with windows 8.1 pre-installed. I partitioned my HDD into 4 : C:/ (Windows install) ; P:/ (Windows Data and installed programs) ; Ubuntu install (/) ; Ubuntu swap ;

I had installed Ubuntu 14.04 and everything was great! However, i needed 12.04 to run some programs, and I decided to uninstall Ubuntu the wrong way: I booted on Windows and deleted the ubuntu partition. Result: PC didnt load grub, and I couldn't boot.

I managed to bypass the situation and formatted my PC factory new, with Windows 8.1.

Then i partitioned the disk again, and went for Ubuntu 12.04. Installation was successful, but my grub didn't show Windows 8, and automatically booted on Ubuntu. Then i went online to search for answers, and I completely ruined the situation..

I followed this question, and I tried changing /etc/grub.d/30_windows and /etc/grub.d/40_custom , nothing worked.

Then i tried to run Ubuntu through USB and boot-repair , and then everything went crazy. I got "Invalid arch independent ELF magic" , and then I ran Ubuntu again from USB and used:

sudo mount /dev/sda7 /mnt; sudo grub-install --boot-directory=/mnt /dev/sda

After I rebooted, I could see Windows Boot UEFI Loader but when I tried to boot I got an error: "invalid signature". I could boot on Ubuntu though.

I'm now asking for help on this matter. I want to be able to boot on both Ubuntu 12.04 (which I already can) and Windows 8.1.

Additional info: http://paste.ubuntu.com/8547720/

Sorry for possible double entries, but I really want to make sure that I don't ruin my windows partition, since I forgot to backup my files and I really need them.

Thanks in advance,

Pedro Marques

1 Answer 1


It seems you have mixed BIOS and UEFI booting.

  1. Windows seems to be installed in UEFI mode (only 64-bit Windows can be installed in UEFI mode)
  2. Disk is in GPT style (has EFI system partition + MS Reserved)
  3. Linux is installed using MBR booting (disk has special BIOS/MBR booting partition)


Easiest solution:

  1. delete BIOS boot partition (sda9)
  2. Fix Windows booting using Windows Recovery/Installation media (boot to recovery console and type "bcdboot Z:\windows" where Z: is your Windows drive, change drive letter accordingly - on Z: you should have \windows directory)
  3. Reinstall Ubuntu 12.04 in UEFI mode !!!

To install in UEFI mode you boot in UEFI mode - select DVD UEFI boot or USB UEFI boot !!!

Check also "rEFInd" boot manager used for multi-booting Windows/Linux. Can be installed later as a software boot switch.

Check also BootNext tool - allows direct booting of Linux/Ubuntu from Windows.

  • Thanks. I didn't even know about those two types of installation. I could solve it in another way though - I had changed my boot setup to CSM so I could boot from USB, and that was causing problems on booting windows. I changed it back to EUFI and everything is fine now. Both OS work well. Oct 13, 2014 at 8:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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