Grub on efi
I have tried installing grub according to the instructions on the wiki out my efi system.
I get this error after running the grub-install command specified in the wiki:
couldn't open either sysfs or procfs directories for accessing efi variables
What is happening?
To clarify, I am booted into my arch system via syslinux, but would like to have grub so I can boot my windows hard drive as well.
Read the Wiki...
Or, if you have already booted in UEFI, modprobe the module.
Similar Messages
-
[SOLVED] Two Grub boot menus on Macbook pro 7.1 efi boot
Hello
This is my first Arch post and I feel a bit of a fool for making the error I'm going to describe but here we go....
A couple of weeks ago I installed Arch as dual boot on my Macbook pro 7.1 and I'm generally quite happy with the result. I boot as EFI using Grub2 having followed instructions to make a standalone boot.efi and boot from the mac's bootloader. The boot.efi file is placed on a small macosx journaled partition that has been made bootable with "bless". I've been able to boot between the two systems using 'alt' at startup or, more generally, just leave the pc to boot into Arch.
When I generated the boot.cfg file I didn't specify ro or rw but grub added ro. So I've had the "root mounted as ro" warning since upgrading to 3.10.3-1 (I don't subscribe to the testing repository) although it was obviously an issue from the start and I was aware of it. After reading some of the forum posts today I thought I'd have a go at changing the boot parameters at startup and edit the boot menu to include rw. This worked and I didn't get the read only warning. I decided to try to generate a new grub.fcg and specify rw before generating a new boot.efi. On inspecting the new boot.cfg I noticed it had both ro and rw entries. I decided to think about what to do (thinking of removing the ro) before making the standalone file.
Anyway, I had to boot into osx for something else but when doing so noticed that I now have 3 efi boot options in the mac bootmanager. Two are grub and one boots osx. I've had a look in the forums and on the internet in general but can't find out how to remove the second entry. My guess is I've installed grub on my Arch /boot partition but can't figure out how to remove it.
Although I can boot into Arch as normal as the pc defaults to the original grub menu, I'd like to remove the additional entry if possible and would be grateful for any help.
Dylan
Last edited by youngdm (2013-08-06 21:00:37)These are the instructions I followed
grub-mkconfig -o boot/grub/grub.cfg grub-mkstandalone -o boot.efi -d usr/lib/grub/x86_64-efi -O x86_64-efi -C xz boot/grub/grub.cfg
Then in osx:
sudo bless --device /dev/disk0s4 --setBoot
I think that on initial installation I ran the command above as one and then last night ran it as two. Like this:
grub-mkconfig -o boot/grub/grub.cfg
grub-mkstandalone -o boot.efi -d usr/lib/grub/x86_64-efi -O x86_64-efi -C xz boot/grub/grub.cfg
The instructions were from:
http://codylittlewood.com/arch-linux-on … tallation/
From the apple discussion forums..
This one is a bit more tricky, surely there is another way but this one is simple and not so risky
1- burn a GParted Live CD iso
2- boot on the GParted live CD (press alt on boot and wait for the CD boot option to appear) and choose the first boot entry
3- during the boot process accept every option with its default value
4- in GParted select the EFI partition and somewhere in the menus select the "flags" entry and uncheck "boot"
5- exit GParted Live CD and boot in Mac OS
6- a new volume has appeared "/volumes/efi"
in the finder go to "/volumes/efi/EFI" and delete the "ubuntu" folder
7- repeat steps 2/3 and step 4 but check "boot" instead of unchecking it
8- exit GParted live CD and reboot
I have found the instructions above on the apple discussion forums but as noted above I'm a little wary about following them. I guess though that I need to remove the entry in the mac EFI partition which is hidden in osx but shows as sda1 in Arch.
Do you think I could mount sda1 in Arch and have a look at what's on there? From the instructions above it looks like there should be a directory for Arch that could be deleted. I presume that Arch is booting from the blessed partition on sda4. Is this correct?
Last edited by youngdm (2013-08-06 11:46:09) -
Dualboot with Windows from secondary MBR drive using e.g. grub/refind
Hi!
I'm trying to get my secondary drive with Windows 8, installed in MBR-mode to boot using either grub2, refind or any other suitable bootloader. "bootinfoscript" return:
Boot Info Script 0.61 [1 April 2012]
============================= Boot Info Summary: ===============================
=> is installed in the MBR of /dev/sda.
=> Windows is installed in the MBR of /dev/sdb.
sda1: __________________________________________________________________________
File system: vfat
Boot sector type: FAT32
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files: /grub/grub.cfg /efi/arch_grub/grubx64.efi
/efi/refind/refind_x64.efi
sda2: __________________________________________________________________________
File system: ext4
Boot sector type: -
Boot sector info:
Operating System: Arch Linux ()
Boot files: /etc/fstab
sdb1: __________________________________________________________________________
File system: ntfs
Boot sector type: Windows Vista/7: NTFS
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files: /bootmgr /Boot/BCD
sdb2: __________________________________________________________________________
File system: ntfs
Boot sector type: Windows Vista/7: NTFS
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files: /bootmgr /Windows/System32/winload.exe
sdb3: __________________________________________________________________________
File system: ext4
Boot sector type: -
Boot sector info:
Operating System:
Boot files:
============================ Drive/Partition Info: =============================
Drive: sda _____________________________________________________________________
Disk /dev/sda: 55.9 GiB, 60022480896 bytes, 117231408 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Partition Boot Start Sector End Sector # of Sectors Id System
/dev/sda1 1 117,231,407 117,231,407 ee GPT
GUID Partition Table detected.
Partition Start Sector End Sector # of Sectors System
/dev/sda1 40 409,639 409,600 EFI System partition
/dev/sda2 409,640 115,752,999 115,343,360 Data partition (Linux)
Drive: sdb _____________________________________________________________________
Disk /dev/sdb: 1.4 TiB, 1500301910016 bytes, 2930277168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Partition Boot Start Sector End Sector # of Sectors Id System
/dev/sdb1 2,048 718,847 716,800 7 NTFS / exFAT / HPFS
/dev/sdb2 718,848 882,276,351 881,557,504 7 NTFS / exFAT / HPFS
/dev/sdb3 * 882,276,352 2,930,272,255 2,047,995,904 af HFS / HFS+
"blkid" output: ________________________________________________________________
Device UUID TYPE LABEL
/dev/sda1 39D2-CCE0 vfat
/dev/sda2 0c5d5c14-1e89-44ec-af4d-7b180ed693bc ext4
/dev/sdb1 780CD4910CD44BAE ntfs System Reserved
/dev/sdb2 105CD9745CD95556 ntfs
/dev/sdb3 bb50e1d4-cc4c-43cc-8597-54815366422f ext4
================================ Mount points: =================================
Device Mount_Point Type Options
/dev/sda1 /boot vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/sda2 / ext4 (rw,noatime,discard,data=ordered)
/dev/sdb3 /home ext4 (rw,relatime,data=ordered)
============================= sda1/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 ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
load_env
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="0"
fi
if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi
export menuentry_id_option
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 load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_gpt
insmod ext2
set root='hd0,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 0c5d5c14-1e89-44ec-af4d-7b180ed693bc
else
search --no-floppy --fs-uuid --set=root 0c5d5c14-1e89-44ec-af4d-7b180ed693bc
fi
font="/usr/share/grub/unicode.pf2"
fi
if loadfont $font ; then
set gfxmode=auto
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=en_US
insmod gettext
fi
terminal_input console
terminal_output gfxterm
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=5
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/10_archlinux ###
menuentry "Arch Linux pkg-linux kernel" --class arch-linux --class arch --class gnu-linux --class gnu --class os {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
fi
set gfxpayload=keep
insmod fat
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1 39D2-CCE0
else
search --no-floppy --fs-uuid --set=root 39D2-CCE0
fi
echo 'Loading Arch Linux pkg-linux kernel ...'
linux /vmlinuz-linux root=UUID=0c5d5c14-1e89-44ec-af4d-7b180ed693bc rw quiet
echo 'Loading Arch Linux pkg-linux kernel initramfs ...'
initrd /initramfs-linux.img
menuentry "Arch Linux pkg-linux kernel (fallback initramfs)" --class arch-linux --class arch --class gnu-linux --class gnu --class os {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
fi
set gfxpayload=keep
insmod fat
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1 39D2-CCE0
else
search --no-floppy --fs-uuid --set=root 39D2-CCE0
fi
echo 'Loading Arch Linux pkg-linux kernel ...'
linux /vmlinuz-linux root=UUID=0c5d5c14-1e89-44ec-af4d-7b180ed693bc rw quiet
echo 'Loading Arch Linux pkg-linux kernel fallback initramfs ...'
initrd /initramfs-linux-fallback.img
### END /etc/grub.d/10_archlinux ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-0c5d5c14-1e89-44ec-af4d-7b180ed693bc' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod fat
set root='hd0,gpt1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1 39D2-CCE0
else
search --no-floppy --fs-uuid --set=root 39D2-CCE0
fi
echo 'Loading Linux linux ...'
linux /vmlinuz-linux root=UUID=0c5d5c14-1e89-44ec-af4d-7b180ed693bc rw quiet
echo 'Loading initial ramdisk ...'
initrd /initramfs-linux.img
submenu 'Advanced options for Arch Linux' $menuentry_id_option 'gnulinux-advanced-0c5d5c14-1e89-44ec-af4d-7b180ed693bc' {
menuentry 'Arch Linux, with Linux linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-0c5d5c14-1e89-44ec-af4d-7b180ed693bc' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod fat
set root='hd0,gpt1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1 39D2-CCE0
else
search --no-floppy --fs-uuid --set=root 39D2-CCE0
fi
echo 'Loading Linux linux ...'
linux /vmlinuz-linux root=UUID=0c5d5c14-1e89-44ec-af4d-7b180ed693bc rw quiet
echo 'Loading initial ramdisk ...'
initrd /initramfs-linux.img
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###
### 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.
menuentry "Microsoft Windows Vista/7/8 BIOS-MBR" {
insmod part_msdos
insmod ntfs
insmod search_fs_uuid
insmod ntldr
search --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1 780CD4910CD44BAE
ntldr /bootmgr
### END /etc/grub.d/40_custom ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
### BEGIN /etc/grub.d/60_memtest86+ ###
### END /etc/grub.d/60_memtest86+ ###
=================== sda1: Location of files loaded by Grub: ====================
GiB - GB File Fragment(s)
=============================== sda2/etc/fstab: ================================
# /etc/fstab: static file system information
# <file system> <dir> <type> <options> <dump> <pass>
# /dev/sda2
UUID=0c5d5c14-1e89-44ec-af4d-7b180ed693bc / ext4 rw,defaults,noatime,discard,data=ordered 0 1
# /dev/sda1
UUID=39D2-CCE0 /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 2
# /dev/sdb3
UUID=bb50e1d4-cc4c-43cc-8597-54815366422f /home ext4 rw,relatime,data=ordered 0 2
=============================== StdErr Messages: ===============================
cat: /tmp/BootInfo-2fUreQzU/Tmp_Log: No such file or directory
No volume groups found
mdadm: No arrays found in config file or automatically
As seen, windows is installed in the MBR of /dev/sdb and grub, using the chainloader should be able to boot it (i guess).
I have the following in my 40-custom.
menuentry "Microsoft Windows Vista/7/8 BIOS-MBR" {
insmod part_msdos
insmod ntfs
insmod search_fs_uuid
insmod ntldr
search --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1 780CD4910CD44BAE
ntldr /bootmgr
where the first is "--hint-bios= ..." is given by
sudo grub-probe --target=hints_string -d /dev/sdb1
and the UUID by
sudo grub-probe --target=fs_uuid -d /dev/sdb1
When I try to boot the above configuration, I get an error saying that "ntldr cannot be found" - and indeed, while I find "ntldr.mod" in "/usr/lib/grub/i386-pc/" I cannot find it in "/usr/lib/grub/x86_64-efi/".
I've also tried getting refind to identify "bootmgr" from windows without success. I guess it does not support NTFS or something.
Anyway, do anyone have any idea of how to get this to work - without reinstalling Windows in EFI-mode?
Thanks in advance,
eltdieelt wrote:
Hi!
I'm trying to get my secondary drive with Windows 8, installed in MBR-mode to boot using either grub2, refind or any other suitable bootloader. "bootinfoscript" return:
Boot Info Script 0.61 [1 April 2012]
============================= Boot Info Summary: ===============================
=> is installed in the MBR of /dev/sda.
=> Windows is installed in the MBR of /dev/sdb.
sda1: __________________________________________________________________________
File system: vfat
Boot sector type: FAT32
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files: /grub/grub.cfg /efi/arch_grub/grubx64.efi
/efi/refind/refind_x64.efi
sda2: __________________________________________________________________________
File system: ext4
Boot sector type: -
Boot sector info:
Operating System: Arch Linux ()
Boot files: /etc/fstab
sdb1: __________________________________________________________________________
File system: ntfs
Boot sector type: Windows Vista/7: NTFS
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files: /bootmgr /Boot/BCD
sdb2: __________________________________________________________________________
File system: ntfs
Boot sector type: Windows Vista/7: NTFS
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files: /bootmgr /Windows/System32/winload.exe
sdb3: __________________________________________________________________________
File system: ext4
Boot sector type: -
Boot sector info:
Operating System:
Boot files:
============================ Drive/Partition Info: =============================
Drive: sda _____________________________________________________________________
Disk /dev/sda: 55.9 GiB, 60022480896 bytes, 117231408 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Partition Boot Start Sector End Sector # of Sectors Id System
/dev/sda1 1 117,231,407 117,231,407 ee GPT
GUID Partition Table detected.
Partition Start Sector End Sector # of Sectors System
/dev/sda1 40 409,639 409,600 EFI System partition
/dev/sda2 409,640 115,752,999 115,343,360 Data partition (Linux)
Drive: sdb _____________________________________________________________________
Disk /dev/sdb: 1.4 TiB, 1500301910016 bytes, 2930277168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Partition Boot Start Sector End Sector # of Sectors Id System
/dev/sdb1 2,048 718,847 716,800 7 NTFS / exFAT / HPFS
/dev/sdb2 718,848 882,276,351 881,557,504 7 NTFS / exFAT / HPFS
/dev/sdb3 * 882,276,352 2,930,272,255 2,047,995,904 af HFS / HFS+
"blkid" output: ________________________________________________________________
Device UUID TYPE LABEL
/dev/sda1 39D2-CCE0 vfat
/dev/sda2 0c5d5c14-1e89-44ec-af4d-7b180ed693bc ext4
/dev/sdb1 780CD4910CD44BAE ntfs System Reserved
/dev/sdb2 105CD9745CD95556 ntfs
/dev/sdb3 bb50e1d4-cc4c-43cc-8597-54815366422f ext4
================================ Mount points: =================================
Device Mount_Point Type Options
/dev/sda1 /boot vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/sda2 / ext4 (rw,noatime,discard,data=ordered)
/dev/sdb3 /home ext4 (rw,relatime,data=ordered)
============================= sda1/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 ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
load_env
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="0"
fi
if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi
export menuentry_id_option
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 load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_gpt
insmod ext2
set root='hd0,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 0c5d5c14-1e89-44ec-af4d-7b180ed693bc
else
search --no-floppy --fs-uuid --set=root 0c5d5c14-1e89-44ec-af4d-7b180ed693bc
fi
font="/usr/share/grub/unicode.pf2"
fi
if loadfont $font ; then
set gfxmode=auto
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=en_US
insmod gettext
fi
terminal_input console
terminal_output gfxterm
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=5
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/10_archlinux ###
menuentry "Arch Linux pkg-linux kernel" --class arch-linux --class arch --class gnu-linux --class gnu --class os {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
fi
set gfxpayload=keep
insmod fat
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1 39D2-CCE0
else
search --no-floppy --fs-uuid --set=root 39D2-CCE0
fi
echo 'Loading Arch Linux pkg-linux kernel ...'
linux /vmlinuz-linux root=UUID=0c5d5c14-1e89-44ec-af4d-7b180ed693bc rw quiet
echo 'Loading Arch Linux pkg-linux kernel initramfs ...'
initrd /initramfs-linux.img
menuentry "Arch Linux pkg-linux kernel (fallback initramfs)" --class arch-linux --class arch --class gnu-linux --class gnu --class os {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
fi
set gfxpayload=keep
insmod fat
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1 39D2-CCE0
else
search --no-floppy --fs-uuid --set=root 39D2-CCE0
fi
echo 'Loading Arch Linux pkg-linux kernel ...'
linux /vmlinuz-linux root=UUID=0c5d5c14-1e89-44ec-af4d-7b180ed693bc rw quiet
echo 'Loading Arch Linux pkg-linux kernel fallback initramfs ...'
initrd /initramfs-linux-fallback.img
### END /etc/grub.d/10_archlinux ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-0c5d5c14-1e89-44ec-af4d-7b180ed693bc' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod fat
set root='hd0,gpt1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1 39D2-CCE0
else
search --no-floppy --fs-uuid --set=root 39D2-CCE0
fi
echo 'Loading Linux linux ...'
linux /vmlinuz-linux root=UUID=0c5d5c14-1e89-44ec-af4d-7b180ed693bc rw quiet
echo 'Loading initial ramdisk ...'
initrd /initramfs-linux.img
submenu 'Advanced options for Arch Linux' $menuentry_id_option 'gnulinux-advanced-0c5d5c14-1e89-44ec-af4d-7b180ed693bc' {
menuentry 'Arch Linux, with Linux linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-0c5d5c14-1e89-44ec-af4d-7b180ed693bc' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod fat
set root='hd0,gpt1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1 39D2-CCE0
else
search --no-floppy --fs-uuid --set=root 39D2-CCE0
fi
echo 'Loading Linux linux ...'
linux /vmlinuz-linux root=UUID=0c5d5c14-1e89-44ec-af4d-7b180ed693bc rw quiet
echo 'Loading initial ramdisk ...'
initrd /initramfs-linux.img
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###
### 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.
menuentry "Microsoft Windows Vista/7/8 BIOS-MBR" {
insmod part_msdos
insmod ntfs
insmod search_fs_uuid
insmod ntldr
search --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1 780CD4910CD44BAE
ntldr /bootmgr
### END /etc/grub.d/40_custom ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
### BEGIN /etc/grub.d/60_memtest86+ ###
### END /etc/grub.d/60_memtest86+ ###
=================== sda1: Location of files loaded by Grub: ====================
GiB - GB File Fragment(s)
=============================== sda2/etc/fstab: ================================
# /etc/fstab: static file system information
# <file system> <dir> <type> <options> <dump> <pass>
# /dev/sda2
UUID=0c5d5c14-1e89-44ec-af4d-7b180ed693bc / ext4 rw,defaults,noatime,discard,data=ordered 0 1
# /dev/sda1
UUID=39D2-CCE0 /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 2
# /dev/sdb3
UUID=bb50e1d4-cc4c-43cc-8597-54815366422f /home ext4 rw,relatime,data=ordered 0 2
=============================== StdErr Messages: ===============================
cat: /tmp/BootInfo-2fUreQzU/Tmp_Log: No such file or directory
No volume groups found
mdadm: No arrays found in config file or automatically
As seen, windows is installed in the MBR of /dev/sdb and grub, using the chainloader should be able to boot it (i guess).
I have the following in my 40-custom.
menuentry "Microsoft Windows Vista/7/8 BIOS-MBR" {
insmod part_msdos
insmod ntfs
insmod search_fs_uuid
insmod ntldr
search --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1 780CD4910CD44BAE
ntldr /bootmgr
where the first is "--hint-bios= ..." is given by
sudo grub-probe --target=hints_string -d /dev/sdb1
and the UUID by
sudo grub-probe --target=fs_uuid -d /dev/sdb1
When I try to boot the above configuration, I get an error saying that "ntldr cannot be found" - and indeed, while I find "ntldr.mod" in "/usr/lib/grub/i386-pc/" I cannot find it in "/usr/lib/grub/x86_64-efi/".
I've also tried getting refind to identify "bootmgr" from windows without success. I guess it does not support NTFS or something.
Anyway, do anyone have any idea of how to get this to work - without reinstalling Windows in EFI-mode?
Thanks in advance,
elt
UEFI GRUB(2) does not support booting BIOS boot loaders in non-Apple systems. For Apple Macs that support exists in form of 'appleloader' grub command. You might have better luck with rEFInd bios boot support but as per its author Rod Smith (srs5694) even that support is severely limited http://rodsbooks.com/refind/using.html#legacy .
You 40_custom is correct but that will work only in bios grub(2), not in uefi grub(2). 'ntldr' grub module is specific to bios grub(2).
Last edited by the.ridikulus.rat (2014-04-13 20:09:25) -
[SOLVED] Can't boot Windows 8 using grub2. invalid EFI file path
English is not my native language. Please excuse typing errors.
I have just successfully installed Arch linux with grub2 as its boot manager. I
followed the arch beginner guide. I've used grub before and I'm familiar with
it, so chose to use grub instead for efistub. I installed os-prober and
ran grub-mkconfig to create the grub.cfg file. The problem now is that I recieve
an error when I try to boot windows 8. I have two drives (/dev/sda and /dev/sdb)
and I believe both are EFI-systems.
However, it's not very important for me to use grub, so if booting into windows
8 is easier using efistub, I will try that.
The computer is ASUS ux32vd with a hybrid disk with 25GB on the SSD and 500GB on
the hard drive. I believe the SSD part is used by Windows.
This is the first error I recieved when I tried to boot windows.
error: can't find command `drivemap'.
error: invalid EFI file path.
Press any key to continue...
Then I tried to follow this post
https://bbs.archlinux.org/viewtopic.php?id=150183 and made a new boot
entry "Windows 82". And I got a new error:
error: unspecified search type.
error: file '/EFI/Microsoft/Boot/bootmgfw.efi' not found
Press any key to continue...
Here are some command line outputs.
~ ᐅ sudo blkid
/dev/sdb1: PARTLABEL="HFS" PARTUUID="4613ee39-4727-4347-8134-173f590f716f"
/dev/sdb2: LABEL="INTELRST" UUID="BA5E-7431" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="304f2630-89b2-4632-a566-e8c6db9df3a9"
/dev/sda1: LABEL="SYSTEM" UUID="90FA-5332" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="5a60fff2-384a-4168-ad7b-7ba25c03c910"
/dev/sda2: LABEL="Recovery" UUID="ECE43E9AE43E674C" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="5da02b32-607a-4c63-88ef-00499bd6e05c"
/dev/sda3: PARTLABEL="Microsoft reserved partition" PARTUUID="6c501a91-71a5-45d8-a9ee-2e2a1c427258"
/dev/sda4: LABEL="OS" UUID="DE4241E84241C5CD" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="6e182189-b0e3-479a-ac74-8e69452d7c66"
/dev/sda5: LABEL="DATA" UUID="B05448EC5448B6BE" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="be7e04ac-fb01-44fd-9571-e0b001652322"
/dev/sda6: LABEL="Restore" UUID="B8D84520D844DDEE" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="4d42c26d-2c85-4ebf-88ec-7a83a4814a61"
/dev/sda7: LABEL="ROOT" UUID="0d63036d-b624-4596-a296-1db457c068d5" TYPE="ext4" PARTUUID="707f4bca-18b4-4340-838f-ec3a39e9338a"
/dev/sda8: UUID="bcaa2c5f-150d-47c9-9a58-9a7b7ec7bed2" TYPE="swap" PARTUUID="1da43668-418c-4883-810b-e1c3dee75e61"
~ ᐅ sudo lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 465.8G 0 disk
├─sda1 8:1 0 300M 0 part /boot/efi
├─sda2 8:2 0 600M 0 part
├─sda3 8:3 0 128M 0 part
├─sda4 8:4 0 186.3G 0 part /mnt/windows
├─sda5 8:5 0 190.1G 0 part /mnt/data
├─sda6 8:6 0 20G 0 part
├─sda7 8:7 0 66.5G 0 part /
└─sda8 8:8 0 1.9G 0 part
sdb 8:16 0 22.4G 0 disk
├─sdb1 8:17 0 18.4G 0 part
└─sdb2 8:18 0 4G 0 part
~ ᐅ sudo 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 ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
load_env
fi
set default="0"
if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi
export menuentry_id_option
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 load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_gpt
insmod ext2
set root='hd0,gpt7'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt7 --hint-efi=hd0,gpt7 --hint-baremetal=ahci0,gpt7 0d63036d-b624-4596-a296-1db457c068d5
else
search --no-floppy --fs-uuid --set=root 0d63036d-b624-4596-a296-1db457c068d5
fi
font="/usr/share/grub/unicode.pf2"
fi
if loadfont $font ; then
set gfxmode=auto
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=en_US
insmod gettext
fi
terminal_input console
terminal_output gfxterm
set timeout=5
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch Linux, with Linux core repo kernel' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-core repo kernel-true-0d63036d-b624-4596-a296-1db457c068d5' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
set root='hd0,gpt7'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt7 --hint-efi=hd0,gpt7 --hint-baremetal=ahci0,gpt7 0d63036d-b624-4596-a296-1db457c068d5
else
search --no-floppy --fs-uuid --set=root 0d63036d-b624-4596-a296-1db457c068d5
fi
echo 'Loading Linux core repo kernel ...'
linux /boot/vmlinuz-linux root=UUID=0d63036d-b624-4596-a296-1db457c068d5 ro quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-linux.img
menuentry 'Arch Linux, with Linux core repo kernel (Fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-core repo kernel-fallback-0d63036d-b624-4596-a296-1db457c068d5' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
set root='hd0,gpt7'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt7 --hint-efi=hd0,gpt7 --hint-baremetal=ahci0,gpt7 0d63036d-b624-4596-a296-1db457c068d5
else
search --no-floppy --fs-uuid --set=root 0d63036d-b624-4596-a296-1db457c068d5
fi
echo 'Loading Linux core repo kernel ...'
linux /boot/vmlinuz-linux root=UUID=0d63036d-b624-4596-a296-1db457c068d5 ro quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-linux-fallback.img
### 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+ ###
### 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 $menuentry_id_option 'osprober-chain-ECE43E9AE43E674C' {
insmod part_gpt
insmod ntfs
set root='hd0,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 ECE43E9AE43E674C
else
search --no-floppy --fs-uuid --set=root ECE43E9AE43E674C
fi
drivemap -s (hd0) ${root}
chainloader +1
menuentry 'Windows 8 (loader) (on /dev/sda4)' --class windows --class os $menuentry_id_option 'osprober-chain-DE4241E84241C5CD' {
insmod part_gpt
insmod ntfs
set root='hd0,gpt4'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt4 --hint-efi=hd0,gpt4 --hint-baremetal=ahci0,gpt4 DE4241E84241C5CD
else
search --no-floppy --fs-uuid --set=root DE4241E84241C5CD
fi
drivemap -s (hd0) ${root}
chainloader +1
### END /etc/grub.d/30_os-prober ###
### 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.
#menuentry "Microsoft Windows 8 x86_64 UEFI-GPT NTFS" {
#insmod part_gpt
#insmod ntfs
#insmod search_fs_uuid
#insmod chain
#search --fs-uuid --set=root --hint-bios=hd0,gpt4 --hint-efi=hd0,gpt4 --hint-baremetal=ahci0,gpt4 DE4241E84241C5CD
#chainloader /EFI/Microsoft/Boot/bootmgfw.efi
menuentry "Windows 8" {
insmod part_gpt
insmod fat
insmod search_fs_uuid
insmod chain
search --no-floppy --fs--uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1 90FA-5332
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
menuentry "Windows 8-2" --class windows --class os $menuentry_id_option 'osprober-chain-ECE43E9AE43E674C' {
insmod part_gpt
insmod fat
insmod search_fs_uuid
insmod chain
search --no-floppy --fs--uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1 90FA-5332
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
### END /etc/grub.d/40_custom ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
~ ᐅ sudo grub-probe --target=fs_uuid /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi
90FA-5332
~ ᐅ sudo grub-probe --target=hints_string /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi
--hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1
bootinitscript
Boot Info Script 0.61 [1 April 2012]
============================= Boot Info Summary: ===============================
=> No boot loader is installed in the MBR of /dev/sda.
=> No boot loader is installed in the MBR of /dev/sdb.
sda1: __________________________________________________________________________
File system: vfat
Boot sector type: Unknown
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files: /efi/arch-grub/grubx64.efi /efi/Boot/bkpbootx64.efi
/efi/Boot/bootx64.efi /efi/ubuntu/grubx64.efi
sda2: __________________________________________________________________________
File system: ntfs
Boot sector type: Windows Vista/7: NTFS
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files: /bootmgr /Boot/BCD
sda3: __________________________________________________________________________
File system:
Boot sector type: -
Boot sector info:
Mounting failed: mount: unknown filesystem type ''
sda4: __________________________________________________________________________
File system: ntfs
Boot sector type: Windows Vista/7: NTFS
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files: /bootmgr /Boot/BCD /Windows/System32/winload.exe
sda5: __________________________________________________________________________
File system: ntfs
Boot sector type: Windows Vista/7: NTFS
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files:
sda6: __________________________________________________________________________
File system: ntfs
Boot sector type: Windows Vista/7: NTFS
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files:
sda7: __________________________________________________________________________
File system: ext4
Boot sector type: -
Boot sector info:
Operating System: Arch Linux ()
Boot files: /boot/grub/grub.cfg /etc/fstab
sda8: __________________________________________________________________________
File system: swap
Boot sector type: -
Boot sector info:
sdb1: __________________________________________________________________________
File system:
Boot sector type: -
Boot sector info:
Mounting failed: mount: unknown filesystem type ''
mount: unknown filesystem type ''
sdb2: __________________________________________________________________________
File system: vfat
Boot sector type: Unknown
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files:
============================ Drive/Partition Info: =============================
Drive: sda _____________________________________________________________________
Disk /dev/sda: 500.1 GB, 500107862016 bytes, 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Partition Boot Start Sector End Sector # of Sectors Id System
/dev/sda1 1 976,773,167 976,773,167 ee GPT
GUID Partition Table detected.
Partition Start Sector End Sector # of Sectors System
/dev/sda1 2,048 616,447 614,400 EFI System partition
/dev/sda2 616,448 1,845,247 1,228,800 Windows Recovery Environment (Windows)
/dev/sda3 1,845,248 2,107,391 262,144 Microsoft Reserved Partition (Windows)
/dev/sda4 2,107,392 392,816,639 390,709,248 Data partition (Windows/Linux)
/dev/sda5 392,816,640 791,449,599 398,632,960 Data partition (Windows/Linux)
/dev/sda6 934,809,600 976,773,119 41,963,520 Windows Recovery Environment (Windows)
/dev/sda7 791,449,600 930,902,015 139,452,416 Data partition (Windows/Linux)
/dev/sda8 930,902,016 934,809,599 3,907,584 Swap partition (Linux)
Drive: sdb _____________________________________________________________________
Disk /dev/sdb: 24.0 GB, 24015495168 bytes, 46905264 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Partition Boot Start Sector End Sector # of Sectors Id System
/dev/sdb1 1 4,294,967,295 4,294,967,295 ee GPT
/dev/sdb1 ends after the last sector of /dev/sdb
GUID Partition Table detected.
Partition Start Sector End Sector # of Sectors System
/dev/sdb1 8,392,704 46,903,295 38,510,592 -
/dev/sdb2 2,048 8,390,655 8,388,608 -
"blkid" output: ________________________________________________________________
Device UUID TYPE LABEL
/dev/sda1 90FA-5332 vfat SYSTEM
/dev/sda2 ECE43E9AE43E674C ntfs Recovery
/dev/sda3
/dev/sda4 DE4241E84241C5CD ntfs OS
/dev/sda5 B05448EC5448B6BE ntfs DATA
/dev/sda6 B8D84520D844DDEE ntfs Restore
/dev/sda7 0d63036d-b624-4596-a296-1db457c068d5 ext4 ROOT
/dev/sda8 bcaa2c5f-150d-47c9-9a58-9a7b7ec7bed2 swap
/dev/sdb1
/dev/sdb2 BA5E-7431 vfat INTELRST
================================ Mount points: =================================
Device Mount_Point Type Options
/dev/sda1 /boot/efi vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/sda4 /mnt/windows fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096)
/dev/sda5 /mnt/data fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096)
/dev/sda7 / ext4 (rw,relatime,commit=600,data=ordered)
=========================== sda7/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 ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
load_env
fi
set default="0"
if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi
export menuentry_id_option
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 load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_gpt
insmod ext2
set root='hd0,gpt7'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt7 --hint-efi=hd0,gpt7 --hint-baremetal=ahci0,gpt7 0d63036d-b624-4596-a296-1db457c068d5
else
search --no-floppy --fs-uuid --set=root 0d63036d-b624-4596-a296-1db457c068d5
fi
font="/usr/share/grub/unicode.pf2"
fi
if loadfont $font ; then
set gfxmode=auto
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=en_US
insmod gettext
fi
terminal_input console
terminal_output gfxterm
set timeout=5
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch Linux, with Linux core repo kernel' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-core repo kernel-true-0d63036d-b624-4596-a296-1db457c068d5' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
set root='hd0,gpt7'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt7 --hint-efi=hd0,gpt7 --hint-baremetal=ahci0,gpt7 0d63036d-b624-4596-a296-1db457c068d5
else
search --no-floppy --fs-uuid --set=root 0d63036d-b624-4596-a296-1db457c068d5
fi
echo 'Loading Linux core repo kernel ...'
linux /boot/vmlinuz-linux root=UUID=0d63036d-b624-4596-a296-1db457c068d5 ro quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-linux.img
menuentry 'Arch Linux, with Linux core repo kernel (Fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-core repo kernel-fallback-0d63036d-b624-4596-a296-1db457c068d5' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
set root='hd0,gpt7'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt7 --hint-efi=hd0,gpt7 --hint-baremetal=ahci0,gpt7 0d63036d-b624-4596-a296-1db457c068d5
else
search --no-floppy --fs-uuid --set=root 0d63036d-b624-4596-a296-1db457c068d5
fi
echo 'Loading Linux core repo kernel ...'
linux /boot/vmlinuz-linux root=UUID=0d63036d-b624-4596-a296-1db457c068d5 ro quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-linux-fallback.img
### 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+ ###
### 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 $menuentry_id_option 'osprober-chain-ECE43E9AE43E674C' {
insmod part_gpt
insmod ntfs
set root='hd0,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 ECE43E9AE43E674C
else
search --no-floppy --fs-uuid --set=root ECE43E9AE43E674C
fi
drivemap -s (hd0) ${root}
chainloader +1
menuentry 'Windows 8 (loader) (on /dev/sda4)' --class windows --class os $menuentry_id_option 'osprober-chain-DE4241E84241C5CD' {
insmod part_gpt
insmod ntfs
set root='hd0,gpt4'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt4 --hint-efi=hd0,gpt4 --hint-baremetal=ahci0,gpt4 DE4241E84241C5CD
else
search --no-floppy --fs-uuid --set=root DE4241E84241C5CD
fi
drivemap -s (hd0) ${root}
chainloader +1
### END /etc/grub.d/30_os-prober ###
### 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.
menuentry "Windows 8" {
insmod part_gpt
insmod fat
insmod search_fs_uuid
insmod chain
search --no-floppy --fs--uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1 90FA-5332
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
menuentry 'Windows 82' --class windows --class os $menuentry_id_option 'osprober-chain-ECE43E9AE43E674C' {
insmod part_gpt
insmod fat
insmod search_fs_uuid
insmod chain
search --no-floppy --fs--uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1 90FA-5332
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
### END /etc/grub.d/40_custom ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
=============================== sda7/etc/fstab: ================================
# /etc/fstab: static file system information
# <file system> <dir> <type> <options> <dump> <pass>
# /dev/sda7 LABEL=ROOT
UUID=0d63036d-b624-4596-a296-1db457c068d5 / ext4 rw,relatime,data=ordered 0 1
# /dev/sda1 LABEL=SYSTEM
UUID=90FA-5332 /boot/efi vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 2
LABEL=DATA /mnt/data ntfs-3g uid=sighol,gid=users,dmask=022,fmask=133 0 0
LABEL=OS /mnt/windows ntfs-3g uid=sighol,gid=users,dmask=022,fmask=133 0 0
=================== sda7: Location of files loaded by Grub: ====================
GiB - GB File Fragment(s)
======================== Unknown MBRs/Boot Sectors/etc: ========================
Unknown GPT Partiton Type
5850cbb887c11947baf0379ca2d4c97e
Unknown GPT Partiton Type
dee2bfd3af3ddf11ba40e3a556d89593
Unknown BootLoader on sda1
00000000 eb 58 90 4d 53 44 4f 53 35 2e 30 00 02 08 5e 1b |.X.MSDOS5.0...^.|
00000010 02 00 00 00 00 f8 00 00 3f 00 ff 00 00 08 00 00 |........?.......|
00000020 00 60 09 00 51 02 00 00 00 00 00 00 02 00 00 00 |.`..Q...........|
00000030 01 00 06 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000040 80 01 29 32 53 fa 90 4e 4f 20 4e 41 4d 45 20 20 |..)2S..NO NAME |
00000050 20 20 46 41 54 33 32 20 20 20 33 c9 8e d1 bc f4 | FAT32 3.....|
00000060 7b 8e c1 8e d9 bd 00 7c 88 56 40 88 4e 02 8a 56 |{......|[email protected]|
00000070 40 b4 41 bb aa 55 cd 13 72 10 81 fb 55 aa 75 0a |@.A..U..r...U.u.|
00000080 f6 c1 01 74 05 fe 46 02 eb 2d 8a 56 40 b4 08 cd |...t..F..-.V@...|
00000090 13 73 05 b9 ff ff 8a f1 66 0f b6 c6 40 66 0f b6 |.s......f...@f..|
000000a0 d1 80 e2 3f f7 e2 86 cd c0 ed 06 41 66 0f b7 c9 |...?.......Af...|
000000b0 66 f7 e1 66 89 46 f8 83 7e 16 00 75 39 83 7e 2a |f..f.F..~..u9.~*|
000000c0 00 77 33 66 8b 46 1c 66 83 c0 0c bb 00 80 b9 01 |.w3f.F.f........|
000000d0 00 e8 2c 00 e9 a8 03 a1 f8 7d 80 c4 7c 8b f0 ac |..,......}..|...|
000000e0 84 c0 74 17 3c ff 74 09 b4 0e bb 07 00 cd 10 eb |..t.<.t.........|
000000f0 ee a1 fa 7d eb e4 a1 7d 80 eb df 98 cd 16 cd 19 |...}...}........|
00000100 66 60 80 7e 02 00 0f 84 20 00 66 6a 00 66 50 06 |f`.~.... .fj.fP.|
00000110 53 66 68 10 00 01 00 b4 42 8a 56 40 8b f4 cd 13 |Sfh.....B.V@....|
00000120 66 58 66 58 66 58 66 58 eb 33 66 3b 46 f8 72 03 |fXfXfXfX.3f;F.r.|
00000130 f9 eb 2a 66 33 d2 66 0f b7 4e 18 66 f7 f1 fe c2 |..*f3.f..N.f....|
00000140 8a ca 66 8b d0 66 c1 ea 10 f7 76 1a 86 d6 8a 56 |..f..f....v....V|
00000150 40 8a e8 c0 e4 06 0a cc b8 01 02 cd 13 66 61 0f |@............fa.|
00000160 82 74 ff 81 c3 00 02 66 40 49 75 94 c3 42 4f 4f |[email protected]|
00000170 54 4d 47 52 20 20 20 20 00 00 00 00 00 00 00 00 |TMGR ........|
00000180 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000001a0 00 00 00 00 00 00 00 00 00 00 00 00 0d 0a 44 69 |..............Di|
000001b0 73 6b 20 65 72 72 6f 72 ff 0d 0a 50 72 65 73 73 |sk error...Press|
000001c0 20 61 6e 79 20 6b 65 79 20 74 6f 20 72 65 73 74 | any key to rest|
000001d0 61 72 74 0d 0a 00 00 00 00 00 00 00 00 00 00 00 |art.............|
000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000001f0 00 00 00 00 00 00 00 00 ac 01 b9 01 00 00 55 aa |..............U.|
00000200
Unknown BootLoader on sdb2
00000000 eb 58 90 4d 53 44 4f 53 35 2e 30 00 02 08 2e 20 |.X.MSDOS5.0.... |
00000010 02 00 00 00 00 f8 00 00 3f 00 ff 00 00 08 00 00 |........?.......|
00000020 00 00 80 00 e9 1f 00 00 00 00 00 00 02 00 00 00 |................|
00000030 01 00 06 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000040 80 00 29 31 74 5e ba 4e 4f 20 4e 41 4d 45 20 20 |..)1t^.NO NAME |
00000050 20 20 46 41 54 33 32 20 20 20 33 c9 8e d1 bc f4 | FAT32 3.....|
00000060 7b 8e c1 8e d9 bd 00 7c 88 56 40 88 4e 02 8a 56 |{......|[email protected]|
00000070 40 b4 41 bb aa 55 cd 13 72 10 81 fb 55 aa 75 0a |@.A..U..r...U.u.|
00000080 f6 c1 01 74 05 fe 46 02 eb 2d 8a 56 40 b4 08 cd |...t..F..-.V@...|
00000090 13 73 05 b9 ff ff 8a f1 66 0f b6 c6 40 66 0f b6 |.s......f...@f..|
000000a0 d1 80 e2 3f f7 e2 86 cd c0 ed 06 41 66 0f b7 c9 |...?.......Af...|
000000b0 66 f7 e1 66 89 46 f8 83 7e 16 00 75 39 83 7e 2a |f..f.F..~..u9.~*|
000000c0 00 77 33 66 8b 46 1c 66 83 c0 0c bb 00 80 b9 01 |.w3f.F.f........|
000000d0 00 e8 2c 00 e9 a8 03 a1 f8 7d 80 c4 7c 8b f0 ac |..,......}..|...|
000000e0 84 c0 74 17 3c ff 74 09 b4 0e bb 07 00 cd 10 eb |..t.<.t.........|
000000f0 ee a1 fa 7d eb e4 a1 7d 80 eb df 98 cd 16 cd 19 |...}...}........|
00000100 66 60 80 7e 02 00 0f 84 20 00 66 6a 00 66 50 06 |f`.~.... .fj.fP.|
00000110 53 66 68 10 00 01 00 b4 42 8a 56 40 8b f4 cd 13 |Sfh.....B.V@....|
00000120 66 58 66 58 66 58 66 58 eb 33 66 3b 46 f8 72 03 |fXfXfXfX.3f;F.r.|
00000130 f9 eb 2a 66 33 d2 66 0f b7 4e 18 66 f7 f1 fe c2 |..*f3.f..N.f....|
00000140 8a ca 66 8b d0 66 c1 ea 10 f7 76 1a 86 d6 8a 56 |..f..f....v....V|
00000150 40 8a e8 c0 e4 06 0a cc b8 01 02 cd 13 66 61 0f |@............fa.|
00000160 82 74 ff 81 c3 00 02 66 40 49 75 94 c3 42 4f 4f |[email protected]|
00000170 54 4d 47 52 20 20 20 20 00 00 00 00 00 00 00 00 |TMGR ........|
00000180 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000001a0 00 00 00 00 00 00 00 00 00 00 00 00 0d 0a 44 69 |..............Di|
000001b0 73 6b 20 65 72 72 6f 72 ff 0d 0a 50 72 65 73 73 |sk error...Press|
000001c0 20 61 6e 79 20 6b 65 79 20 74 6f 20 72 65 73 74 | any key to rest|
000001d0 61 72 74 0d 0a 00 00 00 00 00 00 00 00 00 00 00 |art.............|
000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000001f0 00 00 00 00 00 00 00 00 ac 01 b9 01 00 00 55 aa |..............U.|
00000200
========= Devices which don't seem to have a corresponding hard drive: =========
sdc {
=============================== StdErr Messages: ===============================
cat: /tmp/BootInfo-wSbit3X4/Tmp_Log: No such file or directory
/dev/sdc: open failed: No medium found
No volume groups found
mdadm: No arrays found in config file or automatically
EDIT:
I gave up trying to make grub work, so I uninstalled grub and deleted all the grub files I could find.
# pacrem grub-efi-x86_64
# rm -fr /boot/grub
That last one I came to regret later on. So I installed rEFInd using the archlinux beginners guide. When I then tried to boot into windows It told me that /boot/grub/x86_64-efi/normal.mod was not found. I then reinstalled grub-efi-x86_64 and copied /usr/lib/grub/x86_64 to /boot/grub. Now everything works fine.
Last edited by sighol (2013-06-08 21:47:49)sighol wrote:However, it's not very important for me to use grub, so if booting into windows
8 is easier using efistub, I will try that.
The EFI stub loader is a Linux-only boot loader; however, it is possible to use the EFI stub loader in conjunction with a separate boot manager, such as rEFInd or gummiboot. In such a configuration, you'd use the boot manager to select the OS to boot (Windows or Linux, and possibly the specific Linux kernel), and the boot loader (the Windows loader or the EFI stub loader built into a specific kernel) will then take over booting the OS. In Arch, this is often easier to configure than is GRUB, since GRUB is very complex and its automated tools to help with setting things up often get it wrong.
This is the first error I recieved when I tried to boot windows.
error: can't find command `drivemap'.
error: invalid EFI file path.
Press any key to continue...
The "drivemap" command in GRUB is generally used when booting a BIOS-mode boot loader, and in fact your "Windows Recovery Environment (loader) (on /dev/sda2)" and "Windows 8 (loader) (on /dev/sda4)" GRUB entries are both built as for BIOS-mode Windows installations -- but the fact that your disks both use GPT means that Windows won't boot in BIOS mode on your computer. (This is one of the many things that the GRUB setup scripts can get wrong.)
Then I tried to follow this post
https://bbs.archlinux.org/viewtopic.php?id=150183 and made a new boot
entry "Windows 82". And I got a new error:
error: unspecified search type.
error: file '/EFI/Microsoft/Boot/bootmgfw.efi' not found
Press any key to continue...
Both your "Windows 8" and "Windows 82" entries refer to an EFI boot loader file called EFI/Microsoft/Boot/bootmgfw.efi on your EFI System Partition (ESP). This should be correct, but your Boot Info Script output doesn't show any evidence of such a file. Sometimes Boot Info Script misses such things, so you may want to check it just to be sure. Your ESP is /dev/sda1, and it looks like it's being mounted at /boot/efi by default, so check for the /boot/efi/EFI/Microsoft directory tree, and for /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi in particular. If that file isn't present, then something is wrong -- perhaps you mistakenly erased the ESP when you installed Linux, thus wiping out the Windows boot loader; or perhaps the file was accidentally deleted somewhere along the way. (Note that on FAT, which the ESP uses, case is irrelevant, and in fact case varies between the filenames reported by Boot Info Script and what's recorded in your configuration files.)
You do have another boot loader file that may be a duplicate of the Windows boot loader: EFI/BOOT/bkpbootx64.efi. This filename is generally created by Ubuntu's "Boot Repair" tool, which IMHO can do as much harm as good, especially on a system that's not booting Ubuntu. If you ran this tool, though, it's conceivable that bkpbootx64.efi is a copy of the Windows boot loader, so copying it to EFI/Microsoft/Boot/bootmgfw.efi might get things working. OTOH, the Windows boot loader relies on other files to do its job, so if they're not present, copying the Windows boot loader to its original location won't be sufficient.
If you can't get things working based on the preceding suggestions, I recommend you run a Windows repair tool. These are accessible from a Windows recovery disc. Such disc images are readily available on the Internet, but I don't happen to have any links handy. Try Microsoft's own site; images obtained from random third-party sites might contain malware. Once you've done this, chances are the computer will boot directly into Windows. You'll then need to either restore GRUB as the default boot loader or install another boot loader or boot manager. You can use the Windows "bcdedit" command to do the former, as in:
bcdedit /set {bootmgr} path \EFI\arch-grub\grubx64.efi
You'll need to type this from an Administrator Command Prompt window. -
Grub cannot detect Windows 8 partition (Yields error)
Hi! I have installed Archlinux in my Samsung ATIV Book 4.
sudo blkid
yields,
/dev/sda2: LABEL="Recovery" UUID="648265F58265CBDC" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="594f6bb6-b7f3-4663-8f77-f9473da45702"
/dev/sda5: UUID="30D66A21D669E814" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="df174719-57b3-4d9b-982c-536f33faac55"
/dev/sda8: LABEL="Metanoia" UUID="1c886c4c-d6f4-4a9f-8f42-082abb95dccd" TYPE="xfs" PARTUUID="8b16bd95-1858-4395-a92a-69817e318469"
/dev/sda1: PARTLABEL="Basic data partition" PARTUUID="067cfb82-ff81-4398-9b66-09821a442c0f"
/dev/sda3: UUID="7467-9968" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="ba5109ac-f01c-4838-9334-0ef9c667cb2f"
/dev/sda4: PARTLABEL="Microsoft reserved partition" PARTUUID="1de2e683-b553-4bba-99b9-b67350177d3d"
/dev/sda6: UUID="b1554842-1ae8-40bc-8422-abe9a412ce95" TYPE="ext4" PARTLABEL="Anoia" PARTUUID="19a1c96d-f1ed-4d43-ba39-b7227503d3cf"
/dev/sda7: UUID="2d51872f-57af-4523-bd9a-c42b2f25eeec" TYPE="jfs" PARTLABEL="Pronoia" PARTUUID="704783d2-0630-4297-83fa-da9daef22dfc"
I have disabled secure/fast boot. Have installed dosfstools, mtools, and ntfs-3g.
My fstab is
UUID=b1554842-1ae8-40bc-8422-abe9a412ce95 / ext4 rw,relatime,data=ordered 0 1
# /dev/sda7
UUID=2d51872f-57af-4523-bd9a-c42b2f25eeec /home jfs rw,relatime 0 2
# /dev/sda3
UUID=7467-9968 /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 2
bootmgfw.efi is at /boot/EFI/Microsoft/Boot/bootmgfw.efi
I have installed both archlinux and Windows in UEFI-GPT mode.
When I followed Wiki instructions, and tried to regenerate grub, I receive
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-linux
Found initramfs image: /boot/initramfs-linux.img
Found fallback initramfs image: /boot/initramfs-linux-fallback.img
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/initramfs-linux.img
No volume groups found
Found Windows Boot Manager on /dev/sda3@/EFI/Microsoft/Boot/bootmgfw.efi
error: out of memory.
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error at line 216
Syntax errors are detected in generated GRUB config file.
Ensure that there are no errors in /etc/default/grub
and /etc/grub.d/* files or please file a bug report with
/boot/grub/grub.cfg.new file attached.
done
What should I do to dual boot with Windows?
My /etc/grub.d/40-custom file is
#!/bin/sh
exec tail -n +3 $0
# 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.
if [ "${grub_platform}" == "efi" ]; then
menuentry "Microsoft Windows Vista/7/8/8.1 UEFI-GPT" {
insmod part_gpt
insmod fat
insmod search_fs_uuid
insmod chain
search --fs-uuid --set=root --hint-bios=hd0,gpt3 --hint-efi=hd0,gpt3 --hint-baremetal=ahci0,gpt3 7467-9968
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
fi
/boot/grub/grub.cfg is this
When I select give Windows the highest priority, I receive a grub error. (When I manually try to load Windows from UEFI shell using fs0:\EFI\Microsoft\Boot\bootmgfw.efi or bootx64.efi, I receive "error: file '/boot/grub/x86_64-efi/normal.mod' not found. Entering rescue mode...
grub rescue >")
I know I the Windows 8 bootloader is there because I can boot into Windows from Grub if I install Ubuntu and run boot-repair.
Tried this as well but nothing changes.
Here is my /etc/default/grub
Last edited by celebrimbor (2014-04-17 12:10:27)Thanks Visruth. I managed to get the Windows 8.1 up and running without the the recovery partition.
On another topic, on the previous Windows 8.1 system. (before I deleted and reinstalled it, I downloaded recovery to a usb flash drive. THe RECOVERYflash drive contains 3 foldes named boot, efi and sources and also two files in the root diectory of the RECOVERYusb flash drive named bootmgr and bootmgr.efi. How would I use these files and folders, (for future reference)? -
Arch & Windows 8 Dual Boot -- Windows Boot Loader loads grub-rescue
Arch works fine,but as it always happens Windows boot went down. Both OS are EFI.
Note that boot secure and fast boot were disabled for Windows 8.
I used os-prober, but did not fix anything; so, I removed it. I tried to hack things out using boot-repair from Ubuntu, but it requires a repository, grub-efi, from Ubuntu that Arch doesn't have.
I am trying to modify files in grub.d and grub.cfg and hopefully fix something.
Exact description:
- archgrub loads and shows 3 entries. Two for Arch that load the sys succesfully and one for Windows 8 that fails.
- When I try to execute Windows from grub, it brings me to a grub rescue>
and shows error /boot/grub/x86_64-efi/normal.mod not found
As far as I am concerned this .mod is from Linux, so I don't know why it is being called into Windows loading procedures.
lsblk returns:
[jav@localhost ~]$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 931.5G 0 disk
|-sda1 8:1 0 1000M 0 part
|-sda2 8:2 0 260M 0 part
|-sda3 8:3 0 1000M 0 part
|-sda4 8:4 0 128M 0 part
|-sda5 8:5 0 605.3G 0 part
|-sda6 8:6 0 5.4G 0 part /boot/efi
|-sda7 8:7 0 25G 0 part
|-sda8 8:8 0 20G 0 part
|-sda9 8:9 0 244.1G 0 part /
`-sda10 8:10 0 29.3G 0 part
sr0 11:0 1 1024M 0 rom
Here's the output of fdisk. Another weird thing is that sometimes ubuntu would show on my terminal. See the first line below, "jav@ubuntu"?!
[jav@ubuntu ~]$ sudo fdisk -l
[sudo] password for jav:
Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: [i deleted this]
Device Start End Size Type
/dev/sda1 2048 2050047 1000M Windows recovery environment
/dev/sda2 2050048 2582527 260M EFI System
/dev/sda3 2582528 4630527 1000M unknown
/dev/sda4 4630528 4892671 128M Microsoft reserved
/dev/sda5 4892672 1274335231 605.3G Microsoft basic data
/dev/sda6 1847777280 1859151871 5.4G EFI System
/dev/sda7 1859151872 1911580671 25G Microsoft basic data
/dev/sda8 1911580672 1953523711 20G Windows recovery environment
/dev/sda9 1335775232 1847777279 244.1G Linux filesystem
/dev/sda10 1274335232 1335775231 29.3G Microsoft basic data
And, bootinfoscript output:
Boot Info Script 0.61 [1 April 2012]
============================= Boot Info Summary: ===============================
=> No boot loader is installed in the MBR of /dev/sda.
sda1: __________________________________________________________________________
File system: ntfs
Boot sector type: Windows Vista/7: NTFS
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files:
sda2: __________________________________________________________________________
File system: vfat
Boot sector type: Windows 7: FAT32
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files: /efi/Boot/bkpbootx64.efi /efi/Boot/bootx64.efi
/efi/ubuntu/grubx64.efi
sda3: __________________________________________________________________________
File system: vfat
Boot sector type: Windows 7: FAT32
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files: /efi/Boot/bkpbootx64.efi /efi/Boot/bootx64.efi
/efi/ubuntu/grubx64.efi /bootmgr /boot/bcd
sda4: __________________________________________________________________________
File system:
Boot sector type: -
Boot sector info:
Mounting failed: mount: unknown filesystem type ''
sda5: __________________________________________________________________________
File system: ntfs
Boot sector type: Windows Vista/7: NTFS
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files: /bootmgr /Boot/BCD /Windows/System32/winload.exe
sda6: __________________________________________________________________________
File system: vfat
Boot sector type: SYSLINUX 6.02 ... :..(:,:0:4:8:....D:H:L:[.T:[.\:`:d:[.l:p:t:x:|:.:.:.:.:.:.:.:.....................
Boot sector info: Syslinux looks at sector 99102 of /dev/sda6 for its
second stage. SYSLINUX is installed in the /syslinux
directory. No errors found in the Boot Parameter Block.
Operating System:
Boot files: /grub/grub.cfg /syslinux/syslinux.cfg
/syslinux/ldlinux.sys
sda7: __________________________________________________________________________
File system: ntfs
Boot sector type: Windows Vista/7: NTFS
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files:
sda8: __________________________________________________________________________
File system: ntfs
Boot sector type: Windows Vista/7: NTFS
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files:
sda9: __________________________________________________________________________
File system: ext4
Boot sector type: -
Boot sector info:
Operating System: Arch Linux ()
Boot files: /etc/fstab
sda10: _________________________________________________________________________
File system: ext4
Boot sector type: -
Boot sector info:
Operating System:
Boot files:
============================ Drive/Partition Info: =============================
Drive: sda _____________________________________________________________________
Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Partition Boot Start Sector End Sector # of Sectors Id System
/dev/sda1 1 1,953,525,167 1,953,525,167 ee GPT
GUID Partition Table detected.
Partition Start Sector End Sector # of Sectors System
/dev/sda1 2,048 2,050,047 2,048,000 Windows Recovery Environment (Windows)
/dev/sda2 2,050,048 2,582,527 532,480 EFI System partition
/dev/sda3 2,582,528 4,630,527 2,048,000 -
/dev/sda4 4,630,528 4,892,671 262,144 Microsoft Reserved Partition (Windows)
/dev/sda5 4,892,672 1,274,335,231 1,269,442,560 Data partition (Windows/Linux)
/dev/sda6 1,847,777,280 1,859,151,871 11,374,592 EFI System partition
/dev/sda7 1,859,151,872 1,911,580,671 52,428,800 Data partition (Windows/Linux)
/dev/sda8 1,911,580,672 1,953,523,711 41,943,040 Windows Recovery Environment (Windows)
/dev/sda9 1,335,775,232 1,847,777,279 512,002,048 Data partition (Linux)
/dev/sda10 1,274,335,232 1,335,775,231 61,440,000 Data partition (Windows/Linux)
"blkid" output: ________________________________________________________________
Device UUID TYPE LABEL
/dev/sda1 CE62D9F062D9DCF1 ntfs WINRE_DRV
/dev/sda10 150a8788-6049-45ed-85af-ded92a2c0801 ext4
/dev/sda2 16DC-8816 vfat SYSTEM_DRV
/dev/sda3 7CDD-0403 vfat LRS_ESP
/dev/sda4
/dev/sda5 40E4E0CFE4E0C7EC ntfs Windows8_OS
/dev/sda6 9C3F-2A9E vfat
/dev/sda7 7240E43740E40427 ntfs LENOVO
/dev/sda8 422CE5EA2CE5D945 ntfs PBR_DRV
/dev/sda9 1a765403-f251-43d8-8edf-c191475d3837 ext4
================================ Mount points: =================================
Device Mount_Point Type Options
/dev/sda6 /boot vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/sda6 /boot/efi vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/sda9 / ext4 (rw,relatime,data=ordered)
============================= sda6/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 ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
load_env
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="0"
fi
if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi
export menuentry_id_option
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 load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_gpt
insmod ext2
set root='hd0,gpt9'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt9 --hint-efi=hd0,gpt9 --hint-baremetal=ahci0,gpt9 1a765403-f251-43d8-8edf-c191475d3837
else
search --no-floppy --fs-uuid --set=root 1a765403-f251-43d8-8edf-c191475d3837
fi
font="/usr/share/grub/unicode.pf2"
fi
if loadfont $font ; then
set gfxmode=auto
load_video
insmod gfxterm
fi
terminal_input console
terminal_output gfxterm
set timeout=5
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch Linux, with Linux core repo kernel' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-core repo kernel-true-1a765403-f251-43d8-8edf-c191475d3837' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod fat
set root='hd0,gpt6'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt6 --hint-efi=hd0,gpt6 --hint-baremetal=ahci0,gpt6 9C3F-2A9E
else
search --no-floppy --fs-uuid --set=root 9C3F-2A9E
fi
echo 'Loading Linux core repo kernel ...'
linux /vmlinuz-linux root=UUID=1a765403-f251-43d8-8edf-c191475d3837 rw quiet
echo 'Loading initial ramdisk ...'
initrd /initramfs-linux.img
menuentry 'Arch Linux, with Linux core repo kernel (Fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-core repo kernel-fallback-1a765403-f251-43d8-8edf-c191475d3837' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod fat
set root='hd0,gpt6'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt6 --hint-efi=hd0,gpt6 --hint-baremetal=ahci0,gpt6 9C3F-2A9E
else
search --no-floppy --fs-uuid --set=root 9C3F-2A9E
fi
echo 'Loading Linux core repo kernel ...'
linux /vmlinuz-linux root=UUID=1a765403-f251-43d8-8edf-c191475d3837 rw quiet
echo 'Loading initial ramdisk ...'
initrd /initramfs-linux-fallback.img
### END /etc/grub.d/10_linux ###
## Attempt at fixing grub
# insmod fat
# set root='hd0,gpt6'
### BEGIN /etc/grub.d/30_os-prober ###
#menuentry 'Windows Boot Manager (on /dev/sda2)' --class windows --class os $menuentry_id_option 'osprober-efi-16DC-8816' {
# insmod part_gpt
# insmod fat
# set root='hd0,gpt2'
# if [ x$feature_platform_search_hint = xy ]; then
# search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 16DC-8816
# else
# search --no-floppy --fs-uuid --set=root 16DC-8816
# fi
# chainloader /EFI/Microsoft/Boot/bootmgfw.efi
menuentry "Windows 8 UEFI" {
set root='(hd0,gpt2)'
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
### END /etc/grub.d/30_os-prober ###
### 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 ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
### BEGIN /etc/grub.d/60_memtest86+ ###
### END /etc/grub.d/60_memtest86+ ###
========================= sda6/syslinux/syslinux.cfg: ==========================
# Config file for Syslinux -
# /boot/syslinux/syslinux.cfg
# Comboot modules:
# * menu.c32 - provides a text menu
# * vesamenu.c32 - provides a graphical menu
# * chain.c32 - chainload MBRs, partition boot sectors, Windows bootloaders
# * hdt.c32 - hardware detection tool
# * reboot.c32 - reboots the system
# To Use: Copy the respective files from /usr/lib/syslinux to /boot/syslinux.
# If /usr and /boot are on the same file system, symlink the files instead
# of copying them.
# If you do not use a menu, a 'boot:' prompt will be shown and the system
# will boot automatically after 5 seconds.
# Please review the wiki: https://wiki.archlinux.org/index.php/Syslinux
# The wiki provides further configuration examples
DEFAULT arch
PROMPT 0 # Set to 1 if you always want to display the boot: prompt
TIMEOUT 50
# You can create syslinux keymaps with the keytab-lilo tool
#KBDMAP de.ktl
# Menu Configuration
# Either menu.c32 or vesamenu32.c32 must be copied to /boot/syslinux
UI menu.c32
#UI vesamenu.c32
# Refer to http://syslinux.zytor.com/wiki/index.php/Doc/menu
MENU TITLE Arch Linux
#MENU BACKGROUND splash.png
MENU COLOR border 30;44 #40ffffff #a0000000 std
MENU COLOR title 1;36;44 #9033ccff #a0000000 std
MENU COLOR sel 7;37;40 #e0ffffff #20ffffff all
MENU COLOR unsel 37;44 #50ffffff #a0000000 std
MENU COLOR help 37;40 #c0ffffff #a0000000 std
MENU COLOR timeout_msg 37;40 #80ffffff #00000000 std
MENU COLOR timeout 1;37;40 #c0ffffff #00000000 std
MENU COLOR msg07 37;40 #90ffffff #a0000000 std
MENU COLOR tabmsg 31;40 #30ffffff #00000000 std
# boot sections follow
# TIP: If you want a 1024x768 framebuffer, add "vga=773" to your kernel line.
LABEL arch
MENU LABEL Arch Linux
LINUX ../vmlinuz-linux
APPEND root=/dev/sda3 rw
INITRD ../initramfs-linux.img
LABEL archfallback
MENU LABEL Arch Linux Fallback
LINUX ../vmlinuz-linux
APPEND root=/dev/sda3 rw
INITRD ../initramfs-linux-fallback.img
#LABEL windows
# MENU LABEL Windows
# COM32 chain.c32
# APPEND hd0 1
LABEL hdt
MENU LABEL HDT (Hardware Detection Tool)
COM32 hdt.c32
LABEL reboot
MENU LABEL Reboot
COM32 reboot.c32
LABEL poweroff
MENU LABEL Poweroff
COM32 poweroff.c32
=================== sda6: Location of files loaded by Grub: ====================
GiB - GB File Fragment(s)
================= sda6: Location of files loaded by Syslinux: ==================
GiB - GB File Fragment(s)
============== sda6: Version of COM32(R) files used by Syslinux: ===============
syslinux/cat.c32 : not a COM32/COM32R module
syslinux/chain.c32 : not a COM32/COM32R module
syslinux/cmd.c32 : not a COM32/COM32R module
syslinux/config.c32 : not a COM32/COM32R module
syslinux/cptime.c32 : not a COM32/COM32R module
syslinux/cpuid.c32 : not a COM32/COM32R module
syslinux/cpuidtest.c32 : not a COM32/COM32R module
syslinux/debug.c32 : not a COM32/COM32R module
syslinux/disk.c32 : not a COM32/COM32R module
syslinux/dmitest.c32 : not a COM32/COM32R module
syslinux/elf.c32 : not a COM32/COM32R module
syslinux/ethersel.c32 : not a COM32/COM32R module
syslinux/gfxboot.c32 : not a COM32/COM32R module
syslinux/gpxecmd.c32 : not a COM32/COM32R module
syslinux/hdt.c32 : not a COM32/COM32R module
syslinux/hexdump.c32 : not a COM32/COM32R module
syslinux/host.c32 : not a COM32/COM32R module
syslinux/ifcpu.c32 : not a COM32/COM32R module
syslinux/ifcpu64.c32 : not a COM32/COM32R module
syslinux/ifmemdsk.c32 : not a COM32/COM32R module
syslinux/ifplop.c32 : not a COM32/COM32R module
syslinux/kbdmap.c32 : not a COM32/COM32R module
syslinux/kontron_wdt.c32 : not a COM32/COM32R module
syslinux/ldlinux.c32 : not a COM32/COM32R module
syslinux/libcom32.c32 : not a COM32/COM32R module
syslinux/libgpl.c32 : not a COM32/COM32R module
syslinux/liblua.c32 : not a COM32/COM32R module
syslinux/libmenu.c32 : not a COM32/COM32R module
syslinux/libutil.c32 : not a COM32/COM32R module
syslinux/linux.c32 : not a COM32/COM32R module
syslinux/ls.c32 : not a COM32/COM32R module
syslinux/lua.c32 : not a COM32/COM32R module
syslinux/mboot.c32 : not a COM32/COM32R module
syslinux/meminfo.c32 : not a COM32/COM32R module
syslinux/menu.c32 : not a COM32/COM32R module
syslinux/pcitest.c32 : not a COM32/COM32R module
syslinux/pmload.c32 : not a COM32/COM32R module
syslinux/poweroff.c32 : not a COM32/COM32R module
syslinux/prdhcp.c32 : not a COM32/COM32R module
syslinux/pwd.c32 : not a COM32/COM32R module
syslinux/pxechn.c32 : not a COM32/COM32R module
syslinux/reboot.c32 : not a COM32/COM32R module
syslinux/rosh.c32 : not a COM32/COM32R module
syslinux/sanboot.c32 : not a COM32/COM32R module
syslinux/sdi.c32 : not a COM32/COM32R module
syslinux/sysdump.c32 : not a COM32/COM32R module
syslinux/vesainfo.c32 : not a COM32/COM32R module
syslinux/vesamenu.c32 : not a COM32/COM32R module
syslinux/vpdtest.c32 : not a COM32/COM32R module
syslinux/whichsys.c32 : not a COM32/COM32R module
syslinux/zzjson.c32 : not a COM32/COM32R module
=============================== sda9/etc/fstab: ================================
# /etc/fstab: static file system information
# <file system> <dir> <type> <options> <dump> <pass>
# /dev/sda9
UUID=1a765403-f251-43d8-8edf-c191475d3837 / ext4 rw,relatime,data=ordered 0 1
# /dev/sda6
#UUID=9C3F-2A9E /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 2
UUID=9C3F-2A9E /boot vfat defaults 0 2
UUID=9C3F-2A9E /boot/efi vfat defaults 0 1
============== sda9: Version of COM32(R) files used by Syslinux: ===============
boot/syslinux/cat.c32 : not a COM32/COM32R module
boot/syslinux/chain.c32 : not a COM32/COM32R module
boot/syslinux/cmd.c32 : not a COM32/COM32R module
boot/syslinux/config.c32 : not a COM32/COM32R module
boot/syslinux/cptime.c32 : not a COM32/COM32R module
boot/syslinux/cpuid.c32 : not a COM32/COM32R module
boot/syslinux/cpuidtest.c32 : not a COM32/COM32R module
boot/syslinux/debug.c32 : not a COM32/COM32R module
boot/syslinux/disk.c32 : not a COM32/COM32R module
boot/syslinux/dmitest.c32 : not a COM32/COM32R module
boot/syslinux/elf.c32 : not a COM32/COM32R module
boot/syslinux/ethersel.c32 : not a COM32/COM32R module
boot/syslinux/gfxboot.c32 : not a COM32/COM32R module
boot/syslinux/gpxecmd.c32 : not a COM32/COM32R module
boot/syslinux/hdt.c32 : not a COM32/COM32R module
boot/syslinux/hexdump.c32 : not a COM32/COM32R module
boot/syslinux/host.c32 : not a COM32/COM32R module
boot/syslinux/ifcpu.c32 : not a COM32/COM32R module
boot/syslinux/ifcpu64.c32 : not a COM32/COM32R module
boot/syslinux/ifmemdsk.c32 : not a COM32/COM32R module
boot/syslinux/ifplop.c32 : not a COM32/COM32R module
boot/syslinux/kbdmap.c32 : not a COM32/COM32R module
boot/syslinux/kontron_wdt.c32 : not a COM32/COM32R module
boot/syslinux/ldlinux.c32 : not a COM32/COM32R module
boot/syslinux/libcom32.c32 : not a COM32/COM32R module
boot/syslinux/libgpl.c32 : not a COM32/COM32R module
boot/syslinux/liblua.c32 : not a COM32/COM32R module
boot/syslinux/libmenu.c32 : not a COM32/COM32R module
boot/syslinux/libutil.c32 : not a COM32/COM32R module
boot/syslinux/linux.c32 : not a COM32/COM32R module
boot/syslinux/ls.c32 : not a COM32/COM32R module
boot/syslinux/lua.c32 : not a COM32/COM32R module
boot/syslinux/mboot.c32 : not a COM32/COM32R module
boot/syslinux/meminfo.c32 : not a COM32/COM32R module
boot/syslinux/menu.c32 : not a COM32/COM32R module
boot/syslinux/pcitest.c32 : not a COM32/COM32R module
boot/syslinux/pmload.c32 : not a COM32/COM32R module
boot/syslinux/poweroff.c32 : not a COM32/COM32R module
boot/syslinux/prdhcp.c32 : not a COM32/COM32R module
boot/syslinux/pwd.c32 : not a COM32/COM32R module
boot/syslinux/pxechn.c32 : not a COM32/COM32R module
boot/syslinux/reboot.c32 : not a COM32/COM32R module
boot/syslinux/rosh.c32 : not a COM32/COM32R module
boot/syslinux/sanboot.c32 : not a COM32/COM32R module
boot/syslinux/sdi.c32 : not a COM32/COM32R module
boot/syslinux/sysdump.c32 : not a COM32/COM32R module
boot/syslinux/vesainfo.c32 : not a COM32/COM32R module
boot/syslinux/vesamenu.c32 : not a COM32/COM32R module
boot/syslinux/vpdtest.c32 : not a COM32/COM32R module
boot/syslinux/whichsys.c32 : not a COM32/COM32R module
boot/syslinux/zzjson.c32 : not a COM32/COM32R module
======================== Unknown MBRs/Boot Sectors/etc: ========================
Unknown GPT Partiton Type
e7afbfbf4fa38a449a5b6213eb736c22
========= Devices which don't seem to have a corresponding hard drive: =========
sdb
=============================== StdErr Messages: ===============================
cat: /tmp/BootInfo-p9ML2Cte/Tmp_Log: No such file or directory
cat: /tmp/BootInfo-p9ML2Cte/Tmp_Log: No such file or directory
/dev/cdrom: open failed: No medium found
/dev/sdb: open failed: No medium found
No volume groups found
mdadm: No arrays found in config file or automatically
Any ideas?
Here's my 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 ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
load_env
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="0"
fi
if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi
export menuentry_id_option
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 load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_gpt
insmod ext2
set root='hd0,gpt9'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt9 --hint-efi=hd0,gpt9 --hint-baremetal=ahci0,gpt9 1a765403-f251-43d8-8edf-c191475d3837
else
search --no-floppy --fs-uuid --set=root 1a765403-f251-43d8-8edf-c191475d3837
fi
font="/usr/share/grub/unicode.pf2"
fi
if loadfont $font ; then
set gfxmode=auto
load_video
insmod gfxterm
fi
terminal_input console
terminal_output gfxterm
set timeout=5
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch Linux, with Linux core repo kernel' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-core repo kernel-true-1a765403-f251-43d8-8edf-c191475d3837' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod fat
set root='hd0,gpt6'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt6 --hint-efi=hd0,gpt6 --hint-baremetal=ahci0,gpt6 9C3F-2A9E
else
search --no-floppy --fs-uuid --set=root 9C3F-2A9E
fi
echo 'Loading Linux core repo kernel ...'
linux /vmlinuz-linux root=UUID=1a765403-f251-43d8-8edf-c191475d3837 rw quiet
echo 'Loading initial ramdisk ...'
initrd /initramfs-linux.img
menuentry 'Arch Linux, with Linux core repo kernel (Fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-core repo kernel-fallback-1a765403-f251-43d8-8edf-c191475d3837' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod fat
set root='hd0,gpt6'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt6 --hint-efi=hd0,gpt6 --hint-baremetal=ahci0,gpt6 9C3F-2A9E
else
search --no-floppy --fs-uuid --set=root 9C3F-2A9E
fi
echo 'Loading Linux core repo kernel ...'
linux /vmlinuz-linux root=UUID=1a765403-f251-43d8-8edf-c191475d3837 rw quiet
echo 'Loading initial ramdisk ...'
initrd /initramfs-linux-fallback.img
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows Boot Manager (on /dev/sda2)' --class windows --class os $menuentry_id_option 'osprober-efi-16DC-8816' {
insmod part_gpt
insmod fat
set root='hd0,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 16DC-8816
else
search --no-floppy --fs-uuid --set=root 16DC-8816
fi
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
### END /etc/grub.d/30_os-prober ###
### 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 ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
### BEGIN /etc/grub.d/60_memtest86+ ###
### END /etc/grub.d/60_memtest86+ ###
Last edited by knowNothing23 (2013-12-30 00:17:02)Hi,
New to this forum, joined today in anticipation of trying an install of AL...For whatever this may be worth:
I have an HP Pavillion desktop that came with Windows 8 (now 8.1), & has, of course, a UEFI boot system. I tried earlier to install Ubuntu Studio (which I currently run) on the same disk as Windows (/dev/sda), I made (I believe) a huge mistake in trying to install as LVM/ext4... wiped out my Windows install & made the UEFI unavailable... I had to do a complete re-install of Windows (fortunately, I did the recommended system backup, using 4 DVD's!) so then I tried a (non LVM) install on an external usb 3.0, with the Grub 2 on the external disk (great access time, & it worked fine... IMO)...
One other item: as I have been trying to find the right flavor of Linux for my main purposes, I have been trying various distros. & having to try to learn to negotiate the UEFI, secure/legacy procedures (still learning)... As I was unsure of installing rEFind... I did down load the .iso, burn it to a CD...
http://www.rodsbooks.com/refind/getting.html
& in legacy mode, found that simply putting it (rEFind CD into the CD/DVD player, which in the UEFI it is labeled something like HP/UEFI CD/DVD), & then launching it, rEFind worked for some other distros...that is, I was able to boot into my Linux distros, even bypassing Grub), as well as having the option of booting Windows. It may seem trivial that I say this (it maybe is), but I have not seen anywhere (I have scoured the internet rather well) this mentioned as a possibility (though it, of course, would not make such a good permanent solution, especially for computers like mine that have only one CD/DVD player).
HenryP -
How to setup GRUB for dual booting OS X and arch?
So I am reading the wiki, and there is a command I need to run, but for whatever reason I'm getting an error. The command is,
grub-mkstandalone -o bootx64.efi -d usr/lib/grub/x86_64-efi -O x86_64-efi -C xz boot/grub/grub.cfg
and error I'm getting is,
grub-mkstandalone: -C: (PROGRAM ERROR) Option should have been recognized!?
Google searching the error yielded 2 results
Last edited by ipatch (2014-05-22 18:35:32)Looks like the -C flag has been deprecated:
claire ~ % grub-mkstandalone --help
Usage: grub-mkstandalone [OPTION...] [OPTION] SOURCE...
Generate a standalone image (containing all modules) in the selected format
--compress[=no,xz,gz,lzo] compress GRUB files [optional]
-d, --directory=DIR use images and modules under DIR
[default=/usr/lib/grub/<platform>]
--fonts=FONTS install FONTS [default=unicode]
--install-modules=MODULES install only MODULES and their dependencies
[default=all]
-k, --pubkey=FILE embed FILE as public key for signature checking
--locale-directory=DIR use translations under DIR
[default=/usr/share/locale]
--locales=LOCALES install only LOCALES [default=all]
--modules=MODULES pre-load specified modules MODULES
--themes=THEMES install THEMES [default=starfield]
-v, --verbose print verbose messages.
--core-compress=xz|none|auto
choose the compression to use for core image
-o, --output=FILE save output in FILE [required]
-O, --format=FILE generate an image in FORMAT
available formats: i386-coreboot, i386-multiboot,
i386-pc, i386-pc-pxe, i386-pc-eltorito, i386-efi,
i386-ieee1275, i386-qemu, x86_64-efi, i386-xen,
x86_64-xen, mipsel-yeeloong-flash,
mipsel-fuloong2f-flash, mipsel-loongson-elf,
powerpc-ieee1275, sparc64-ieee1275-raw,
sparc64-ieee1275-cdcore, sparc64-ieee1275-aout,
ia64-efi, mips-arc, mipsel-arc,
mipsel-qemu_mips-elf, mips-qemu_mips-flash,
mipsel-qemu_mips-flash, mips-qemu_mips-elf,
arm-uboot, arm-efi, arm64-efi
-?, --help give this help list
--usage give a short usage message
-V, --version print program version
Mandatory or optional arguments to long options are also mandatory or optional
for any corresponding short options.
Graft point syntax (E.g. /boot/grub/grub.cfg=./grub.cfg) is accepted
Report bugs to <[email protected]>.
I couldn't find -C in the man-page either. -
[SOLVED] Splitting grub2 package as grub2-bios and grub2-efi
Hi all,
I currently maintain the grub2-efi-bzr http://aur.archlinux.org/packages.php?ID=40290 and grub2-bios-bzr http://aur.archlinux.org/packages.php?ID=41055 AUR packages. I proposed a split PKGBUILD to tpowa and pressh for grub2 package based on requests at https://bugs.archlinux.org/task/19838 and https://bugs.archlinux.org/task/20419 . The PKGBUILD creates 4 packages grub2-common, grub2-bios, grub2-efi-x86_64, grub2-efi-i386.
I need your impressions and suggestions on improving the PKGBUILD, especially in avoiding the use of multilib toolchain. Thanks in advance.
grub2-bios for Archlinux i686 and x86_64 (multilib needed in x86_64) - compiled as any in Arch64
grub2-bios for Archlinux i686 and x86_64 (multilib needed in x86_64) - compiled as any in Arch64
grub2-efi-x86_64 for Archlinux i686 and x86_64 (no need for multilib in x86_64, not possible to compile in i686) - compiled as any in Arch64
I currently use x86_64 Archlinux with gcc-multilib from the official repo. I do not have i686 linux (either Arch or any other distro) installed. My system compiles both grub2-efi-x86_64 and grub2-efi-i386 using the below PKGBUILD. I use only grub2-efi-x86_64 (or x86_64-EFI) in my system.
_grub2_rev=3040
_grub2_lua_ver=19
_grub2_gpxe_ver=12
_grub2_ntldr_ver=13
_grub2_915_ver=6
_USE_MULTILIB=1
pkgname=('grub2-common' 'grub2-bios' 'grub2-efi-i386')
pkgbase="grub2"
pkgver="1.99beta0_r${_grub2_rev}"
pkgrel=1
url="http://www.gnu.org/software/grub/"
arch=('i686' 'x86_64')
license=('GPL3')
optdepends=()
makedepends=('bdf-unifont' 'python2' 'xz' 'autogen' 'texinfo' 'help2man' 'gettext')
options=(strip docs zipman !emptydirs)
groups=('grub2')
conflicts=()
provides=()
# source=("ftp://alpha.gnu.org/gnu/grub/grub-${pkgver}.tar.gz"
source=("http://dl.dropbox.com/u/9710721/grub2_sources/grub2_r${_grub2_rev}.tar.xz"
"http://dl.dropbox.com/u/9710721/grub2_sources/grub2_extras_lua_r${_grub2_lua_ver}.tar.xz"
"http://dl.dropbox.com/u/9710721/grub2_sources/grub2_extras_gpxe_r${_grub2_gpxe_ver}.tar.xz"
"http://dl.dropbox.com/u/9710721/grub2_sources/grub2_extras_ntldr-img_r${_grub2_ntldr_ver}.tar.xz"
"http://dl.dropbox.com/u/9710721/grub2_sources/grub2_extras_915resolution_r${_grub2_915_ver}.tar.xz"
'grub2.default'
'grub.cfg.example'
'20_memtest86+'
'05_archtheme')
noextract=("grub2_extras_lua_r${_grub2_lua_ver}.tar.xz"
"grub2_extras_gpxe_r${_grub2_gpxe_ver}.tar.xz"
"grub2_extras_ntldr-img_r${_grub2_ntldr_ver}.tar.xz"
"grub2_extras_915resolution_r${_grub2_915_ver}.tar.xz")
sha256sums=('50e17683b972c0f5aab9b252af6c800bdc6068aab3654059046a435a3c5eccb6'
'4d092a8780342a0f7fb5f5f92dc3b123fb5dd583ba137357630c56d416ed3114'
'8ce1b6b89ef0e3545736477d4c4418524e32c7fb9ba40c67dcebfb84b98cde66'
'554e9d65805ac61ca9a8c7cecdf6e7d28375dc28b3984140faef0e929e1ebd5b'
'f0bd90bbbad4b07ec2053d4056f7c5252e95e97477af4206df59ec2d72d88ce0'
'9dc7834514deabba3eb3ed19d0c7d73e3ab0114b7cd8a2eb6b17e8b7a6328143'
'8128da77d8e8c86077fde561ba107756ece744ad54a16161c637ce73f836a84a'
'ba0f871ee93760d14d7f19709bb875af4a863a758776a23519ca7100a63da295'
'6628b70b857c024297af38cf519bfe7d518a122030ab5d0958677a60ddff6cdd')
# DESTARCH="i686"
DESTARCH="x86_64"
if [ "${CARCH}" = 'x86_64' ] && [ "${_USE_MULTILIB}" = '1' ]
then
makedepends=(${makedepends[@]} 'gcc-multilib' 'gcc-libs-multilib' 'lib32-glibc' 'binutils-multilib' 'libtool-multilib')
_EFIEMU="--enable-efiemu"
_CFLAGS=""
_HOST="x86_64"
if [ "${DESTARCH}" = 'i686' ]
then
_CFLAGS="-m32"
_HOST="i686"
fi
elif [ "${CARCH}" = 'x86_64' ] && [ "${_USE_MULTILIB}" = '0' ]
then
echo "This package can be built only in a i686 system or in a x86_64 system using gcc-multilib. Exiting."
exit 1
fi
if [ "${CARCH}" = 'i686' ]
then
_EFIEMU="--disable-efiemu"
if [ "${DESTARCH}" = 'x86_64' ]
then
_CFLAGS="-m32 -static"
_HOST="i686"
fi
fi
build_grub2-common_and_bios() {
rm -rf ${srcdir}/grub2_bios_${DESTARCH} || true
cp -r ${srcdir}/grub2 ${srcdir}/grub2_bios_${DESTARCH}
cd ${srcdir}/grub2_bios_${DESTARCH}
mkdir ${srcdir}/grub2_bios_${DESTARCH}/grub2-extras/
cd ${srcdir}/grub2_bios_${DESTARCH}/grub2-extras/
bsdtar xf ${srcdir}/grub2_extras_lua_r${_grub2_lua_ver}.tar.xz
bsdtar xf ${srcdir}/grub2_extras_gpxe_r${_grub2_gpxe_ver}.tar.xz
bsdtar xf ${srcdir}/grub2_extras_ntldr-img_r${_grub2_ntldr_ver}.tar.xz
bsdtar xf ${srcdir}/grub2_extras_915resolution_r${_grub2_915_ver}.tar.xz
cd ${srcdir}/grub2_bios_${DESTARCH}
export GRUB_CONTRIB=${srcdir}/grub2_bios_${DESTARCH}/grub2-extras/
## Archlinux changed default /usr/bin/python3, need to use /usr/bin/python2 instead
cp ${srcdir}/grub2_bios_${DESTARCH}/autogen.sh ${srcdir}/grub2_bios_${DESTARCH}/autogen_unmodified.sh
sed -i 's|python|python2|' ${srcdir}/grub2_bios_${DESTARCH}/autogen.sh
${srcdir}/grub2_bios_${DESTARCH}/autogen.sh
echo
mkdir ${srcdir}/grub2_bios_${DESTARCH}/BUILD_BIOS
cd ${srcdir}/grub2_bios_${DESTARCH}/BUILD_BIOS
CFLAGS="${_CFLAGS}" ${srcdir}/grub2_bios_${DESTARCH}/configure --with-platform=pc \
--host=${_HOST} \
--program-transform-name=s,grub,grub2, \
--enable-mm-debug \
${_EFIEMU} \
--enable-grub-mkfont \
--prefix=/usr \
--bindir=/bin \
--sbindir=/sbin \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--sysconfdir=/etc
echo
CFLAGS="${_CFLAGS}" make
echo
${srcdir}/grub2_bios_${DESTARCH}/BUILD_BIOS/grub-mkfont --output=${srcdir}/unifont.pf2 /usr/share/fonts/misc/unifont.bdf || true
${srcdir}/grub2_bios_${DESTARCH}/BUILD_BIOS/grub-mkfont --ascii-bitmaps --output=${srcdir}/ascii.pf2 /usr/share/fonts/misc/unifont.bdf || true
build_grub2-efi-i386() {
mkdir ${srcdir}/grub2_efi/BUILD_EFI_i386
cd ${srcdir}/grub2_efi/BUILD_EFI_i386
CFLAGS="${_CFLAGS}" ${srcdir}/grub2_efi/configure --with-platform=efi \
--target=i386 \
--host=${_HOST} \
--program-transform-name=s,grub,grub2, \
--enable-mm-debug \
--disable-efiemu \
--prefix=/usr \
--bindir=/bin \
--sbindir=/sbin \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--sysconfdir=/etc
echo
CFLAGS="${_CFLAGS}" make
echo
build_grub2-efi() {
rm -rf ${srcdir}/grub2_efi || true
cp -r ${srcdir}/grub2 ${srcdir}/grub2_efi
rm -rf ${srcdir}/grub2
cd ${srcdir}/grub2_efi
mkdir ${srcdir}/grub2_efi/grub2-extras/
cd ${srcdir}/grub2_efi/grub2-extras/
bsdtar xf ${srcdir}/grub2_extras_lua_r${_grub2_lua_ver}.tar.xz
bsdtar xf ${srcdir}/grub2_extras_gpxe_r${_grub2_gpxe_ver}.tar.xz
cd ${srcdir}/grub2_efi
export GRUB_CONTRIB=${srcdir}/grub2_efi/grub2-extras/
## Archlinux changed default /usr/bin/python3, need to use /usr/bin/python2 instead
cp ${srcdir}/grub2_efi/autogen.sh ${srcdir}/grub2_efi/autogen_unmodified.sh
sed -i 's|python|python2|' ${srcdir}/grub2_efi/autogen.sh
${srcdir}/grub2_efi/autogen.sh
echo
build_grub2-efi-i386
echo
build() {
echo
build_grub2-common_and_bios #
echo
build_grub2-efi #
echo
package_grub2-common() {
pkgdesc="The GNU GRand Unified Bootloader version 2 - Files common for all platforms"
install="grub2-common.install"
depends=('sh' 'xz' 'freetype2' 'mtools' 'dosfstools')
conflicts=('grub2')
backup=('etc/default/grub' 'etc/grub.d/40_custom')
cd ${srcdir}/grub2_bios_${DESTARCH}/BUILD_BIOS
make DESTDIR=${pkgdir} install
## install grub2-extras ntldr-img's grubinst as grub2-grubinst
install ${srcdir}/grub2_bios_${DESTARCH}/BUILD_BIOS/grub-core/grubinst ${pkgdir}/sbin/grub2-grubinst || true
## remove platform specific files
rm -rf ${pkgdir}/usr/lib/grub2/
rm -rf ${pkgdir}/usr/share/grub2/
## remove some problamatic files - may work properly in future
rm -rf ${pkgdir}/etc/bash_completion.d/
cp ${pkgdir}/sbin/grub2-install ${pkgdir}/sbin/grub2_bios-install
cp ${pkgdir}/sbin/grub2-install ${pkgdir}/sbin/grub2_efi_x86_64-install
cp ${pkgdir}/sbin/grub2-install ${pkgdir}/sbin/grub2_efi_i386-install
sed -i "s|^\(target_cpu\)=.*|\1=i386|; \
s|^\(platform\)=.*|\1=pc|" \
${pkgdir}/sbin/grub2_bios-install
sed -i "s|^\(target_cpu\)=.*|\1=x86_64|; \
s|^\(platform\)=.*|\1=efi|" \
${pkgdir}/sbin/grub2_efi_x86_64-install
sed -i "s|^\(target_cpu\)=.*|\1=i386|; \
s|^\(platform\)=.*|\1=efi|" \
${pkgdir}/sbin/grub2_efi_i386-install
## install the /etc/grub.d/ files
install ${startdir}/05_archtheme ${pkgdir}/etc/grub.d/05_archtheme
install ${startdir}/20_memtest86+ ${pkgdir}/etc/grub.d/20_memtest86+
## install the unifont files
install ${srcdir}/unifont.pf2 ${pkgdir}/etc/grub.d/unifont.pf2 || true
install ${srcdir}/ascii.pf2 ${pkgdir}/etc/grub.d/ascii.pf2 || true
## install /etc/default/grub
install -Dm644 ${srcdir}/grub2.default ${pkgdir}/etc/default/grub
## install example grub2 config file
install -Dm755 ${srcdir}/grub.cfg.example ${pkgdir}/etc/grub.d/grub.cfg.example
## rename grub.info to grub2.info
mv ${pkgdir}/usr/share/info/grub.info ${pkgdir}/usr/share/info/grub2.info || true
export CARCH="${DESTARCH}"
package_grub2-bios() {
pkgdesc="The GNU GRand Unified Bootloader version 2 - Built for PC BIOS"
arch=('any')
depends=(grub2-common=${pkgver})
replaces=('grub2')
install="grub2-bios.install"
cd ${srcdir}/grub2_bios_${DESTARCH}/BUILD_BIOS
make DESTDIR=${pkgdir} install
## remove non platform-specific files
rm -rf ${pkgdir}/bin/
rm -rf ${pkgdir}/sbin/
rm -rf ${pkgdir}/etc/
rm -rf ${pkgdir}/usr/share/info/
rm -rf ${pkgdir}/usr/share/man/
rm -rf ${pkgdir}/usr/lib/grub/
package_grub2-efi-i386() {
pkgdesc="The GNU GRand Unified Bootloader version 2 - i386 UEFI version"
arch=('any')
depends=("grub2-common=${pkgver}" 'efibootmgr-git')
replaces=('grub2-efi-x86')
install="grub2-efi.install"
cd ${srcdir}/grub2_efi/BUILD_EFI_i386
make DESTDIR=${pkgdir} install
## remove non platform-specific files
rm -rf ${pkgdir}/bin/
rm -rf ${pkgdir}/sbin/
rm -rf ${pkgdir}/etc/
rm -rf ${pkgdir}/usr/share/info/
rm -rf ${pkgdir}/usr/share/man/
rm -rf ${pkgdir}/usr/lib/grub/
sed -i "s|^\(_EFI_ARCH\)=.*|\1=i386|" ${startdir}/grub2-efi.install
Last edited by skodabenz (2011-01-30 19:36:25)The package is now in testing repo and will soon be moved to extra repo. Solved by splitting the PKGBUILDs and through direct interaction with grub2 maintainer using irc.
-
I am currently trying to dual boot Windows 8 and Arch Linux. I have Windows 8 installed on my first boot device and Arch installed as per the Beginner's Wiki to my second boot device (both SSD's, sdb and sdc, respectively).
lsblk:
sda [RAID controlled by dedicated card]
sda1 128M
sda2 3.7T
sdb
sdb1 300M
sdb2 100M
sdb3 128M
sdb4 232.4G
sdc
sdc1 500M
sdc2 20G /
sdc3 10G /var
sdc4 200G /home
sdc5 235.3G (spare)
Everything appears to be installed and configured correctly, and I have installed GRUB and gummiboot after GRUB did not work. This was partly do to me having to change some bios settings so that secure boot was disabled, or at least set to "Other OS". At an earlier point I actually wiped my /boot and re-installed Arch (which I believe only replaced missing files) and re-installed grub and re-generated the configuration file.
Now, the GRUB menu shows properly on boot with my Arch and Windows entries and I am able to boot into Arch fine. However, now when I select MS Windows, Grub tells me that it cannot find the chainload command. Is it supposed to be just 'chain', perhaps?
In my /etc/grub.d/40_custom file I added two menu entries, one for Arch Linux and one for MS Windows.
menuentry "Arch Linux" {
set root=(hd2,2)
linux /boot/vmlinuz-linux
initrd /boot/initrd.img
# This was added as per the advice at: http://unix.stackexchange.com/questions … gpt-system
menuentry "MS Windows" {
insmod part_gpt
insmod search_fs_uuid
insmod ntfs
insmod chain
search --fs-uuid 3A781C97781C544B --set=root --hint-bios=hd1,gpt4 --hint-efi=hd1,gpt4 --hint-baremetal=ahci1,gpt4
chainload (${root})/Windows/Boot/EFI/bootmgfw.efi
What could this be?
Thank you for any and all suggestions!!I'm not opposed to gummiboot, like I said it was my first choice, but as I encountered problems I took the guide advice and tried GRUB. If I can get GRUB to work and it increases my understanding, I would be all for it. I'm definitely familiar with Linux, but I don't have extensive experience with GRUB and EFI.
What is the best way to use gummiboot? Uninstall GRUB or install them side-by-side?
Here is the output of parted -l:
parted -l]http://www.hrtmn.net/Images/parted.png
And here is the output of lsblk:
parted -l]http://www.hrtmn.net/Images/lsblk.png
bootmgfw.efi:
parted -l]http://www.hrtmn.net/Images/bootmgfw.png
Moderator edit: Redacted huge images
Last edited by ewaller (2015-04-16 04:41:27) -
Can't add new GRUB entries thru /etc/grub.d/40_custom on MacBook Pro
I am using Arch Linux on my MacBook Pro. The main bootloader is rEFInd, which then loads GRUB (in EFI mode) which in turns loads Linux. Of course rEFInd can also load OS X directly, but I am experimenting because I need OS X to be loaded by GRUB: some buggy hardware requires "outb" commands before booting the OS, and loading OS X through GRUB seems like the most natural way of doing it.
I am using the automatic script in /boot/grub.d/ to generate the bootloader configuration, so I use the following commands:
grub-mkconfig > /boot/grub/grub.cfg
grub-mkstandalone -o boot.efi -d /usr/lib/grub/x86_64-efi -O x86_64-efi --compress=xz /boot/grub/grub.cfg
They generate a new configuration and to create a new EFI image, which is then copied on a blessed boot partition. I am sure that the changes I make to the configuration file are put into effect, because I can (for instance) modify the kernel parameters for the default image and see the modified entry on the GRUB menu.
Now I am trying to add a new configuration entry, the usual way would be by modifying /etc/grub.d/40_custom. I add the following lines:
menuentry 'OS X (on /dev/sda2)' {
insmod hfsplus
insmod part_gpt
set root='hd0,gpt2'
chainloader /System/Library/CoreServices/boot.efi
which are added correctly to /boot/grub/grub.cfg after I run grub-mkconfig as shown above. I also generate boot.efi as shown above, too, and I copy it on the boot partition.
However when I reboot I cannot see the new entry in the GRUB menu. Is there something I am overlooking? Is there some way of troubleshooting GRUB when it's reading the configuration file? I think it may not like the syntax of the new entry I added.
Last edited by zakk (2014-12-04 20:35:17)You should point grub-mkconfig to "your_efi_system_partition"/grub/grub.cfg instead of boot/grub/grub.cfg
-
Grub-mkstandalone with custom configuration
Hi everyone,
I am trying to install Arch Linux on a Macbook 8,2 (Intel+Ati Graphics) alongside Os X.
I was able to successfully complete the installation of Arch using that partition scheme:
sda1 hfs+ Basic Apple Efi Partition
sda2 hfs+ Os X
sda3 hfs+ Grub partition
sda4 ext2 /boot
sda5 ext4 /
sda6 ext4 /home
That setup allows me not to install Refind/Refit, and to directly Efi boot on the small Grub partition. To setup the partition I was told to use the command
grub-mkstandalone -o boot.efi -d usr/lib/grub/x86_64-efi -O x86_64-efi -C xz boot/grub/grub.cfg
and then to copy the generated "boot.efi" in the small hfs+ partition.
This method works, but I need to add those parameters to edit the grub boot menu like this:
set gfxpayload=keep
outb 0x728 1
outb 0x710 2
outb 0x740 2
outb 0x750 0
insmod gzio
linux /vmlinuz-linux root=/dev/mapper/vgroup-root cryptdevice=/dev/sda2:vgroup ro quiet radeon.modeset=0 i915.modeset=1 i915.lvds_channel_mode=2 i915.lvds_use_ssc=0 acpi_backlight=vendor libahci.ignore_sss=1
initrd /initramfs-linux.img
How can i do it?
I both attempted to edit the /etc/grub/grub.conf, where i added to the default parameters the one listed up here,
and to edit /etc/grub.d/10_linux , adding this thing in the right place
adding
echo " outb 0x728 1" | sed "s/^/$submenu_indentation/"
echo " outb 0x710 2" | sed "s/^/$submenu_indentation/"
echo " outb 0x740 2" | sed "s/^/$submenu_indentation/"
echo " outb 0x750 0" | sed "s/^/$submenu_indentation/"
echo " insmod gzio" | sed "s/^/$submenu_indentation/"
but both did not work. (That means, booting on grub does not get those things I modified)
Thanks for your help,
FilippoThanks for the welcome!
You are right! it is /etc/default/grub.conf . It was a Typo.
uname -a
Linux archbook 3.11.5-1-ARCH #1 SMP PREEMPT Mon Oct 14 08:31:43 CEST 2013 x86_64 Gnu/Linux
Im following this tutorial http://codylittlewood.com/arch-linux-on … tallation/
With a spice of http://rorygarand.com/blog/2013/6/6/arc … oot-loader
Last edited by PhilipV (2013-10-17 07:16:39) -
Installing Arch on MacBook Air - EFI issues
Hi, all.
I have a mid-2012 13" Air and I want to install Arch on it as the only OS.
Now, I've tried following guides on the wiki and in the forum, and I tried to install it with grub2-efi loader, but after numerous attempts I either got nothing, or got a system that had a big delay with the bootloader. There are two or three articles on the topic: GRUB2, MacBook guide and EFI guide, but no straightforward guide, just these three pages that crossreference each other in all the wrong places What is the best way to install Arch on a Mac?
I understand that installing rEFIt can simplify things, but I want to find a way around it, since I'll only be using one OS, and I really dislike the Qt3 looks of rEFIt.
Some articles say that LILO is simpler to setup that grub on an EFI machine - is that true?
Furthermore, some discussions here mention that I should use archboot rather than the default installation image.
So, could anyone please give me a simple list of steps?
Last edited by ilembitov (2012-11-04 00:45:48)Hi,
I'm using also Arch on a MacBook, but with rEFIt. Never tried to to remove OS X complete, because I want to have the chance to upgrade EFI and Firmware itself via Mac OS X Update.
But for a clean grub_efi installation you have to create and mount an "efi partition" and install some boot files here. Check for detailed information those 2 wiki pages:
https://wiki.archlinux.org/index.php/UEFI
https://wiki.archlinux.org/index.php/UEFI_Bootloaders
Afterwards you can start with the grub installation.
Simple Steps:
create partitions on disk
mount partitions
Install arch system ( https://wiki.archlinux.org/index.php/Beginners%27_Guide )
prepare chroot environment
jump into crhoot environment
configure system
configure grub2_efi (default files /etc/default/grub)
prepare efi partition (dir and files)
install grub2_efi
That should it be...
As I already said, never tried it without rEFIt, but its not simple, because Apple is not using a standard UEFI, so some futures won't work or will work differently. If I have some free time and money, I will try it on a second harddisk. That will be my next private project :-) -
[SOLVED]Grub-Install can't Find Kernel and/or initrd, mkinitcpio Fails
Hi all,
I have recently installed Arch on my new build (with UEFI firmware). I successfully set up xorg, alsa/pulseaudio, xfce, etc... things were looking pretty good. Then, I tried to blacklist the pcspkr in order to silence the annoying beep every time I selected "Log Out" inside xfce. I executed
mkinitcpio -p linux
and was presented with the following errors:
==> Building image from preset: 'default'
-> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
==> ERROR: specified kernel image does not exist: `/boot/vmlinuz-linux'
==> Building image from preset: 'fallback'
-> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
==> ERROR: specified kernel image does not exist: `/boot/vmlinuz-linux`
There were no such files anywhere on /boot. I tried doing
find / -name vmlinuz-linux
and nothing was found. I wasn't quite sure why that was happening, but I tried uninstalling/reinstall grub (grub-common and grub2-efi-x86_64). I installed grub to /boot using
grub-install --directory=/usr/lib/grub/x86_64-efi --target=x86_64-efi --efi-directory=/boot --bootloader-id="Arch Linux" --boot-directory=/boot --recheck --debug
and then generated /boot/grub/grub.cfg. I tried rebuilding the initramfs again but got the same error. I was tired and frustrated so I removed the old grub efi entry with
efibootmgr -b 0 -B
and then went to sleep.
I didn't have the chance to turn the computer back on until tonight... I was then presented with a grub2 shell. Since I didn't know where the kernel/initrd were located I tried
set root=(hd1,gpt1)
chainloader +1
but grub told me
error: invalid EFI file path
So that's about it. It appears that grub-mkconfig is having trouble locating the kernel/initrd so it doesn't make any entries, dropping me right into a shell. I've tried booting up with my installation USB and chrooting in and reinstalling grub again but nothing seems to work. So what I'd like to try to do is just boot up into my system and then modify add the grub boot entries entries I want... but I just can't figure out what's causing all these issues.
Sorry if I mess up any terminology... still learning the ropes here. Thanks for any input.
Last edited by cogeary (2012-09-17 05:35:51)DSpider wrote:
==> ERROR: specified kernel image does not exist: `/boot/vmlinuz-linux'
Probably because you have a separate boot partition (not just the 512 MB "UEFISYS" FAT32 partition), which you forgot to mount (in fstab).
Post your /etc/fstab.
Thank you for your reply!
However, I do not have a separate boot partition apart from the "UEFISYS" partition. Here is my fstab:
# UUID=3ec307aa-0ead-4d33-b292-42bbe783d6ee
/dev/sda2 / ext4 rw,relatime,data=ordered 0 1
# UUID=B192-6C57
/dev/sda1 /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 2
When I first looked at the fstab I saw that both of the entries repeated themselves. This was because I had even tried reformatting /boot so I had to generate a new fstab, but for some reason I used ">> /mnt/etc/fstab" rather than "> ..."
So I executed
genfstab /mnt > /mnt/etc/fstab
and reinstalled grub, but still no difference... mkinitcpio fails and I reboot to a grub shell.
Last edited by cogeary (2012-09-16 18:15:51) -
[SOLVED] Bricked computer - GRUB won't show
I'm not sure what happened, but I rebooted my computer, and now it won't show the boot loader page.
I had updated some packages, but I don't think grub was among them.
My boot setup is grub and EFI.
I booted using a recovery disk (systemrescuecd), but I don't even know where to start looking.
My initial try was to choose "boot existing installation" on the recovery disk. Unfortunately systemd reported several "failed to mount" and then hung.
parted /dev/sda print
Shows my EFI partition with the boot and esp flag.
I'm able to mount all the partitions and browse the files.
Any idea where I should start looking for the problem?
And is there a "better" rescue disk with more up-to-date software? I see grub-install on the rescue disk shows version 0.97.
Last edited by simendsjo (2015-02-18 12:20:28)jasonwryan wrote:Read pacman's log to see what was updated. Use the Arch ISO as your rescue disk.
Thanks. This is mighty strange though.. I couldn't find any package upgrades that should have modified my boot.
Reinstalling grub fixed the problem, but I don't like that I have no idea what caused the problem in the first place. -
[SOLVED] grub-install command failing for UEFI
I downloaded the 8/2013 iso and burned it with dd. I have an ASUS Rampage IV Extreme motherboard. I was booted into efi mode on both the ISO and in the chroot (the /sys/firmware/efi directory did exist).
I followed the instructions in the Beginner's Guide, but with a 512 MB EFI partition as sda1, 50 GB root as sda2, the rest of my 256 GB SSD as /home, and a 100 GB space on my HDD as /tmp. Everything was ext4 and the EFI partition was a fat32. The EFI partition was mounted on /boot of the new install, as the beginner's guide stated it should be
Everything worked until I get to the part of installing GRUB. Before installing, I again confirmed that /sys/firmware/efi existed. When booting, on the motherboard boot selection screen, it showed 2 options for my USB, one with the name of my drive and another with [UEFI] in front of the drive name. I selected the UEFI option, so I was booted into UEFI mode, and the USB's bootloader also gave options to boot into a UEFI shell instead of the standard Arch ISO bootloader I get on MBR computers (though I did not try those EFI shell options). I looked into te /sys/firmware/efi/efivars directory and it had 2 items in it
Going back to the chroot's / directory, I did the first command in the guide for installing grub (after installing grub and efibootmgr with pacman).
umount /sys/firmware/efi/efivarsk
This gave the error that the directory was not mounted
modprobe -r efivars and modprobe efivars worked correctly (or at least they didn't output any errors).
When I got to
grub-install --efi-directory=/boot --bootloader-id=arch_grub --recheck
it gave this error:
Fatal: Couldn't open either sysfs or procfs directories for accessing EFI variables.
I searched around on the interwebs and for every other person this problem was occuring because they were booted into BIOS mode instead of UEFI mode, and booting the USB into UEFI mode fixed the problem for them. However, the /sys/firmware/efi directory exists and I made sure to boot into EFI mode in the BIOS.
Are there any other reasons that this could be happening?
Also, is there really any advantage to GPT/EFI booting over GPT/BIOS booting other than a 1-2 second shorter boot time?
Last edited by subraizada3 (2013-08-23 21:10:37)You burnt it to CD?DVD, right? Not dd? Because that won't create an EFI bootable USB key, for example.
modprobe efivars never gives errors (that I've seen). The question is whether the directories are populated. It isn't enough for /sys/firmware/efi to exist. /sys/firmware/efi/vars/ should be full of a *lot* of stuff. In fact /sys/firmware/efi/efivars/ should have lots of stuff before you umount it.
Did you modprobe before arch-chroot? That's essential if the installed kernel is different from the one on the installer (which is very likely).
I think you are confused. There's no such thing as GPT/MBR booting.
GPT and MBR are 2 ways of partitioning disks. GPT has various advantages explained on the wiki page.
EFI and BIOS are 2 ways of booting.
In my personal opinion, if BIOS booting works for you, I'd stick with BIOS. EFI is buggy - why be a guinea pig if you can help it?
Also in my personal opinion, if you can only use GPT in EFI mode, it is worth the hassle to use EFI to reap the benefits of GPT.
At least, those are the decisions I made. Nothing will convince my laptop to boot BIOS mode with a GPT disk. MBR+BIOS is fine but GPT+BIOS is a non-starter. So I use GPT+EFI. On machines that don't care, I prefer BIOS+GPT.
If you are dual booting Windows, I believe BIOS+GPT may not be an option but I'm not certain of this.
Your kilometres may vary.
By the way, you almost certainly do not want a partition for /tmp unless you are extraordinarily short of RAM and even then...
Maybe you are looking for
-
I have a FormCalc script that checks to see if TextField1 == TextField 2 and if it does then set a value of 1, if they're not equal, then 0. However, the form is setting the value to 1 even though there is no entry in either field. I'm thinking I nee
-
Can we replace an old serial board with a new one found available on your site?
So.. we are using Lookout 5.0 to operate a plant, and we have a PCI SERIAL RS 232/485 ISOLATED 2 PORTS board, with the code 185726C-02 printed on that board, which is used to comunicate with some solenoids modules. I search your site for a replacemen
-
Hi! Find attached a file which stores two variables (x, y) in a file .txt every time the button "Run" is pressed. I don't know why, but in Pocket Pc it doesn't work: the file .txt is created correctly, but this file is empty. 0,3232
-
How to set user quotas on a certain filesystem
Hi It may be simple and easy question but I'm really new to this I need to know how to set user quotas on a certain file system in details I know it can be done easily in one step in Solaris ZFS but how is it done in Linux ? Thanks in Advance :)
-
Any experts on embedding a video in a page?
I have created a video that I would like to embed in my website. My goal is to have the video actually play on the page automatically and have a button to click for sound. Currently I have a link to a page explaining that a media player is required a