So I'm writing an custom init script and I want to mount / as rw. In /etc/init.d/rcS when I use mount -t ext4 -o remount /dev/sda / it does remount as rw but when I do mount -a (or I even tried mount -a -o remount) with fstab:

/dev/sda                 /                       ext4    defaults        1 1

it doesn't and / is mounted as ro. What is going on here?

  • Are you sure you are trying to mount "/dev/sda" (the disk itself), not "/dev/sda1" / "/dev/sda2" (the first or other partitions on it) – Jaleks Dec 16 '18 at 15:10

You should mount partitions on your disk (e.g. /dev/sda1, /dev/sda2) to a certain folder, not disk by self.

However, it would be better if you replace the names of partitions with UUID's. Use blkid to learn UUID's of your partitions on the disk.

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.