Score:1

Changes to fstab completely breaks ubuntu

ng flag

I have a 1TB HDD. Completely formatted it to free space in the Disks program and made a 500GB EXT4 partition to have the other 500GB for Windows, just in case. Looked up guides and threads on how to make it mount itself automatically on boot so I added PARTUUID=ba69b10a-b371-4ca0-a2af-8cfd309e34a3 /hdd ext4 defaults 0 2 to the end of /etc/fstab.

This method WORKED for a few restarts until one reboot when I was thrown into emergency mode root. Rebooted into recovery mode which in itself took a while because stuff kept timing out and when I recognized the PARTUUID in one of the messages I knew that was it. I entered root and commented my changes which got Ubuntu to boot normally.

I didn't catch any errors explaining what had happened or why so I'm asking here. While I can manually mount the drive everytime I restart or boot, it's very annoying.

Previously I had problems mounting the drive from the console when I had created the partition from Disks app: mount: wrong fs type, bad option, bad superblock on /dev/sda1, missing codepage or helper program, or other error which I fixed by running mkfs.ext4 /dev/sda1 and then mounting it again. But then the drive was read-only and I still just formatted everything in Disks app and recreated the 500GB EXT4 partition.

Clearly something is up with either my HDD or Ubuntu or both. The drive mounts normally when done from Disks app however. How can I have my HDD automount everytime I boot without problems?

zwets avatar
us flag
If you think the disk was the issue (did you try rebooting with the line uncommented in the fstab?), then could try a `mkfs.ext4` with `-c` or `-c -c` to check its full surface.
Nmath avatar
ng flag
Did you try just rebooting **before** you manipulated fstab? Internal disks typically mount automatically without intervention
Frappy avatar
ng flag
@zwets yes, done those things.
Frappy avatar
ng flag
@Nmath Yes. Unfortunately the drive doesn't mount automatically for me.
Score:1
ng flag

Replacing PARTUUID=ba69b10a-b371-4ca0-a2af-8cfd309e34a3 /hdd ext4 defaults 0 2 with UUID=f8f825b9-16a3-426c-a946-8aeb6eebcc51 /hdd auto nosuid,nodev,nofail,x-gvfs-show 0 0 has fixed the issue. (new UUID because I recreated the partition while fiddling around)

It probably didn't like the PARTUUID. I'm not so sure myself.

Organic Marble avatar
us flag
I think you are right. I use this method often, but I have never used PARTUUID.
mook765 avatar
cn flag
PARTUUID should work, if not, it'sa a bug. I use PARTLABEL in my fstab which works well. I always prefer LABEL or PARTLABEL, it's better readable.
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.