You are not logged in.

#1 2017-01-18 19:10:57

kvtb
Member
Registered: 2014-01-11
Posts: 30

UEFI: Boot local arch installation using USB key

the past 18 years of Linux-usage, I was always able to succeed installing without resorting to forums, so I hope I have enough credits to ask this question. smile

So, I have a new laptop with Windows pre-installed.
Apparantly there is some new boot technology UEFI of which I do not know the added value. And there is a special boot partition, and nowadays partition tables seem to have a new format (GPT)?
And clearly I cannot keep up with these advancements, because I'm getting old.

Anyway, this is wat I would like to achieve
- keep existing Windows partition as-is, because unfortunately I need this for work
- when power on laptop without 'USB Boot key' inserted, boot to Windows without showing boot menu (as if there is no Linux installed)
- when power on laptop with 'USB Boot key' automatically boot to the LInux partition (root is at /dev/sda5)
- do not touch the MBR of the harddisk (does MBR still exist anyway with these UEFI GPT ESP technology things?)

What I have done already
- install Arch Linux to partition /dev/sda5 - this is where / will be mounted
- create /dev/sda6 for /home
- I stopped at the step 'instal boot loader' - because I don't want to change the existing behaviour (just boot to windows)

I have an USB key with the archiso (ISO from January 2017).
When I boot with this USB key, some EFI menu is shown
I have no idea how to boot the Linux installed at /dev/sda5.
And what happened to good ol' GRUB? There is some EFI menu v1 and v2, but no option to boot a specific partition


So this is where I'm stuck
How can I install grub or whatever boot loader is fancy nowadays to my USB stick, and configure it in such a way that it will boot the Linux at /dev/sda5?
(after booting, the USB key can be removed)

Update: the partition table is old-style, fdisk does not state it is gpt

Thanks for your help!

Last edited by kvtb (2017-01-18 19:22:41)

Offline

#2 2017-01-19 00:17:43

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,466

Re: UEFI: Boot local arch installation using USB key

If the disk is still MBR instead of GPT, you're probably booting the CSM, or Compatibility Support Module, which emulates BIOS. Windows is pretty locked down (at least the installer is) to UEFI is only GPT, BIOS is only MBR.

Edit, if the Arch disk is showing systemd-boot, though, it is booting in UEFI mode. Some firmwares have a mode that will automatically fall back to CSM/BIOS, see if that's enabled.

Last edited by Scimmia (2017-01-19 00:18:41)

Offline

#3 2017-01-21 10:00:32

kvtb
Member
Registered: 2014-01-11
Posts: 30

Re: UEFI: Boot local arch installation using USB key

I had some difficulties, and for future reference, I'll post these and the solution here
- Windows 7 only boots in Legacy mode, and the partition is with MBR. So old-style stuff here.
- USB sticks only boot in UEFI mode (in Legacy mode, the USB stick is not seen even if the boot order is USB first. - in other words, I could not use an USB stick with MBR and old-style grub, because it would not be seen as valid boot device by the BIOS
- I was unable to create a USB stick with GRUB on it, because of the mismatch UEFI boot + non-GPT partitioned ssd.
- Super Grub Disk 2 did not work either, I would get  a Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) when pointing to /dev/sda5

I have solved the problem by installing rEFInd on an usb stick
http://www.rodsbooks.com/refind/
when booting, it immediately recognizes the Arch installation at /dev/sda5 and all I have to do is press enter (or wait a few seconds) and it will boot to Arch when the USB stick is inserted - and this is exactly what I was trying to achieve!

Last edited by kvtb (2017-01-21 10:04:57)

Offline

#4 2017-02-06 22:30:59

gabriel9
Member
From: Berlin, DE
Registered: 2009-05-06
Posts: 89

Re: UEFI: Boot local arch installation using USB key

Hi, i am also long time Linux user but first time i have this UEFI Windows preinstalled. My setup is Windows 10 GPT with UEFI.
And from your experience, you just created new partitions and instlal Arch on them, and now you use USB to Boot into Arch?
Could this work for me also, or i can do something else?


"The flesh knows it suffers even when the mind has forgotten."

Offline

#5 2017-02-07 01:32:31

memory_leak
Member
Registered: 2015-03-02
Posts: 43

Re: UEFI: Boot local arch installation using USB key

I am also Linux user since 98 and have never have problems installing Linux, but last 3 days I have come to point where I am almost on verge to turning back to Linux all together. Trying to install Arch on my new computer. I have two nvme drives in it, one is for windows another for arch. Installation from arch iso goes fine, as well as from arch-anywhere iso. But booting is impossible. I have tried both grub and gummiboot (aka systemd-boot). I have tried formatting my nvme drive as mbr-drive and gpt-drive. No matter what I do uefi never sees linux partition. I have created of course separate partition for /boot (aka ESP) of type fe00 formatted as fat32 which didn't work I have also tried to install everything on one ext4 partition which of course didn't work either. I have followed every tutorial, blog, forum guide and video under the sun trying to get arch to boot nothing works. I can chroot to arch, I can install/uninstall stuff even run emacs in terminal no problems, but booting it seems impossible. Even when I try to "boot existing OS" from installation media, it just snaps back to startup screen. Why was windows able to install everything on first go without even needing to ask me where I want to install boot loader and why arch can't do similar is beyond my imagination. I am really agrievated, I have spent so many hours and energy on such idiotic stupid thing and that even without sucess. Yes I am probably an idiot but even as idiot as I am I managed to install linux so many times before.

Last edited by memory_leak (2017-02-07 01:33:33)

Offline

#6 2017-02-07 09:03:31

gabriel9
Member
From: Berlin, DE
Registered: 2009-05-06
Posts: 89

Re: UEFI: Boot local arch installation using USB key

That's why i am not starting this installation yet.
It would be nice if i could remove Windows, but unfortunatly i can't.
I plan to install Arch beside Windows 10 on m.2 ssd.
Do i need separate boot partition?

@memory_leek can you try rEFInd which was mentioned in previous posts?

Last edited by gabriel9 (2017-02-07 09:03:44)


"The flesh knows it suffers even when the mind has forgotten."

Offline

#7 2017-02-07 23:39:04

memory_leak
Member
Registered: 2015-03-02
Posts: 43

Re: UEFI: Boot local arch installation using USB key

I haven't tried refind yet. Will try it when I have a bit more time.

Offline

#8 2017-02-08 02:08:26

jonno2002
Member
Registered: 2016-11-21
Posts: 684

Re: UEFI: Boot local arch installation using USB key

i agree uefi is a pain in the ass, when i installed arch on my uefi laptop alongside windows 8 i had major problems getting arch/grub to boot and not windows. my EFI partition has multiple folders: arch , boot , microsoft, and toshiba and what i figured out was if i copied the "grubx64.efi" file from the "arch" directory to the "boot" directory and renamed it to "bootx64.efi" and renamed the existing "bootx64.efi" to "bootx64.efi.bak" then grub booted up and i could select arch or windows. i hope ive described this clearly enough and hope it helps

Offline

#9 2017-02-08 03:18:28

memory_leak
Member
Registered: 2015-03-02
Posts: 43

Re: UEFI: Boot local arch installation using USB key

Ok. I didn't tried refind yet, but I took few deep breaths and tryed again with default boot media. I managed to boot into arch by setting my boot partiotion (esp) to old bios bootable flag and putting my bios into legacy compatibility mode (from uefi only).

Next thing, something that isn't mentioned anywhere in Arch wiki is that one has to pass init=/lib/systemd/systemd as a kernel parameter at boot. I am using old gumiboot - aka systemd-boot, so in arch.conf file (or whatever you use it, pass it on options line. I found it by error and trial - my system froze after the boot with message /sbin/init does not exist - you are on your own etc ... it's just that I wasn't even able to use keyboard to shuttdown computer, all input was dead - I had to pull out power cable. So much for "you are on your own - good luck!" message, thanks Arch devs. Googeling it up one can see numerous posts about same issues over the web, not less on Arch forums, yet there is no mentioning or warning about that option anywhere in installation guide or elsewhere on wiki. I googled up some snide answeres from people on this forum on raised issue like it does not belong to arch wiki etc. And yes, before you ask - I pacstrapped "base" and also isntalled "base-devel" on installation.

@jonno, I don't think uefi per se is a pita, windows had no problems installing on uefi nvme drive, and it managed to even correctly register itself in uefi boot. It is interesting how this is pita when it comes to linux (at least arch). One would expect that we have machines to do work for us, but in certain circles it seems to be sign of cosmic intelligence to write 1001 option manually introducing 1001 opportunity to type wrong, choose wrong and in any other mean screw things that are simply meaningless to take care off and anyway better left to automated process. Don't get me wrong, I really think arch has awesome concept - I am 110% for rolling distro, but I really can't understand why we can't get a decent automated installer.

Last edited by memory_leak (2017-02-08 03:22:43)

Offline

#10 2017-02-08 07:35:21

jonno2002
Member
Registered: 2016-11-21
Posts: 684

Re: UEFI: Boot local arch installation using USB key

Ok i guess it was only a pita till i figured it out, thats why i like arch linux it gives me problems to solve, and ive learned heaps in the process, if everything is done for you, you dont learn anything.

Offline

#11 2017-02-14 16:26:17

gabriel9
Member
From: Berlin, DE
Registered: 2009-05-06
Posts: 89

Re: UEFI: Boot local arch installation using USB key

For me systemd-boot worked flawlessly. Just follow the guides on Wiki.


"The flesh knows it suffers even when the mind has forgotten."

Offline

Board footer

Powered by FluxBB