You are not logged in.
Pages: 1
I just installed Arch on my SSD, everything works fine except this.
I have an extra HDD and I would like to use it to store data. I proceed to open /etc/fstab as root and then add the usual lines to mount it on boot.
However, when saving and closing (:wq on vim), an error pops
"fstab" E212: Can't open file for writing I checked with lsattr fstab and this is the output:
-----a--------e----- fstab So the file is not immutable.
I checked ls -l fstab and it outputs
-rw-r--r-- 1 root root 492 jul 17 12:38 fstab So the file is read-write.
I really don't know what to do, I have checked plenty of posts and can't find a solution.
Would appreciate some help. Thanks.
Last edited by manuel_yao (2020-07-18 00:07:13)
Offline
Is the filesystem it's on read only? Please post the full output of `mount` in code tags.
Last edited by Trilby (2020-07-17 23:10:11)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Is the filesystem it's on read only? Please post the full output of `mount` in code tags.
It outputs this
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sys on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
dev on /dev type devtmpfs (rw,nosuid,relatime,size=3737604k,nr_inodes=934401,mode=755)
run on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
/dev/nvme0n1p7 on / type ext4 (rw,relatime)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup2 on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
none on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/rdma type cgroup (rw,nosuid,nodev,noexec,relatime,rdma)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=29,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=318)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev)
/dev/nvme0n1p6 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=755648k,mode=700,uid=1000,gid=985)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=985)Only the tmpfs is RO, should it be RW? If so, how do i fix it? Thanks in advance.
Forgot to mention I'm running dual boot with Windows 10 and I can access the HDD from Windows without any issues.
Last edited by manuel_yao (2020-07-17 23:38:39)
Offline
No the cgroup mount is normally ro - your root partition where fstab is is rw. I'm stumped ... except for one thing that stands out though it seems almost too silly to mention (almost): your initial post only refers to "fstab" which would be a relative path (aka a file in the current directory) - if your working directory was /etc then that'd be fine, but otherwise it wouldn't be.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Why in the world does it have the append-only attribute? That's what's causing your problem.
Offline
No the cgroup mount is normally ro - your root partition where fstab is is rw. I'm stumped ... except for one thing that stands out though it seems almost too silly to mention (almost): your initial post only refers to "fstab" which would be a relative path (aka a file in the current directory) - if your working directory was /etc then that'd be fine, but otherwise it wouldn't be.
Yes, forgot to mention my working directory was /etc. The command lsattr /etc/fstab and ls -l /etc/fstab output the same as in my initial post.
I ran out of ideas, gnome-disks won't update fstab as well...
And the mount command shows my root partition as RW as you said
Offline
Why in the world does it have the append-only attribute? That's what's causing your problem.
Holy... I changed it the first time by accident because I was trying some things... and forgot to change it back...
Thank you so much!
Offline
Sorry I'm not familiar with lsattr and didn't know what the 'a' was.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Pages: 1