2

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?

3 Answers3

6

Boot into recovery mode and choose the root shell option, then edit and fix your fstab:

nano /etc/fstab
psusi
  • 38,031
2

I am exactly not sure if I understood you right but I think you may could reboot your machine and go in grub in the recovery mode and create a new user or use your normal user and give him back his admin/sudo permissions but I may understood your wrong. Just a question at last: You have stil got a /usr folder right? If not uhh this will a little bit mor complicated.(I think)

Rinzwind
  • 309,379
2

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.

Sergey
  • 44,353