I have a Samsung ATIV Book 9 with Windows 8 and over the time different Linux distributions. Lately, I switched from Debian 11 to SuSE Tumbleweed and now to Debian 12.
Since this switch to Debian 12 I cannot boot from disk any more.
When I change the Linux distribution/ version, I format and overwrite /
and swap
but keep all other partitions.
When I boot, the system tells me that it cannot find a system to boot and I should press to initiate the Windows Rescue system.
I then insert the Debian 12 installation medium (SD card), enter the grub command mode and enter the following code to boot the Linux system:
grub> set root=(hd0,5)
grub> linux /boot/vmlinuz-6.1.0-11-amd64 root=/dev/sda5
grub> initrd /boot/initrd.img-6.1.0-11-amd64
grub> boot
(How to boot from Grub Shell) That works but is tedious.
This is my partition table:
Device Start End Sectors Size Type
/dev/sda1 2048 1023999 1021952 499M Windows recovery environment
/dev/sda2 1024000 1638399 614400 300M Microsoft basic data
/dev/sda3 1638400 1900543 262144 128M Microsoft reserved
/dev/sda4 1900544 217001984 215101441 102.6G Microsoft basic data
/dev/sda5 217004032 278444031 61440000 29.3G EFI System
/dev/sda6 278444032 294828031 16384000 7.8G Linux swap
/dev/sda7 294828032 470757375 175929344 83.9G Linux home
/dev/sda8 470757377 498020352 27262976 13G Windows recovery environment
/dev/sda9 498020353 500117504 2097152 1G Windows recovery environment
Device Start End Sectors Type-UUID UUID Name Attrs
/dev/sda1 2048 1023999 1021952 DE94BBA4-06D1-4D40-A16A-BFD50179D6AC 1F2F0B2D-5B67-4F47-A273-FF56466FAA0E Basic data partition RequiredPartition
/dev/sda2 1024000 1638399 614400 EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 B103ECB1-3B97-4DA6-B8F2-BAC85C20E16F EFI system partition
/dev/sda3 1638400 1900543 262144 E3C9E316-0B5C-4DB8-817D-F92DF00215AE D0717FA8-DDAA-4966-8F76-53AB4571A31C Microsoft reserved partition
/dev/sda4 1900544 217001984 215101441 EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 07973992-B738-46E4-8743-09032C2F0621 Basic data partition
/dev/sda5 217004032 278444031 61440000 C12A7328-F81F-11D2-BA4B-00A0C93EC93B 58F769CE-1A2F-4266-AF6B-3F27A5EE053D Root LegacyBIOSBootable
/dev/sda6 278444032 294828031 16384000 0657FD6D-A4AB-43C4-84E5-0933C84B4F4F D5E27C09-786F-46B9-81A8-BD15053043FC Swap
/dev/sda7 294828032 470757375 175929344 933AC7E1-2EB4-4F13-B844-0E14E2AEF915 65F8E696-9D05-4605-9B00-DE061A9A8ED5 Home
/dev/sda8 470757377 498020352 27262976 DE94BBA4-06D1-4D40-A16A-BFD50179D6AC 002EF7EB-5D99-4584-922A-34D7E1611290 Basic data partition RequiredPartition
/dev/sda9 498020353 500117504 2097152 DE94BBA4-06D1-4D40-A16A-BFD50179D6AC B9FB900E-BA45-4D16-4173-636C65706975 Basic data partition RequiredPartition
This is the output of sudo efibootmgr -v
BootCurrent: 0006
Timeout: 2 seconds
BootOrder: 0006,0007,0005,0000,0001,0002
Boot0000* opensuse-secureboot VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)
Boot0001* opensuse VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)
Boot0002* UEFI OS VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)
Boot0005* debian VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)
Boot0006* UEFI: Generic STORAGE DEVICE 0819 PciRoot(0x0)/Pci(0x1d,0x0)/USB(1,0)/USB(8,0)/HD(1,MBR,0x23261683,0x11a4,0x4a20)..BO
Boot0007* Generic STORAGE DEVICE 0819 BBS(USB,,0x0)..BO
Does anyone have any idea what I could do to boot directly from HDD?
Thanks, Jan
[Update]
- Re-installed the debian OS incl. erasing /dev/sda2 (EFI)
- Ensured that in BIOS it only boots EFI
- Executed
efibootmgr --remove-dups
-> did not change anything - Used
efibootmgr -b [0|1|5] -B
to delete some entries manually - Created a new entry
efibootmgr --create --disk /dev/sda --part 2 --label "GRUB2" --loader \\EFI\\debian\\grubx64.efi
-> gave me a nice entry likeBoot0000* GRUB2 HD(2,GPT,b103ecb1-3b97-4da6-b8f2-bac85c20e16f,0xfa000,0x96000)/File(\EFI\debian\grubx64.efi)
--> after reboot it looked likeBoot0000* GRUB2 VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)
=> why does this happen? - Create another entry "GRUB2 II" and did not reboot -> so you can see the difference to "GRUB2"
efibootmgr -v
BootCurrent: 0006
Timeout: 2 seconds
BootOrder: 0001,0006,0000,0005,0002
Boot0000* GRUB2 VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)
Boot0001* GRUB2 II HD(2,GPT,b103ecb1-3b97-4da6-b8f2-bac85c20e16f,0xfa000,0x96000)/File(\EFI\debian\grubx64.efi)
Boot0002* UEFI OS VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)
Boot0005* debian VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)
Boot0006* UEFI: Generic STORAGE DEVICE 0819 PciRoot(0x0)/Pci(0x1d,0x0)/USB(1,0)/USB(8,0)/HD(1,MBR,0x23261683,0x11a4,0x4a20)..BO
I also noticed that the UUIDs shown by efibootmgr -v
do not match the UUIDs presented by lsblk -o +partuuid
(except for sdb (the SD that I use for booting) and the newly created entry):
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS PARTUUID
sda 8:0 0 238.5G 0 disk
|-sda1 8:1 0 499M 0 part 1f2f0b2d-5b67-4f47-a273-ff56466faa0e
|-sda2 8:2 0 300M 0 part /boot/efi b103ecb1-3b97-4da6-b8f2-bac85c20e16f
|-sda3 8:3 0 128M 0 part d0717fa8-ddaa-4966-8f76-53ab4571a31c
|-sda4 8:4 0 102.6G 0 part 07973992-b738-46e4-8743-09032c2f0621
|-sda5 8:5 0 29.3G 0 part / 58f769ce-1a2f-4266-af6b-3f27a5ee053d
|-sda6 8:6 0 7.8G 0 part [SWAP] d5e27c09-786f-46b9-81a8-bd15053043fc
|-sda7 8:7 0 83.9G 0 part /home 65f8e696-9d05-4605-9b00-de061a9a8ed5
|-sda8 8:8 0 13G 0 part 002ef7eb-5d99-4584-922a-34d7e1611290
`-sda9 8:9 0 1G 0 part b9fb900e-ba45-4d16-4173-636c65706975
sdb 8:16 1 14.8G 0 disk
|-sdb1 8:17 1 738M 0 part 23261683-01
`-sdb2 8:18 1 9.3M 0 part 23261683-02
sudo tree /boot/efi/
/boot/efi/
`-- EFI
`-- debian
|-- BOOTX64.CSV
|-- fbx64.efi
|-- grub.cfg
|-- grubx64.efi
`-- mmx64.efi
3 directories, 5 files
[Upadte 2]
/boot/efi shows the contents of /dev/sda2
$ mount
...
/dev/sda2 on /boot/efi type vfat (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro)
...
I use the installation medium to enter grub and then boot the system via grub command line as described here: How to boot from Grub Shell
$ sudo mount /dev/sda2 /mnt
$ sudo tree /mnt/
/mnt/
`-- EFI
`-- debian
|-- BOOTX64.CSV
|-- fbx64.efi
|-- grub.cfg
|-- grubx64.efi
`-- mmx64.efi
3 directories, 5 files
Here the output of lsblk
$ lsblk -o +partuuid,UUID
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS PARTUUID UUID
sda 8:0 0 238.5G 0 disk
|-sda1 8:1 0 499M 0 part 1f2f0b2d-5b67-4f47-a273-ff56466faa0e 825667F15667E3FF
|-sda2 8:2 0 300M 0 part /mnt b103ecb1-3b97-4da6-b8f2-bac85c20e16f 604D-98BD
| /boot/efi
|-sda3 8:3 0 128M 0 part d0717fa8-ddaa-4966-8f76-53ab4571a31c
|-sda4 8:4 0 102.6G 0 part 07973992-b738-46e4-8743-09032c2f0621 5EA66ADEA66AB5E5
|-sda5 8:5 0 29.3G 0 part / 58f769ce-1a2f-4266-af6b-3f27a5ee053d 8c520857-fa9a-4943-a92b-9aa16fb9075c
|-sda6 8:6 0 7.8G 0 part [SWAP] d5e27c09-786f-46b9-81a8-bd15053043fc af973a94-fc1f-4797-a89c-fb4558d7609e
|-sda7 8:7 0 83.9G 0 part /home 65f8e696-9d05-4605-9b00-de061a9a8ed5 295faf9b-1536-4a9d-aa92-7cbb9d251312
|-sda8 8:8 0 13G 0 part 002ef7eb-5d99-4584-922a-34d7e1611290 74846D39846CFECC
`-sda9 8:9 0 1G 0 part b9fb900e-ba45-4d16-4173-636c65706975 E06C-1BB1
sdb 8:16 1 14.8G 0 disk 2023-06-10-10-25-55-00
|-sdb1 8:17 1 738M 0 part 23261683-01 2023-06-10-10-25-55-00
`-sdb2 8:18 1 9.3M 0 part 23261683-02 DEB0-0001
Even after re-installation of Debian the boot via EFI Boot Menu still does not succeed? —> correct
Are you sure the installation media has booted in UEFI Mode for the installation? (Disable "Legacy Boot" of removable media in BIOS, Check the output of efibootmgr -v whe booted in the installation media. – Qualified output states the desired UEFI boot mode).
$ efibootmgr -v
BootCurrent: 0006
Timeout: 2 seconds
BootOrder: 0005,0001,0006,0000,0002
Boot0000* GRUB2 VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)
Boot0001* GRUB2 II HD(2,GPT,b103ecb1-3b97-4da6-b8f2-bac85c20e16f,0xfa000,0x96000)/File(\EFI\debian\grubx64.efi)
Boot0002* UEFI OS VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)
Boot0005* debian HD(2,GPT,b103ecb1-3b97-4da6-b8f2-bac85c20e16f,0xfa000,0x96000)/File(\EFI\debian\grubx64.efi)
Boot0006* UEFI: Generic STORAGE DEVICE 0819 PciRoot(0x0)/Pci(0x1d,0x0)/USB(1,0)/USB(8,0)/HD(1,MBR,0x23261683,0x11a4,0x4a20)..BO
I'll reboot and print the output of efibootmgr -v
again. ...
$ efibootmgr -v
BootCurrent: 0006
Timeout: 2 seconds
BootOrder: 0006,0005,0000,0002
Boot0000* GRUB2 VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)
Boot0002* UEFI OS VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)
Boot0005* debian VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)
Boot0006* UEFI: Generic STORAGE DEVICE 0819 PciRoot(0x0)/Pci(0x14,0x0)/USB(13,0)/HD(1,MBR,0x23261683,0x11a4,0x4a20)..BO
The settings in the bios look as follows:
Secure Boot Control -> off
OS Mode Selection -> UEFI OS (alternative options would be |CSM OS| or |CSM and UEFI OS|) It could be that I had |CSM and UEFI OS| during installation.
Fast BIOS Mode -> off
PXE OPROM -> off
sudo efibootmgr -v
and extend your question by the output.efibootmgr --remove-dups
to eliminate them. // Do not mix Legacy and UEFI mode! As you've a GPT partition scheme you should decide to UEFI BIOS mode and also disable "USB Legacy boot" in BIOS. On GPT/EFI systems the bootmanagers reside in the EFI partition, not in some "hidden" areas before the partitions as in earlier times./dev/sda2
.