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!

  • Dave.@aussie.zone
    link
    fedilink
    arrow-up
    19
    ·
    8 months ago

    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_1OP
      link
      fedilink
      arrow-up
      2
      ·
      8 months ago

      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.

  • chameleon@kbin.social
    link
    fedilink
    arrow-up
    14
    ·
    8 months ago

    sudo mv /etc/default/grub /root/old_etcdefaultgrub to get it out of the way, then sudo dnf reinstall /etc/default/grub to reinstall the package that provides it, giving you a fresh unmodified copy. Should work for practically any config file on Fedora.

  • Jordan_U@lemmy.ml
    link
    fedilink
    arrow-up
    8
    ·
    8 months ago

    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_1OP
      link
      fedilink
      arrow-up
      3
      ·
      8 months ago

      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.

  • catloaf@lemm.ee
    link
    fedilink
    English
    arrow-up
    9
    arrow-down
    3
    ·
    8 months ago

    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_1OP
      link
      fedilink
      arrow-up
      5
      ·
      8 months ago

      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.

  • Pantherina@feddit.de
    link
    fedilink
    arrow-up
    7
    arrow-down
    1
    ·
    8 months ago

    No you should not reinstall the system.

    You use grubby to change grub configs afaik