Hi.. When I try to update my server this error! If I run "sudo apt update" i get this.. Code: [email protected]:~$ sudo apt upgrade Reading package lists... Done Building dependency tree... Done Reading state information... Done Calculating upgrade... Done Try Ubuntu Pro beta with a free personal subscription on up to 5 machines. Learn more at https://ubuntu.com/pro 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 1 not fully installed or removed. After this operation, 0 B of additional disk space will be used. And then "sudo apt upgrade" I get this error: Code: Setting up grub-efi-amd64-signed (1.182~22.04.1+2.06-2ubuntu10) ... mount: /var/lib/grub/esp: special device /dev/sda15 does not exist. dpkg: error processing package grub-efi-amd64-signed (--configure): installed grub-efi-amd64-signed package post-installation script subprocess returned error exit status 32 dpkg: dependency problems prevent processing triggers for shim-signed: shim-signed depends on grub-efi-amd64-signed | grub-efi-arm64-signed; however: Package grub-efi-amd64-signed is not configured yet. Package grub-efi-arm64-signed is not installed. dpkg: error processing package shim-signed (--configure): dependency problems - leaving triggers unprocessed Errors were encountered while processing: grub-efi-amd64-signed shim-signed needrestart is being skipped since dpkg has failed E: Sub-process /usr/bin/dpkg returned an error code (1) Can someone help me to fix the error...
I did find this solution.. And it seams to fix the problem for me.. Code: apt remove shim-signed grub-efi-amd64-bin --allow-remove-essential
This was an bad idea... Don't reboot the machine, as it might won't boot anymore! Run these commands: Code: sudo apt-get purge grub\* sudo apt-get install grub-efi sudo apt-get autoremove sudo update-grub You also need to validate if grub is still installed with Code: sudo ls /boot/grub/ , post the output here.
sudo apt-get purge grub\ Code: Reading package lists... Done Building dependency tree... Done Reading state information... Done Note, selecting 'grub-rescue-pc' for glob 'grub*' Note, selecting 'grub-xen' for glob 'grub*' Note, selecting 'grub2' for glob 'grub*' Note, selecting 'grub-splashimages' for glob 'grub*' Note, selecting 'grubzfs-testsuite' for glob 'grub*' Note, selecting 'grub-coreboot' for glob 'grub*' Note, selecting 'grub-legacy-doc' for glob 'grub*' Note, selecting 'grub-legacy-ec2' for glob 'grub*' Note, selecting 'grub-emu-dbg' for glob 'grub*' Note, selecting 'grub-pc-bin' for glob 'grub*' Note, selecting 'grub-pc-dbg' for glob 'grub*' Note, selecting 'grub-gfxpayload-lists' for glob 'grub*' Note, selecting 'grub-xen-host' for glob 'grub*' Note, selecting 'grub2-themes-ubuntustudio' for glob 'grub*' Note, selecting 'grub-ieee1275-bin' for glob 'grub*' Note, selecting 'grub-cloud-amd64' for glob 'grub*' Note, selecting 'grub-ieee1275-dbg' for glob 'grub*' Note, selecting 'grub-imageboot' for glob 'grub*' Note, selecting 'grub-efi-arm64' for glob 'grub*' Note, selecting 'grub-efi-amd64' for glob 'grub*' Note, selecting 'grub-efi-arm' for glob 'grub*' Note, selecting 'grub-yeeloong' for glob 'grub*' Note, selecting 'grub' for glob 'grub*' Note, selecting 'grub-ipxe' for glob 'grub*' Note, selecting 'grub-firmware-qemu' for glob 'grub*' Note, selecting 'grub-efi-amd64-signed' for glob 'grub*' Note, selecting 'grub-coreboot-bin' for glob 'grub*' Note, selecting 'grub-efi-arm64-signed' for glob 'grub*' Note, selecting 'grub-coreboot-dbg' for glob 'grub*' Note, selecting 'grub-theme-starfield' for glob 'grub*' Note, selecting 'grub-efi-amd64-bin' for glob 'grub*' Note, selecting 'grub2-common' for glob 'grub*' Note, selecting 'grub-legacy' for glob 'grub*' Note, selecting 'grub-efi-amd64-signed-template' for glob 'grub*' Note, selecting 'grub-efi-amd64-dbg' for glob 'grub*' Note, selecting 'grub-ieee1275' for glob 'grub*' Note, selecting 'grub-uboot' for glob 'grub*' Note, selecting 'grub-common' for glob 'grub*' Note, selecting 'grub2-splashimages' for glob 'grub*' Note, selecting 'grub-efi-ia32-bin' for glob 'grub*' Note, selecting 'grub-efi-ia32-dbg' for glob 'grub*' Note, selecting 'grub2-themes-ubuntu-mate' for glob 'grub*' Note, selecting 'grub-invaders' for glob 'grub*' Note, selecting 'grub-linuxbios' for glob 'grub*' Note, selecting 'grub-xen-bin' for glob 'grub*' Note, selecting 'grub-efi-ia32' for glob 'grub*' Note, selecting 'grub-efi-ia64' for glob 'grub*' Note, selecting 'grub-xen-dbg' for glob 'grub*' Note, selecting 'grub-pc' for glob 'grub*' Note, selecting 'grub-doc' for glob 'grub*' Note, selecting 'grub-efi' for glob 'grub*' Note, selecting 'grub-emu' for glob 'grub*' Note, selecting 'grub-theme-breeze' for glob 'grub*' Package 'grub-efi-ia64' is not installed, so not removed Package 'grub-yeeloong' is not installed, so not removed Package 'grub' is not installed, so not removed Package 'grub-legacy' is not installed, so not removed Package 'grub-legacy-doc' is not installed, so not removed Package 'grub-cloud-amd64' is not installed, so not removed Package 'grub-doc' is not installed, so not removed Package 'grub-efi-arm' is not installed, so not removed Package 'grub-efi-arm64' is not installed, so not removed Package 'grub-uboot' is not installed, so not removed Package 'grub-efi-arm64-signed' is not installed, so not removed Package 'grub-efi' is not installed, so not removed Package 'grub-efi-ia32' is not installed, so not removed Package 'grub-efi-ia32-bin' is not installed, so not removed Package 'grub-efi-ia32-dbg' is not installed, so not removed Package 'grub-gfxpayload-lists' is not installed, so not removed Package 'grub-ieee1275' is not installed, so not removed Package 'grub-ieee1275-bin' is not installed, so not removed Package 'grub-ieee1275-dbg' is not installed, so not removed Package 'grub-ipxe' is not installed, so not removed Package 'grub-legacy-ec2' is not installed, so not removed Package 'grub-pc' is not installed, so not removed Package 'grub-pc-bin' is not installed, so not removed Package 'grub-pc-dbg' is not installed, so not removed Package 'grub-xen' is not installed, so not removed Package 'grub-xen-bin' is not installed, so not removed Package 'grub-xen-dbg' is not installed, so not removed Package 'grub-coreboot' is not installed, so not removed Package 'grub-coreboot-bin' is not installed, so not removed Package 'grub-coreboot-dbg' is not installed, so not removed Package 'grub-efi-amd64-signed-template' is not installed, so not removed Package 'grub-emu' is not installed, so not removed Package 'grub-emu-dbg' is not installed, so not removed Package 'grub-firmware-qemu' is not installed, so not removed Package 'grub-imageboot' is not installed, so not removed Package 'grub-invaders' is not installed, so not removed Package 'grub-linuxbios' is not installed, so not removed Package 'grub-rescue-pc' is not installed, so not removed Package 'grub-splashimages' is not installed, so not removed Package 'grub-theme-breeze' is not installed, so not removed Package 'grub-theme-starfield' is not installed, so not removed Package 'grub-xen-host' is not installed, so not removed Package 'grub2' is not installed, so not removed Package 'grub2-splashimages' is not installed, so not removed Package 'grub2-themes-ubuntu-mate' is not installed, so not removed Package 'grub2-themes-ubuntustudio' is not installed, so not removed Package 'grubzfs-testsuite' is not installed, so not removed Package 'grub-efi-amd64-dbg' is not installed, so not removed Package 'grub-efi-amd64-signed' is not installed, so not removed The following packages will be REMOVED: grub-common* grub-efi-amd64* grub-efi-amd64-bin* grub2-common* 0 upgraded, 0 newly installed, 4 to remove and 0 not upgraded. After this operation, 0 B of additional disk space will be used. Do you want to continue? [Y/n] y (Reading database ... 164876 files and directories currently installed.) Purging configuration files for grub2-common (2.06-2ubuntu7) ... Purging configuration files for grub-common (2.06-2ubuntu7) ... dpkg: warning: while removing grub-common, directory '/var/lib/grub/ucf' not empty so not removed dpkg: warning: while removing grub-common, directory '/etc/default/grub.d' not empty so not removed Purging configuration files for grub-efi-amd64 (2.06-2ubuntu10) ... Purging configuration files for grub-efi-amd64-bin (2.06-2ubuntu10) ... sudo apt-get install grub-efi Code: sudo apt-get install grub-efi Reading package lists... Done Building dependency tree... Done Reading state information... Done The following additional packages will be installed: grub-common grub-efi-amd64 grub-efi-amd64-bin grub-efi-amd64-signed grub2-common os-prober Suggested packages: multiboot-doc grub-emu mtools xorriso desktop-base The following NEW packages will be installed: grub-common grub-efi grub-efi-amd64 grub-efi-amd64-bin grub-efi-amd64-signed grub2-common os-prober 0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded. Need to get 0 B/4.206 kB of archives. After this operation, 28,5 MB of additional disk space will be used. Do you want to continue? [Y/n] y Preconfiguring packages ... Selecting previously unselected package grub-common. (Reading database ... 164859 files and directories currently installed.) Preparing to unpack .../0-grub-common_2.06-2ubuntu7_amd64.deb ... Unpacking grub-common (2.06-2ubuntu7) ... Selecting previously unselected package grub-efi-amd64-bin. Preparing to unpack .../1-grub-efi-amd64-bin_2.06-2ubuntu10_amd64.deb ... Unpacking grub-efi-amd64-bin (2.06-2ubuntu10) ... Selecting previously unselected package grub2-common. Preparing to unpack .../2-grub2-common_2.06-2ubuntu7_amd64.deb ... Unpacking grub2-common (2.06-2ubuntu7) ... Selecting previously unselected package grub-efi-amd64. Preparing to unpack .../3-grub-efi-amd64_2.06-2ubuntu10_amd64.deb ... Unpacking grub-efi-amd64 (2.06-2ubuntu10) ... Selecting previously unselected package grub-efi-amd64-signed. Preparing to unpack .../4-grub-efi-amd64-signed_1.182~22.04.1+2.06-2ubuntu10_amd64.deb ... Unpacking grub-efi-amd64-signed (1.182~22.04.1+2.06-2ubuntu10) ... Selecting previously unselected package os-prober. Preparing to unpack .../5-os-prober_1.79ubuntu2_amd64.deb ... Unpacking os-prober (1.79ubuntu2) ... Selecting previously unselected package grub-efi. Preparing to unpack .../6-grub-efi_2.06-2ubuntu7_amd64.deb ... Unpacking grub-efi (2.06-2ubuntu7) ... Setting up grub-common (2.06-2ubuntu7) ... Created symlink /etc/systemd/system/multi-user.target.wants/grub-common.service → /lib/systemd/system/grub-common.service. Created symlink /etc/systemd/system/sleep.target.wants/grub-common.service → /lib/systemd/system/grub-common.service. Created symlink /etc/systemd/system/multi-user.target.wants/grub-initrd-fallback.service → /lib/systemd/system/grub-initrd-fallback.service. Created symlink /etc/systemd/system/rescue.target.wants/grub-initrd-fallback.service → /lib/systemd/system/grub-initrd-fallback.service. Created symlink /etc/systemd/system/emergency.target.wants/grub-initrd-fallback.service → /lib/systemd/system/grub-initrd-fallback.service. Created symlink /etc/systemd/system/sleep.target.wants/grub-initrd-fallback.service → /lib/systemd/system/grub-initrd-fallback.service. update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults Setting up os-prober (1.79ubuntu2) ... Setting up grub-efi-amd64-bin (2.06-2ubuntu10) ... Setting up grub2-common (2.06-2ubuntu7) ... Setting up grub-efi-amd64 (2.06-2ubuntu10) ... Creating config file /etc/default/grub with new version mount: /var/lib/grub/esp: special device /dev/sda15 does not exist. Failed: grub-install --target=x86_64-efi WARNING: Bootloader is not properly installed, system may not be bootable Sourcing file `/etc/default/grub' Sourcing file `/etc/default/grub.d/hetzner.cfg' Sourcing file `/etc/default/grub.d/init-select.cfg' Generating grub configuration file ... Found linux image: /boot/vmlinuz-5.15.0-52-generic Found initrd image: /boot/initrd.img-5.15.0-52-generic Found linux image: /boot/vmlinuz-5.15.0-50-generic Found initrd image: /boot/initrd.img-5.15.0-50-generic Warning: os-prober will not be executed to detect other bootable partitions. Systems on them will not be added to the GRUB boot configuration. Check GRUB_DISABLE_OS_PROBER documentation entry. done Setting up grub-efi (2.06-2ubuntu7) ... Setting up grub-efi-amd64-signed (1.182~22.04.1+2.06-2ubuntu10) ... mount: /var/lib/grub/esp: special device /dev/sda15 does not exist. dpkg: error processing package grub-efi-amd64-signed (--configure): installed grub-efi-amd64-signed package post-installation script subprocess returned error exit status 32 Processing triggers for install-info (6.8-4build1) ... Processing triggers for man-db (2.10.2-1) ... Errors were encountered while processing: grub-efi-amd64-signed needrestart is being skipped since dpkg has failed E: Sub-process /usr/bin/dpkg returned an error code (1) sudo apt-get autoremove Code: sudo apt-get autoremove Reading package lists... Done Building dependency tree... Done Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 1 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Setting up grub-efi-amd64-signed (1.182~22.04.1+2.06-2ubuntu10) ... mount: /var/lib/grub/esp: special device /dev/sda15 does not exist. dpkg: error processing package grub-efi-amd64-signed (--configure): installed grub-efi-amd64-signed package post-installation script subprocess returned error exit status 32 Errors were encountered while processing: grub-efi-amd64-signed needrestart is being skipped since dpkg has failed E: Sub-process /usr/bin/dpkg returned an error code (1) sudo update-grub Code: sudo update-grub Sourcing file `/etc/default/grub' Sourcing file `/etc/default/grub.d/hetzner.cfg' Sourcing file `/etc/default/grub.d/init-select.cfg' Generating grub configuration file ... Found linux image: /boot/vmlinuz-5.15.0-52-generic Found initrd image: /boot/initrd.img-5.15.0-52-generic Found linux image: /boot/vmlinuz-5.15.0-50-generic Found initrd image: /boot/initrd.img-5.15.0-50-generic Warning: os-prober will not be executed to detect other bootable partitions. Systems on them will not be added to the GRUB boot configuration. Check GRUB_DISABLE_OS_PROBER documentation entry. done sudo ls /boot/grub/ Code: fonts grub.cfg grubenv i386-pc locale unicode.pf2 x86_64-efi
Code: mount: /var/lib/grub/esp: special device /dev/sda15 does not exist. Failed: grub-install --target=x86_64-efi WARNING: Bootloader is not properly installed, system may not be bootable Grub can't seem to find your efi partition. Can you please provide the Output of parted like so: Code: # sudo parted (parted) p ...... (parted) quit (Note: might be 'exit' or Just Press CTRL + C)
@pyte - First i want to thanks for you help sudo parted -> P Code: [email protected] ~ # sudo parted GNU Parted 3.4 Using /dev/nvme0n1 Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) p Model: SAMSUNG MZVLB1T0HBLR-00000 (nvme) Disk /dev/nvme0n1: 1024GB Sector size (logical/physical): 512B/512B Partition Table: msdos Disk Flags: Number Start End Size Type File system Flags 1 1049kB 4296MB 4295MB primary raid 2 4296MB 5370MB 1074MB primary raid 3 5370MB 1024GB 1019GB primary raid (parted) EDIT: I don't know if it helps.. cat /etc/fstab Code: proc /proc proc defaults 0 0 # /dev/md/0 UUID=2e6b0814-45fc-434a-aa8f-de3dfbc09b1c none swap sw 0 0 # /dev/md/1 UUID=de31220f-816e-41d9-b7ff-826ea87348fe /boot ext3 defaults 0 0 # /dev/md/2 UUID=8e61a7e7-5565-4901-b602-c8c39e0ff680 / ext4 defaults 0 0 BTW.. Running Ubuntu 22.04
Sure sudo mount Code: [email protected] ~ # sudo mount sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime) proc on /proc type proc (rw,relatime) udev on /dev type devtmpfs (rw,nosuid,relatime,size=65854060k,nr_inodes=16463515,mode=755,inode64) devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000) tmpfs on /run type tmpfs (rw,nosuid,nodev,noexec,relatime,size=13182144k,mode=755,inode64) /dev/md2 on / type ext4 (rw,relatime) securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime) tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,inode64) tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k,inode64) cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot) pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime) bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700) systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=29,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=17385) hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M) mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime) debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime) tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime) fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime) configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime) none on /run/credentials/systemd-sysusers.service type ramfs (ro,nosuid,nodev,noexec,relatime,mode=700) /var/lib/snapd/snaps/certbot_2344.snap on /snap/certbot/2344 type squashfs (ro,nodev,relatime,errors=continue,x-gdu.hide) /var/lib/snapd/snaps/certbot_2414.snap on /snap/certbot/2414 type squashfs (ro,nodev,relatime,errors=continue,x-gdu.hide) /var/lib/snapd/snaps/core_13886.snap on /snap/core/13886 type squashfs (ro,nodev,relatime,errors=continue,x-gdu.hide) /var/lib/snapd/snaps/core20_1623.snap on /snap/core20/1623 type squashfs (ro,nodev,relatime,errors=continue,x-gdu.hide) /dev/md1 on /boot type ext3 (rw,relatime) binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime) tracefs on /sys/kernel/debug/tracing type tracefs (rw,nosuid,nodev,noexec,relatime) tmpfs on /run/user/1003 type tmpfs (rw,nosuid,nodev,relatime,size=13182140k,nr_inodes=3295535,mode=700,uid=1003,gid=1003,inode64) tmpfs on /run/user/1005 type tmpfs (rw,nosuid,nodev,relatime,size=13182140k,nr_inodes=3295535,mode=700,uid=1005,gid=1005,inode64) tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=13182140k,nr_inodes=3295535,mode=700,uid=1000,gid=1000,inode64) [email protected] ~ # lsblk Code: [email protected] ~ # lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS loop0 7:0 0 44,5M 1 loop /snap/certbot/2344 loop1 7:1 0 44,7M 1 loop /snap/certbot/2414 loop2 7:2 0 115M 1 loop /snap/core/13886 loop3 7:3 0 63,2M 1 loop /snap/core20/1623 nvme1n1 259:0 0 953,9G 0 disk ├─nvme1n1p1 259:1 0 4G 0 part │ └─md0 9:0 0 4G 0 raid1 [SWAP] ├─nvme1n1p2 259:2 0 1G 0 part │ └─md1 9:1 0 1022M 0 raid1 /boot └─nvme1n1p3 259:3 0 948,9G 0 part └─md2 9:2 0 948,7G 0 raid1 / nvme0n1 259:4 0 953,9G 0 disk ├─nvme0n1p1 259:5 0 4G 0 part │ └─md0 9:0 0 4G 0 raid1 [SWAP] ├─nvme0n1p2 259:6 0 1G 0 part │ └─md1 9:1 0 1022M 0 raid1 /boot └─nvme0n1p3 259:7 0 948,9G 0 part └─md2 9:2 0 948,7G 0 raid1 /
Just to make sure and double check, please provide output of the following commands: Code: sudo fdisk -l sudo lsblk sudo df -h
sudo fdisk -l Code: [email protected] ~ # sudo fdisk -l Disk /dev/loop0: 44,5 MiB, 46661632 bytes, 91136 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk /dev/loop1: 44,69 MiB, 46858240 bytes, 91520 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk /dev/loop2: 114,99 MiB, 120573952 bytes, 235496 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk /dev/loop3: 63,22 MiB, 66293760 bytes, 129480 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk /dev/nvme1n1: 953,87 GiB, 1024209543168 bytes, 2000409264 sectors Disk model: SAMSUNG MZVLB1T0HALR-00000 Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0xd557c7eb Device Boot Start End Sectors Size Id Type /dev/nvme1n1p1 2048 8390655 8388608 4G fd Linux raid autodetect /dev/nvme1n1p2 8390656 10487807 2097152 1G fd Linux raid autodetect /dev/nvme1n1p3 10487808 2000407215 1989919408 948,9G fd Linux raid autodetect Disk /dev/nvme0n1: 953,87 GiB, 1024209543168 bytes, 2000409264 sectors Disk model: SAMSUNG MZVLB1T0HBLR-00000 Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x779ffa24 Device Boot Start End Sectors Size Id Type /dev/nvme0n1p1 2048 8390655 8388608 4G fd Linux raid autodetect /dev/nvme0n1p2 8390656 10487807 2097152 1G fd Linux raid autodetect /dev/nvme0n1p3 10487808 2000407215 1989919408 948,9G fd Linux raid autodetect Disk /dev/md1: 1022 MiB, 1071644672 bytes, 2093056 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk /dev/md2: 948,74 GiB, 1018703446016 bytes, 1989655168 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk /dev/md0: 4 GiB, 4289724416 bytes, 8378368 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes sudo lsblk Code: NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS loop0 7:0 0 44,5M 1 loop /snap/certbot/2344 loop1 7:1 0 44,7M 1 loop /snap/certbot/2414 loop2 7:2 0 115M 1 loop /snap/core/13886 loop3 7:3 0 63,2M 1 loop /snap/core20/1623 nvme1n1 259:0 0 953,9G 0 disk ├─nvme1n1p1 259:1 0 4G 0 part │ └─md0 9:0 0 4G 0 raid1 [SWAP] ├─nvme1n1p2 259:2 0 1G 0 part │ └─md1 9:1 0 1022M 0 raid1 /boot └─nvme1n1p3 259:3 0 948,9G 0 part └─md2 9:2 0 948,7G 0 raid1 / nvme0n1 259:4 0 953,9G 0 disk ├─nvme0n1p1 259:5 0 4G 0 part │ └─md0 9:0 0 4G 0 raid1 [SWAP] ├─nvme0n1p2 259:6 0 1G 0 part │ └─md1 9:1 0 1022M 0 raid1 /boot └─nvme0n1p3 259:7 0 948,9G 0 part └─md2 9:2 0 948,7G 0 raid1 / sudo df -h Code: Filesystem Size Used Avail Use% Mounted on tmpfs 13G 1,3M 13G 1% /run /dev/md2 933G 43G 843G 5% / tmpfs 63G 248K 63G 1% /dev/shm tmpfs 5,0M 0 5,0M 0% /run/lock /dev/md1 989M 251M 688M 27% /boot tmpfs 13G 4,0K 13G 1% /run/user/1003 tmpfs 13G 4,0K 13G 1% /run/user/1005 tmpfs 13G 4,0K 13G 1% /run/user/1000
Ok it seems like the boot and esp flag is missing which is why grub can't detect esp. Did you change your disks in this server? Code: sudo parted /dev/nvme0n1 (parted) set 2 esp on ( NOTE: try this it may fails as the disklabel is dos) (parted) set 2 boot on (parted) p (parted) quit # Do the same for the /dev/nvme1n1 sudo parted /dev/nvme1n1 (parted) set 2 esp on ( NOTE: try this it may fails as the disklabel is dos) (parted) set 2 boot on (parted) p (parted) quit Report back with the output
Sure: sudo parted /dev/nvme0n1 Code: sudo parted /dev/nvme0n1 GNU Parted 3.4 Using /dev/nvme0n1 Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) set 2 esp on (parted) set 2 boot on (parted) p Model: SAMSUNG MZVLB1T0HBLR-00000 (nvme) Disk /dev/nvme0n1: 1024GB Sector size (logical/physical): 512B/512B Partition Table: msdos Disk Flags: Number Start End Size Type File system Flags 1 1049kB 4296MB 4295MB primary raid 2 4296MB 5370MB 1074MB primary boot, esp 3 5370MB 1024GB 1019GB primary raid (parted) quit Information: You may need to update /etc/fstab. sudo parted /dev/nvme1n1 Code: [email protected] ~ # sudo parted /dev/nvme1n1 GNU Parted 3.4 Using /dev/nvme1n1 Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) set 2 esp on (parted) set 2 boot on (parted) p Model: SAMSUNG MZVLB1T0HALR-00000 (nvme) Disk /dev/nvme1n1: 1024GB Sector size (logical/physical): 512B/512B Partition Table: msdos Disk Flags: Number Start End Size Type File system Flags 1 1049kB 4296MB 4295MB primary raid 2 4296MB 5370MB 1074MB primary boot, esp 3 5370MB 1024GB 1019GB primary raid (parted) quit Information: You may need to update /etc/fstab. EDIT: I have not change disk... The problem come after a update..
I've just realized what is happening here... Revert these changes Code: sudo parted /dev/nvme0n1 (parted) set 2 esp off (parted) set 2 boot off (parted) set 2 raid on (parted) p (parted) quit # Do the same for the /dev/nvme1n1 sudo parted /dev/nvme1n1 (parted) set 2 esp off (parted) set 2 boot off (parted) set 2 raid on (parted) p (parted) quit Then try installing grub like so: Code: grub-install /dev/nvme0n1
If i run Code: grub-install /dev/nvme0n1 i get this error: Code: [email protected] ~ # grub-install /dev/nvme0n1 grub-install: error: /usr/lib/grub/i386-pc/modinfo.sh doesn't exist. Please specify --target or --directory.
Alright there's the issue. Please install the package "grub-pc" Code: sudo apt-get install grub-pc And then try installing it again with Code: grub-install /dev/nvme0n1
If i run the first command - i get this output.. Code: [email protected] ~ # sudo apt-get install grub-pc Reading package lists... Done Building dependency tree... Done Reading state information... Done grub-pc is already the newest version (2.06-2ubuntu7). The following packages were automatically installed and are no longer required: grub-efi-amd64-bin grub-efi-amd64-signed Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 1 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Do you want to continue? [Y/n] y Setting up grub-efi-amd64-signed (1.182~22.04.1+2.06-2ubuntu10) ... mount: /var/lib/grub/esp: special device /dev/sda15 does not exist. dpkg: error processing package grub-efi-amd64-signed (--configure): installed grub-efi-amd64-signed package post-installation script subprocess returned error exit status 32 Errors were encountered while processing: grub-efi-amd64-signed needrestart is being skipped since dpkg has failed E: Sub-process /usr/bin/dpkg returned an error code (1) The second command show this: Code: [email protected] ~ # grub-install /dev/nvme0n1 Installing for i386-pc platform. Installation finished. No error reported.
Maybe i have done somthing wrong.. It did run apt update.. Code: [email protected] ~ # apt upgrade Reading package lists... Done Building dependency tree... Done Reading state information... Done Calculating upgrade... Done Try Ubuntu Pro beta with a free personal subscription on up to 5 machines. Learn more at https://ubuntu.com/pro 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 1 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Do you want to continue? [Y/n] y Setting up grub-efi-amd64-signed (1.182~22.04.1+2.06-2ubuntu10) ... mount: /var/lib/grub/esp: special device /dev/sda15 does not exist. dpkg: error processing package grub-efi-amd64-signed (--configure): installed grub-efi-amd64-signed package post-installation script subprocess returned error exit status 32 Errors were encountered while processing: grub-efi-amd64-signed needrestart is being skipped since dpkg has failed E: Sub-process /usr/bin/dpkg returned an error code (1)
This look correct. Now to boot of off both drives, install it on the other disk as well: Code: grub-install /dev/nvme1n1 Then update grub with: Code: update-grub /dev/nvme0n1 update-grub /dev/nvme1n1 Then let's remove that conflicting package: Code: apt autoremove --purge grub-efi-am64-signed apt autoremove --purge grub-efi-amd64-bin apt autoremove --purge grub-efi Check back if the error still occurs with: Code: apt upgrade Report back with output of the commands
grub-install /dev/nvme1n1 Code: grub-install /dev/nvme1n1 Installing for i386-pc platform. Installation finished. No error reported. update-grub /dev/nvme0n1 Code: [email protected] ~ # update-grub /dev/nvme0n1 Sourcing file `/etc/default/grub' Sourcing file `/etc/default/grub.d/hetzner.cfg' Sourcing file `/etc/default/grub.d/init-select.cfg' Generating grub configuration file ... Found linux image: /boot/vmlinuz-5.15.0-52-generic Found initrd image: /boot/initrd.img-5.15.0-52-generic Found linux image: /boot/vmlinuz-5.15.0-50-generic Found initrd image: /boot/initrd.img-5.15.0-50-generic Warning: os-prober will not be executed to detect other bootable partitions. Systems on them will not be added to the GRUB boot configuration. Check GRUB_DISABLE_OS_PROBER documentation entry. done update-grub /dev/nvme1n1 Code: [email protected] ~ # update-grub /dev/nvme1n1 Sourcing file `/etc/default/grub' Sourcing file `/etc/default/grub.d/hetzner.cfg' Sourcing file `/etc/default/grub.d/init-select.cfg' Generating grub configuration file ... Found linux image: /boot/vmlinuz-5.15.0-52-generic Found initrd image: /boot/initrd.img-5.15.0-52-generic Found linux image: /boot/vmlinuz-5.15.0-50-generic Found initrd image: /boot/initrd.img-5.15.0-50-generic Warning: os-prober will not be executed to detect other bootable partitions. Systems on them will not be added to the GRUB boot configuration. Check GRUB_DISABLE_OS_PROBER documentation entry. done apt autoremove --purge grub-efi-am64-signed Code: [email protected] ~ # apt autoremove --purge grub-efi-am64-signed Reading package lists... Done Building dependency tree... Done Reading state information... Done E: Unable to locate package grub-efi-am64-signed apt autoremove --purge grub-efi-amd64-bin Code: [email protected] ~ # apt autoremove --purge grub-efi-amd64-bin Reading package lists... Done Building dependency tree... Done Reading state information... Done Package 'grub-efi-amd64-bin' is not installed, so not removed 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. [email protected] ~ # apt autoremove --purge grub-efi Code: [email protected] ~ # apt autoremove --purge grub-efi Reading package lists... Done Building dependency tree... Done Reading state information... Done Package 'grub-efi' is not installed, so not removed 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. [email protected] ~ # apt autoremove --purge grub-efi Code: [email protected] ~ # apt autoremove --purge grub-efi Reading package lists... Done Building dependency tree... Done Reading state information... Done Package 'grub-efi' is not installed, so not removed 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. [email protected] ~ # EDIT apt update and apt upgrade works fine now