Quantcast
Channel: Alexander D. Chamberlain
Viewing all articles
Browse latest Browse all 7

How Do I Run My Native Pacman Against A Mounted Image?

$
0
0

So, you have read How Do I Update, Upgrade And Install Software Before Flashing An Image? and were wondering whether you could use the native pacman against an ARM image instead of using an emulated version?

It turns out you can and it's not too hard. Make sure you have followed the instructions on How do I update, upgrade and install software before flashing an image? carefully and you have qemu-user-static installed correctly on the mounted system.

pacman.conf

The /etc/pacman.conf file controls pacman, and normally, we wouldn't need to edit it. However, there is a problem with the supplied pacman.conf when used in this way. It includes the directive

Include = /etc/pacman.d/mirrorlist

Unfortunately, this picks up the mirror list from your host system, which probably won't mirror ARM packages. Copy /etc/pacman.conf from your mount to an appropriate directory and replace that line with

Server = http://mirror.archlinuxarm.org/arm/$repo

You can find my adapted pacman.conf at github.

Running pacman

You can now run pacman. Assuming your config file is in your pwd, run

sudo pacman -r <mount-point> --config pacman.conf -Syu

References

  1. Github project, which is forked from @Jivings Github project.

Viewing all articles
Browse latest Browse all 7

Trending Articles