Which partition should /usr be on

As per this document /bin and /sbin contains minimal files for system boot up and repair and /usr is separate partition so that it can be easily unmounted for repair.

But as per this info on partition, all directories essential for booting (except /boot) must be on the same partition where / is.These essential directories are /etc and /usr

I find this two documents contradictory.

1. According to the first link /bin and /sbin are essential for boot up, then why only /etc and /usr are said to be essential by second link ? Is it the case that system can bootup in single user mode using /bin and /sbin only but for full mode /usr and /etc are also required ?
2. Why is it essential for /usr and /etc to be on same partition as root but not for /boot, /bin and /sbin
3. How come /usr can be made read only ? As far I know /usr/bin is used to store binaries by package managers.
4. Also somewhere I read that /bin and /sbin contains code for mounting other file-systems, if that is the case who mounts the /? IS it done by grub ?
• On Ubuntu the directory /usr is put on the system (or /) partition. On some older distros (including BSDs) user data goes into /usr (there is no /home) which is what is confusing you. Your first 'this' document wasn't being specific as related to unix-like systems. Do whatever the OS you are using expects; which for Ubuntu is /usr being in the / partition. – guiverc Nov 24 '17 at 11:08

You are reading documentation from 2006 the idea that their practices mentioned in them seem contradictory is not surprising.

However lets answer this given the modern state of Linux distributions.

• /sbin is system binaries
• /etc is host-specific system-wide configuration data
• /usr is shared, read only data
• /var is host-specific, persistent, variable data
• /run is run-time (since last boot) variable data

Given that lets consider each of your points:

1. This is because of service managers including init.d require both host configuration and the shared (user) /usr/bin for programs. The second link is implying booting as in booting normally while the first link is referring to administrative tasks such as system recovery. Both are correct given the context.

2. Modern Linux don't actually have a /bin instead its in /usr/bin which is considered essential in the second document. /boot need not be on the same partition because it contains data for the bootloader and Linux doesn't necessarily need it while booting itself after the bootloader. Further /boot will usually be a separate partition with a file system the bootloader supports. This just leaves /sbin, the linux kernel will call init after some point however file systems are mounted as part of the initram. Information contained in /etc/fstab may contain where /sbin/ is to be mounted before /sbin/init is called therefor it can be seperate.

3. The second link isn't actually saying that /usr must be mounted read-only only that its intended to be read-only from applications perspective. However files are still changed as part of the administrative tasks of installing and updating software. Certain tools like the package manager therefor to write data here.

4. GRUB is aware of file systems although given your phrasing its worth noting that it wouldn't really matter from Linux's perspective. For example on Android the kernel (system program) and initram are stored in partitions with no file system. A bootloader will then load Linux and initram into memory and call into Linux. Linux will then mount root from the initram. The initram contains the necessary kernel modules and software to access hardware and mount the root file system it doesn't need any configuration to do this because it was passed on from the bootloader. But then it will access files like /etc/fstab, mount /sbin if needed before calling /sbin/init.

According to Ubuntu documentation

The following directories should NEVER be placed in their own separate partitions:

• /bin -- This directory stores the system wide executables that are accessible by most users.
• /sbin -- This directory holds the executables used for core system functions, and used by the system administrator to maintain the system.
• /proc -- This is a system use directory containing process information. Almost never accessed by a user.
• /dev -- This directory contains system created links to your installed hardware, and like /proc is almost never accessed directly.

Any other directory can be placed on a separate partition provided it's mounting is correctly noted in /etc/fstab. However over doing this can significantly affect performance.

Grub Loads the kernel and initramfs (initial RAM filesystem). It is initramfs that checks and mounts drives, then starts the boot process.

Note: /etc contains system configuration files; including fstab, which specifies mount points. I'm not sure how initramfs handles this. But I would say that, /etc should be added to the list since a cursory web search indicates modification to boot files or kernel is necessary to accommodate moving /etc to a separate partition.

Reference

https://help.ubuntu.com/community/DiskSpace

This is a regression introduced by systemd, which has tighter integration into the desktop environment and therefore requires libraries and daemons at boot time that on a traditional Unix system would not be considered part of the minimal core system.

With modern hardware, a separate /usr partition is not usually worth it for most users, so that is considered an acceptable trade-off.