Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am developing a device that will run Linux as its operating system. The device is a small form factor X86 device with a flash drive exposed as a SATA-device. So it is not very dissimilar from any other PC running Linux.

For several good reasons I am building my own "distribution", instead of using an existing one.

What confuses me is how mount/umount of the root file system is handled. I boot my kernel with the commandline "root=/dev/sda1 rw" which works fine. But everytime I do poweroff or reboot Busybox complained about no /etc/fstab, so I decided to build one.

Should I have an entry for my root file system? It seems like this is shadowed by the rootfs anyway. I.e. if I have the fstab entry "/dev/sda1 / ext2 1 1" mount still reports

  rootfs on / type rootfs (rw)
  /dev/root on / type ext2 (rw,relatime,errors=continue)

My questions are:

  1. Do I need to worry? Will the drive be correctly unmounted by the kernel on poweroff/reboot?
  2. If I want to perform file system checking on boot, can I do that without resorting to an initrd?
share|improve this question

At the startup the Kernel needs the root only for reading the init process (ex. /init).

During this step the root MUST NOT be mounted as read-write, it could cause errors.

The read-write root's mount is performed by the /etc/fstab.

If you have the necessity to mounts a filesystem without an /etc/fstab, use the -n option.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .