Announcement

Collapse
No announcement yet.

I tried portabilizing the installation of my Kubuntu 22.04, now I have a problem with grub

Collapse
This topic has been answered.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [RESOLVED] I tried portabilizing the installation of my Kubuntu 22.04, now I have a problem with grub

    What have I done:
    • I used a live kubuntu usb to install kubuntu on a usb drive using computer A.
    • The kubuntu installation was on the USB drive, but the grub was tied to the ssd of computer A (coexisting with windows), so the installation was not portable, and only worked on that PC
    a few months have passed
    • I took the USB drive on which kubuntu was installed and from another computer B, I formatted it and followed this tutorial to install kubuntu in a truly portable way https://itsfoss.com/intsall-ubuntu-on-usb/
    • Everything worked fine, kubuntu starts from a USB stick on computer B.
    • On computer A, however, when I try to boot kubuntu from the usb drive, I get a "reset system" message and the system reboots.
    • Trying to boot a kubuntu live USB on computer A I get the problem "Verification failed: (0x1A) Security Violation"
    • Trying to boot from the "ubuntu" entry that I used to start the old installation (therefore the grub on the local SSD) I get the grub screen with the terminal.
    What I would like to do:
    • Remove the grub from computer A and use the one on the USB drive to portabilize the installation.
    What I can't do:
    • Format the SSD
    What I wouldn't want to do if not literally indispensable:
    • Disassemble computer A to extract the SSD and modify its contents on another computer.
    I apologize for my English as I am not a native speaker.

  • Answer selected by Snowhog at Nov 29, 2023, 01:15 PM.

    I solved the problem. It seems that there was more than one problem, and this obviously complicated the resolution.

    First I removed the grub from the SSD of computer A following this procedure: https://askubuntu.com/a/869888/1748690 However, the problem was not resolved.

    Based on the content of this page (https://askubuntu.com/questions/1456...-04-1-live-usb) I checked the kubuntu versions more carefully. In the first installation of kubuntu on computer A I must have used Kubuntu 22.04.3. I think this changed the secure boot certifications on computer A. In the second installation made from computer B I used Kubuntu 22.04.1, which instead has different/obsolete secure boot certifications, which is why the USB drive did not load the operating system and the live distribution gave the error "Verification failed: 0x1A security violation".

    I rebuilt a live distribution with Kubuntu 22.04.3 and reinstalled kubuntu on the usb drive using computer A and everything works now.​

    Comment


      #2
      Welcome.

      Wipe the USB-stick and install Kubuntu on it again from Computer A (with at least an EFI partition and a system partition), but disconnect all other internal (and external, of course) storage media first (either physically or if possible disable it in your UEFI).
      I suppose this should solve your problem (you only have to be aware that it won't be bootable from an old computer this way which has legacy BIOS only).
      Last edited by Schwarzer Kater; Nov 27, 2023, 06:30 PM. Reason: typos
      Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
      Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

      get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
      install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

      Comment


        #3
        Originally posted by Schwarzer Kater View Post
        Welcome.

        Wipe the USB-stick and install Kubuntu on it again from Computer A (with at least an EFI partition and a system partition), but disconnect all other internal (and external, of course) storage media first (either physically or if possible disable it in your UEFI).
        I suppose this should solve your problem (you only have to be aware that it won't be bootable from an old computer this way which has legacy BIOS only).
        Hi, thanks for your answer
        I can try, but I think it is still crucial to make sure I remove the grub (and therefore the linx bootloader) from the SSD of computer A, because otherwise when selecting the "ubuntu" option in the boot menu of the bios, it is likely that it will still maintain priority, compared to the one on the USB drive

        Comment


          #4
          No, you don't need to remove GRUB from the SSD of Computer A - only disconnect the SSDs, NVMes and other storage media etc. during you install Kubuntu to the USB drive. Or to utilize the GRUB_DISABLE_OS_PROBER variable in GRUB's settings in the different systems (if this is a valid solution depends on e.g. - but not only - if you have an additional Windows on your computer or an additional Linux…).
          And you will have to do this again every time GRUB on the USB drive is updated (e.g. after a kernel update) - and you will have to remove the USB drive before you update GRUB on the internal drives when you have booted from them.
          Both if you cannot utilize GRUB_DISABLE_OS_PROBER.
          Otherwise the portability of the USB stick is void and the internal GRUB on the SSD might have problems - if you want to keep the possibility to boot internally without the USB stick attached and the possibility to boot from the USB drive on another computer.
          Afterwards you will have the option to boot from Kubuntu on the USB drive in the boot menu of your computer's UEFI (but not the GRUB boot menu that is e.g. on your internal SSD). It will probably have the name of your USB drive's manufacturer in the UEFI boot menu.

          Please note that I am still talking about UEFI here, not legacy BIOS - you did not tell us about the specifics of your computer or your boot setup or what your exact goal is here.

          GRUB is not the best solution for independent portability IMHO.
          An alternative for your USB drive to avoid much of the hassle could be e.g. to install rEFInd instead of GRUB onto it as a replacement boot manager - and still detach it when you update a computer's internal GRUB.
          Or if possible to consequently set GRUB_DISABLE_OS_PROBER=true everywhere and boot with the computers' UEFI boot menus when applicable and suitable.

          PS: See https://www.gnu.org/software/grub/
          and https://www.rodsbooks.com/refind/
          for further information.
          Last edited by Schwarzer Kater; Nov 28, 2023, 09:52 AM. Reason: typos and additions
          Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
          Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

          get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
          install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

          Comment


            #5
            Originally posted by Schwarzer Kater View Post
            ... but disconnect all other internal ... storage media first
            I imagine for some laptops this may be difficult; some have an SSD soldered in.

            I'm not sure whether this will be helpful... OP you could use the grub-install directly with the --efi-directory option. Ensure there is an EFI System Partition on the removable drive, and is mounted, before running grub-install.
            Regards, John Little

            Comment


              #6
              I solved the problem. It seems that there was more than one problem, and this obviously complicated the resolution.

              First I removed the grub from the SSD of computer A following this procedure: https://askubuntu.com/a/869888/1748690 However, the problem was not resolved.

              Based on the content of this page (https://askubuntu.com/questions/1456...-04-1-live-usb) I checked the kubuntu versions more carefully. In the first installation of kubuntu on computer A I must have used Kubuntu 22.04.3. I think this changed the secure boot certifications on computer A. In the second installation made from computer B I used Kubuntu 22.04.1, which instead has different/obsolete secure boot certifications, which is why the USB drive did not load the operating system and the live distribution gave the error "Verification failed: 0x1A security violation".

              I rebuilt a live distribution with Kubuntu 22.04.3 and reinstalled kubuntu on the usb drive using computer A and everything works now.​

              Comment


                #7
                Originally posted by eseller View Post
                In the second installation made from computer B I used Kubuntu 22.04.1, which instead has different/obsolete secure boot certifications, which is why the USB drive did not load the operating system and the live distribution gave the error "Verification failed: 0x1A security violation".
                That is good info to keep handy, if one has to use secure boot. I am sure there are ways to clear this out from the BIOS, but this depends on the computer.
                I wonder how systems that need to be on 22.04.0 or.1 (non-HWE, with the "GE" 5.15 kernel) fare here? Though these are unlikely to be using secure boot, methinks.

                Comment

                Working...
                X