1

I am struggling to finalize my attempt to run Ubuntu 13.10 alongside Windows 8 on my new Sony Vaio Pro. After long hours of research I feel I am stuck.

I was booting from a USB, let me outline what I did (apologies if it's too detailed)

Before the installation:

  • deactivated Secure Boot
  • stayed in UEFI boot mode
  • deactivated Fast Startup

Initially, when I booted from the USB (in the EFI mode), I got a kernel error right away. Then I:

  • pressed e to enter grub after booting
  • added in grub libata.force=noncq at the end of the line starting with linux.

This solved the problem and the installer could run. (Apparently it has something to do with the SSD.)

During the installation I created three partitions, all of them as logical partitions, the first two as EXT4.

⠀/root (10GB)
⠀/home (40GB)
⠀swap (2GB)

I know I should avoid having two /boot/efi partitions, so I just left the Windows 8 one as it was.

The installation finished successfully. Afterwards, the computer would boot into Windows 8 straightaway. I used the Live USB to install Boot Repair and followed the instructions given by community/Boot-Repair

Once running Boot repair, the pop-up window said there were WinEFI files detected, and asked me whether I would like to proceed via changing them or not. During the first trial, I said "yes". The link produced was: http://paste.ubuntu.com//6726194. After that even Windows 8 stopped booting, and the error is that no operating system was found.

As suggested by the Boot repair program itself, I went through the procedure again, and this time I pressed "no" when prompted about the WinEFI files. The link produced was: http://paste.ubuntu.com//6726299. Unfortunately, again it didn't help and I can't boot either of the operating systems. The computer either suggests recovery for Windows or entering BIOS.

I tried changing the booting options to Legacy from UEFI, but this didn't help.

I would be really grateful for any hints.

karel
  • 114,770
user234356
  • 23
  • 1
  • 2
  • 4

2 Answers2

2

Your configuration is very strange, and your Boot Repair outputs indicate that you've omitted many critical details from your summary. Most importantly:

  • You've converted the system from having a GUID Partition Table (GPT) to having a Master Boot Record (MBR) partition table. (I'm assuming it had GPT initially because you said it's a new computer; almost all computers that ship with Windows 8 or 8.1 use EFI and GPT.) The use of MBR has significant implications for all your OSes. Most importantly, Windows will boot from an MBR disk only in BIOS/CSM/legacy mode.
  • Sometime between your two Boot Repair runs, you repartitioned and installed the Clover boot loader, and perhaps a Hackintosh setup.
  • You don't have a proper EFI System Partition (ESP), although your /dev/sda1 is close. To be an ESP, it needs to have an MBR type code of 0xEF, not 0x0B. Even with this change, though, some EFIs might not recognize the ESP as such. (OTOH, some might use it just fine as it is now -- this is an area that's not well-documented or well-tested.)

Basically, a setup like yours is so far from the norm that you can't count on a tool like Boot Repair to handle it properly. You'd need to be an expert to get it to work. In fact, speaking as such an expert (I maintain the rEFInd boot manager), I wouldn't touch that configuration. Instead, what I recommend is:

  1. Wipe the partition table clean and create an empty GPT setup.
  2. Create a 550MiB ESP and whatever other partitions you care to create at this time. (You can instead leave some or all of the remaining partitions to be created by their respective OS installers, though.)
  3. Install Windows in EFI mode.
  4. Install Ubuntu in EFI mode. See my Web page on such installations and the Ubuntu wiki on EFI installations for guidance.
  5. If you want to triple-boot with a Hackintosh, you can set it up at this time, but I can't offer much advice about EFI-mode Hackintosh boot loaders. Ask about this on a Hackintosh site. If you need to use a BIOS-mode Hackintosh boot loader, though, you might find rEFInd useful for launching the Hackintosh boot loader. rEFInd can boot a BIOS-mode boot loader if you uncomment the scanfor option in refind.conf and include hdbios among its options. I'd hope that there'd be a native EFI-mode Hackintosh boot loader by now, but I've not kept up with Hackintosh developments.

Alternatively, you could use a strictly BIOS/CSM/legacy-mode boot with an MBR. This is likely to be more familiar, but the world is moving quickly towards EFI and GPT, and OS X might work a little better with GPT.

Rod Smith
  • 44,284
  • 7
  • 63
  • 105
  • Thank you for your help. I'm very far from an expert and I haven't done anything to change the partition table. I found on the web that "You can change a disk from MBR to GPT partition style as long as the disk does not contain any partitions or volumes." - the first thing I've done after opening my new laptop was shrinking my Windows partition and creating a second volume... At some point I used some parition manager, which might have changed something? It didn't seem to work very well, as it formatted my USB in a way that made it unreadable... – user234356 Jan 11 '14 at 21:38
  • Also, this all seems pretty strange. All I did between my two boot repairs was reboot my computer from the live USB, install the boot repair according to: https://help.ubuntu.com/community/Boot-Repair and run it. As I mention in my post, the two repairs were different, as I chose a different option as an aswer to the procedure regarding "the WinEFI files" - I am not able to recall the exact formulation of that quesiton. The Clover boot loader might have been installed by the boot repair itself, to solve an issue? – user234356 Jan 11 '14 at 21:43
  • Also, could it be the boot repair that changed disks from MBR to GPT? You say that Windows will boot from an MBR disk only in BIOS/CSM/legacy mode. Right after installing Ubuntu, Windows was booting straight away. Then I ran the first round of boot repair and it stopped booting.

    All in all, I decided that I don't care enough about Windows to fight so much to keep it. I think I will just wipe everything off my computer and install Ubuntu only.

    – user234356 Jan 11 '14 at 21:47
  • The Boot-Repair tool cannot change disk partitioning, so for sure it did not change your disk from GPT to MsDos. Between you 2 logs, we can see that you have tried to install MacOS, this is probably what changed your disk partitioning. – LovinBuntu Jan 12 '14 at 09:41
  • I really assure you I did not try to do absolutely anything. After the first boot repair, when the computer didn't boot into anything, I ran the live USB again, installed the boot repair again and ran it again - the program itself said to do it and try both "yes" and "no" answers to the change to WinEFI files. I didn't try to install anything else than Ubuntu... I really don't understand what happened. – user234356 Jan 12 '14 at 12:06
  • I tried to re-do everything. I booted live Ubuntu. I opened Gparted. I created a new GUID partition table (gpt). I created an ESP. I reinstalled Ubuntu 13.10. It isn't booting. Again, the information I received is "Your VAIO failed to start Windows. The operating system was not found". Through live Ubuntu I ran boot-repair again. It found "the WinEFI files" again! It didn't manage to fix it. The link it gave me: http://paste.ubuntu.com//6738375. – user234356 Jan 12 '14 at 13:08
  • If you really did not try to install OS X between your two original Boot Repair posts, then one of them was a bad URL. The second one definitely did show Clover and an HFS+ partition. If your computer was an "open-box" model, it's conceivable that the original buyer set it up that way and didn't bother to undo it before returning it to the store. – Rod Smith Jan 12 '14 at 14:31
  • Your current setup looks OK, at least after Boot Repair changed the boot order. Your firmware may have a bug that causes it to favor some Sony-specific boot path, though. I recommend you look for a firmware update from Sony, then run Boot Repair again. If that fails, try using the CD-R or USB flash drive version of my rEFInd boot manager. If you can boot in that way, try installing the Debian package of rEFInd and see if that helps. – Rod Smith Jan 12 '14 at 14:34
  • After your suggestion of a firmware bug I googled around and I came across this: http://ubuntuforums.org/showthread.php?t=2196415 - it looks like my BIOS recreates the windows boot manager every time, even after I've deleted it! However, the solution provided there did not fix my problem. Could your rEFInd boot manager solve such problem? – user234356 Jan 12 '14 at 15:29
  • rEFInd won't fix a firmware bug that causes the computer to launch a Windows boot loader in a hard-coded way. If that's the problem, though, you can rename your boot loader/manager (whether it's GRUB, rEFInd, or anything else) to use the Windows boot loader's name. Boot Repair can set this up for GRUB semi-automatically, and rEFInd's mvrefind.sh script can do the job for it. You can do it manually, too. IMHO, though, the best solution in this case, if a firmware upgrade doesn't fix it, is to return the computer, since that's a serious firmware bug. – Rod Smith Jan 12 '14 at 18:26
  • I did that yesterday and it worked! Thank you so much. – user234356 Jan 13 '14 at 08:06
0

You still have a live-usb, right?

You might want to install the grub from one of your linux partition, since sometimes, boot-repair fails. Let me explain.

We will first boot from a live-cd, then chroot in your linux partition, then call update-grub. To "chroot" means to make the shell think the root directory is in a different place. It allows terminal access to a partition as if you booted from if. You can use that method to run an apt-get update, too.

  1. Boot from live-usb.

  2. In a terminal (or shell: ctrl+alt+F1), call sudo fdisk -l

  3. Find your linux partition. I will assume your partition is /dev/sda1 from now on, but it may be sdb2 or else

  4. Call sudo mount /dev/sda2 /mnt.

  5. Mount the filesystems too. This allows you to call the partition’s commands while chrooted.:

    $ mount -t proc none /mnt/proc

    $ mount -o bind /dev /mnt/dev

    $ mount -o bind /sys /mnt/sys

Now, just call sudo chroot/mnt, and you're in your partition. We'll install, check and update the grub:

sudo grub-install /dev/sda
sudo grub-install --recheck /dev/sda
sudo update-grub

Note that you only call the drive name (sda) and not the partition name (sda1).

Hope this helps!

o7

morphheus
  • 491
  • 1
  • 5
  • 15
  • Thank you for your kind answer! I read it along with the one above which seems to kill the last bit of hope that I can manage to make things run. I think I will resort to wiping the partition clean and installing only Ubuntu! – user234356 Jan 11 '14 at 21:59