I tried to use a bind mount from my /d(another partition)/usr to /usr
And I tried that several times using fstab and failed, can someone have a look?
fstab file:
# / was on /dev/nvme0n1p2 during installation
UUID=b3dc29ae-e63b-4ced-89ab-1173755b3f6c / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/nvme0n1p1 during installation
UUID=3124-2C6F /boot/efi vfat umask=0077 0 1
# /d was on /dev/sda during installation
UUID=2ca0cc41-b46c-4b39-8c08-70bccc8698d2 /d ext4 defaults 0 2
/swapfile none swap sw 0 0
/d/usr /usr bind bind 0 0
If I mount it somewhere that's not /usr everything works fine.
But if I mount on /usr, it gives the following error on startup:
mounting /d/usr on /root/usr failed: No such file or directory.
failed to mount /d/usr as /usr file system.
I copied these 2 errors myself because you can't actually copy them.
After that ubuntu leads me to a ash terminal and I can sudo mount -a
just fine, but it stops me from starting up.
the fstab works well anytime after startup using sudo mount -a
.
As K7AAY recommended, the version is Ubuntu Desktop 20.04 LTS, 64bit.
/d/usr /usr none bind 0 0
– vanadium May 26 '20 at 14:05/usr
is a very essential folder containing important system libraries.Why do you want to mount anything on/usr
? – mook765 May 26 '20 at 14:47/usr
to a different partition in an earlier version, I cant't remember if I tried it with 16.04 or 18.04. Theoratically it should work but in praxis it doesn't. Maybe due to the importance of/usr
, maybe a problem with systemd. I don't know if we can have/usr
on a dedicated partition when we install the OS this way from the beginning, never tried this. – mook765 May 27 '20 at 06:55