11

I mounted a partition on /usr accidentally. Hence, I have lost access to sudo command and can't unmount the partion. I am using AWS EC2 instance and don't have password for root user set.

What are my options? Will reboot unmount the newly mounted partition and will I get access to content of /usr again? Or else, how can I get root access? Are there any threat of data loss or system going to unusable state after reboot?

Any help would be appreciated.

A.B.
  • 89,123
  • 21
  • 245
  • 323
Rumit Parakhiya
  • 213
  • 1
  • 6
  • If you have the `root` account (password) enabled, you can do `su` and then `umount` the partition.. – heemayl Apr 10 '16 at 03:31
  • 1
    @heemayl I didn't had root account enabled. So, was out of this option. Reboot resolved the issue. – Rumit Parakhiya Apr 10 '16 at 05:42
  • A reboot will help you (as told above). This is not a weird thing. System administrators do this to save their time (by actually not creating a new mount point). Source: A Flickr DevOps. – Avineshwar Apr 10 '16 at 11:05

1 Answers1

18

Yes; a reboot will get rid of the mount.

psusi
  • 37,033
  • 2
  • 68
  • 106