Announcement

Collapse
No announcement yet.

Ack! Boot broken after grub config!

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Ack! Boot broken after grub config!

    Hi! I've been struggling to get a usb keyboard to work. It works everywhere all the time except on the grub screen (it works in BIOS).

    Based on some online threads, I added
    Code:
    GRUB_TERMINAL_INPUT="usb_keyboard"
    GRUB_PRELOAD_MODULES="usb usb_keyboard ohci uhci ehci"
    ...to /etc/default/grub and then ran update-grub and rebooted.

    Now when i try to boot, it gives the error:

    Code:
    error: disk 'hd0, msdos1' not found
    On the grub command line "ls -l" just returns the same error.

    I'm pretty confused and would love to get back into my machine! Any advice?

    I'm going to boot a live USB and see what i can learn.

    #2
    Most effective way would be to live boot, chroot, reinstall grub. https://www.bleepingcomputer.com/for...hroot-command/

    Is there a reason you need the grub screen? do you dual (or more) boot?

    Comment


      #3
      Thanks! -- yes I have several other linux installs and a windows install on the same machine.

      Update: before I saw your post, I got to the live USB's grub screen, went to the grub terminal, did this:

      Code:
      set root=(hd1,1)
      linux /boot/vmlinuz root=/dev/sda1
      initrd /boot/initrd.img
      boot
      ...and that booted my main install normally. Then I removed the grub config lines I had added, did update-grub, and now it boots normally.

      So I'm back to normal, which is great, but I'd love to understand why those grub config lines were so harmful. Any ideas on that?

      And, bigger picture, I'd love to try them again (correctly, assuming I'm doing it incorrectly) so I can attempt to get the keyboard working.

      Comment


        #4
        Do remember that for most installs (uefi) each OS has its own separate bootloader, so every linux will have a separate grub. If something breaks for the main OS you access grub from, you should be able to select a different OS option using your system's boot menu F-key.
        The grub for those others might need updating, if there has been a kernel update on the desired distro install since the last time the currently-booted distro has updated its grub.

        Might save some amount of work or aggravation down the road

        Comment


          #5
          Originally posted by chconnor View Post
          Boot broken...

          Thanks! -- yes I have several other linux installs and a windows install on the same machine.
          Running multiple linux installs, with grub active in each, breaks the boot sooner or later. It's hard to persuade an installer to not overwrite the existing boot loader, and unless you stop it, a new kernel or a grub update in all those installs may overwrite the boot loader, with fragile results.

          If you have a main install that you plan to always keep going, I suggest designating that as the boot controller, and telling grub in all the others to be not active by removing grub-efi-amd64 in them. That's the dependency package that tells grub it is the active boot loader. On a new install do this as soon as possible, and if the installer has overwritten the boot, immediately boot into the main install (perhaps using a live USB) and rerun grub install from it.

          If you are the type of user that has multiple installs, IMO you'd suit taking control by making grub independent of any particular install by installing it to its own small partition or subvolume, and removing grub-efi-amd64 from all the Linux installs. One has to take on maintaining the grub.cfg, but this can be vastly simplified.
          Regards, John Little

          Comment


            #6
            Thanks claydoh and jlittle -- I will take note of your advice.

            Re: the keyboard, I'm so *&%*& close I can taste it, but no dice.

            Having experimented, including any of "ohci", "ehci", or "uhci" in the GRUB_PRELOAD_MODULES causes it not to boot, with the same error.

            The other modules don't prevent booting, but they also don't solve the keyboard issue.

            Intriguingly, the keyboard has worked a few times at the grub screen! Every time it happens I think I have figured it out (e.g. by disabling "fast boot" in bios, or some combination of GRUB configs, etc.) but it works a couple times after reboot and then stops working on subsequent attempts.

            It's maddening. I'm beginning to wonder if the keyboard is actually malfunctioning. Do people successfully use apple keyboards on linux? (I have all the rest of the quirky configs working great once it has booted, I just can't use it on the grub screen.)

            Comment


              #7
              Just in case it's relevant (though I think it's unlikely) not all USB connections are equal. A USB on a dock, or hub, or monitor can be problematic. Some cases use a hub to provide connections on the front and the like, so ports directly on the motherboard may be better, though it's years since I've heard of that.
              Regards, John Little

              Comment


                #8
                If you are multibooting with Windows and have fast boot set, it MAY be that Windows is playing poorly with your USB keyboard. A USB keyboard should "just work" in any OS as well as the BIOS without any special entries in a boot loader.
                The next brick house on the left
                Intel i7 11th Gen | 16GB | 1TB | KDE Plasma 5.27.11​| Kubuntu 24.04 | 6.8.0-31-generic



                Comment


                  #9
                  Thanks! I have tried in all the different USB ports... at first there were apparent differences: I thought I had it all worked out by simply plugging it into a different port, using a different USB extension cable, etc. But in the end it seems like the keyboard was only temporarily working and throwing me off the scent (you can read the saga here). This is part of why I suspect the keyboard may be messed up; e.g. bad connection cause transitory success/failure. Or some quirk of my motherboard/grub and this model keyboard (Apple A1243).

                  jglen490 -- thanks -- I haven't booted into windows in a week or two, though, so I don't think it's causing the issue.

                  I did find these reports of people having the same kind of issue (here, here, here), which is where I got the grub stuff from.

                  Comment

                  Working...
                  X