Skip to content

Replacing Windows 10 with Archlinux, UEFI mode.

Hi,

​

I'm used to installing Arch Linux in Bios mode, but I'm about to get a new laptop that comes with Windows 10 preinstalled on it, so I guess it's in UEFI mode. The idea is to replace W10 with Arch.

​

What are the necessary steps ? I know UEFI needs an EFI (or ESP) partition, can I use the one that already exists with Windows ? Can I just format the Windows partition and create my Arch partitions on it and voila ? Should I stick with Grub as the bootloader or is there something better for UEFI ? Thanks !

58 points33 comments
Open on Reddit
About this post
Posted
Archived
Score
58 · 100% up
Kind
Text
ID
ajnt57

Author

6
posts
35
comments
1
media
View profile

35 comments

All modern Windows 10 machines come with their hard disk formated using 'GUID Partition Table' (GPT), which is a pre-requisite for UEFI boot.

Yes, you can use the EFI System partition that already exists.

And yes, you could simple change the partition type of the Windows 10 partition from 'Basic Data Partition' to 'Linux filesystem data'.

Most likely there will also be a 'Windows Recovery Environment' partition on the hard disk though, which you don't need for Linux.

For EFI boot, there is absolutely no need to mess around with GRUB (or any bootloader at all).

I personally prefer systemd-boot, because it's quick and simple to set up.

Other people tend to forgo a bootloader altogether and opt for 'EFI Stub' booting.

27 points

+1 for systemd-boot. I'm dual booting windows and Arch on and nvme SSD and systemd boots just disgustingly fast.

10 points

Thanks for the clear explanations ! Changing the partition type of the Windows 10 partition from 'Basic Data Partition' to 'Linux filesystem data' simply means formatting it from NTFS to Ext4, right ?

1 points

Changing partition type and formatting the portion are actually two different steps.

Changing the partition type is something that is done with a partition manager like fdisk or preferably gdisk for GPT partitions.

Formatting a partition is done with the good old mkfs.ext4.

10 points

Disable secure boot in the bios and you should be good following the instructions.

11 points

Format your drive with GPT scheme and make one ~200MB EFI partition and the remaining size for the EXT4 root partition accompanied by a EXT4 home partition if you wish to. Also using a swap file is better than using a swap partition imo.

8 points

Thanks ! So basically I wipe everything, and I recreate an EFI partition instead of using the one coming with Windows. And then I create my partitions as I would do in Bios mode.

4 points

You could use the existing EFI partition from the Windows installation, but starting from scratch helps troubleshooting in the future. I hope you get my point.

1 points

Yes. Though not necessary, it's a good idea to really start from the beginning as if you had a brand new disk. I'd strongly recommend encrypting it, though with a larger drive writing random data to fill it up can take a while.

1 points

Format your disk as GPT. I used rEFInd, which basically runs by itself.

5 points

But if there is already Windows on it, wouldn't it already be in GPT ?

5 points

That won't cause any issues. Just fdisk your main drive, the press 'm'. The help output will show you want to press to format it in GPT.

1 points

check to make sure. if it isnt in GPT, microsoft has a tool on their site for converting between Bios/GPT

1 points

I use EFI without a bootloader, or rather with the kernel's builtin efistub. Good if Arch is going to be the only OS.

5 points

Efistub was my solution as well for running Arch alone. Who needs a bootloader anyway when efi is one. :D

5 points

Installing Arch in UEFI mode is very similar to legacy mode. The only differences are: you need a separate FAT32 boot partition and the bootloader of your choice must be EFI bootable (GRUB is UEFI compatible) .

2 points

Arch makes it easy to put your /boot files inside the ESP. Other distributions insist on separate partitions, resulting in your loader going under /boot/efi/efi (or some other absurd path).

Oh, and don't bother with GRUB. Use rEFInd if you want a fancy loader, systemd-boot if you want a minimal loader, or efistub if you want it to go straight to the OS.

2 points

Just be carefull that some laptops have discustingly bad UEFI implementations, because the standart is not strictly enforced. It can litterally make you crazy.

The archwiki has some troubleshooting steps, usually bad implementations only look for certain names in a specific path in the EFI partition, and only read the EFI partition at a specific place on the disk.

Reusing the same EFI scheme as windows is good.

1 points

I think it's recommended somewhere to use 500 MB for efi partition. I think it must be taking into account around 75MB per linux distribution + Windows + buffer.

1 points

Now, I took the easy way out by just getting a different MVMe drive for Arch to live on...and I don’t have my machine in front of me, but here’s my configuration iirc:

  • 512MB EFI partition
  • 300GB (ish) LVM partition
  • 200GB (ish) free space (to use later)

The LVM part is where /, /Home, and swap live.

I went with rEFInd as a boot loader, but otherwise the installation is exactly the same as any other install—the wiki worked for me just fine.

Tbh, I’d recommend just reformatting the drive and going from there, if you’re not interested in retaining the windows install (tho the product key is still embedded).

Oh, and you should still disable secure boot unless you wanna fight with that.

1 points

A little update : I got my new laptop, I tried to install Arch as usual, I kept the existing ESP partition, and used the refind script "refind-install" ; it seemed to install without error, but I can only reboot to a rootfs ! What did I do wrong ?

​

My refind_linux.conf file is as follow, I don't know if it's normal :

​

"Boot with standard options" "archisobasedir=arch archisolabel=ARCH_201901"

"Boot to single user mode" "archisobasedir=arch archisolabel=ARCH_201901 single"

"Boot with minimal options" "ro root=UUID=bfbffb2e-37f3-48dd-a845-76a7123d7d32""

​

Any suggestion ?

​

​

1 points

GRUB is sometimes not friends with EFI. I advise system-boot. The rest you correctly prompted

0 points

UEFI is such a pain in the ass. If your laptop supports it, go legacy, and disable secure boot.

My new laptop runs so much better without running in UEFI mode, and I don't plan on dual booting or using disks >2TB anyway.

-6 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.