You are not logged in.

#1 2015-05-17 22:41:25

linux_dream
Member
Registered: 2015-05-17
Posts: 45

lnstalled Arch alongside windows 8.1 (uefi), grub doesn't show up

Hello people,
I've been following the Beginner's guide to install Arch on my laptop (HP) via the arch.iso on usb flash drive. I have windows 8.1 already installed and I'd like to install Arch alongside it, in uefi mode too.
I could follow most of the steps in the guide, installing arch, grub, ran pacstrap, installed lxde, gummiboot, efibootmgr, etc. But in the end when I reboot, grub doesn't show up and Windows 8.1 boots instead. I even used efibootmgr to display the order of booting (and seeing that Windows was in front of grub), changed the order of booting but to no avail; when rebooted, Windows booted up.

Some information: My efi partition was created by Windows so I used the same partition for Arch's uefi, namely /dev/sda2.
I've got a / partition at /dev/sda6 and a swap partition at /dev/sda7.
I've perfomed the commands

grub-install /dev/sda

but was told that it was wrong (on IRC) and thus I later installed it on the efi partition.
I generated grub.cfg twice:

grub-mkconfig -o /boot/grub/grub.conf

but I was told that this was wrong and so I also did

grub-mkconfig -o /mnt/boot/efi/grub.conf

because the efi partition was mounted at /mnt/boot/efi.

I've also created some files related to gummiboot as the Arch wiki stated to do and set Arch as default OS to boot, but that didn't seem to work.
Lastly I've also booted into the firmware and I have set to boot from usb first, then OS. (I don't see Linux/Windows choices there, only OS). And yes I disabled secure and fast boot.

P.S.:This is my first Arch installation, I come from Lubuntu/Manjaro and I bought this hardware for the purpose of learning Arch Linux (so I really, really, really want to install Arch on it).

Thanks for any help!

Last edited by linux_dream (2015-05-17 22:43:29)

Offline

#2 2015-05-18 03:46:54

JeromeDGDG
Member
Registered: 2015-05-13
Posts: 5

Re: lnstalled Arch alongside windows 8.1 (uefi), grub doesn't show up

Hello linux_dream.
First, archlinux is for boot exactly the same than other linux distributions. It mount by a boot manager first (grub for exemple).
So, first of all, you absolutly need to creat a /boot partition with some required tools (have some differents) and then, mount it on /boot. This partition need to be FAT32 with around 512MB (mine is 256MB and works fine) and be gpt/UEFI and bootable. There is specific parameters to pass to the tool at format partition time (but if you followed the wiki, all of this is ok now...).
Then...
you have to see the /boot partition you created on your BIOS. The bios, is the first thinks the computer run at boot time (before everythings). Then go inside your bios and check options around boot and see boot list (sometimes, when change config, you have to reboot again the bios for see the changes on boot list appears). Then on your boot list from BIOS, you have to see your grub /boot partition (mine is named égrub_archlinux" viewed by the boot list of my bios) and make it boot first (or just after usb and cdrom if you prefer...). If not, this grub will never been mounted and windows will start first.

Also, if you are confused with command tools on linux systems and you not sure your partition boot is not well created, you can easily used gparted gui tools (do a bootable cdrom and use it for partitions or check...).

Offline

#3 2015-05-18 08:55:07

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: lnstalled Arch alongside windows 8.1 (uefi), grub doesn't show up

linux_dream wrote:

I could follow most of the steps in the guide, installing arch, grub, ran pacstrap, installed lxde, gummiboot, efibootmgr, etc. But in the end when I reboot, grub doesn't show up and Windows 8.1 boots instead. I even used efibootmgr to display the order of booting (and seeing that Windows was in front of grub), changed the order of booting but to no avail; when rebooted, Windows booted up.

That doesn't make much sense -- you say you have "installed gummiboot" but also that "Windows was in front of grub [sic]" in your NVRAM entries -- which did you install, GRUB or gummiboot?

Also, installing a desktop environment (LXDE) is mentioned nowhere in the Beginner's Guide.

linux_dream wrote:

I've perfomed the commands

grub-install /dev/sda

The actual command you should use is:

# grub-install --target=x86_64-efi --efi-directory=$esp --bootloader-id=grub --recheck

https://wiki.archlinux.org/index.php/GR … allation_2

linux_dream wrote:

I generated grub.cfg twice:

grub-mkconfig -o /boot/grub/grub.conf

but I was told that this was wrong and so I also did

grub-mkconfig -o /mnt/boot/efi/grub.conf

because the efi partition was mounted at /mnt/boot/efi.

Again, the command should be:

# grub-mkconfig -o /boot/grub/grub.cfg

As stated in the ArchWiki page I have linked above.

Make sure you have mounted all your partitions and used `arch-chroot` before running these commands.

linux_dream wrote:

I've also created some files related to gummiboot

Please post the content of /boot/loader/loader.conf & /boot/loader/entries/arch.conf (if that is what you've called it) and the output of:

lsblk -f
ls -R /boot
# parted -l
# efibootmgr -v

Again, run all these commands after you have mounted all your partitions and used `arch-chroot` from the live Arch ISO.

You can use sprunge to generate a link to their pastebin for the command output:

<command> | curl -F 'sprunge=<-' http://sprunge.us

https://wiki.archlinux.org/index.php/Li … in_clients

Offline

#4 2015-05-19 01:49:05

linux_dream
Member
Registered: 2015-05-17
Posts: 45

Re: lnstalled Arch alongside windows 8.1 (uefi), grub doesn't show up

JeromeDGDG wrote:

Hello linux_dream.
First, archlinux is for boot exactly the same than other linux distributions. It mount by a boot manager first (grub for exemple).
So, first of all, you absolutly need to creat a /boot partition with some required tools (have some differents) and then, mount it on /boot. This partition need to be FAT32 with around 512MB (mine is 256MB and works fine) and be gpt/UEFI and bootable. There is specific parameters to pass to the tool at format partition time (but if you followed the wiki, all of this is ok now...).

Hello Jérome,
I do have an uefi partition (FAT32) thanks to Windows. It is on /dev/sda2, so I mounted it as /mnt/boot/efi  where I had mounted /mnt as root.

JeromeDGDG wrote:

Then...
you have to see the /boot partition you created on your BIOS. The bios, is the first thinks the computer run at boot time (before everythings). Then go inside your bios and check options around boot and see boot list (sometimes, when change config, you have to reboot again the bios for see the changes on boot list appears). Then on your boot list from BIOS, you have to see your grub /boot partition (mine is named égrub_archlinux" viewed by the boot list of my bios) and make it boot first (or just after usb and cdrom if you prefer...). If not, this grub will never been mounted and windows will start first.

Also, if you are confused with command tools on linux systems and you not sure your partition boot is not well created, you can easily used gparted gui tools (do a bootable cdrom and use it for partitions or check...).

In the BIOS I don't see anything related to grub nor Arch. However in the uefi settings, I do. To access these settings is tedious, I need to boot Windows, click on reboot while maintaining the Shift key, selecting "troubleshooting", go to uefi settings, reboot and then press F9 to enter there. There I can see grub, Arch and Windows and I can enter in Arch from there. So I don't need the arch.iso flash drive anymore, I prefer to boot from my hard disk.

head_on_a_stick wrote:

That doesn't make much sense -- you say you have "installed gummiboot" but also that "Windows was in front of grub [sic]" in your NVRAM entries -- which did you install, GRUB or gummiboot?

Also, installing a desktop environment (LXDE) is mentioned nowhere in the Beginner's Guide.

I installed both Grub and gummiboot (in that order). Yeah I installed LXDE because I thought everything went fine (grub recognized Arch when it generated the .cfg file), I only saw the problems when I rebooted: grub doesn't show up.

head_on_a_stick wrote:

The actual command you should use is:

# grub-install --target=x86_64-efi --efi-directory=$esp --bootloader-id=grub --recheck

I did that command too, where I took care to replace $esp by /mnt/boot/efi if I remember well. The command worked.

head_on_a_stick wrote:

Again, the command should be:

# grub-mkconfig -o /boot/grub/grub.cfg

As stated in the ArchWiki page I have linked above.

Make sure you have mounted all your partitions and used `arch-chroot` before running these commands.

I did that command, it generated files and recognized 3 images (linux, initramfs and another thing I don't remember). Again, if I remember well.

head_on_a_stick wrote:

Please post the content of /boot/loader/loader.conf & /boot/loader/entries/arch.conf (if that is what you've called it) and the output of:

lsblk -f
ls -R /boot
# parted -l
# efibootmgr -v

Again, run all these commands after you have mounted all your partitions and used `arch-chroot` from the live Arch ISO.

You can use sprunge to generate a link to their pastebin for the command output:

<command> | curl -F 'sprunge=<-' http://sprunge.us

https://wiki.archlinux.org/index.php/Li … in_clients

Unfortunately I'm having a very hard time to make the curl command work, I think that it's due to my keyboard layout and I can't seem to write the correct apostrophes (mines seem curvy) nor the correct " sign. Here's the error that I get (manually copied): 

returned Warning: Illegally formatted input field! 
curl: option -F: is badly used here.
curl: try 'curl --help' or 'curl --manual' for more information

. I've been seeking help for around 20 minutes on #archlinux (IRC) to no avail thus far.

So I entered some of the commands you mentionned and I took some photos of them.  See the 5 photos at https://imgur.com/QN8FBZ1,RLbSe2u,73o1w … ,aBTxNNF#0
Of course it would be much better if I could find a way to make the curl command work.

Offline

#5 2015-05-19 05:01:38

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,523

Re: lnstalled Arch alongside windows 8.1 (uefi), grub doesn't show up

linux_dream wrote:

Of course it would be much better if I could find a way to make the curl command work.

If you use a simple redirection to file, in a mounted partition, later you may post the output.


do it good first, it will be faster than do it twice the saint wink

Offline

#6 2015-05-19 05:13:55

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: lnstalled Arch alongside windows 8.1 (uefi), grub doesn't show up

Moving to NC...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#7 2015-05-19 07:18:01

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: lnstalled Arch alongside windows 8.1 (uefi), grub doesn't show up

linux_dream wrote:

due to my keyboard layout

https://wiki.archlinux.org/index.php/Be … ard_layout

You have mounted /boot/efi to the EFI system partition -- the Beginner's Guide specifically states that /boot should be mounted to the ESP.
https://wiki.archlinux.org/index.php/Be … partitions

As a result, the path for your gummiboot boot manager in the NVRAM entry is probably wrong.

I would know for sure but you haven't provided the output of `ls -R /boot`

I would recommend starting again and mounting /boot to the ESP this time (ie, follow the instructions to the letter).

Offline

#8 2015-05-19 21:15:58

linux_dream
Member
Registered: 2015-05-17
Posts: 45

Re: lnstalled Arch alongside windows 8.1 (uefi), grub doesn't show up

Head_on_a_Stick wrote:
linux_dream wrote:

due to my keyboard layout

https://wiki.archlinux.org/index.php/Be … ard_layout

You have mounted /boot/efi to the EFI system partition -- the Beginner's Guide specifically states that /boot should be mounted to the ESP.
https://wiki.archlinux.org/index.php/Be … partitions

As a result, the path for your gummiboot boot manager in the NVRAM entry is probably wrong.

I would know for sure but you haven't provided the output of `ls -R /boot`

I would recommend starting again and mounting /boot to the ESP this time (ie, follow the instructions to the letter).

I have just retried the whole process of mounting, installing grub and generating the grub.cfg taking care of following your recommendations (So following the wiki to the letter).
Since I had installed os-prober, what it did is grub recognized Windows 8.1 when generating the .cfg file, as well as Arch.
However rebooting is still the same, no grub. Windows 8.1 auto boots.
I've also installed gummiboot in /boot and created the 2 files (they were already created in fact) according to the wiki and that you asked me to past here.
/boot/loader/entries/arch.conf :

title Arch Linux
linux /vmlinuz-linux
initrd /initramfs-linux.img
options root=/dev/sda6 rw

/boot/loader/loader.conf:

timeout 5
default arch

#default 7719f234dd8f49efb746edaf8143832b-*

I commented the last line because it shouldn't be in the file according to Arch wiki but it was there by default.
Actually I'd rather not change the keyboard layout. I can in fact use the apostrophe, it just appears curvy on my screen but that's an apostrophe and for some reason the command with curl doesn't work. Someone suggested not to use "http://" but that didn't work.
So I can't really paste the content of `ls -R /boot`, but I've taken 12 pictures of it (and this doesn't cover 100% of it): https://imgur.com/D55ZF3J,rRooumb,jTboX … ,JXK33Yo#0.
Thanks for any further help!

Offline

#9 2015-05-20 02:53:41

linux_dream
Member
Registered: 2015-05-17
Posts: 45

Re: lnstalled Arch alongside windows 8.1 (uefi), grub doesn't show up

Ok I have solved the problem. The problem was HP, booting Windows no matter what. So the fix is an ugly but really simply hack:
Using

efitbootmgr -v

check the path of bootmgfw.efi (from Windows) and grub64.efi (Linux!). Then rename bootmgfw.efi into for example bootmgfw.efiold.
And move and rename the grub64.efi file as bootmgfw.efi. So HP is now booting Grub thinking it's Windows smile
I found the solution thanks to duckduckgo search engine, there https://xpressubuntu.wordpress.com/2014 … -pavilion/.

This should help a lot of people, since many people reported this problem.

Offline

#10 2015-05-20 08:19:49

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: lnstalled Arch alongside windows 8.1 (uefi), grub doesn't show up

linux_dream wrote:

The problem was HP, booting Windows no matter what.

Ah...
https://bbs.archlinux.org/viewtopic.php … 2#p1514912

Just to note: gummiboot will never work on your set up (without further work-arounds [1]) because it is a boot manager rather than a boot loader and uses the kernel's ability to boot itself up (CONFIG_EFI_STUB) and this requires that the kernel image & initrd be located on the EFI system partition (ie, /boot is mounted to $ESP, rather than /boot/efi).

[1] https://wiki.archlinux.org/index.php/EF … unt_Points

Last edited by Head_on_a_Stick (2015-05-20 08:20:10)

Offline

Board footer

Powered by FluxBB