PDA

View Full Version : [ubuntu] Win 8 does not boot after installation of Ubuntu 12.04.2 LTS on Sony Vaio SVF1521C5E



RostigerNagel
June 29th, 2013, 03:02 PM
Hello Ubuntu experts,

I am a Linux newbie.
On my Sony Vaio SVF1521C5E was Win 8 preinstalled.
As a Ubuntu-fan, I decided to additionally install Ubuntu 12.04.2 LTS for an dual-boot system (because I need also software, that is only written for Windows).
After the installation Ubuntu can be booted, but if I want to select Windows 8 the following error message appears:
"error: unkown command 'drivemap'.
error: invalid EFI file path."
After a few seconds it returns to the previous page, where I can select Ubuntu and Win8, but Win8 does not boot.

After that I decided to boot my computer on a Ubuntu live-CD.
In a Terminal I typed
"sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update"
and
"sudo apt-get install -y boot-repair && (boot-repair &)", as described in https://help.ubuntu.com/community/Boot-Repair .
There I hit "Create a BootInfo summary".
The result you can find in http://paste.ubuntu.com/5810798/ .

Before the installation I checked by pressing "Assist" that secure boot was disabled.

Can it be a problem with the new UEFI?

I hope, that somebody can help me!!!
Please help me!!!

John

oldfred
June 29th, 2013, 04:42 PM
Did you see if you can boot Windows with secure boot off? Some do and some do not.
Also did you turn off secure boot and turn off fast boot?

You show you have the grub shim file which has the Microsoft key and the signed kernels, so you probably are booting Ubuntu with secure boot on.

You may just need correct links back to Windows. Grub2's os-prober still creates BIOS entries that do not work with UEFI. Boot-Repair will fix that by adding correct entries.
Also some systems only boot the Windows efi file. But if you are booting Ubuntu then you do not need that. Not sure if you can run the Boot-Repair fixes without the rename function as you must not need that.

grub2's os-prober creates wrong style (BIOS) chain boot entry
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1024383
type of entry from Boot-Repair that should work.
menuentry "Windows UEFI bkpbootmgfw.efi" {
menuentry "Windows Boot UEFI loader" {
Type of entry that does not work:
'Windows ...) (on /dev/sdXY)'
Some info in Post #3 on cleaning up menus, if desired.
http://ubuntuforums.org/showthread.php?t=2085530

If you run Boot-Repair it will proably run this Windows efi file rename.

Boot-Repair - Updated Jan 1, 2013 to not rename first time, but rename if first time Windows does not boot. Post 706 and 711
http://ubuntuforums.org/showthread.php?t=1769482&page=71
Boot-Repair copied /EFI/ubuntu/grubx64.efi to /EFI/Boot/bootx64.efi (in case the BIOS is hard-coded to boot into /EFI/Boot/bootx64.efi or secure boot signed GRUB file shimx64.efi.
Renamed files:
/EFI/Boot/bkpbootx64.efi
/EFI/Microsoft/Boot/bkpbootmgfw.efi


To undo & to rename files to their original names, you just need to tick the "Restore EFI backups" option of Boot-Repair.

RostigerNagel
June 29th, 2013, 06:02 PM
Hello oldfred,

thank you for your fast reply!
For the Vaio Notebooks you need to go with "Assist" into the InsydeH20 Setup Utility.
There is written: "Secure Boot [Disabled]".
"Boot Mode [UEFI]".
"Select UEFI boot or legacy boot. If it is not set correctly, the operating system cannot boot. "
There is no option to turn fast boot on or off.
But if I start boot repair (as described before) it says in a warning "EFI detected. Please check the options." What shall I check in the options?
And after a click on "Recommended repair" it is written in a warning "Please disable Secure Boot in he BIOS. Then try again. Do you want to continue." I clicked on "no", because I am afraid, that I destroy also my Ubuntu. How can I be sure, if Secure Boot is disabled or not (because in the InsydeH20 Setup Utility there is written "Secure Boot [Disabled]")?

Because I can boot Ubuntu, I could look into my grub.cfg.
Probably it helps to solve the problem.
Can I make there changes to correct links back to Windows?

Here the result:

cat /boot/grub/grub.cfg



#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
set default="0"
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function recordfail {
set recordfail=1
if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}
function load_video {
insmod efi_gop
insmod efi_uga
insmod video_bochs
insmod video_cirrus
}
insmod part_gpt
insmod ext2
set root='(hd0,gpt7)'
search --no-floppy --fs-uuid --set=root c6d2d26e-a5ef-4b69-87a0-a2e9842ba999
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=auto
load_video
insmod gfxterm
insmod part_gpt
insmod ext2
set root='(hd0,gpt7)'
search --no-floppy --fs-uuid --set=root c6d2d26e-a5ef-4b69-87a0-a2e9842ba999
set locale_dir=($root)/boot/grub/locale
set lang=de_DE
insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ]; then
set timeout=-1
else
set timeout=10
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
if background_color 44,0,30; then
clear
fi
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
set gfxpayload="${1}"
if [ "${1}" = "keep" ]; then
set vt_handoff=vt.handoff=7
else
set vt_handoff=
fi
}
if [ "${recordfail}" != 1 ]; then
if [ -e ${prefix}/gfxblacklist.txt ]; then
if hwmatch ${prefix}/gfxblacklist.txt 3; then
if [ ${match} = 0 ]; then
set linux_gfx_mode=keep
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=keep
fi
else
set linux_gfx_mode=text
fi
export linux_gfx_mode
if [ "${linux_gfx_mode}" != "text" ]; then load_video; fi
menuentry 'Ubuntu, mit Linux 3.5.0-34-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
gfxmode $linux_gfx_mode
insmod gzio
insmod part_gpt
insmod ext2
set root='(hd0,gpt7)'
search --no-floppy --fs-uuid --set=root c6d2d26e-a5ef-4b69-87a0-a2e9842ba999
linux /boot/vmlinuz-3.5.0-34-generic.efi.signed root=UUID=c6d2d26e-a5ef-4b69-87a0-a2e9842ba999 ro quiet splash $vt_handoff
initrd /boot/initrd.img-3.5.0-34-generic
}
menuentry 'Ubuntu, mit Linux 3.5.0-34-generic (Wiederherstellungsmodus)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod gzio
insmod part_gpt
insmod ext2
set root='(hd0,gpt7)'
search --no-floppy --fs-uuid --set=root c6d2d26e-a5ef-4b69-87a0-a2e9842ba999
echo 'Linux 3.5.0-34-generic wird geladen …'
linux /boot/vmlinuz-3.5.0-34-generic.efi.signed root=UUID=c6d2d26e-a5ef-4b69-87a0-a2e9842ba999 ro recovery nomodeset
echo 'Initiale Ramdisk wird geladen …'
initrd /boot/initrd.img-3.5.0-34-generic
}
submenu "Previous Linux versions" {
menuentry 'Ubuntu, mit Linux 3.5.0-23-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
gfxmode $linux_gfx_mode
insmod gzio
insmod part_gpt
insmod ext2
set root='(hd0,gpt7)'
search --no-floppy --fs-uuid --set=root c6d2d26e-a5ef-4b69-87a0-a2e9842ba999
linux /boot/vmlinuz-3.5.0-23-generic root=UUID=c6d2d26e-a5ef-4b69-87a0-a2e9842ba999 ro quiet splash $vt_handoff
initrd /boot/initrd.img-3.5.0-23-generic
}
menuentry 'Ubuntu, mit Linux 3.5.0-23-generic (Wiederherstellungsmodus)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod gzio
insmod part_gpt
insmod ext2
set root='(hd0,gpt7)'
search --no-floppy --fs-uuid --set=root c6d2d26e-a5ef-4b69-87a0-a2e9842ba999
echo 'Linux 3.5.0-23-generic wird geladen …'
linux /boot/vmlinuz-3.5.0-23-generic root=UUID=c6d2d26e-a5ef-4b69-87a0-a2e9842ba999 ro recovery nomodeset
echo 'Initiale Ramdisk wird geladen …'
initrd /boot/initrd.img-3.5.0-23-generic
}
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod part_gpt
insmod ext2
set root='(hd0,gpt7)'
search --no-floppy --fs-uuid --set=root c6d2d26e-a5ef-4b69-87a0-a2e9842ba999
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_gpt
insmod ext2
set root='(hd0,gpt7)'
search --no-floppy --fs-uuid --set=root c6d2d26e-a5ef-4b69-87a0-a2e9842ba999
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows Recovery Environment (loader) (on /dev/sda2)" --class windows --class os {
insmod part_gpt
insmod ntfs
set root='(hd0,gpt2)'
search --no-floppy --fs-uuid --set=root 7CC839E5C8399E78
drivemap -s (hd0) ${root}
chainloader +1
}
menuentry "Windows 8 (loader) (on /dev/sda3)" --class windows --class os {
insmod part_gpt
insmod fat
set root='(hd0,gpt3)'
search --no-floppy --fs-uuid --set=root FA9E-B86B
drivemap -s (hd0) ${root}
chainloader +1
}
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/30_uefi-firmware ###
menuentry 'System setup' {
fwsetup
}
### END /etc/grub.d/30_uefi-firmware ###
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

oldfred
June 29th, 2013, 06:37 PM
Please use code tags on any longer text or terminal output.

BootInfo report already had copy of grub.cfg and you are using the signed kernel which is for secure boot. That should boot with secure boot on and I presume with it off.


linux /boot/vmlinuz-3.5.0-34-generic.efi.signed

RostigerNagel
June 29th, 2013, 06:38 PM
If you want, that I press "Advanced options" at "Boot-Repair" I want to inform you, what is marked, to avoid mistakes.
At "Main options" it is marked:
"x Reinstall GRUB"
"x Backup and rename EFI files (solves the [hard-coded-EFI] error)"
"x Unhide boot menu 10 s"
Not marked is "Repair file systems"

At "GRUB location" it is only marked "Separate /boot/efi partition: sda3"

At GRUB options it is only marked:
"x SecureBoot"

At "Other options" it is everything marked:
"x Repair Windows boot files
x Create a BootInfo summary (to get help ...)
x Check internet connection"

Maybe this information helps you.

oldfred
June 29th, 2013, 06:56 PM
I do not know which option adds the new chain load boot stanzas to Windows. I know Boot-repair does that almost all the time. Perhaps it is the Repair Windows boot files option? I might try just running that.
You can also manually add those boot stanzas. I can post that if you like. General info in link to bug report on grub's os-prober.

If at all concerned you can do a full backup of your efi partition which is not large to an external device. Probably a good idea anyway.

RostigerNagel
June 29th, 2013, 07:01 PM
Thank you for your reply, oldfred.
It is very strange, because Secureboot seems to be disabled in InsydeH20 Setup Utility.
But why is it necessary to disable Secureboot? Ubuntu works and Windows worked before the installation of Ubuntu. I think that Windows should boot with secure boot. Or is it a problem of GRUB2, that it does not work with SecureBoot and Windows8?

RostigerNagel
June 29th, 2013, 07:19 PM
Can you tell me how to do a full backup of my efi partition? Sorry, I'm a newbie.
I don't want to use BootRepair, because after pressing "Recommended repair" it is written in a warning "Please disable Secure Boot in he BIOS. Then try again. Do you want to continue." and I'm afraid to press "yes", because SecureBoot seems to be enabled (but in the UEFI-menue there is written disabled, so I cannot chage anything.).
To add those boot stanzas manually could be a good idea, but I dont know how they should be changed.
Well I think that I could place corrected boot stanzas directly in my /boot/grub/grub.cfg file, but I read, that they would be temporary.
What about /etc/grub.d/40_custom and then rund update-grub? Or will that destroy also my Ubuntu booting?

RostigerNagel
June 29th, 2013, 09:22 PM
244264

As you can see SecureBoot should be disabled (I have changed nothing), but how can I be sure?
Is there a Ubuntu command to check?

For less than 1s at the booting screen appears "Secure Boot forbids loading module from (hd0, gpt7)/boot/grub/gettext.mod." before I see the Grub2 page.
I am very confused, because of the attached screen.

oldfred
June 30th, 2013, 04:42 AM
It looks disabled to me.

Boot-Repair looks at some UEFI parameters and some sytems do not seem to have good menus. If it works that should be fine.

#Add menu entry to 40_custom, add entry below.
gksudo gedit /etc/grub.d/40_custom
#Turn off prober to eliminate incorrect BIOS type entries.
gksudo gedit /etc/default/grub
#Add this line
GRUB_DISABLE_OS_PROBER=true
#update grub menu after any change
sudo update-grub

# Either of these should work in 40_custom



menuentry "Windows 8 UEFI" {
search --file --no-floppy --set=root /efi/Microsoft/Boot/bootmgfw.efi
chainloader (${root})/efi/Microsoft/Boot/bootmgfw.efi
}

menuentry "Windows bootmgfw.efi " {
search --fs-uuid --no-floppy --set=root FA9E-B86B
chainloader (${root})/EFI/Microsoft/Boot/bootmgfw.efi
}


http://www.insanelymac.com/forum/lofiversion/index.php/t186440

RostigerNagel
June 30th, 2013, 01:24 PM
Hello oldfred,
thank you so much for your help!
Now it works, beacause of your pervious tipp with boot repair.

The stroy is very strage.
I have disabled UEFI in the Assist-menue an went to legacy mode.
After that I have enabled UEFI in the Assist-menu.
Then Ubuntu only booted in windows an the grub2 menu was gone.
After that I inserted my Ubuntu 12.04.02 live disk and started grub repair in the recommended way without any changes.
After a reboot I saw insead of a grub menu only in red "Secure Boot Faild. Operating System is invalid".
At this point I could boot neither in windows nor in ubuntu.
So I was angry and pressed the Assist-menu. In sheer desperation I changed in this menue SecureBoot from "diabled" (!) to "enabled" and rebooted.
No improvement. After that I changed in this menue SecureBoot from "enabled" to "disabled" and rebooted.
No improvement. Then I deactivated UEFI activated the legacy mode and rebooted. On the screen appeared "No operating system found ...". After that I changed from legacy mode to UEFI, rebooted and surprisingly (!) the grub menu appeared with two more entries for Windows.
No I can boot boot Ubuntu and Windows :KS.
The old not working entries are still in the grub menu. Can I remove this not working entries easy?

oldfred
June 30th, 2013, 01:56 PM
In post #10 above and (with alternative methods) link in my signature are the instructions to turn off os-prober which creates the BIOS entries. Someday they will fix that bug then you may want to turn it back on.

RostigerNagel
June 30th, 2013, 05:50 PM
Thank you very much! :p
Now it's [solved] !