High Weirdness: Can't login on Wayland....can't run anything other than built in shell commands in terminal

I have the AMD 13 inch Framework laptop and it has worked well for me with Fedora…until now.

Suddenly - I don’t know what triggered it - I can not log in to my account with Wayland on Gnome. I can login without Wayland and I can log in on KDE which I also have installed…

But in addition to that, once I do log in, if I open terminal, I can not run any commands - it says they are not found. So, I was unable to do any of the diagnostics or suggested fixes I found online for various wayland and gnome issues…

I am wondering if this is related to recent updates or the BIOS issues? I have no idea…I am a little creeped out becuase this happened without warning as far as I can tell … and the thing is virtually bricked for me at the moment…any help is appreciated.

Sounds to me like your SSD’s formatting is borked. Not sure what could cause that, but I’ve had similar things happen a couple times in the seventeen years that I’ve been using Linux. In my case, both of them turned out to be software problems rather than hardware, but it could be either.

You might be able to repair it, or at least confirm that that’s what is going on (look up fsck if you’re not familiar with it). Although if you’ve got a pretty recent backup (you do make regular backups, don’t you?), it would probably be simplest to reinstall from scratch.

Before you start reformatting and reinstalling, can you run a couple easier checks?

Launch a broken shell, and run…

echo $PATH

If it’s empty or too short,

export PATH=/bin:/sbin:/usr/bin:/usr/sbin

That should restore your access to most of your system administration tools for that session.

Now, if PATH was the problem, you can set about figuring out who reset it. Is it one of your shell .profile (.bash_profile, .bashrc, .zshrc if you’re a zsh person) files? Is /etc/environment intact? Is /etc/profile (and /etc/profile.d on some distributions) OK?

If PATH was fine and you’re still seeing errors… what are those errors?

2 Likes

Guess an update was not complete and is borked.
Boot into recovery, mount the drives, and issue a full upgrade.

I would bet on a software issue too. But there is a way to know: boot a live Fedora from usb and if everything works fine the problem is probably related to your installation. If everything works you’ll have many ways to do the proper diagnostic. You can also compare the “shell profile” and “environment” files suggested above between your installation and the live system.

A million thanks for the help.

I was able to log in to KDE using x-org and get into the terminal. Thanks to @DHowett I was able to restore the bin and sbin to my path and use basic utilities. So I do think this is a software issue and I do think I should be able to fix it. I ran dnf update and it did do some updating of things…

But I am not out of the woods. It still won’t log in. I think I need to explore the fsck route recommended above by @Chad_Nelson. I think I will try that next and then - if I must - do a full reinstall. I have data backed up but I don’t have a full bootable system back up - so I think I need to add that to my back up routine after this experience…I know…3-2-1…

Thanks again for all the tips and help and let me know if you have other suggestions. REALLY HELPFUL AND REALLY APPRECIATED! Linux is great - but we are on our own!

2 Likes

2 things to take into account:

  • Backup the /home, /root /etc directories. home holds your user data, /root the root user’s data, and /etc the system configuration.
  • Install a fresh system. Make sure this time that you create a partition for the /home directory. This way, you separate the system from the user-data. Makes it easier later to recover.

I always do that. I also encrypt the /home partition but will make sure that the partition is not unlocked automatically!

This has been a useful lesson…again thanks to all.

I really don’t want to reinstall my system, but I am starting to think I must. Guess I can put Fedora 40 on there now, eh? What I hate is going through and setting up all my applications again…all the login accounts, api keys, etc. I wonder if there is a better way to preserve that information? If I back up the /home, /root and /etc directories as @Jorg_Mertin suggests, will that preserve my various application settins - like email accounts in Thunderbird, etc?

Thanks for the tips…coming up with a robust back up strategy for version 2.0 of this!

Ok…so…I rebooted and now it is working…like before…I could just log in…

So…I’m wondering what to do. Obviously my confidence is shaken. I wonder if I should just run fsck and see if it finds any errors. And then implement my backup strategy but otherwise move on? Or should I do a clean install and upgrade just to be on the safe side?

I also notice that my updater is now inviting me to Fedora 40 - I wonder if this is what when wrong? There is also a firmware update…hmm??

MAKE A GOOD BACKUP NOW!

You may not have a chance again. :slight_smile:

@Chad_Nelson I think i will get that tattooed on my arm!

1 Like

Since you plan of using Fedora it might be easy to use BTRFS to have features like snapshot, backups and subvolumes for home, root, etc, var and any other relevant path. I’ll take a look at. (Never used Fedora in the last year though).

Yes. Almost every application settings is saved in your home directory (either under .local, .config, .var or some other application specific path).

From @Jorg_Mertin’s list a possible path missing is /var which contains system level data, like logs, databases, flatpaks, docker, data of some system services. You might want or not want to also backup some of these data.

Also some corrupted data in /etc might be the cause of your problem. So I would not blindly restore all /etc after a reinstall.

@Ulmondil Good points all around. I am presently planning to do the following:

  • Backup stuff I care about first (thanks @Chad_Nelson)
  • Update to 40
  • Establish a back up routine to back up key folders (/etc, /home, /root, /var) on a regular pattern (daily?)
  • Establish a back up routine to back up a whole disk bootable clone to a big USB harddrive on a weekly basis
  • Establish a back up routine to back up key folders to offsite storage (Backblaze b2)
    I also use Dropbox for plain old documents, so a lot of stuff is already backed up there.

I was also looking at going with an Atomic version of Fedora, but I’m a developer and it looks like it might be a pain since I use a lot of terminal tools and such.

1 Like

A final point: keep several sets of backups, not just one. If you only have one, then a corrupt file that you don’t notice immediately will corrupt its backup too.

I keep one backup from every year; one backup from each of the last twelve months; one backup from each week in the last month; and one from each day (that I make a backup) in the last week – I usually only make a backup once a week, but sometimes more often if I’m doing something that I think warrants it.

It’s also a good idea to make an off-site copy of your backups. I keep my “live” set of backups on a BTRFS RAID1C3 volume on my NAS system, a second set on an encrypted external hard drive that I update every few weeks, and a third set on another encrypted external hard drive that I swap with the second set regularly and keep at a different location away from my office. It might seem like overkill (and probably is), but it would require a truly massive and devastating set of circumstances to rob me of more than a small portion of my data.

I use borgbackup for my backups on an external device. It deduplicates and maintains the backup size low. So far, for my home Network, I’m at 100Gb size knowing that my family does not care about storage space … :}

I use a custom backup script, which employs BTRFS’s deduplicating system to keep my backup size low. :smile:

I am learning that there are a LOT of ways to backup a linux computer. I am looking into a good approach - and I’ll chronicle what I come up with here. But I really appreciate knowing what others are doing. Borg looks interesting. So does scripting with rsync or something like it. So does making clones with Clonezilla. And I don’t even really know what BTRFS is capable of on its own. But I know it is better. Or butter?

Glad you’re back in business!

There are many ways to achieve the same goal.

I’m a fan of rsync. I combine it with cron to automate a weekly backup at work. Monthly, that backup is tar’ed and bzipped into a snapshot. Annually, the snapshot is archived.

While man rsync is your friend, some helpful flags I recommend:
-P show progress
-a archive
-h human reabable nums
-m prune empty dirs
-x stay on one fs
-v verbose
-n or --dry-run, see what will be copied
–exclude limit what gets copied or use
–exclude-from=FILE to define excludes in a file (more portable!)

Other considerations:
-W whole files, with today’s fast drives, usually less cpu intensive for many smaller files. If you tend to have lots of HUGE files, better to leave off.
-R relative paths, may help depending on backup media

Whichever way you manage your backups from here forth, may you never need them :wink: