Announcement

Collapse
No announcement yet.

GRUB Problem, can't upgrade to 26.04

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    GRUB Problem, can't upgrade to 26.04

    • Kubuntu 25.10
    • Kubuntu is currently installed
    • NOT dual-boot
    • KDE Plasma 6.4.5
    I tried to upgrade in konsole with do-release-upgrade and it tells me to install upgrades for the current release first, and sudo apt full-upgrade doesn't finish but gives these errors:

    Setting up grub-efi-amd64-signed
    Mount is denied because the NTFS volume is already exclusively opened.
    The volume may be already mounted, or another software may use it which
    could be identified for example by the help of the 'fuser' command.
    (dpkg errors removed for space, I apologize in case this isn't proper form)
    grub-efi-amd64-signed
    shim-signed
    Error: Sub-process /usr/bin/dpkg returned an error code (1)


    Trying sudo apt-get install grub-efi does the same thing... apparently it's not fully installed. I don't understand what the fuser -l command is supposed to tell me.

    So then I tried sudo grub-install and it gave me this:

    grub-install: error: /boot/efi doesn't look like an EFI partition.

    This is where I'm baffled, because it should definitely be an EFI partition and I've upgraded before, and it definitely exists with /boot/efi/EFI.
    Other help topics have suggested a mount command, but it doesn't work because:


    Mount is denied because the NTFS volume is already exclusively opened.
    The volume may be already mounted, or another software may use it which
    could be identified for example by the help of the 'fuser' command.


    So I'm completely lost. In case it helps, I got to this point starting from grub not wanting to install because of the NTFS volume exclusively opened part and following at least a dozen help topics to no avail. One of the topics was to try purging grub, but it didn't help and caused extra dpkg errors where I removed it for space, but it was giving a dpkg error even before purging grub. If you help, can you explain the intended effect of the commands as well? Like fuser, I don't really understand what it was supposed to help me with. But the problem seems to be that it's not recognizing /boot/efi for some reason.


    #2
    ...I kinda feel helpless with no responses yet... would it be better to just do a reinstall? I didn't want to go through setting everything up again if I could avoid it. If I have to do that how can I carry over my settings and programs I have installed on my main drive?

    Comment


      #3
      Maybe. I say maybe because you say you aren't dual-booting (and assuming that would have been with Windows), yet you are running Kubuntu 25.10.

      AI Overview


      This error happens because GRUB is trying to update and locate an EFI system partition, but it accidentally detects a leftover or external NTFS partition that is marked as "dirty" or currently locked in a "hibernated" state by another system or prior crash.

      Step 1: Identify Your NTFS and EFI Partitions
      Run sudo fdisk -l or sudo lsblk in the terminal. Locate the partition (e.g., /dev/nvme0n1pX or /dev/sdaX) that is causing the lock.


      Step 2: Unmount the Drive and Clear the Lock

      If the partition is actively mounted, you must unmount it before attempting to clear the NTFS lock:
      sudo umount /dev/partition-name


      Once unmounted, use the ntfsfix tool to clear the "dirty" flag and release the exclusive lock:
      sudo ntfsfix /dev/partition-name



      Step 3: Complete the Update

      After the lock is successfully released, finish your system update/upgrade using:
      sudo dpkg --configure -a


      If the issue persists, ensure that the EFI partition is mounted to /boot/efi during the upgrade by running sudo mount -a to check for missing mount points, and verify that your EFI partition has the esp flag toggled in GParted.





















      Windows no longer obstruct my view.
      Using Kubuntu Linux since March 23, 2007.
      "It is a capital mistake to theorize before one has data." - Sherlock Holmes

      Comment


        #4
        Maybe. I say maybe because you say you aren't dual-booting (and assuming that would have been with Windows), yet you are running Kubuntu 25.10.
        Is there something wrong with kubuntu 25.10? This was previously a windows system before I swapped to kubuntu, so I guess it's possible.

        Trying to follow the instructions you posted, ntfsfix seemed to work fine as if nothing's wrong (for what it's worth, it apparently is an ntfs partition)

        dpkg gave me a warning- " Configuring grub-efi-amd64-signed- grub failed to install to the following devices: /dev/sdc1 (the boot partition) Do you want to continue anyway? your computer might not start up properly. Writing GRUB to boot device failed- continue?"

        I picked "no" because I was nervous about messing things up further, and it gives the same error until I re-mount the boot partition, which then gives the same error as my first post. Should I try picking yes anyway? I don't want to mess it up.

        Checking it with KDE partition manager, it has the boot flag but not an esp flag. would I need specifically Gparted to see if this has a flag or not? I don't see an option to add/toggle flags or something.

        Also, sudo mount -a gave me a lot of text output, but nothing was labeled as an error or was obviously missing as far as I can tell.
        (Thanks for trying to help, by the way)

        Comment


          #5
          (I don't have recent experience with Windows or NTSF.)

          /boot/efi doesn't look like an EFI partition.
          I've see that error before, even on my system when I'm messing around.
          It usually means the partition is not a FAT32 and/or the boot flag is not set on it.

          In gparted, you highlight a partition, then
          click the "Partition" tab at the top of the screen, then "Manage Flags."
          Both "boot" and "esp" should be checked.
          Sometimes if you click on boot, the esp is automatically selected also.

          Sometimes, Boot-Repair can work to sort things out, even fix things.
          https://help.ubuntu.com/community/Boot-Repair

          An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

          Comment


            #6
            Thanks for replying. GParted showed that esp flag wasn't set, but setting it didn't seem to help- it still has the previously mentioned errors.

            dpkg gave me a warning- " Configuring grub-efi-amd64-signed- grub failed to install to the following devices: /dev/sdc1 (the boot partition) Do you want to continue anyway? your computer might not start up properly. Writing GRUB to boot device failed- continue?"

            I picked "no" because I was nervous about messing things up further, and it gives the same error until I re-mount the boot partition, which then gives the same error as my first post. Should I try picking yes anyway? I don't want to mess it up.​
            So should I pick yes here and try that? I'm just nervous about it because I'm not sure what the consequences are.

            Comment


              #7
              I would not do it.
              I would check Boot-Repair and see what messages it sends me.
              An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

              Comment


                #8
                Wait, if I try to run the commands while the boot drive's unmounted, it says

                grub-install: error: /var/lib/grub/esp doesn't look like an EFI partition.


                Seems it tries to install grub there if the boot drive's unmounted... doing just sudo grub-install also says


                grub-install: error: cannot find EFI directory.


                I'll check out boot-repair next

                Comment


                  #9
                  Not sure you can use this:

                  The command
                  df /boot/efi
                  shows the ESP the OS is using that you are booted into now.
                  (space after the df)

                  Ex.:
                  $ df /boot/efi
                  Filesystem 1K-blocks Used Available Use% Mounted on
                  /dev/nvme0n1p1 562080 6232 555848 2% /boot/efi

                  An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                  Comment

                  Users Viewing This Topic

                  Collapse

                  There are 0 users viewing this topic.

                  Working...
                  X