Happy holidays!
Btw, the context:
- Ubuntu 22 on an Acer laptop;
- ubuntu live via USB stick, not CDROM;
- Secure Boot enabled and machine owner key set up.
The initial problem was that I did a regular software update (Software Updater, the gray icon with the circling arrows), then a restart – but this error message showed up, as the only text on a black screen, right after … first the vendor logo, then a while of a blinking cursor, then that:
Failed to start Samba NMB Daemon.
Not sure why samba is being necessary for booting, nor why it’s not working. Or why a regular software update can (nearly) brick your computer and ruin a holiday for you.
So I’ve launched ubuntu live from a USB stick that I still have luckily. There, I’ve ran boot-repair
(Recommended Repair).
(UPDATE: the following block has now become just context. I doubt GRUB has anything to do with this. Let’s skip to the end of this post)
Research at this point:
- https://askubuntu.com/questions/1467074/boot-freezing-on-failed-to-start-samba-nmb-daemon
- https://askubuntu.com/questions/1481176/how-to-resolve-computer-not-starting-up-after-update-to-ubuntu-22-04
- https://linuxconfig.org/ubuntu-22-04-not-booting-troubleshooting-guide
Log:
boot-repair-4ppa2081 [20241224_1428]
============================= Boot Repair Summary ==============================
Recommended repair: ____________________________________________________________
The default repair of the Boot-Repair utility will reinstall the grub-efi-amd64-signed of
nvme0n1p2,
using the following options: nvme0n1p1/boot/efi
Additional repair will be performed: unhide-bootmenu-10s use-standard-efi-file
Mount /dev/nvme0n1p1 on /mnt/boot-sav/nvme0n1p2/boot/efi
Unhide GRUB boot menu in nvme0n1p2/etc/default/grub
============ Reinstall the grub-efi-amd64-signed of /dev/nvme0n1p2 =============
chroot /mnt/boot-sav/nvme0n1p2 grub-install --version
grub-install (GRUB) 2.06-2ubuntu7.2
chroot /mnt/boot-sav/nvme0n1p2 modprobe efivars
chroot /mnt/boot-sav/nvme0n1p2 efibootmgr -v (filtered) before grub install
BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0000,0002,2001,2002,2003
Boot0000* Linpus lite HD(1,MBR,0xc3072e18,0x1f80,0x1dd2080)/HD(2,GPT,a0891d7e-b930-4513-94db-f629dbd637b2,0x92b094,0x2754)/File(EFIBootgrubx64.efi)RC
Boot0002* ubuntu HD(1,GPT,1b34ea49-876c-45c2-81b2-885b142888c9,0x800,0x100000)/File(EFIubuntushimx64.efi)
Boot2001* EFI USB Device RC
Boot2002* EFI DVD/CDROM RC
Boot2003* EFI Network RC
chroot /mnt/boot-sav/nvme0n1p2 uname -r
5.19.0-32-generic
chroot /mnt/boot-sav/nvme0n1p2 grub-install --efi-directory=/boot/efi --target=x86_64-efi --uefi-secure-boot
Installing for x86_64-efi platform.
grub-install: warning: EFI variables cannot be set on this system.
grub-install: warning: You will have to complete the GRUB setup manually.
Installation finished. No error reported.
df /dev/nvme0n1p1
mv /mnt/boot-sav/nvme0n1p2/boot/efi/EFI/Boot/bootx64.efi /mnt/boot-sav/nvme0n1p2/boot/efi/EFI/Boot/bkpbootx64.efi
cp /mnt/boot-sav/nvme0n1p2/boot/efi/efi/ubuntu/shimx64.efi /mnt/boot-sav/nvme0n1p2/boot/efi/EFI/Boot/bootx64.efi
cp /mnt/boot-sav/nvme0n1p2/boot/efi/efi/ubuntu/grubx64.efi /mnt/boot-sav/nvme0n1p2/boot/efi/EFI/Boot/
chroot /mnt/boot-sav/nvme0n1p2 grub-install --efi-directory=/boot/efi --target=x86_64-efi --uefi-secure-boot
Installing for x86_64-efi platform.
grub-install: warning: EFI variables cannot be set on this system.
grub-install: warning: You will have to complete the GRUB setup manually.
Installation finished. No error reported.
chroot /mnt/boot-sav/nvme0n1p2 efibootmgr -v (filtered) after grub install
BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0000,0002,2001,2002,2003
Boot0000* Linpus lite HD(1,MBR,0xc3072e18,0x1f80,0x1dd2080)/HD(2,GPT,a0891d7e-b930-4513-94db-f629dbd637b2,0x92b094,0x2754)/File(EFIBootgrubx64.efi)RC
Boot0002* ubuntu HD(1,GPT,1b34ea49-876c-45c2-81b2-885b142888c9,0x800,0x100000)/File(EFIubuntushimx64.efi)
Boot2001* EFI USB Device RC
Boot2002* EFI DVD/CDROM RC
Boot2003* EFI Network RC
Warning: NVram was not modified.
chroot /mnt/boot-sav/nvme0n1p2 update-grub
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Found linux image: /boot/vmlinuz-6.8.0-50-generic
Found initrd image: /boot/initrd.img-6.8.0-50-generic
Found linux image: /boot/vmlinuz-6.8.0-49-generic
Found initrd image: /boot/initrd.img-6.8.0-49-generic
Found linux image: /boot/vmlinuz-6.8.0-48-generic
Found initrd image: /boot/initrd.img-6.8.0-48-generic
Found linux image: /boot/vmlinuz-6.5.0-45-generic
Found initrd image: /boot/initrd.img-6.5.0-45-generic
Found linux image: /boot/vmlinuz-6.2.0-39-generic
Found initrd image: /boot/initrd.img-6.2.0-39-generic
Found linux image: /boot/vmlinuz-5.19.0-50-generic
Found initrd image: /boot/initrd.img-5.19.0-50-generic
Unhide GRUB boot menu in nvme0n1p2/boot/grub/grub.cfg
Boot successfully repaired.
You can now reboot your computer.
Please do not forget to make your UEFI firmware boot on the Ubuntu 22.04.5 LTS entry (nvme0n1p1/efi/ubuntu/shimx64.efi file) !
============================ Boot Info After Repair ============================
=> No boot loader is installed in the MBR of /dev/nvme0n1.
=> Windows 2000/XP/2003 is installed in the MBR of /dev/sda.
nvme0n1p1: _____________________________________________________________________
File system: vfat
Boot sector type: FAT32
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files: /efi/BOOT/bkpbootx64.efi /efi/BOOT/bootx64.efi
/efi/BOOT/fbx64.efi /efi/BOOT/grubx64.efi
/efi/BOOT/mmx64.efi /efi/ubuntu/grubx64.efi
/efi/ubuntu/mmx64.efi /efi/ubuntu/shimx64.efi
/efi/ubuntu/grub.cfg
nvme0n1p2: _____________________________________________________________________
File system: ext4
Boot sector type: -
Boot sector info:
Operating System: Ubuntu 22.04.5 LTS
Boot files: /boot/grub/grub.cfg /etc/fstab /etc/default/grub
sda1: __________________________________________________________________________
File system: iso9660
Boot sector type: Grub2 (v1.99-2.00)
Boot sector info: Grub2 (v1.99-2.00) is installed in the boot sector of
sda1 and looks at sector 0 of the same hard drive for
core.img, but core.img can not be found at this
location.
Operating System:
Boot files: /boot/grub/grub.cfg
================================ 1 OS detected =================================
OS#1 (linux): Ubuntu 22.04.5 LTS on nvme0n1p2
================================ Host/Hardware =================================
CPU architecture: 64-bit
Video: Lexa [Radeon 540X/550X/630 / RX 640 / E9171 MCM] Lucienne from Advanced Micro Devices, Inc. [AMD/ATI] Advanced Micro Devices, Inc. [AMD/ATI]
Live-session OS is Ubuntu 64-bit (Ubuntu 22.04.2 LTS, jammy, x86_64)
===================================== UEFI =====================================
BIOS/UEFI firmware: V1.08(1.8) from INSYDE Corp.
The firmware is EFI-compatible, and is set in EFI-mode for this live-session.
SecureBoot enabled.
BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0000,0002,2001,2002,2003
Boot0000* Linpus lite HD(1,MBR,0xc3072e18,0x1f80,0x1dd2080)/HD(2,GPT,a0891d7e-b930-4513-94db-f629dbd637b2,0x92b094,0x2754)/File(\EFI\Boot\grubx64.efi)RC
Boot0002* ubuntu HD(1,GPT,1b34ea49-876c-45c2-81b2-885b142888c9,0x800,0x100000)/File(\EFI\ubuntu\shimx64.efi)
Boot2001* EFI USB Device RC
Boot2002* EFI DVD/CDROM RC
Boot2003* EFI Network RC
07e25dcaf57c776875f78fa36827c58e nvme0n1p1/BOOT/bkpbootx64.efi
07e25dcaf57c776875f78fa36827c58e nvme0n1p1/BOOT/bootx64.efi
1d43d986c265d8c455d020e4a1f28c52 nvme0n1p1/BOOT/fbx64.efi
a1da253696a304dce6b4668b70151c0e nvme0n1p1/BOOT/grubx64.efi
1d260ff1255f189ab621209796ee2fed nvme0n1p1/BOOT/mmx64.efi
a1da253696a304dce6b4668b70151c0e nvme0n1p1/ubuntu/grubx64.efi
1d260ff1255f189ab621209796ee2fed nvme0n1p1/ubuntu/mmx64.efi
07e25dcaf57c776875f78fa36827c58e nvme0n1p1/ubuntu/shimx64.efi
============================= Drive/Partition Info =============================
Disks info: ____________________________________________________________________
nvme0n1 : is-GPT, no-BIOSboot, has---ESP, not-usb, not-mmc, has-os, no-wind, 2048 sectors * 512 bytes
Partitions info (1/3): _________________________________________________________
nvme0n1p1 : no-os, 64, nopakmgr, no-docgrub, nogrub, nogrubinstall, no-grubenv, noupdategrub, not-far
nvme0n1p2 : is-os, 64, apt-get, signed grub-pc grub-efi , grub2, grub-install, grubenv-ok, update-grub, end-after-100GB
Partitions info (2/3): _________________________________________________________
nvme0n1p1 : is---ESP, part-has-no-fstab, no-nt, no-winload, no-recov-nor-hid, no-bmgr, notwinboot, vfat
nvme0n1p2 : isnotESP, fstab-has-goodEFI, no-nt, no-winload, no-recov-nor-hid, no-bmgr, notwinboot, ext4
Partitions info (3/3): _________________________________________________________
nvme0n1p1 : not--sepboot, no---boot, part-has-no-fstab, not-sep-usr, no---usr, part-has-no-fstab, no--grub.d, nvme0n1
nvme0n1p2 : not--sepboot, with-boot, fstab-without-boot, not-sep-usr, with--usr, fstab-without-usr, std-grub.d, nvme0n1
fdisk -l (filtered): ___________________________________________________________
Disk nvme0n1: 953.87 GiB, 1024209543168 bytes, 2000409264 sectors
Disk identifier: 12EDCD0E-A14C-4384-BF27-C04CF427D2FF
Start End Sectors Size Type
nvme0n1p1 2048 1050623 1048576 512M EFI System
nvme0n1p2 1050624 2000408575 1999357952 953.4G Linux filesystem
Disk sda: 14.91 GiB, 16013852672 bytes, 31277056 sectors
Disk identifier: 0xc3072e18
Boot Start End Sectors Size Id Type
sda1 8064 31277055 31268992 14.9G 7 HPFS/NTFS/exFAT
parted -lm (filtered): _________________________________________________________
sda:16.0GB:scsi:512:512:msdos: USB DISK 2.0:;
1:4129kB:16.0GB:16.0GB:::;
nvme0n1:1024GB:nvme:512:512:gpt:Micron_2210_MTFDHBA1T0QFD:;
1:1049kB:538MB:537MB:fat32:EFI System Partition:boot, esp;
2:538MB:1024GB:1024GB:ext4::;
blkid (filtered): ______________________________________________________________
NAME FSTYPE UUID PARTUUID LABEL PARTLABEL
sda
└─sda1 iso9660 2023-02-23-04-13-44-00 c3072e18-01 Ubuntu 22.04.2 LTS amd64
nvme0n1
├─nvme0n1p1 vfat BAF8-5A00 1b34ea49-876c-45c2-81b2-885b142888c9 EFI System Partition
└─nvme0n1p2 ext4 6b8dc4c9-e078-4dbb-a11f-0358c5699ed0 6077e52e-1d47-47d2-a97b-c50fb035aa5d
Mount points (filtered): _______________________________________________________
Avail Use% Mounted on
/dev/nvme0n1p1 501.5M 2% /mnt/boot-sav/nvme0n1p1
/dev/nvme0n1p2 595.4G 31% /mnt/boot-sav/nvme0n1p2
/dev/sda1 0 100% /cdrom
Mount options (filtered): ______________________________________________________
/dev/nvme0n1p1 vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro
/dev/nvme0n1p2 ext4 rw,relatime
/dev/sda1 iso9660 ro,noatime,nojoliet,check=s,map=n,blocksize=2048,iocharset=utf8
=================== nvme0n1p1/efi/ubuntu/grub.cfg (filtered) ===================
search.fs_uuid 6b8dc4c9-e078-4dbb-a11f-0358c5699ed0 root
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg
=================== nvme0n1p2/boot/grub/grub.cfg (filtered) ====================
Ubuntu 6b8dc4c9-e078-4dbb-a11f-0358c5699ed0
### END /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_uefi-firmware ###
======================== nvme0n1p2/etc/fstab (filtered) ========================
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/nvme0n1p2 during installation
UUID=6b8dc4c9-e078-4dbb-a11f-0358c5699ed0 / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/nvme0n1p1 during installation
UUID=BAF8-5A00 /boot/efi vfat umask=0077 0 1
/swapfile none swap sw 0 0
==================== nvme0n1p2/etc/default/grub (filtered) =====================
GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=menu
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
GRUB_DISABLE_OS_PROBER=false
================= nvme0n1p2: Location of files loaded by Grub ==================
GiB - GB File Fragment(s)
?? = ?? boot/grub/grub.cfg 1
537.946285248 = 577.615425536 boot/vmlinuz 2
512.488922119 = 550.280790016 boot/vmlinuz-5.19.0-50-generic 1
382.125972748 = 410.304638976 boot/vmlinuz-6.2.0-39-generic 2
176.154880524 = 189.144862720 boot/vmlinuz-6.5.0-45-generic 1
102.397678375 = 109.948669952 boot/vmlinuz-6.8.0-48-generic 2
199.499240875 = 214.210678784 boot/vmlinuz-6.8.0-49-generic 2
537.946285248 = 577.615425536 boot/vmlinuz-6.8.0-50-generic 2
199.499240875 = 214.210678784 boot/vmlinuz.old 2
217.052440643 = 233.058283520 boot/initrd.img 1
724.875972748 = 778.329649152 boot/initrd.img-5.19.0-50-generic 2
694.375972748 = 745.580523520 boot/initrd.img-6.2.0-39-generic 7
726.293655396 = 779.851874304 boot/initrd.img-6.5.0-45-generic 4
535.997718811 = 575.523168256 boot/initrd.img-6.8.0-48-generic 1
216.380519867 = 232.336814080 boot/initrd.img-6.8.0-49-generic 1
217.052440643 = 233.058283520 boot/initrd.img-6.8.0-50-generic 1
216.380519867 = 232.336814080 boot/initrd.img.old 1
=================== nvme0n1p2: ls -l /etc/grub.d/ (filtered) ===================
-rwxr-xr-x 1 root root 18683 Dec 2 2022 10_linux
-rwxr-xr-x 1 root root 43031 Dec 2 2022 10_linux_zfs
-rwxr-xr-x 1 root root 14387 Dec 18 2022 20_linux_xen
-rwxr-xr-x 1 root root 13369 Dec 2 2022 30_os-prober
-rwxr-xr-x 1 root root 1372 Dec 2 2022 30_uefi-firmware
-rwxr-xr-x 1 root root 700 Sep 20 2022 35_fwupd
-rwxr-xr-x 1 root root 214 Dec 2 2022 40_custom
-rwxr-xr-x 1 root root 215 Dec 2 2022 41_custom
====================== sda1/boot/grub/grub.cfg (filtered) ======================
Try or Install Ubuntu
Ubuntu (safe graphics)
OEM install (for manufacturers)
Boot from next volume
UEFI Firmware Settings
Test memory
==================== sda1: Location of files loaded by Grub ====================
GiB - GB File Fragment(s)
?? = ?? boot/grub/grub.cfg 1
Neither do I understand why and what variables could not be set; nor what manual setup I am supposed to do; nor how or where I am supposed to make that boot change. It took me over a day of trying to decipher these cryptic instructions and warnings.
grub-install: warning: EFI variables cannot be set on this system.
grub-install: warning: You will have to complete the GRUB setup manually.
[…]
You can now reboot your computer.
Please do not forget to make your UEFI firmware boot on the Ubuntu 22.04.5 LTS entry (nvme0n1p1/efi/ubuntu/shimx64.efi file) !
I am a developer who uses vagrant, and in installing VMware, I was forced to set up a machine owner key. Is that why the variables failed to be set? I did not get any MOK prompt during this boot repair.
About that boot entry … are they talking about the boot order in the BIOS? There, I can see (1) linpus lite (2) ubuntu
. “linpus lite” seems to be the correct one.
I tried rebooting. That samba error message is gone … but now the laptop is in a “boot and restart” loop, only getting past the Acer logo.
nvme0n1p1 is the one that has the shimx64.efi file – am I supposed to mount nvme0n1p1 or nvme0n1p2 now in order to update-grub
? Why am I trying to do the same steps that boot-repair just did? Why don’t I have to also bind mount boot/
like I do for dev/
and others?
Research:
- https://askubuntu.com/questions/1363886/why-does-ubuntu-show-as-linpus-lite-when-i-am-in-the-boot-manager-is-this-som
- https://adityagilra.blogspot.com/2014/11/fixing-ubuntu-boot-problems-with-boot.html
- https://askubuntu.com/questions/974522/please-do-not-forget-to-make-your-bios-boot-on-sda6-efi-ubuntu-shimx64-efi-file
- need help with: grub-install warning
- https://hatchjs.com/ubuntu-22-04-reinstall-grub/
- https://askubuntu.com/questions/254491/failed-to-get-canonical-path-of-cow
- https://askubuntu.com/questions/974522/please-do-not-forget-to-make-your-bios-boot-on-sda6-efi-ubuntu-shimx64-efi-file
- https://askubuntu.com/questions/1304515/usr-sbin-grub-probeerrorfailed-to-get-canonical-path-of-cow-from-live-usb-w
- https://unix.stackexchange.com/questions/535434/what-exactly-is-mok-in-linux-for
[…] Okay good, in writing this post, I could clarify a few things and we can skip several questions. “linpus lite” was not the correct priority.
Now I’m back to the initial samba NMB daemon error, though. I will keep looking myself, but I didn’t really find anything on this so far, which is probably how I ended up following ↑ the wrong lead.
Any help would be appreciated.