Announcement

Collapse
No announcement yet.

Need help with efi-uefi-bios-partitioning to install kubuntu on usb flash

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

    Need help with efi-uefi-bios-partitioning to install kubuntu on usb flash

    Hello everyone!

    I hope you are enjoying your holidays.

    I want to install kubuntu on a flash drive, so I can run it on my new laptop without making any changes to its hard drive. By that I don't mean a live-usb with persistent changes, but a full install, like portable distros. Is this possible? I am following these instructions (https://askubuntu.com/questions/1698...creator#942312) but facing a problem.

    In order to check if my laptop's hardware works ok with kubuntu, I made a kubuntu-live-usb by following these steps:
    a) created a gpt partition table on the usb flash, otherwise the laptop would not show the boot option in the boot menu
    b) created a fat32 partition where I extracted the 18.04.1x64 iso.
    c) can't remember if I labeled the partition in a specific way in gparted, I can't find the article with the instructions either...
    These resulted in a fully working live kubutntu. After testing successfully, I decided to do a full install on a different usb flash. In order to do this, I will use my desktop pc.

    As suggested in the link above, I disconnected my hard drives, and tried to boot from the kubuntu-live-usb. The desktop pc won't boot regardless of what settings I choose in BIOS (EFI/NON EFI/Auto). It looks as if it doesn't detect the kubuntu-live-usb flash. Tested the kubuntu-live-usb flash again on the laptop, it boots fine.

    The desktop's boot priority in usb-hdd first, which works fine with slax via a different usb flash I have. That slax usb-flash does not boot the laptop (I guess because it is mbr, not gpt).

    What am I missing here? My knowledge on uefi-bios, gpt-msdos etc are very superficial, I didn't know uefi was the new thing until a few days ago when I bought the laptop. In case it is useful, the laptop is acer sf314-54 (intel i5) and the desktop has a gigabyte ga-a75m-d2h with amd processor, also x64.

    Thanks in advance!

    #2
    You shouldn't need to do anything special to get the live stick to boot. Newer machines may prevent other oses from booting via Secure Boot, check that Secure Boot is off in your BIOS. When you do this it may prevent your already installed os from booting until its back on.
    Mark Your Solved Issues [SOLVED]
    (top of thread: thread tools)

    Comment


      #3
      Hello, thanks for your reply.

      The kubuntu-live-usb I cerated as described above, works fine on the laptop, but is not detected on the desktop. So there is indeed something that I am missing.

      The desktop pc does not have secure boot or fast boot options in its bios.

      Does this mean that I can't create a live usb that works both on the laptop (uefi) and on the desktop (old bios legacy type)?

      Comment


        #4
        Hmmm, gotta think this through! You raise a good point:

        Does this mean that I can't create a live usb that works both on the laptop (uefi) and on the desktop (old bios legacy type)?
        I think you can create a permanent USB that will boot by both laptop and desktop but I never really tried it.

        First, I would start with my live USB built from your .iso. The Kubuntu should be the 64-bit, for starters.

        Second, I would build the live Kubuntu USB using the Linux command dd, as follows, see my how-to on this:

        Building a Kubuntu live USB flash drive installer using dd

        https://www.kubuntuforums.net/showth...712#post378712

        That almost certainly ensures the live USB is "best" built.

        Next, I would understand how booting works in UEFI. Just happen to have a how-to on that, too, especially these topics (they are brief but detailed enough):

        Installing the OS in UEFI mode, doing your own partitioning, include ESP
        How will you know you are booting in UEFI mode?
        How UEFI booting works
        Here:

        UEFI Simplified, a quicker version

        https://www.kubuntuforums.net/showth...l=1#post379977

        Note that you will build the live Kubuntu installer USB using dd, but you will prepare your permanent Kubuntu USB using the guidance just cited (partition GPT, include and ESP, etc.).

        Let's see if any of this makes any sense to you, first, and if any of it helps at all. I'll be in and out today, but we have several other people here who are UEFI and booting experts who can also pitch in.

        - - - - - - - - - -

        Not for now, but for future reference on UEFI/EFI topics, my whole list of how-to's:

        UEFI, GPT, ESP, GRUB2-EFI, (dual)-booting, fixing things

        https://www.kubuntuforums.net/showth...-fixing-things
        An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

        Comment


          #5
          Qqmike, thank you very much for your time!

          Regarding the dd part (post #142), I’m ok with most of that. If I guess right, if= and of= refer to input file and output file respectively? A more serious question I have is:
          Does it matter where the dd command is run from?
          I have kubuntu 18.04x64 on my desktop and 18.04-32bit Lubuntu on an old netbook which I used to do the partitioning and stuff (having a functional small pc on the desk while messing with the others is really convenient!). Does it matter on what machine the dd command is run?

          Regarding the UEFI technology (post #147) I understand some things, enough to be willing to proceed with the live-usb creation. One reservation is that where you describe about the UEFI configuration, I don’t have the options “secure boot” or “fast boot” in my motherboard’s bios/uefi/cmos setup. Therefore I’ll proceed and check if the kubuntu-live booted in UEFI by one of the criteria you mentioned:
          > Your /etc/fstab file should show an EFI System Partition (mount point: /boot/efi, type EF00, vfat).
          Does this mean that I open the /etc/fstab with Kate and look for a line like this?
          Code:
          /boot/efi, type EF00, vfat
          Additionally, you suggest to make a partition EFI, via gparted (256MB, fat32, flagged boot). Does this mean that we actually don’t need to see/set the name/label EFI for this specific partition, but the OS automatically detects and uses it accordingly?

          So in order to summarize the questions:
          1) Does it matter what machine the dd command is run on?
          2) Does reading fstab in Kate, and finding the line “/boot/efi, type EF00, vfat” guarantee that my live kubuntu is running on UEFI?
          3) When partitioning in gparted, does setting the 1st partition on the gpt table 256MB, fat32, flagged boot take care of the booting needs?

          Thanks again!

          Comment


            #6
            (1) No, it doesn't matter. In Linux, dd is dd, no matter what. The input file is always the iso; the output file is your USB as seen in the operating system from where you issued the dd command (e.g., /dev/sdb or /dev/sdc, etc.).

            (2) The fstab would be for permanent installations of the operating system, maybe not so with the LIVE USB. On your final permanent USB where you installed Kubuntu, then the fstab should indicate the efi installation as you wrote under point (2).

            (3) Yes. Just set the boot flag on that first (ESP) partition (on your USB you are using for the permanent installation of Kubuntu).

            - - - - -

            Now, just thinking here ... If you install Kubuntu permanently to a USB on a computer that is UEFI, then you would have the choice of making that installation a UEFI installation (by booting the USB in UEFI mode). But if you install Kubuntu permanently to a USB (and trying to make the USB a UEFI) on a computer that is not UEFI ... well, that is something I've not done, but it may work as well. (For sure, this is true: If you have a non-UEFI Kubuntu permanently installed to a USB, it should boot (in Legacy mode) on either an older non-UEFI computer or on a newer UEFI computer.) You'll just have to try and see what happens, unless one of the other guys here can glean something that would settle this issue.

            The UEFI is not important per se. That is, if you have a non-UEFI permanent installation of Kubuntu to a USB, you could (you should be able) to boot that USB on any computer (on the UEFI computer, when you plug in that permanent non-UEFI USB and re-boot, you would enter UEFI-BIOS firmware and select to boot that USB in legacy mode (not in UEFI mode).)
            An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

            Comment


              #7
              More thoughts on this ...

              This may be relevant:

              GRUB and GPT partitioned disks

              https://www.kubuntuforums.net/showth...l=1#post403281

              This how-to, by oshunluvr, shows you how to do this:

              On a system that is not UEFI,
              use the GPT partition table,
              and install GRUB (using a BIOS Boot Partition) to your GPT.
              You know, one option you have here is to build the permanent Kubuntu USB using the older legacy boot using just a MBR on that permanent USB (not a GPT) (and then hoping your UEFI computer's firmware can handle that; i.e., that the UEFI firmware can accommodate booting that USB in legacy--non-UEFI--mode. I think my ASUS UEFI computer could do it, but never tried it).
              An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

              Comment


                #8
                Ok, I lost you at that last paragraph, but we can talk on some feedback. I made the live-usb (yet a different usb3 flash drive) using the dd command as you described. The usb flash with 18.04.1x64, boots the desktop, but I think not in UEFI.

                In Konsole, I get
                Code:
                kubuntu@kubuntu:~$ sudo efibootmgr [-v] 
                EFI variables are not supported on this system.
                While on the laptop (which is currently running on the initial usb3 flash drive that I created as described in post #1) I get the following output:
                Code:
                kubuntu@kubuntu:~$ sudo efibootmgr [-v]
                BootCurrent: 0000
                Timeout: 0 seconds
                BootOrder: 0000,0002,2001,2002,2003
                Boot0000* Linpus lite
                Boot0001* Network Boot-IPV4: 9C-EB-E8-4D-06-4A
                Boot0002* Windows Boot Manager
                Boot2001* EFI USB Device
                Boot2002* EFI DVD/CDROM
                Boot2003* EFI Network
                So the problem seems to be that I cannot boot the desktop pc in UEFI. The only option I saw, refers to cd\dvd efi, nothing else...

                I’ll shutdown, remove the disks see if the situation persists.

                Question: during bootup from the usbflash, I get a low resolution icon of a man + keyboard. Does this indicate that I am booting kubuntu in legacy instead of UEFI, or is it something else?

                ================================================== =================================
                EDIT #1: You responded while I was typing I think that the usb flash drives I created on my desktop pc via Universal Usb Installer (if I remember the name correctly) did not boot the laptop. More tests to come in the following minutes, going to update this, or reply if someone else replies in the meantime
                EDIT #2: Updated with the output I get form the laptop. This booted from my initial flash drive, not the one I created via the dd command as you described. More tests to come, I'll reply on a different post.
                Last edited by zahtar; Dec 29, 2018, 05:04 PM.

                Comment


                  #9
                  OK, so the USB will boot on both laptop and desktop, though not in UEFI mode on the desktop. That makes sense, actually. The desktop computer is controlled by your BIOS and that BIOS has no UEFI capability to handle anything related to booting. But if I understand you correctly, the USB you created DOES boot and work (to let you use Kubuntu OS) on both machines.

                  Question: during bootup from the usbflash, I get a low resolution icon of a man + keyboard. Does this indicate that I am booting kubuntu in legacy instead of UEFI, or is it something else?
                  Oh. my memory ... I'm pretty sure that when you get that screen, it indicates you are NOT in UEFI mode.

                  I'm on the run again here to get the spousal unit from work and do some shopping, then be back here later.
                  An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                  Comment


                    #10
                    ... via Universal Usb Installer ...
                    A lot of us here have had mixed results using those packaged OS-USB creators. Thus, many of us here simply use the dd method, which appears to be foolproof. (The Kubuntu iso file contains all you need for partitioning and booting -- you do not even need to partition your USB before using dd; in fact, if you do partition a USB before using dd, dd will simply overwrite any partitioning you did on the USB, bit-by-bit).
                    An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                    Comment


                      #11
                      Btw, Post #8: Your output from efibootmgr on both machines looks normal, as expected.
                      An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                      Comment


                        #12
                        No worries my friend, take your time, I am not in a hurry. Actually it is past 1:30am here, so I’ll call it a day in a while...

                        I rebooted both pcs (dekstop and laptop) and exchanged the flash drives with kubuntu-live. Results:
                        a) The initial flashdrive I made (by creating a gpt table and iso extraction) cannot boot the desktop pc. Therefore it will be retired from the project (=formatted and used otherwise).
                        b) The flashdrive created with the dd command boots both pcs successfully, so this is the one I’ll be keeping until the project is complete. So the first part is done (creation of a reliable live-usb).
                        c) The efibootmgr command gives the same output on the laptop regardless of flash drive used to boot.
                        d) I booted the desktop from the internal sdd, and efibootmgr gives the same output as before (“EFI variables are not supported on this system.”). Since you say these are normal, I am good to go I guess.

                        To do:
                        i) I’ll try what you mentioned in post #7, because my previous attempt was with flash drives that proved unreliable. Maybe I’ll succeed with the current one.
                        ii) I’ll read the post by oshunluvr you linked. I hope I’ll keep understanding! lol

                        if you do partition a USB before using dd, dd will simply overwrite any partitioning you did on the USB, bit-by-bit
                        Now this is something I really like!!!

                        Thanks again, I’ll get back to this tomorrow and post updates. Of course, ideas are welcome from everyone

                        Comment


                          #13
                          Not trying to dissuade you from a fun project, but the problem with actually doing an install to a thumb is the installation process causes drivers and setting from the computer on which it was created to be used. Also the whole EFI thing will be problematic because an EFI entry will be needed to boot the thumb drive - but i'm not an EFI user so I'll defer to others on that topic. Assuming you are fine with that, then go ahead.

                          I tried this today and got GRUB to install to a USB stick, but running Ubiquity failed. I haven't tried booting to a live session and installing from there, but I can't see why it wouldn't work.

                          Please Read Me

                          Comment


                            #14
                            Oshunluvr, you were right, it didn't work. The pc didn't make it efi compatible, so the laptop did not detect it. I'll do some more reading and see if anything else is possible. Thanks

                            Comment


                              #15
                              One thing to keep in mind, the "(desktop)PC can't make it EFI" unless the (desktop) PC has UEFI firmware. The PC comes with a computer board called the motherboard, right?, and that motherboard comes with special software called firmware kind of "embedded" on it in chip(s). That firmware can be the older legacy BIOS or it can be the newer firmware called UEFI (usually on computers made after about 2010-2011). So if you have a UEFI USB, it can't boot by UEFI on a non-UEFI PC/laptop.

                              https://en.wikipedia.org/wiki/Unifie...ware_Interface

                              This is why I mentioned oshunluvr's how-to about using a BIOS boot partition:

                              GRUB and GPT partitioned disks

                              https://www.kubuntuforums.net/showth...l=1#post403281

                              This how-to, by oshunluvr, shows you how to do this:

                              On a system that is not UEFI,
                              use the GPT partition table,
                              and install GRUB (using a BIOS Boot Partition) to your GPT.
                              An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                              Comment

                              Working...
                              X