Adding a USB thumb drive to GRUB? SOLVED

Forum Forums New users New Users and General Questions Adding a USB thumb drive to GRUB? SOLVED

  • This topic has 7 replies, 3 voices, and was last updated Apr 15-8:12 pm by srgilbert.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #81351
    Member
    srgilbert

      I think I’ve got this figured out, please see below.

      Ok, this is probably a weird question, but here goes. I have an old HP laptop that I have setup as a dual boot with Windows XP(!) and antiX on the same 100 gb hard drive using the standard grub menu to choose.

      One quirk of this computer is it does NOT have a BIOS option to boot from USB even though it has three USB2 ports. You can only boot from the optical drive, hard drive or lan. What’s weirder still is that if you disconnect the hard drive it WILL boot from a USB! I’ve worked around this when needed by using Plops loader from a CD. What I want is to be able to run LibreELEC for KODI from USB without having to use Plops. I know KODI can run in antiX but the version that installs is too advanced for this system I guess so it won’t run. From UBS I can run an older version just fine.

      Anyway, is there an easy way to ADD a listing to the grub so I could theoretically leave the usb in and choose it as needed?

      Thanks

      • This topic was modified 1 year ago by srgilbert.
      #81353
      Anonymous
        Helpful
        Up
        0
        ::

        If the computer can NOT boot from usb, this is actually a witless question.

        Otherwise GRUB would have to be installed on the usb stick.

        #81369
        Member
        srgilbert
          Helpful
          Up
          0
          ::

          I thing I’m making some progress. I have a little experience with Grub Customizer so I installed that and am able to add a boot entry but I can’t seem to figure out what settings I need to make it work.

          #81371
          Member
          srgilbert
            Helpful
            Up
            0
            ::

            Jesus, I hope your attitude isn’t indicative of the rest of this forum.

            Grub Customizer absolutely does let me choose the directories on the USB and attempts to load, but I’m not giving it the specific information it wants yet. I don’t know enough about the file structure but I’m determined to figure it out.

            #81372
            Member
            PPC
              Helpful
              Up
              1
              ::

              Jesus, I hope your attitude isn’t indicative of the rest of this forum.

              Like you said in your original post, your question is “weird” and, like male said (although in a bit of a harsh tone), something that seems impossible in the way you asked.
              I do know that a Plop executable can be added to Grub (but I never tested that), so, you get it to indirectly boot from USB drives…

              Don’t be afraid to ask strange questions – sometimes it’s the way we get to find out new things!

              Please, if you do have success with adding that feature to Grub (either with Plop or using any other way) do share the way you did it – many users have devices that are unable to boot from USB (I have one such 32 bits HP laptop).

              P.

              • This reply was modified 1 year ago by PPC.
              #81374
              Member
              srgilbert
                Helpful
                Up
                0
                ::

                Here’s what I can say so far. In Grub Customizer, there is an option to add a new entry to the Grub boot list.

                A menu pops up with the following options:

                Name: (this is blank to type the name in)

                Type: (a drop down menu with Linux/Linux0-ISO/Chainloader/Memtest/Other/(Script codes) – Changing this determines the choices below it. I chose Linux as OpenElec is a Linux based OS.)

                Partition: (a drop down with all the drives/partitions attached, including my USB)

                Initial ramdisk: /initrd.img (This is what it defaults to, but doesn’t seem correct.)

                Linux image: /vmlinuz (again, this is the default)

                Kernel params: (this is blank by default

                Boot Sequence (this is a large text box that shows the code for the changes you make as they I’m assuming they will appear in the grub config file.

                So, I’m able to direct it to the USB and the proper boot directory for OpenElec. If I leave the rest at default I get the message
                “error: file /vmlinuz’ not found error: you need to load the kernel first.

                I’m assuming in the Linux image line in the menu is for the the kernel, so I changed that to /KERNEL which should be correct.

                Reboot gives me a new error

                error: file /initrd.img’ not found

                So it’s looking for an initial ramdisk file and this is where I get stuck.

                #81376
                Member
                srgilbert
                  Helpful
                  Up
                  1
                  ::

                  Ok, I think I have this figured out, it just needed the right syntax.

                  Using information I found here, modified slightly due to different files system paths.

                  https://www.instructables.com/Dual-Boot-Libre-ELEC-and-Ubuntu-161/

                  In Grub Customizer I used the “add” function to create a new entry and named it Kodi, chose “Other” for the type and typed in

                  search --set=root --label System --hint hd1,1
                  
                  linux /KERNEL boot=LABEL=System disk=LABEL=Storage quiet

                  Hit OK, saved the configuration and rebooted.

                  Now I have a Kodi entry in the Grub and it boots into OpenElec if chosen.

                  If I remove the flash drive, it remains in the Grub menu, but obviously errors if you choose it.

                  #81377
                  Member
                  srgilbert
                    Helpful
                    Up
                    0
                    ::

                    I think my next challenge will be just installing LibreElec (the successor to OpenElec) to a partition and running from there, but that’s another day.

                  Viewing 8 posts - 1 through 8 (of 8 total)
                  • You must be logged in to reply to this topic.