Repository: archlinux/archinstall

Issue:
tmpfs in fstab causing issues with some steam games
Hi!

I've used archinstall to install arch. (ext4 partition, grub, network manager, gnome DE).
I wanted to install Death stranding with proton via steam. The installation was stuck into a loop (steam was always saying that there were corrupt update files).

After I removed the line concerning tmpfs in `/etc/fstab`, the issue was solved. The way tmpfs is mounted by default seems to be messing with the way steam install games.
Since tmpfs is already mounted via systemd, this line doesn't seem that useful. 

Here's a link to the reddit thread that helped me resolve my issue :
[link](https://www.reddit.com/r/linuxquestions/comments/p8s3bm/trouble_installing_a_death_stranding_with_proton/)




Discussion:
Why this script adds /tmp to fstab? /tmp is mounted on tmpfs by default with no fstab record
It's added when it runs [genfstab](https://github.com/archlinux/archinstall/blob/6d2a2f327c874f38233d6f52bc27d5678586567a/archinstall/lib/installer.py#L183-L187) as per according to the [installation instructions](https://wiki.archlinux.org/title/installation_guide#Fstab). I'm not sure why this would mess with steam tho.

I'm not sure if I've misunderstood the installation instructions, or if I got it right and can close this issue as it's probably more related to steam specifically. I suspect that you're running out of ram or something similar, in which case perhaps limit your specific tempfs using `size=2G` or something?

This should be the issue for everyone running Arch either with or without the installer as it's a step in the installation process.
Maybe the ISO permissions on `/tmp` has changed propagating down to the installation?
Are you sure it's added by `genfstab`? I just looked at my 2 most recently manually installed vm's and they don't have `/tmp` in fstab
Also this is what `genfstab` output on one of vm's
```bash
$ genfstab -U /
# /dev/mapper/archlinux-root
UUID=5fb8ee3e-fbbb-48ca-b7f4-93445dd0d448	/         	ext4      	rw,relatime	0 1

# tracefs
tracefs             	/sys/kernel/tracing	tracefs   	rw,nosuid,nodev,noexec	0 0

# /dev/vda1
UUID=802B-CD42      	/boot/efi 	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2
```
> It's added when it runs [genfstab](https://github.com/archlinux/archinstall/blob/6d2a2f327c874f38233d6f52bc27d5678586567a/archinstall/lib/installer.py#L183-L187) as per according to the [installation instructions](https://wiki.archlinux.org/title/installation_guide#Fstab). I'm not sure why this would mess with steam tho.
> 
> I'm not sure if I've misunderstood the installation instructions, or if I got it right and can close this issue as it's probably more related to steam specifically. I suspect that you're running out of ram or something similar, in which case perhaps limit your specific tempfs using `size=2G` or something?
> 
> This should be the issue for everyone running Arch either with or without the installer as it's a step in the installation process.
> Maybe the ISO permissions on `/tmp` has changed propagating down to the installation?

genfstab does not add a tmpfs entry in `/etc/fstab`. [A tmpfs is already automatically handled by systemd](https://wiki.archlinux.org/title/Tmpfs#Usage):

> Arch uses a tmpfs `/run` directory, with `/var/run` and `/var/lock` simply existing as symlinks for compatibility. It is also used for `/tmp` by the default systemd setup and does not require an entry in [fstab](https://wiki.archlinux.org/title/Fstab) unless a specific configuration is needed. 
Apologies, I was pretty sure `genfstab` was the only time we touch the fstab but it appears some [older legacy code](https://github.com/archlinux/archinstall/commit/a59efc40a7556724a5ba3980d2b49d98b215d0ef#diff-283d51110d004467e254215ad93e4dfcf0188beb22d9f878bb7088c12076dd2eR67) has slipped through the cracks and we do actually manually create a `/tmp` entry:

* https://github.com/archlinux/archinstall/blob/6d2a2f327c874f38233d6f52bc27d5678586567a/archinstall/lib/installer.py#L407

This can probably get removed.

Resolving patch:
diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py
--- a/archinstall/lib/installer.py
+++ b/archinstall/lib/installer.py
@@ -403,9 +403,6 @@ def minimal_installation(self):
 		self.pacstrap(self.base_packages)
 		self.helper_flags['base-strapped'] = True
 
-		with open(f"{self.target}/etc/fstab", "a") as fstab:
-			fstab.write("\ntmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0\n")  # Redundant \n at the start? who knows?
-
 		# TODO: Support locale and timezone
 		# os.remove(f'{self.target}/etc/localtime')
 		# sys_command(f'/usr/bin/arch-chroot {self.target} ln -s /usr/share/zoneinfo/{localtime} /etc/localtime')


Test patch: