Score:0

Ubuntu changed to Read-only file system after update & rbenv install

jp flag

Linux noob using Ubuntu 20.04.3 to learn code.

Background: This morning I was prompted by Ubuntu to install updates and restart. I have been installing rbenv and Ruby Gems this week trying to fix my development environment (I had previously installed Ruby via sudo apt and it was causing havoc). I had rbenv working fine and it was setting the global version of Ruby to the correct latest version, but I had to source ~/.bash_profile in order to prepend the shims correctly, otherwise it would default to the ruby installed by apt. I also did sudo apt upgrade from the terminal before installing rbenv and it all worked fine for 3 days until I did the update/restart I was prompted to.

Now, chaos.

Trying to source ~/.bash_profile I get he following error:

/usr/lib/rbenv/libexec/rbenv-init: line 131: cannot create temp file for here-document: Read-only file system

Trying to save any files using the GUI I get

Failed to save 'GREED_RULES.txt': Unable to write file '/home/vida/Desktop/koans/GREED_RULES.txt' (Unknown (FileSystemError): Error: EROFS: read-only file system, open '/home/vida/Desktop/koans/GREED_RULES.txt')

Tried sudo mount -o remount,rw /dev/sda5 and get mount: /: cannot remount /dev/sda5 read-write, is write-protected.

My etc/fstab is

/etc/fstab: static file system information.
Use 'blkid' to print the universally unique identifier for a
device; this may be used with UUID= as a more robust way to name devices
that works even if disks are added and removed. See fstab(5).
<file system> <mount point>   <type>  <options>       <dump>  <pass>
/ was on /dev/sda5 during installation
UUID=a0f66c38-8b52-4d2f-87f2-a8ef1e49796b /               ext4    errors=remount-ro 0       1
/boot/efi was on /dev/sda1 during installation
UUID=A88E-FD34  /boot/efi       vfat    umask=0077      0       1
/swapfile                                 none            swap    sw

I've looked at a bunch of other questions like this but they are generally 5-8 years old and using virtual machines, this is a fairly fresh installation and the only OS on this machine.

Soren A avatar
mx flag
Often when a filesystem becomes ReadOnly it is because of a software or hardware error. Try booting up on a live media (USB, DVD ..) and run `fsck -y /dev/sda5` to check and repair the root FS. You can also take a look at /var/log/syslog for disk errors around the time when the FS became ReanOnly.
Siobhan Vida Ashmole avatar
jp flag
This worked well enough! Took a bit of work to reboot successfully (had ncq issues) but ultimately resolved it. Thanks!
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.