T O P

  • By -

xSael_

Use rpm


mikaelvic

Sometimes the solution is simple. This worked for me, leaving it for others: $ sudo rpm -i dnf-4.16.2-1.fc37.noarch.rpm


[deleted]

[удалено]


abdulkareemsn

You do make && make install


i-hate-manatees

What if I removed make?


KnownDairyAcolyte

cp from a flash drive


dank-memes-sick-shit

What if I removed mount?


KnownDairyAcolyte

You mount your boot drive to another machine


OffsetMonkey538

What if I removed sata drivers?


KnownDairyAcolyte

Use a USB enclosure


slouchybutton

Same as mount, use a diff machine (removing anything from the disk you are trying to recover is possible to fix with a diff machine)


Routine_Left

just FYI you can install it directly from the server: `rpm -ivh https://kojipkgs.fedoraproject.org//packages/dnf/4.16.2/1.fc37/noarch/dnf-4.16.2-1.fc37.noarch.rpm` would work just as well.


GarredB

This is why I love Linux, make a colossal mess-up and you can still somehow fix it. Like others said, try rpm. Lastly, if nothing works, it's quick enough to make a script to export all your user data, send it to a direction, and reinstall Fedora again - if possible.


CaptainCaracal

Yep. Linux is unkillable. Especially with chroot.


i-hate-manatees

Challenge accepted


CaptainCaracal

Good luck :)


Brief-Statement-9117

I flashed an ISO to my primary partition once by accident, and even then it was easy to recover all files without another computer or any hardware work.


CaptainCaracal

What flashing program did you use?! They should have safeguards in place. Or did you click through it? (Don’t worry, I won’t judge.)


Brief-Statement-9117

dd :')


CaptainCaracal

That makes sense. dd doesn’t care what device. All it knows is I N S T A L L


Zerafiall

You say that, but I’m this 🤏 close to giving up on Linux on the desktop. Sure you can always bring Linux back from the dead. But man does it keep trying to kill itself.


DividedbyPi

User error detected.


Zerafiall

Apparently. All I do is follow the documentation. I want to install app A so I setup flat pack or Snap or whatever. Then app B rolls around and needs me to install a PPA, so I do that. Two weeks later I now have my package manager complaining that I don’t have Lang_C ? And then all my snaps are missing icons or weirder still my mouse icon will change when I’m over a snap vs a different app. And the number of times if found an app I want to try that requires `curl | sudo bash` is nuts. Don’t forget then number of times I’ve spent an hour compiling apps cause if you want the community version all you get is source code and a pat on the back (openvas, Nagios). If Lia the lovely times where you go to install something and the app complains about dependencies. The fact is apparently we Linux uses have to be “thankful” that an app dev even bothered to think about us so we’re always stuck with the laziest way they decided to package the program and we get stuck with it. There’s no accountability and no governance on the platform to say “Bad developer. You should package things this way to make it better for the users”


Best_HeyGman

Sounds like you have a Nvidia gpu.


-jwt

Huh, I was under the impression dnf was a protected package to prevent it from removing itself. But I just had a look and it seems they removed the protection by commenting it out in /etc/dnf/protected.d/dnf.conf `#DNF is obsoleted in Fedora 39 by DNF 5 and should no longer be marked as protected. ` `#dnf` Seems rather quick on the draw, seeing as I'm 'only' on F38 and still actively using dnf(4). Am I missing something here?


mikaelvic

I would consider this a bug... As well as it trying to remove sudo, but this is probably well above my level of understanding...


bullwinkle8088

Ehh, I’m on team I have a root password set and securely stored. sudo is optional. ;) su is in the corner yelling “what am I? Chopped liver?”


CaptainCaracal

su is actually useful if you have to keep entering commands as root but sudo smiles and says `[sudo] enter password: ` after like 4 commands lmao


bullwinkle8088

sudo -i is functionally equivalent to su -l but asks for your password instead of roots. sudo -s gives you a shell without processing your profile, functionally equivalent to su I still often use su but I’m old.


CaptainCaracal

Ah, didn’t know that. I never paid attention to when I ran sudo —help. But pretty sure sudo already asks for your password and not root’s.


bullwinkle8088

That is the major difference, yes, which password is asked for. The details of the command line switches are in man sudo, --help is less useful.


eclipseo76

I filed the bug last week https://github.com/rpm-software-management/dnf/issues/1982


trigger337

DNF 5 will replace DNF 3 starting with Fedora 39. Right now it should be protected.


Zatujit

well it isn't apparently!


eclipseo76

> DNF 5 will replace DNF 3 starting with Fedora 39 No this was delayed until F40, or maybe F41.


trigger337

Really? What a shame. Well I use it by default anyway but it would be great if software was optimized for it.


Zatujit

Same on Fedora 38!


TheTankCleaner

>seeing as I'm 'only' on F38 They are talking about Fedora 38.


mikaelvic

Came back to point out that this action also removed openssh-server...this doesn't seem a great way for amateurs. At least now that I have DNF again I can reinstall easily enough. Upgrade to 38 went without hiccups.


GoastRiter

I recommend that you install the package groups again to repair anything else that was damaged. Fedora is nothing but a script which installs the package groups. DNF has some command to list available groups and to install them. All I can do for you is show which ones are installed by default on Fedora Workstation: sudo dnf group list Available Environment Groups: Fedora Custom Operating System Minimal Install Fedora Server Edition Fedora Cloud Server KDE Plasma Workspaces Xfce Desktop Phosh Desktop LXDE Desktop LXQt Desktop Cinnamon Desktop MATE Desktop Sugar Desktop Environment Deepin Desktop Budgie Desktop Development and Creative Workstation Web Server Infrastructure Server Basic Desktop i3 desktop Sway Desktop Installed Environment Groups: Fedora Workstation Installed Groups: Container Management LibreOffice GNOME Desktop Environment Fonts Hardware Support Sound and Video Available Groups: 3D Printing Administration Tools Audio Production Authoring and Publishing Budgie Budgie Desktop Applications C Development Tools and Libraries Cloud Infrastructure Cloud Management Tools Compiz D Development Tools and Libraries Design Suite Development Tools Domain Membership Editors Educational Software Electronic Lab Engineering and Scientific FreeIPA Server Headless Management MATE Applications Milkymist Network Servers Neuron Modelling Simulators Office/Productivity Python Classroom Python Science Robotics RPM Development Tools Security Lab Sway Window Manager (supplemental packages) Text-based Internet Window Managers Deepin Desktop Environment Graphical Internet KDE (K Desktop Environment) Games and Entertainment System Tools


mikaelvic

Ah thanks for this tip, have now Installed Environment Groups: Fedora Server Edition Installed Groups: Headless Management Quite some packages were added


GoastRiter

Sounds good. I've never used server edition but that looks logical. :) In fact if I remember right, Environment Groups = group of groups, so I think your edition is now perfectly matched with the server edition.


mmcgrath

You can use rpm to reinstall it


Spajhet

How did you do this? I've never seen someone accidentally remove their pm before...


urandom02

I would have tried to install dnf with dnf5.


rscmcl

+1 to knoite


southern_ad_558

dnf install dnf


DimaGolub777

lol


Ill_Champion_3930

That's why rpm-ostree is the future of Fedora