I was making some changes to /etc/fstab, when this chicken and egg question occurred to me - if /etc/fstab contains the instructions for mounting the file systems, including the root partition, then how does the OS read that file in the first place?
How is /etc/fstab accessed before root is mounted?
boot;mount;startup;fstab;root filesystem
When the boot loader calls the kernel it passes it a parameter called root. So once the kernel finished initializing it will continue by mounting the given root partition to / and then calling /sbin/init (unless this has been overriden by other parameters).Then the init process starts the rest of the system by loading all services that are defined to be started in your default runlevel. Depending on your configuration and on the init system that you use, there can be multiple other steps between the ones that I mentioned. Currently the most popular init systems on Linux are SysVInit (the traditional one), Upstart and Systemd. You can find more details about the boot process in this wikipedia article.Here is a simplified example of my Grub config. The important part to answer your question is on the second to last line, there is a root=/dev/sda3:menuentry 'Gentoo GNU/Linux' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-40864544-2d0f-471a-ab67-edd7e4754dae' {    set root='hd0,msdos1'    echo    'Loading Linux 3.12.6-gentoo-c2 ...'    linux   /kernel-3.12.6-gentoo-c2 root=/dev/sda3 ro  }In many configurations the kernel mounts / in read-only mode and all the rest of the options are set to the defaults. In /etc/fstab you might specify file system parameters which would then be applied once init remounts it.