Hi @chiagonyc,
EDIT 4: Ok, I think I’ve figured out the problem now. Please use this method!
Sorry for the mistake in my suggestion. It looks like /etc is part of the ostree (The way Fedora Atomic/Ublue makes its updates “immutable”/atomic). This is normally good, but may make our job harder… Please proceed with these instructions at your own risk!
You may be able to edit /mnt/ostree/boot.?/fedora/*/0/etc/passwd. Only edit one line, or append one line. Best to run this first:
grep ':1000:' /mnt/ostree/boot.?/default/*/0/etc/passwd
and look for lines that don’t match the format I suggest below. This may be multiple files. You should probably only edit only the first one, then see whichever “snapshot” is able to boot (From grub, you’ll probably have to try one at a time). I included the * because that directory is a “random” long hexidecimal hash, so better to not try to type it. I also don’t know how to correlate which hash belongs to which “snapshot”.
First, even though the system is broken, you should back up the file:
ls /mnt/ostree/boot.?/default/*/0/etc/passwd | while read file; do cp "${file}" "${file}.bak"; done
Then the backups will be next to the originals with a .bak suffix.
Also, in the .../etc/passwd file, I mentioned you want a line in the format: USER:x:1000:1000::/var/home/USER:/bin/bash (Don’t edit the other lines!)
nano /mnt/ostree/boot.?/default/*/0/etc/passwd
(You can replace nano with another terminal-based text-editor if you prefer.) Note, each time you save and exit, it will bring you to a new file to edit, probably a total of 5 to edit, looking at the outputs you sent.
Where a better format would be:
USER:x:1000:1000:FULL_NAME:/var/home/USER:/bin/bash
where USER is your Linux username (Hopefully, you know this already! It should also exist as a directory in /mnt/var/home/ often the first word of your full name, all lowercase), and FULL_NAME is your full name, e.g. the full name you want to appear on the lock screen. Again, don’t edit the other lines! If the line doesn’t exist, you’ll have to append it, but for the moment, I’ll assume it does, unless you tell me otherwise! Please be careful here… Make sure this line has exactly 6 of the character : … Also, please make sure you’re only editing the end of the line, if everything else looks correct already!!! (i.e. just the /bin/bash instead of /bin/zsh or /bin/whatnot )
I wouldn’t suggest this in general, as it might mess up your system, depending on how ostree works, but if your system seems completely shot, maybe it’s worth a try… Can someone with more experience than me let us know if this is dangerous to the way ostree works?
Thanks, Good luck!
EDIT 1: Replaced /boot.1 with /boot.? which is more generic.
EDIT 2: I just tried this on an extra snapshot, and it appears to not mess up ostree, but still Your Results May Vary! Please proceed at your own risk! Also please type commands exactly as they appear! I’ve also tried to clean this up somewhat.
EDIT 3: More clarification and command to edit all the files.
EDIT 4: Noticed problem with my assumptions. should be /mnt/ostree/boot.?/default/*/...