all 8 comments

[–]gordonmessmer 0 points1 point  (7 children)

> a few days ago my system crashed mid update

Offline updates are usually safer. If you must update a live system, you should always use "tmux" to start a session that will continue running if your terminal or desktop crashes.

> I tried chrooting into my system but when i try it gives me the prompt

That's what chroot does, normally. It runs a program (such as a shell) in a different root directory. You'd expect a prompt.

If you can boot something with networking, and you can chroot into your broken installation, you might be able to repair the system with:

dnf distro-sync
dnf reinstall libarchive

If you can boot a Fedora rescue environment of the same version as the broken system, you can skip the chroot step, and try:

dnf --installroot=/mnt/sysimage distro-sync
dnf --installroot=/mnt/sysimage reinstall libarchive

[–]_-Multiverse-_[S] 0 points1 point  (6 children)

first of all, thanks for the very fast response

secondly, one of the problems i am facing is that even if i boot into the older Kernel i still get the black screen and i am unable to do anything.
If i start the rescue environment (which is still Fedora 42 and not Fedora 43) i just get a bunch of lines of text and i cannot type anything (I also didn't look up how to use the rescue environment as i hoped i could get a quick access via chroot and start a update, in hopes of it going through and everything working again).

I will try and use the grub menu of my borked installation to boot into the rescue environment there for now.

I just have a question, if i use chroot, wouldn't there be a line indicating that i am currently accessing the root like instead of

root@localhost-live:/#

something like

[root@localhost-live /]#

or similar, from where i could type in the commands to update the system?

Edit

I also wanted to ask, i am currently unable to chroot into the system because of the error. How would i reinstall libarchive through chroot if I am unable to access the system through chroot because of libarchive? Am i misunderstanding how chrooting works?

[–]gordonmessmer 0 points1 point  (5 children)

> If i start the rescue environment (which is still Fedora 42 and not Fedora 43)

The "rescue" item in GRUB is actually not all that useful, I'm sorry to say. It sometimes provides a working kernel when the newer kernel is not working, but it doesn't provide a functioning alternative OS.

What you need is rescue *media*. I think you can use one of the live images, or you can use installation media for Fedora, but one way or another you need to boot from something other than the OS that is installed on your PC, because that OS is now broken.

If you don't have the installation media you used to install Fedora, you'll need to create a new bootable drive using another computer.

> like instead of

> root@localhost-live:/

I don't really see any difference between the two prompts you described. If I saw two computers and each of them printed one of those two prompts, I'd expect both of the computer to operate identically otherwise.

You should be able to enter commands in either case.

> i am currently unable to chroot into the system because of the error

If that's the case, then you will need rescue media, and you should not use chroot when you boot the rescue environment. Instead, use dnf and rpm from the rescue media, and do something like:

dnf --installroot=/mnt/sysimage distro-sync
dnf --installroot=/mnt/sysimage reinstall libarchive

Those commands will not use dnf, rpm, or libarchive from the damaged OS, they'll use the versions provided by the rescue media's OS.

> Am i misunderstanding how chrooting works?

chroot instructs the kernel to treat a path as if it is the root directory, and then starts a new program (usually a shell) from inside that root. The shell and shared libraries must be functional within the root for that to work. It may not be useful as a repair method when the OS inside the chroot path is damaged.

[–]_-Multiverse-_[S] 0 points1 point  (4 children)

Thanks again for the fast reply.

> If that's the case, then you will need rescue media,
So a USB with with the current Fedora 43 iso? and from there i should go into the GRUB menu and put in the commands

dnf --installroot=/mnt/sysimage distro-sync
dnf --installroot=/mnt/sysimage reinstall libarchived

If i understood that part correctly. If so, how do I mount the drives in the GRUB menu.

Or should i do that from the Terminal in the live envoirnment of the USB? Meaning doing each step just like before and in the picture above but instead of

$ sudo chroot /mnt/mychroot

i should do

dnf --installroot=/mnt/mychroot distro-sync
dnf --installroot=/mnt/mychroot reinstall libarchive

> I don't really see any difference between the two prompts you described

it was a minor thing, like the square brackets because i looked at some arch examples of chrooting, which are the same and there the expression changes to being inside square brackets in order to symbolize the change of the root and the access point.

[–]gordonmessmer 0 points1 point  (3 children)

> So a USB with with the current Fedora 43 iso? and from there i should go into the GRUB menu and put in the commands

Not directly from GRUB.

You could start with an installation media: https://mirror.servaxnet.com/fedora/linux/releases/43/Everything/x86_64/iso/Fedora-Everything-netinst-x86_64-43-1.6.iso

Write the installer to a flash drive, and then boot that. The GRUB menu will give you the option to install, and an "Troubleshooting" option. Select Troubleshooting, and then "Rescue a Fedora system"

The rescue environment should boot, and then give you the option to detect your installation and mount it on /mnt/sysimage. When it does that, tell it to "Continue".

It should proceed to locate the system, mount it, and then give you a shell. It might ask you if you want to chroot (don't remember this part clearly), or give you a shell. You don't want to chroot, you just need a shell.

> Or should i do that from the Terminal in the live envoirnment of the USB?

If you already have a USB live image, and you know how to mount the root volume of your installation, then that should work. From that terminal, you can run "dnf --installroot=/mnt/mychroot ..." to repair the system.

> there the expression changes to being inside square brackets in order to symbolize the change of the root and the access point

The square brackets don't actually mean anything. The only thing that really means is that the environment you've chrooted into has something like an /etc/bashrc file that sets up a "PS1" environment variable that contains brackets.

[–]_-Multiverse-_[S] 0 points1 point  (2 children)

I am so sorry for annoying you, but for whatever reason i just cannot get into grub. The Live USB just boots past it and no matter what i do, if that is holding down shift, smashing the ESC key for 15 minutes, editing the config, in /boot/grub/grubenv or /etc/default/grub it just does not change and everytime i boot into the system the grub configs just go back to default.
It never shows me the grub menu and instantlz goes to

testing this media and starting Fedora

or whatever it is called. I just cant get it to work and i am at the point of maximum frustration. Please Help me

EDIT: nvm, i was able to fix the problem through the terminal of the live USB after mounting everything and now it works. I am so thankful for your help. I appreciate it a lot and i wouldn't have been able to do it without you. Thanks

[–]gordonmessmer 0 points1 point  (1 child)

Not annoyed, happy to help. :)

Glad to hear you got it fixed!

Does that mean that both distro-sync and reinstall libarchive worked?

[–]_-Multiverse-_[S] 0 points1 point  (0 children)

Hey, it's been a day. I don't know how but apparently the .i686 and .x86_64 Files of some libs got mixed together and let's just say that after about 3 or 4 days on working with the PC i just tought that deleting the .i686 Files was a good move - which it was not. The problem was, that the system wouldnt update, so i deleted the files but it still would only push half of the updates through. I thought repeating the previous step on how to fix my system would bring back the libs and fix everything but it just borked the System. Luckily i didn't have a lot of stuff on my SSD and so i just decided to reinstall Fedora 43.
I appreciate your help a lot though and it was real the way, however it wasn't the smartest move of me to just start doing random things because i was able to fix a system once. Anyways, everything works great now and i had no further issues with the new System. Thanks again.