You are not logged in.

#1 2012-02-11 15:17:52

kmason
Member
From: Tempe, Arizona, USA
Registered: 2010-03-23
Posts: 256
Website

/etc/mtab is read-only, even to the root user [Solved]

So, I managed to get an /etc/mtab that was read-only, and not even the root user can do anything with it.  Is there any way to change the permissions at all?  There's a bunch of archiso mount points mucking it up that I want to remove, and I can't do this if I can't edit the file.

Last edited by kmason (2012-02-12 07:03:25)

Offline

#2 2012-02-11 15:24:07

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: /etc/mtab is read-only, even to the root user [Solved]

[karol@black ~]$ ls -l /etc/mtab
lrwxrwxrwx 1 root root 17 12-19 18:44 /etc/mtab -> /proc/self/mounts

It's a symlink to /proc
https://bbs.archlinux.org/viewtopic.php?pid=1040046

Last edited by karol (2012-02-11 15:24:44)

Offline

#3 2012-02-11 17:01:10

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: /etc/mtab is read-only, even to the root user [Solved]

You don't change mtab, you change fstab.

Offline

#4 2012-02-11 17:17:29

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: /etc/mtab is read-only, even to the root user [Solved]

Awebb wrote:

You don't change mtab, you change fstab.

That completely depends. Mtab reflects the actual state of mounted partitions and drives, and if it becomes inconsistent (ie does not reflect the real mounts anymore), then you have trouble.

It is read-only now, but in the good old days, it used to be editable. I have fixed many a conundrum with that.

I don't know if /proc/self/mounts can be edited in any way. /proc and /sys are tricky little buggers.

Last edited by .:B:. (2012-02-11 17:18:29)


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#5 2012-02-11 20:18:14

guelfi
Member
From: /home/guelfi
Registered: 2011-07-01
Posts: 111

Re: /etc/mtab is read-only, even to the root user [Solved]

.:B:. wrote:
Awebb wrote:

You don't change mtab, you change fstab.

That completely depends. Mtab reflects the actual state of mounted partitions and drives, and if it becomes inconsistent (ie does not reflect the real mounts anymore), then you have trouble.

It is read-only now, but in the good old days, it used to be editable. I have fixed many a conundrum with that.

I don't know if /proc/self/mounts can be edited in any way. /proc and /sys are tricky little buggers.

If it is a symlink to /proc/self/mounts, it should be correct, otherwise, something is seriously wrong with your kernel.

Offline

#6 2012-02-11 23:31:32

kmason
Member
From: Tempe, Arizona, USA
Registered: 2010-03-23
Posts: 256
Website

Re: /etc/mtab is read-only, even to the root user [Solved]

The problem is that archiso managed to add a bunch of entries specific to it to mtab, but they don't appear in fstab.  And no, I tried editing /proc/sys/mounts as well, and its also read only.  I REALLY don't want to have to reinstall, at worst I would like to just have to uninstall archiso and hope it goes away.  Will that do it?

Offline

#7 2012-02-12 00:12:18

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,406
Website

Re: /etc/mtab is read-only, even to the root user [Solved]

Find out what's causing these mounts, disable it, and reboot? The contents of /etc/mtab (i.e. /proc/self/mounts) doesn't persist over boot sessions, so modifying the contents would only ever serve as a short-term solution -- if it even solved anything to begin with.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Online

#8 2012-02-12 07:02:44

kmason
Member
From: Tempe, Arizona, USA
Registered: 2010-03-23
Posts: 256
Website

Re: /etc/mtab is read-only, even to the root user [Solved]

A reboot seemed to have fixed the issue.  Thanks, I'll mark it as solved now.

Last edited by kmason (2012-02-12 07:03:05)

Offline

Board footer

Powered by FluxBB