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?
1 Answer
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 /
-
You're spot on. Suppose I'd like to add several options, in what format should they be listed?– ivviCommented May 5, 2013 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. Commented May 5, 2013 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.– ivviCommented May 5, 2013 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. Commented Dec 4, 2013 at 15:45
-
About rootflags=noatime failing. I experienced the same problem; see this SO question: unix.stackexchange.com/questions/130966/… Commented May 29, 2014 at 9:40