You are not logged in.

#1 2012-01-11 19:38:22

HermesT
Member
From: Spain
Registered: 2008-09-06
Posts: 36

[Solved]Root filesystem read-only at boot

Hi,

I can't boot arch. Root filesystem is mounted ro, so nothing works properly. Last boot I make a pacman -Syu without incidences. A few weeks ago I make manual intervention  (filesystem upgrade - manual intervention required from latest news). I think that last new (Users of unofficial kernels must enable devtmpfs support) is not the problem  since I don't complile the kernel.

dmesg show 2 mount operations to /dev/sda3 (my root partition, EXT4 fs).
mtab have 2 entrys with /sda3. The last shown "ro" flag, and some strange parameters  for me .

Maybe is a disk problem? How can I remove this flag, or remount in rw mode?

umount -f don't work.

I use a dual boot with GRUB, and second system is  W7.

Thanks in advanced.

Last edited by HermesT (2012-01-14 19:05:56)

Offline

#2 2012-01-11 20:11:11

HermesT
Member
From: Spain
Registered: 2008-09-06
Posts: 36

Re: [Solved]Root filesystem read-only at boot

Some extra info:

from dmesg

[    1.237581]  sda: sda1 sda2 sda3 sda4 < sda5 >
[    1.829594] EXT4-fs (sda3): mounted filesystem with ordered data mode. Opts: (null)
[    5.722599] EXT4-fs (sda3): re-mounted. Opts: user_xattr,acl,barrier=1,data=ordered.

mtab

rootfs / rootfs rw 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
/sys /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
udev /dev devtmpfs rw,nosuid,relatime,size=10240k,nr_inodes=215507,mode=755 0 0
/run /run tmpfs rw,nosuid,nodev,relatime,size=10240k,mode=755 0 0
/dev/sda3 / ext4 ro,relatime,user_xattr,acl,barrier=1,data=ordered 0 0
devpts /dev/pts devpts rw,relatime,mode=600,ptmxmode=000 0 0
shm /dev/shm tmpfs rw,nosuid,nodev,relatime 0 0
/dev/sda1 /media/SYSTEM fuseblk rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096 0 0
/dev/sda2 /media/COMPAQ fuseblk rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096 0 0
/dev/sda5 /media/Almacen fuseblk rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096 0 0

* please, note that rootfs (?) is the same partition as /dev/sda3, like can be seen in df output.

df

S.ficheros     1K-bloques     Usado Disponible Uso% Montado en
rootfs           21096088  12132788    7891664  61% /
udev                10240         0      10240   0% /dev
/run                10240       252       9988   3% /run
/dev/sda3        21096088  12132788    7891664  61% /
shm               1550516         0    1550516   0% /dev/shm
/dev/sda1          102396     25744      76652  26% /media/SYSTEM
/dev/sda2        54772576  36097780   18674796  66% /media/COMPAQ
/dev/sda5       548819964 142760132  406059832  27% /media/Almacen

Offline

#3 2012-01-11 21:59:35

Yurlungur
Member
From: USA
Registered: 2012-01-06
Posts: 116

Re: [Solved]Root filesystem read-only at boot

I remember having a similar problem when I installed fedora, and it came from some funny fstab configurations. I'm not sure if this is the same issue or not, I might not be able to help... but... I'll try. Could you get the contents of /etc/fstab? I'm assuming you have a way to get through your filesystem even if it doesn't boot, right? An Arch iso, or something?


Lenovo Thinkpad T420; Intel sandy bridge i7 2.7GHz; integrated graphics card; 4GB RAM; wifi; Arch; Xmonad WM

Offline

#4 2012-01-12 09:25:09

HermesT
Member
From: Spain
Registered: 2008-09-06
Posts: 36

Re: [Solved]Root filesystem read-only at boot

Hi Yurlungur,

I can login in console, and read & write in sda5 (NTFS), so I can access to some files. I'm no sure if log files have info from last days.. I supose no.

fstab  is empty, and has been empty for a long time ago. Simply, of overnight, root filesystem is mounted ro sad.

I'm pending to look at last pacam log, because it must be the cause from this strange change. But even if I get to know who caused the problem, I need to be able to mount in rw mode to solve it.

Thanks.

Offline

#5 2012-01-12 10:33:18

Yurlungur
Member
From: USA
Registered: 2012-01-06
Posts: 116

Re: [Solved]Root filesystem read-only at boot

HermesT,

If you use an Arch install disk, you should be able to run a live session. You can then mount to your temporary OS that's running off of the iso. When you do this, you can choose new permissions. This should allow you to make changes to any files you want. You'll be without pacman in a live session, but this shouldn't be a problem for at least a temporary fix.

I'm not sure if this will help, and I have no clue how your fstab and mtab files got messed up, but what I would suggest doing is deleting the mtab file using the method for accessing it I outlined, and then writing a new /etc/fstab file... the same one you wrote when you first installed Arch. At the very least, you probably want your fstab file to have:

# /etc/fstab: static file system information
#
# <file system> <dir>   <type>  <options>            <dump>     <pass>
tmpfs           /tmp    tmpfs    nodev,nosuid         0          0
/dev/sda3 /       ext4     defaults,relatime,user_xattr    0          1

You probably want to mount /var as well. Check out the fstab wiki page to make sure you configure it just right. If you want, I can also help if you post your partitioning scheme.

I think that mtab is usually generated at boot from fstab. If this is the case, making a new fstab file should fix your problems... and your original problem was probably related to an empty fstab file. I can't say for sure, though... and if I'm wrong, someone please correct me.

If this doesn't work, I have another idea too.

Hope this helps!

Last edited by Yurlungur (2012-01-12 10:43:30)


Lenovo Thinkpad T420; Intel sandy bridge i7 2.7GHz; integrated graphics card; 4GB RAM; wifi; Arch; Xmonad WM

Offline

#6 2012-01-12 12:21:25

HermesT
Member
From: Spain
Registered: 2008-09-06
Posts: 36

Re: [Solved]Root filesystem read-only at boot

Yes, I also think that include an explicit mount entry in fstab is the better option ... but I don't want to do nothing without an "autorized" opinion.

I really dont' know very well how linux works. Until yesterday, all was Ok without explicits entries in fstab.

Maybe udev,or hal (yes, deprecated, I know, but without HAL I' was having problems with "automount" from usb), probably were doing the job automatically.

I'm not at home now. This evening I'll try this solution.

Thanks!.

Offline

#7 2012-01-12 14:33:00

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [Solved]Root filesystem read-only at boot

http://projects.archlinux.org/initscrip … 420829c5fe

That's the commit which changed the behavior. You must have an entry for / in your fstab.

Offline

#8 2012-01-13 10:00:23

HermesT
Member
From: Spain
Registered: 2008-09-06
Posts: 36

Re: [Solved]Root filesystem read-only at boot

Hi guys. Now I can enjoy again my arch reloaded smile

Adding a entry in fstab solved the problem.



falconindy wrote:

http://projects.archlinux.org/initscrip … 420829c5fe

That's the commit which changed the behavior. You must have an entry for / in your fstab.

It is really a hidden place to look for a solution... 

allow ro root
We no longer force root to be rw, but follow what is set in fstab. Things might not work well if root is mounted ro, but now we at least have the possibility of chasing down problems elsewhere.

I don't understand wich is the problem with mount / rw ... it is a improve of security ?

Anyway, surely I'm the only arch user without an entry in fstab...  so "mea culpa".

Thanks to both!

Offline

#9 2012-01-18 15:07:10

laurion
Member
Registered: 2011-05-12
Posts: 6

Re: [Solved]Root filesystem read-only at boot

Not the only one. This one just bit me as well.  But as ever, the forums come through!

Offline

Board footer

Powered by FluxBB