Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unclear instructions for creating fstab from /proc/mounts #786

Open
o-alquimista opened this issue Jan 4, 2024 · 2 comments
Open

Unclear instructions for creating fstab from /proc/mounts #786

o-alquimista opened this issue Jan 4, 2024 · 2 comments

Comments

@o-alquimista
Copy link

In installation/chroot/configure fstab you are supposed to overwrite /etc/fstab with the contents of /proc/mounts:

[xchroot /mnt] # cp /proc/mounts /etc/fstab

Then it says:

Remove lines in /etc/fstab that refer to proc, sys, devtmpfs and pts

OK, I look for lines that start with proc, sys, devtmpfs or pts, and erase them. But what about the remaining dozens of mounts, should I keep them all?

This is what /proc/mounts looks like to me:

/dev/mapper/voidroot / ext4 rw,relatime 0 0
/dev/mapper/voidhome /home ext4 rw,relatime 0 0
/dev/mapper/voidvar /var ext4 rw,relatime 0 0
/dev/mapper/voidtmp /tmp ext4 rw,relatime 0 0
/dev/nvme0n1p2 /boot ext4 rw,relatime 0 0
/dev/nvme0n1p1 /boot/efi vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev,noexec,inode64 0 0
sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
securityfs /sys/kernel/security securityfs rw,relatime 0 0
efivarfs /sys/firmware/efi/efivars efivarfs rw,nosuid,nodev,noexec,relatime 0 0
cgroup /sys/fs/cgroup tmpfs rw,relatime,mode=755,inode64 0 0
cgroup /sys/fs/cgroup/cpuset cgroup rw,relatime,cpuset 0 0
cgroup /sys/fs/cgroup/cpu cgroup rw,relatime,cpu 0 0
cgroup /sys/fs/cgroup/cpuacct cgroup rw,relatime,cpuacct 0 0
cgroup /sys/fs/cgroup/blkio cgroup rw,relatime,blkio 0 0
cgroup /sys/fs/cgroup/memory cgroup rw,relatime,memory 0 0
cgroup /sys/fs/cgroup/devices cgroup rw,relatime,devices 0 0
cgroup /sys/fs/cgroup/freezer cgroup rw,relatime,freezer 0 0
cgroup /sys/fs/cgroup/net_cls cgroup rw,relatime,net_cls 0 0
cgroup /sys/fs/cgroup/perf_event cgroup rw,relatime,perf_event 0 0
cgroup /sys/fs/cgroup/net_prio cgroup rw,relatime,net_prio 0 0
cgroup /sys/fs/cgroup/hugetlb cgroup rw,relatime,hugetlb 0 0
cgroup /sys/fs/cgroup/pids cgroup rw,relatime,pids 0 0
cgroup /sys/fs/cgroup/misc cgroup rw,relatime,misc 0 0
cgroup2 /sys/fs/cgroup/unified cgroup2 rw,relatime,nsdelegate 0 0
cgroup /sys/fs/cgroup/elogind cgroup rw,relatime,name=elogind 0 0
LiveOS_rootfs /etc/resolv.conf overlay rw,relatime,lowerdir=/run/rootfsbase,upperdir=/run/overlayfs,workdir=/run/ovlwork 0 0

For example, there are multiple cgroup lines, and one LiveOS_rootfs line. I never had to add anything like this to fstab on other operating systems. This doesn't look right to me.

@o-alquimista
Copy link
Author

o-alquimista commented Jan 6, 2024

I've finished the encrypted installation for the first time, and now I suppose I only need to keep the /dev/mapper and /dev/nvme lines, and also the /tmp tmpfs directory, which is properly documented.

The resulting /etc/fstab is this:

tmpfs           /tmp    tmpfs   defaults,nosuid,nodev   0       0
/dev/mapper/voidroot / ext4 rw,relatime 0 0
/dev/mapper/voidhome /home ext4 rw,relatime 0 0
/dev/mapper/voidvar /var ext4 rw,relatime 0 0
/dev/mapper/voidtmp /tmp ext4 rw,relatime 0 0
/dev/nvme0n1p2 /boot ext4 rw,relatime 0 0
/dev/nvme0n1p1 /boot/efi vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0

Can we improve that part of the documentation, for extra clarity?

This part:

Remove lines in /etc/fstab that refer to proc, sys, devtmpfs and pts

Becomes this (my suggestion):

Remove lines in /etc/fstab that refer to pseudo-devices (or virtual filesystems).

@classabbyamp
Copy link
Member

classabbyamp commented Jan 6, 2024

that suggestion seems less clear because it refers to the things to remove in more abstract terms.

it would probably be better to write a script like arch's/chimera's fstab generators and document that instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants