Sudo – How to Recover from Mounting /usr/ nosuid


I was able to move /usrto an external harddrive. In fstab I mistakenly mounted the drive with nosuid. Now I can't use sudo or su. I can't edit the fstab entry. When I manage to open it I can't do so as root and it therefore is read-only. I can provide more details if need be.

How can I fix this?

Best Answer

I'm probably late to the party, but recently I learned that having /usr on a separate partition is not such a good idea anyway - some things during the early Linux boot expect /usr to be available - so generally there will be silent failures unless you also modify the initrd to mount /usr during the early boot:

Most of the failures you will experience with /usr split off and not pre-mounted
in the initramfs are graceful failures: they won't become directly visible, 
however certain features become unavailable due to these failures.
Here's a short, very in-comprehensive list of software we are aware that currently
they are not able to provide the full set of functionality when /usr is split off 
and not pre-mounted at boot: udev-pci-db/udev-usb-db and all rules depending on
this (using the PCI/USB database in /usr/share), PulseAudio, NetworkManager, '
ModemManager, udisks, libatasmart, usb_modeswitch, gnome-color-manager, usbmuxd, 
ALSA, D-Bus, CUPS, Plymouth, the locale logic of most programs and a lot of 
other stuff.

See Booting Without /usr is Broken for more details.

Related Question