Score:1

Accidentally commented out main drive in /etc/fstab, cant boot, any way to fix this without clean install?

bq flag

Yall are gunna chuckle at this one, but in an attempt to resolve a slow boot issue, I opened up etc/fstab, commented what I thought was an unused drive causing the issue, and then rebooted to see if it resolved the issue.

In retrospect, I think I just commented out the main drive because now I can't boot. No backups either.

Is there any way I can fix this? Is there any way to open up the filesystem of my now defunct OS and edit that etc file when I can't even boot?

Score:1
cn flag

2 methods:

  • from a live session. Use the usb/dvd you used to create the system and boot from that. This is the easiest method; if you do not have a live session create it using another machine if possible.
  • from grub rescue. Press a key during boot and grub will show its menu and from here you can get a root prompt.

Both methods let you use "root" to edit files on your disks.

In case you do not know how you messed it up or do not know how to fix it; if you remove /etc/fstab it will be recreated on boot.

Don Quetzelquot avatar
bq flag
Thank you. I followed the instructions and was able to get it. I wasn't able to pull up the grub menu, but I loaded the iso of Ubuntu desktop to a USB using Rufus, selected 'try ubuntu' on boot, then found the drives to the defunct OS under `media/ubuntu/<partition ID>/etc/fstab`. They also showed up as SSD's on the taskbar.
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.