Pacman-key garuda-tools-livecd

Hi, in live-tools i make a script to change the mirrorlist.
When i try the live iso, pacman need this commands:
-pacman -Sy
-pacman-key --init
-pacman-key --populate archlinux

What can i do make this 3 commands automatic?
I tried to make a script and running it in a systemd.service but this not work. Anyone know why or what can i do?

Can you share the script and the service file?

1 Like

We had this once but got rid of it :smiley: Whats your reason for wanting to do this?

1 Like

Script: (croco-mirrorlist)
#! /bin/sh
cp /usr/share/croco-mirrorlist/mirrorlist /etc/pacman.d
pacman -Sy
pacman-key --init
pacman-key --populate archlinux

Service file:
Description=LiveMedia Pacman mirror ranking script

ExecStart=/usr/bin/sh /usr/bin/croco-mirrorlist


Trying to make my own distro but got this error. I enable pacman-init but no way...

This should probably be either:



ExecStart=/usr/bin/sh -c /usr/bin/croco-mirrorlist

If it is the former, it probably needs to be set as executable.

I would also make sure the network is up in the service unit to ensure it doesn't run too early.

ExecStart=/usr/bin/croco-mirrorlist i've tried with this the first time than i tried with the one i shared.

Was it marked as executable?

Alternatively, you can try the second way.

Also, how are you starting the network? The problem with using a systemd service on boot of an ISO is ensuring the network is up.

yeah, it' s marked. Now i try the second way

At the moment i try live via usb it obviusly doesn' t work because i use wifi, but at the moment i try via vbox i get the same error while i' m connected to network.

What is the error?

Also, even you are wired, you aren't waiting for the network to actually be started.

Ok and can i solve it? When i try to see if pacman works i get the error:
database file for **** does not exists (try with pacman -Sy)

Because of this i tried to use the script containing the command pacman -Sy

Just use pacman -Sy <packagename> instead of pacman -S <packagename>. Normally that is unsafe but on an ISO it should be fine. Although it is kind of hard to say without understanding what you are actually trying to accomplish.

Change the service unit to wait for the network.

1 Like

Ok but i also need to populate with the keyrings :slight_smile: -.-

Try now thx

Tried but after installing it pacman-init service doesn' t work. And yes i' m connected to network.

How is possible? After installing it, keyrings should be populated but not.

If anyone can help me i can share everything u need.

How garuda populate keyrings?

Start by checking the logs to see why it failed.


In the postcfg module of calamares