cross-posted from: https://pawb.social/post/7200764
I can't edit /etc/default/grub
I'm trying to update my grub boot order back to booting the first option instead of the second, so I run
sudo nano /etc/default/grub, but it brings up this, which is not the file I want to edit.I'm on fedora 38
It has been solved!

18 Comments
dgriffith@aussie.zone · 19 pts · 2y
Read the first couple of lines in that file, they provide a vital clue as to where you should be looking and what you should be doing.
Interstellar_1@pawb.social · 2 pts · 2y
Sorry, I think I forgot to update my original post to mention this, but I think I somehow overwrote this file with the contents of grub.cfg so that file is no help to me.
thantik@lemmy.world · 1 pts · 2y
This guy right here...he knows what he's doing. :)
We used to just say "RTFM", but this is nicer.
Try grub2-mkconfig
Starbuck@lemmy.world · 14 pts · 2y
Don’t you go and reinstall, learn how to fix this
Morphit@feddit.uk · 2 pts · 2y
It stinks: https://youtu.be/SHcqNVjGJN4
Starbuck@lemmy.world · 2 pts · 2y
How have I never seen that before. It’s perfection
PipedLinkBot@feddit.rocks · 1 pts · 2y
Here is an alternative Piped link(s):
https://piped.video/SHcqNVjGJN4
Piped is a privacy-respecting open-source alternative frontend to YouTube.
I'm open-source; check me out at GitHub.
chameleon@kbin.social · 13 pts · 2y
sudo mv /etc/default/grub /root/old_etcdefaultgrubto get it out of the way, thensudo dnf reinstall /etc/default/grubto reinstall the package that provides it, giving you a fresh unmodified copy. Should work for practically any config file on Fedora.Interstellar_1@pawb.social · 2 pts · 2y
I did this and it worked! Thanks so much !
billgamesh@lemmy.ml · 12 pts · 2y
superuser.com/questions/469249/how-can-i-restore-grub-for-fedora ... maybe try rming that file, then /sbin/grub-install. All else fails, use package manager to purge and reinstall grub
bceuhwps@lemmy.ml · 7 pts · 2y
Fedora uses grubby to edit grub. Read documentation. Do some research.
Interstellar_1@pawb.social · 2 pts · 2y
Cool, thanks I'll check this out.
Jordan_U@lemmy.ml · 6 pts · 2y
I was helping you there and asked you to back up configs and post some information.
Once you've done that I think actually getting things back the way they should be will go fine.
Interstellar_1@pawb.social · 3 pts · 2y
Oops, sorry, I must have missed that. Tomorrow I'll try grubby, and if that doesn't work I'll get that information back to you.
CaptDust@sh.itjust.works · 6 pts · 2y
Interstellar_1@pawb.social · 1 pts · 2y
Thanks!
Pantherina@feddit.de · 6 pts · 2y
No you should not reinstall the system.
You use grubby to change grub configs afaik
catloaf@lemm.ee · 6 pts · 2y
Did you even try? A bunch of people, including myself, gave you plenty of suggestions.
If you're expecting to have your hand held and the solutions spoon-fed, consider Windows or macOS. If you want to use Linux, you have to help yourself, or at least help us help you.
Interstellar_1@pawb.social · 5 pts · 2y
I am sorry, I have been very busy and was planning on getting back to this when I have the time. I have done a lot of searching over the past months, and the comments on this post have mostly been very helpful and seem like they will work, so that's great actually. I am sorry if my post comes off as lazy or something, because that is not my intent.