You are not logged in.

#1 2013-02-14 01:44:05

Registered: 2011-02-13
Posts: 105

Install Arch with nfs shared pacman cache

I would like to make a post of some information that worked for me. I think it could find its way into the wiki, but I prefer not to be the one to do that. Two reasons for that:
1. Just becuase it worked for me doesn't mean it is proper. If someone can confirm it is an acceptable method...
2. I am a wiki reader, not a writer

My situation is that I have a 3G internet conection. I like to only download the packages once... I run nfs4 exports from my desktop computer to share user data, pacman cache and sync folders See the Pacman tips I just did fresh installs of my systems. After the main system was running, I wanted to use the existing pacman cache to install the second system. I followed the Beginners guide and also used the Install from ssh article. I created my partitions with gparted on a live stick. Boot into the Arch install media, and follow the instructions for mounting the partitions. And here is where I make a brief detour to utilize my existing pacman cache.

For reference, my nfs exports are on the desktop computer (hostname is nas) and the pkg cache is exported as:
Databases are exported as:

mkdir -p /mnt/var/cache/pacman/pkg
mkdir -p /mnt/var/lib/pacman/sync

mount the nfs exports:
mount -t nfs4 nas:/pkg /mnt/var/cache/pacman/pkg
mount -t nfs4 nas:/sync /mnt/var/lib/pacman/sync

Now I am back on track with the Beginners guide...
pacstrap -i /mnt base base-devel
While in the chroot, be sure to install nfs-utils (and openssh if you want to continue ssh after boot)
When running the genfstab, it will create tons of options for the nfs4 mounts. I edited those in nano to look like other references on the site:
nas:/pkg /var/cache/pacman/pkg nfs4 defaults,x-systemd.automount 0 0
nas:/sync /var/lib/pacman/sync nfs4 defaults,x-systemd.automount 0 0

And of course unmounting at the end of the Beginners guide requires unmounting these two directories too.


Board footer

Powered by FluxBB