FS#15852 - [initscripts] fail to mount root read-write when ext4 with data=journal or data=ordered

Attached to Project: Arch Linux
Opened by David Auinger (David1989) - Saturday, 08 August 2009, 09:44 GMT
Last edited by Aaron Griffin (phrakture) - Monday, 17 August 2009, 20:27 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Aaron Griffin (phrakture)
Thomas Bächler (brain0)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:


My root partition is on ext4.
When I add one of the options data=journal or data=writeback to the root partition in /etc/fstab, I get error messages saying root is read-only file system during boot.
With option data=ordered mounting works well.
Non-root partitions can be mounted with these options.


Steps to reproduce:

Install Arch Linux on ext4.
Edit /etc/fstab. The line for / should look like:
/dev/whatever / ext4 defaults,data=journal 0 1
Boot and watch the messages.
This task depends upon

Closed by  Aaron Griffin (phrakture)
Monday, 17 August 2009, 20:27 GMT
Reason for closing:  Not a bug
Additional comments about closing:  rootflags= kernel parameter is required in these cases
Comment by Aaron Griffin (phrakture) - Monday, 10 August 2009, 22:04 GMT
Hmmm is there any way you could boot with a livecd (or the latest ISOs) and see what commands fail?

It originally mounts the root partition as read-only with no options, then remounts it was rw. I'd be interested in seeing what happens if you do it manually
Comment by David Auinger (David1989) - Tuesday, 11 August 2009, 09:06 GMT
I booted with livdcd and tried to mount /dev/sda1 like in booting process:

# mount -o ro /dev/sda1 /mnt
# mount -o remount,rw,data=journal /mnt
mount: /mnt not mounted already, or bad option

It works if I use data=journal also for mounting ro:

# umount /mnt
# mount -o ro,data=journal /dev/sda1 /mnt
# mount -o remount,rw,data=journal /mnt
Comment by Aaron Griffin (phrakture) - Tuesday, 11 August 2009, 18:56 GMT
Can you do this:

# mount -o ro /dev/sda1 /mnt
# chroot /mnt
# mount -o remount,ro /
# mount -o remount,rw /
Comment by Aaron Griffin (phrakture) - Tuesday, 11 August 2009, 18:58 GMT
Hmmm from the mount man page:

data=journal / data=ordered / data=writeback
Specifies the journalling mode for file data. Metadata is always journaled. To use modes other than ordered on the root file sys‐
tem, pass the mode to the kernel as boot parameter, e.g. rootflags=data=journal.
Comment by David Auinger (David1989) - Sunday, 16 August 2009, 07:53 GMT
I can do this:

# mount -o ro /dev/sda1 /mnt
# chroot /mnt
# mount -o remount,ro /
# mount -o remount,rw /

Passing the mode as boot parameter works.
Comment by Aaron Griffin (phrakture) - Monday, 17 August 2009, 20:26 GMT
The man page for mount indicates that rootflags is a REQUIRED kernel parameter in this case (most likely due to the fact that it needs to be used on the initial RO mount). I'm closing this

Loading...