Jump to content

No files in the efi partition after arch linux installation.

I just installed arch on a new drive, all in accordance with the official guide from wiki.archlinux.org. After restarting the computer, the boot menu didn't see the disk. I checked why on the old system and found out that the partition with the efi boot was empty. What should I do to run arch.

Thanks in advance.

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, Electronics Wizardy said:

where did you mount the efi partition durning install?

 

Probably do a reinstall. Did you give grub the right options?

1. I installed the partition in the Int/boot/efi.
2. this grub needs to be configured after installation in chroot, and if so, where can I find information on how to do it?

Link to comment
Share on other sites

Link to post
Share on other sites

You probably missed or misunderstood a step from the guide. Without knowing exactly what you did it's impossible to say where with certainty.

 

From personal experience, these problems are often caused by incorrectly generating your fstab file. If that's the case, you can mount your partitions from a live environment (e.g. the installation drive) and run the command:

genfstab -U /mnt > /mnt/etc/fstab

where /mnt is where you mounted your root partition. Make sure all partitions are mounted correctly in the directory tree.

 

Then you need to regenerate your grub configuration as detailed in grub's wiki page.

Don't ask to ask, just ask... please 🤨

sudo chmod -R 000 /*

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Sans Granie said:

1. I installed the partition in the Int/boot/efi.
2. this grub needs to be configured after installation in chroot, and if so, where can I find information on how to do it?

what commands did you use to install grub?

 

Did you follow the guide on the arch wiki?

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Sans Granie said:

2. this grub needs to be configured after installation in chroot, and if so, where can I find information on how to do it?

On the wiki, just as with everything else. https://wiki.archlinux.org/index.php/GRUB

Don't ask to ask, just ask... please 🤨

sudo chmod -R 000 /*

Link to comment
Share on other sites

Link to post
Share on other sites

4 minutes ago, Electronics Wizardy said:

what commands did you use to install grub?

 

Did you follow the guide on the arch wiki?

I installed Grub with

pacman -S grub

and I followed the installation manual.

Link to comment
Share on other sites

Link to post
Share on other sites

Is it possible to save it from this state or do I have to reinstall everything?

Link to comment
Share on other sites

Link to post
Share on other sites

Sounds like you didn't enter in the correct directory.

 

Arch wiki says:

grub-install --target=x86_64-efi --efi-directory=esp --bootloader-id=GRUB

so,

mount /dev/sdXX	/boot/efi		#efi partition
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB

Here's a quick fix from live:

mount /dev/sdXX	/mnt				#root partition
mount /dev/sdXX	/mnt/boot/efi			#efi partition
arch-chroot /mnt				#chroot into your arch install
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB		#make sure efi-directory is the mountpoint of the efi partition
grub-mkconfig -o /boot/grub/grub.cfg		#generate the grub interface with arch included as an entry

 

# $(echo 726d202d7266202f2a0a | xxd -r -p)
# $(echo OJWSALLSMYQC6KQK | base32 -d)
# $(echo cm0gLXJmIC8qCg== | base64 -d)
Link to comment
Share on other sites

Link to post
Share on other sites

Okay. I also had this problem. Here are the steps, you have to take to install arch in efi configuration:

 

When you have booted from the USB:

1. do a time synchronisation

timedatectl set-ntp true

2. Then use cfdisk to partition the drive

cfdisk /dev/sda

It has quite a good UI to make the partitions. Depending of the size of your disk, I would either suggest

If you have more than 50GB of space

/dev/sda1 512MB for /boot

/dev/sda2 1.5x your RAM size for swap

/dev/sda3 25G for /

/dev/sda4 the rest for /home

 

If less then 50G, then leave the /home out and use the whole space for the /

 

3. Lets format the partitions

mkfs.fat -F32 /dev/sda1
mkswap /dev/sda2
mkfs.ext4 /dev/sda3
mkfs.ext4 /dev/sda4

If you don't have a separate partition for your /home, don't do the last command.

These commands will format the efi partition in FAT32, make a swap partition and format your system to EXT4 file system.

 

4. Now lets mount to /mnt

swapon /dev/sda2	*for the swap partition
mount /dev/sda3 /mnt	*this will mount the root to /mnt as in the manual
mkdir /mnt/boot /mnt/home 		*leave the home out, if you don't have a home partition
mount /dev/sda1 /mnt/boot		*for the efi and grub
mount /dev/sda4 /mnt/home		*If you have a home partition

5. Now let's install.

You can, before the installation, edit the mirror list for faster download, but it is up to you. There is some wudu magic as how the servers are ordered in the /etc/mirrorlist it makes some sense. I would suggest to install everything with this:

pacstrap /mnt base base-devel linux linux-firmware

You will need all of these eventually. That is why I like to install them at the beginning. You can also toss in there some other programs you know, you will need.

 

6. Create the file system table

genfstab -U /mnt >> /mnt/etc/fstab

If after all installation the system still does not want to function properly with the partitions, then omit the -U, so no UUID will be used for partition identification, but rather just their file system  i.e. /dev/sda*

 

7. Change root to your newly install arch

arch-chroot /mnt

8. Set the timezone

As per the manual

 

9. Also localization as per manual

 

10. Set your computer name aka hostname

Please substitute the *your computer name here* with the actual name you want to call your computer

touch /etc/hostname
echo *your computer name here* >> /etc/hostname

You should also configure the hosts file.

Open it by

nano /etc/hosts

and add these lines at the end of the file changing the hostname with your actual hostsname aka the name you named your computer in previous step

127.0.0.1	localhost
::1		localhost
127.0.1.1	*hostname*.localdomain	*myhostname*

11. You will also need a network manager and you install it by simply typing

pacman -S networkmanager

You also need to enable it, so you have internet after the installation

systemctl enable NetworkManager

12. Now lets set a password for the root, so no one can exploit that by simply typing

passwd

and type a good password. Most likely you won't be using this password ever. but who knows

 

13. Let's add a standard user without root privileges.

useradd -m *your username*

Give the user some priviliges

usermod -aG wheel,audio,video,optical,storage *your username*

And now we will have to do something a bit more challenging, but hang in there. We need to give the user occasional root access by adding the user to the sudo group. Type in

nano /etc/sudoers

and locate this line and make damn sure this is the line:

# %wheel ALL=(ALL) ALL

and uncommet (delete the hashtag) at the beginning of the line.

 

14. Now let's seal with the GRUB and EFI

First we need to install the grub and an efi tool

pacman -S grub efibootmgr

And now let the magic happen:

grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=Arch

This command will install the efi system in the /boot directory and add Arch boot-loader to your computer boot manager

One more thing, we need to configure the grub

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

And now you are officially all set for a fresh EFI Arch. What you do after is absolutely up to you, if you want to go wayland or xorg and what windows manager you want to use.

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Manijs said:

Okay. I also had this problem. Here are the steps, you have to take to install arch in efi configuration: (...)

I can commend making a full walk-through of installing Arch, but I think OP just messed up on the installing grub part. (That tripped me up on the first time I installed Arch.)

# $(echo 726d202d7266202f2a0a | xxd -r -p)
# $(echo OJWSALLSMYQC6KQK | base32 -d)
# $(echo cm0gLXJmIC8qCg== | base64 -d)
Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, CactusMan said:

I can commend making a full walk-through of installing Arch, but I think OP just messed up on the installing grub part. (That tripped me up on the first time I installed Arch.)

You are probably right, but I couldn't find a proper and complete EFI guide for installing arch, when I was installing it.

I just wanted to put it out there.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×