There I was last night - thinking about how kick arse my re-vitalized Ubuntu 18.04.4 “gaming rig” was (going from 12 GB RAM to 16, adding a GTX1650 Nvidia GPU and 32" QHD monitor), I even tempted fate (and Murphy) by crowing about it in an email to my brother 3,000 km away in gloomy old Melbourne Town (he works in IT but in a more “management” focussed role, and runs Windows stuff mostly everywhere)…
So what happens? I’ve got like 5 USB hubs hooked up to my system, 2 of them are USB 3, and 3 of them USB 2 (one of them via a “daisy chain”)…
All of a sudden all my desktop “shortcuts” to Pictures, and Documents, no longer work… WTF? It actually took me 2 hours or more to realise… I was actually “working” and had taken a couple of screenshots (using Prt-Scrn key) - and they weren’t appearing in my ~/Pictures folder… What’s going on?
WTF? Some really weird stuff (i.e. SH!T) going on…
Rebooted - ALL my ~/ gnome shortcut doohickies were gone for my user profile! All of them!
Note : this particular install of Ubuntu was done in 2018, which is unusual for me - generally the lifespan of an operating install for my personall stuff is about 3 months…
Reboot again - to the hideous, infamous "Press Ctrl+D to continue, or enter root password, run’“journal -xb blah blah blah’”- this has gotta be a Debian thing that Canonical forgot to remove… Who even sets a “root” password in Ubuntu? Luckily for me, I ALWAYS DO (e.g. “sudo password -r files root”) - so I knew it - but in a TTY with no buffer, how do I find whatever the “F” it is that’s stopping me from booting?
Seriously “journalxctl -xb” is a piece of cr@p… What’s the point? Is there even a scroll up
bugger in a Ubuntu/Debian virtual TTY (e.g. Ctrl+Alt+F3)…
My first hunch was Hard Drive issues… So I plonked a 4 GB thumb drive into another machine and “burned” (using “dd”) a ubuntu 18.04.4 USB to either rescue, or re-install, as a stand by while I troubleshoot…
Then in “single user mode” (i.e. login as root or press Ctrl+D to continue)… Did that several times - and because I’ve got usually 3, but some times 4 SATA devices hooked into this system - it turns out it was probably the “ancient” device name change issue… e.g. what was mounting as /dev/sdb1 could become /dev/sdd1 et cetera… and when init and/or systemd couldn’t find a device I’d religiously quoted in /etc/fstab, it spat the dummy…
Did several fsck (how much does this look and want to be pronounced as the “F bomb”? I know all about this b@stard, had to support like 20 Sun servers on a site with no UPS - they’d lose power at least ever six weeks, and I’d spend the next 16 HOURS doing FSCK on every raw SCSI device name!)
Anyway / UPSHOT : I just commented everything but my “/” (which gets mounted using a UUID, and not "/dev/sda1 or /dev/sdb1) - booted up - and all good - but all my lovely Gnome shortcuts like “Documents” and “Pictures” and “Music” was still gone…
So - I rebuilt all of those again as symlinks, then edited ~/.config/user-dirs.dirs to point to the locations (when gnome doesn’t find them - it empties that “value”)…
So anyway - longer story into TL;DR - if you’re going to mount disks in your FSTAB, don’t be lazy, query the UUID of your device and change e.g. /dev/sdb1 or /dev/sdq3 to “UUID=5e898664-27d1-4e7b-87a7-2f13a83e4c8e” and if that thing switches from /dev/sde3 to /dev/sdz3, your system won’t give a rat’s…
Proviso - I recall a time when some Linux systems stopped new devices at 8. e.g. all was good until /dev/sdh, but would barf at 9 (i.e. no such device as /dev/sdj)…
Word to the wise - "sudo lsblk -f " will usually grab the UUID of your disks and partitions… cross reference that with what’s in your /etc/fstab… and ALWAYS use the UUID!!! (or just goddamn well use LVM like I do on all the hundreds of Linux servers I manage!)…
Further to TL; DR : I think I spent about 2 hours on this trouble-shooting… versus a 1 hour Ubuntu re-install, followed by 1 hour getting NVidia GPU working, then overnight getting all my cloud data and Steam games re-syncing…