0

I had Windows 8.1 Professional and Xubuntu in VM, but now I want dual boot.

First two partitions I had them before with Windows 8.1 ((1) EFI and (2) msftres) then (3) partition C: and (4) parition D:.

With the remaining space I planned to use for linux, while installing Xubuntu the wizard suggested me to have a separated partition for Reserved Boot Space (5) I let 100MB.

And then (6) mapped to / and (7) for swap.

parted output

valentin@valentin-N550JV:~$ sudo parted -l
Model: ATA WDC WD7500BPKX-8 (scsi)
Disk /dev/sda: 750GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number  Start   End    Size    File system     Name                          Flags
 1      1049kB  538MB  537MB   fat32                                         boot
 2      538MB   672MB  134MB   ext4            Microsoft reserved partition  msftres
 3      672MB   323GB  322GB   ntfs            Basic data partition          msftdata
 4      323GB   478GB  155GB   ntfs            Basic data partition          msftdata
 5      478GB   478GB  99,6MB                                                bios_grub
 6      478GB   734GB  256GB   ext4
 7      734GB   750GB  16,5GB  linux-swap(v1)

Problems: I have as boot entries: Windows Boot Manager and ubuntu(targeting \EFI\Ubuntu\grubx64.efi).

When I select the ubuntu entry from BIOS I get into grub2 minimal shell interface.

and to actually get into Grub2 menu selection I need to manually run these commands

set prefix=(hd1,gpt6)/boot/grub
insmod normal
normal

Boot entries from EasyBCD:

There are a total of 4 entries listed in the bootloader.

Default: Windows 8.1
Timeout: None
EasyBCD Boot Device: C:\

Entry #1
Name: CD/DVD Drive 
BCD ID: {9e3f8460-4c68-11e4-9e25-d50f39372dbe}
Device: Unknown
Bootloader Path: 

Entry #3
Name: Network Card 
BCD ID: {3e1cfad9-4c73-11e4-824e-806e6f6e6963}
Device: Unknown
Bootloader Path: 

Entry #4
Name: Windows 8.1
BCD ID: {current}
Drive: C:\
Bootloader Path: \Windows\system32\winload.efi

I already tried boot-repair from a live-usb stick xubuntu, but is failing due to the /dev/sda2 (2) partition (the Microsoft reserved one).

mount /dev/sda2 : Error code 32
mount -r /dev/sda2 /mnt/boot-sav/sda2
mount: wrong fs type, bad option, bad superblock on /dev/sda2,

Please find the boot-repair log created for reference, uploaded on ubuntu pastebin: boot-repair.log

Problem solved. Thank you RobinHood, Rod Smith!

I changed the path in grub.cfg and now it's working with the grub2 menu selector. I retrieved the UUID for the linux partition and replaced it in grub.cfg file.

valentin@valentin-N550JV:/media/efimnt/EFI/ubuntu$ pwd
/media/efimnt/EFI/ubuntu

valentin@valentin-N550JV:/media/efimnt/EFI/ubuntu$ sudo blkid /dev/sda6
/dev/sda6: UUID="d17d4033-8152-412f-ad06-f30ecde45d53" TYPE="ext4"

valentin@valentin-N550JV:/media/efimnt/EFI/ubuntu$ cat grub.cfg
search.fs_uuid d17d4033-8152-412f-ad06-f30ecde45d53 root hd1,gpt6
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg

2 Answers2

0

Partition 5 is not necessary. This partition is not used for /boot from your description. You can delete it.

SOLUTIONS:

  1. You need check the grub.cfg in EFI partition(partiton 1)\EFI\Ubuntu\grub.cfg. Correct the partiton for /boot.

Example: search.fs_uuid d17d4033-8152-412f-ad06-f30ecde45d53 root hd1,gpt6 uuid for the partition can be found with blkid command.

OR

  1. Repair boot use boot-repair in Ubuntu. This application will install the grub2 in EFI partition as the default bootloader instead of easybcd and bootmgr.

Repare boot(reinstall grub2 in partition 1) with boot-repair.

You may need this:

RobinHood
  • 73
  • 1
  • 8
  • Thank you for your answer, I already tried boot-repair, but it was failing due to the Microsoft reserved partition. I'll update my question with the logs. Now I tried to modify the boot partition and it's still failing. Please see the updated question post. – valentin_nasta Jul 25 '15 at 15:37
  • You need change the uuid for (hd0, gpt6) in grub.cfg. Every partiton has it's own uuid. You can get the uuid from disk tool. – RobinHood Jul 25 '15 at 15:47
  • And your Microsoft reserved partition is broken during install ubuntu, I guess. This partition is formated in wrong file system format. You can delete this partiton. It's not neccery – RobinHood Jul 25 '15 at 15:51
  • Thank you @RobinHood, that did the trick. Now I'm a happy dual boot user. – valentin_nasta Jul 25 '15 at 17:43
0

RobinHood's answer is worth considering. Boot Repair should be able to fix your problem; but some situations tend to confuse it, so it does sometimes fail. I have some more information and suggestions....

First, your /dev/sda5 is set up as a BIOS Boot Partition, which is used for BIOS-mode booting, not EFI-mode booting. Such partitions are normally 1MiB in size, although they can be somewhat bigger or smaller than that -- but a 100MiB BIOS Boot Partition is ridiculously oversized. You can safely delete that partition; but of course that will leave you with 100MiB of wasted space.

I don't recall offhand exactly what terminology the Ubuntu installer uses for the BIOS Boot Partition. If it uses "reserved boot space" as a synonym for the BIOS Boot Partition, then that indicates the installer was running in BIOS/CSM/legacy mode, not in EFI mode. That's a recipe for creating problems, given your pre-existing EFI-mode installation of Windows. Such problems can be fixed, but if that's what happened, it's likely to be easiest to delete all your Ubuntu partitions and start again. This time, though, you should go into your firmware and disable any option that enables BIOS-mode booting (aka legacy-mode booting or the Compatibility Support Module [CSM]), or that disables EFI/UEFI-mode booting. As I describe on my Web page on the subject, enabling the CSM creates a more complicated boot process in which more things can go wrong. If you're dual-booting with an existing EFI-mode installation, there's seldom any benefit to be gained from the extra complication, so the usual result is either no effect or negative. (On occasion there is a benefit to enabling the CSM in a dual-boot with an EFI-mode OS, but those situations are becoming increasingly rare.)

The Microsoft Reserved partition is used by some Windows partitioning tools as "scratch space." It's ordinarily empty except for temporary storage when those tools are working. For some reason, it's being detected as an ext4fs partition on your system -- chances are you used to have an ext4fs partition that started at this exact spot. This is complicating your installation, although if you used the "Something Else" installation option, you could simply ignore it. Instead of deleting the partition, as RobinHood suggests, I recommend you overwrite it with:

sudo dd if=/dev/zero of=/dev/sda2

Be very careful with that command, though, and particularly with the of=/dev/sda2 option. If you mistype the destination partition, you'll overwrite the wrong partition, which could trash your Windows installation. Wiping the partition in this way will enable Windows to use it if/when it wants to, while also preventing it from confusing the Ubuntu installer.

If you don't want to re-install Ubuntu, another option you might consider is installing another boot loader. The easiest of these to do is likely to be my own rEFInd:

  1. If you haven't already done so, disable Secure Boot in your firmware.
  2. Download the USB flash drive or CD-R version of rEFInd from its downloads page.
  3. Prepare a rEFInd boot medium.
  4. Boot to rEFInd.
  5. Test that rEFInd can boot Windows. If not, you might reconsider this approach or work to fix it.
  6. Reboot again into rEFInd, but this time try booting Ubuntu. (rEFInd should show at least one Ubuntu option.)
  7. If rEFInd boots Ubuntu, install the Debian package or PPA of rEFInd. This should set up rEFInd as the default boot program on your computer.
  8. If desired, re-enable Secure Boot. If this causes rEFInd to not boot, disable Secure Boot and install a Shim package, as described in the rEFInd documentation. (rEFInd will set itself up to use Shim if it finds a Shim binary, but your system might not have this already.)

rEFInd tends to get confused less often than GRUB, although rEFInd isn't well-integrated into Ubuntu and so requires more setup effort, particularly if you want to use Secure Boot. This extra setup effort is likely to be less than the effort required to fix GRUB if GRUB is misbehaving badly, as yours is, hence the suggestion. In your case, though, since you haven't yet done anything with Ubuntu, and since deleting the BIOS Boot Partition will leave 100MiB of wasted disk space, re-installing Ubuntu may be a superior solution than either fixing GRUB or installing rEFInd.

Beyond this, you'll need to post details from your Boot Repair run if you need more help. (Boot Repair should spit out a URL where it stores details about your system.)

Rod Smith
  • 44,284
  • 7
  • 63
  • 105
  • Thank you for your answer. You are right about the /dev/sda5 parition, I assigned too much, but for big safety reasons I assigned 100MB (I also can afford from a 750GB HDD). With regard to the boot-repair, I think something went wrong with the /dev/sda2 parition (the Microsoft reserved one), and then it was confused. Boot Repair didn't spit out a URL because it was keep running and showing a message to close all applications or to unmount all partitions (even though I was on a live session and with the partitions unmounted), but I posted the log for reference. – valentin_nasta Jul 25 '15 at 17:49
  • I didn't replaced the GRUB, I only changed the path as RobinHood suggested. Thank you for the advice of rewriting the /dev/sda2, I was also a bit scared to just dump it, because I still need windows for other applications. – valentin_nasta Jul 25 '15 at 17:53