6

I installed Arch Linux ARM for Raspberry Pi and it doesn't have an entry for the root directory in /etc/fstab but it's still mounted on boot somehow. How is it mounted and how can mount options be modified for it?

6

While I don't have Arch Linux to check if this, it's probably mounted by kernel itself and never remounted. You can check your /proc/cmdline and you should see something like root=/dev/mmcblk0p2 and rootfstype=ext4 options. You can set them in /boot/cmdline.txt file. First one specifies which device (partition) should be mounted as root device, second one specifies filesystem type. If you want to change some mount options, you can use rootflags= kernel option - just specify proper mount option string (for example rootflags=data=writeback,acl).

Note that you can only specify filesystem specific options like this, filesystem independent options seems not to be working.

Also note that if you make an error setting this option, your system wont boot. In order to fix this you have to use emergency boot or change your /boot/cmdline.txt file on other computer.

You can also remount your root file system somewhere in the boot process with following command:

mount -o remount,data=ordered /
| improve this answer | |
  • You're spot on. Suppose I'd like to add several options, in what format should they be listed? – seron May 5 '13 at 18:45
  • @seron: The same format you use for mount command, comma delimited, no spaces. Take a look at the modified example in my answer. – Krzysztof Adamski May 5 '13 at 20:05
  • Thank you. I tried rootflags=noatime but it failed to boot. Anyway, you've answered my original question and I feel grateful for that. – seron May 5 '13 at 20:09
  • (I can't comment your last comment because I don't have reputation). I had the same idea as you about noatime. But now relatime is the default behavior and since noatime seems not to be "a good" optimization. – Julien Brdy Dec 4 '13 at 15:45
  • About rootflags=noatime failing. I experienced the same problem; see this SO question: unix.stackexchange.com/questions/130966/… – Grodriguez May 29 '14 at 9:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.