Siduction Forum

Siduction Forum => Upgrade Warnings => Topic started by: titan on 2023/09/05, 10:02:53

Title: PC boots into BIOS
Post by: titan on 2023/09/05, 10:02:53
After DU today machine boots into BIOS , I saw other thread and tried setting/changing boot order but just get  error "grub_file_filters not found"
Title: Re: PC boots into BIOS
Post by: charlyheinz on 2023/09/05, 11:28:21
This is because grub-efi-amd64-bin has been updated during DU.
You have to reinstall grub as it is shown here:
https://forum.siduction.org/index.php?topic=6065.msg49947#msg49947 (https://forum.siduction.org/index.php?topic=6065.msg49947#msg49947)
What I have to do is to mount /sys different:

Quote
mount --rbind /sys mnt/where you chroot/sys
otherwiese I get an installation-warning!!
Title: Re: PC boots into BIOS
Post by: titan on 2023/09/05, 11:55:05
I am not duel booting just siduction not using uefi
Title: Re: PC boots into BIOS
Post by: hendrikL on 2023/09/05, 12:38:19
Well, I used a live siduction-iso (mow/giants).
Booted it from a USB-Stick, clicked on the chroot-helper icon and after being root in the chrooted system (the dialog is telling all important things) I ran grub-install and to be sure after it an update-grub!
Rebooted, all is fine again!
Title: Re: PC boots into BIOS
Post by: ghstryder on 2023/09/05, 12:41:11
Dual-Booting w/Windows 10 here.

All it took was:

chroot w/USB
# grub-install
# update-grub
Title: Re: PC boots into BIOS
Post by: hendrikL on 2023/09/05, 15:14:35
So, I run on a second laptop an "apt full-upgrade" (it could also be nala-upgrade or apt dist-upgrade), grub got its upgrade,
After that full-upgrade, I ran "grub-install /dev/sdb" (sdb is my boot disk) and afterwards "update-grub" (I don't know if this is necessary), rebooted, and I do not have any problems so far.

Code: [Select]
apt policy grub-common
grub-common:
  Installed: 2.12~rc1-7
  Candidate: 2.12~rc1-7
Title: Re: PC boots into BIOS
Post by: titan on 2023/09/05, 15:47:45
Thanks, I have tried everything here still get same error, I have had enough I am off down the woods on my bike to chill out.
Title: Re: PC boots into BIOS
Post by: hendrikL on 2023/09/05, 15:55:30
So maybe you should downgrade it, if possible.

http://snapshot.debian.org/package/grub2/2.06-14/#grub2-common_2.06-14
Title: Re: PC boots into BIOS
Post by: dibl on 2023/09/05, 16:18:30
The new chroot-helper is the star of the show, today!  Nice job!
Title: Re: PC boots into BIOS
Post by: ghstryder on 2023/09/05, 17:27:54
The new chroot-helper is the star of the show, today!  Nice job!

You can say that again dibl, thanks Team!
Title: Re: PC boots into BIOS
Post by: Teriarch on 2023/09/05, 22:49:42
As far as I can tell the problem occurs with the update of grub from
version 2.06-13 to version 2.12~rc1-7 on the 4th of September.

Only UEFI (with or w/o Secure Boot) Mode is affected. The developer
changed the lines in file /etc/grub.d/30_uefi-firmware:

if [ "\$grub_platform" = "efi" ]; then
        fwsetup --is-supported
        if [ "\$?" = 0 ]; then
                menuentry '$LABEL' \$menuentry_id_option 'uefi-firmware' {
                        fwsetup
                }
        fi

The offending command
"fwsetup --is-supported"
has no consequence for grubx64.efi in version 2.12 but causes
version 2.06 to enter the bios fw settings (obviously version 2.06
ignores the option "--is-supported" and enters the firmware settings
instead).

In rare circumstances the old grubx64.efi is not replaced by the new one.
Comment the offending line in /etc/grub.d/30_uefi-firmware as a quick fix
and run update-grub in a chroot environment as suggested.
Title: Re: PC boots into BIOS
Post by: hendrikL on 2023/09/06, 07:52:55
One short information to the chroot-helper and  encrypted systems. First you have to open your crypted system before chrooting in to it.
So you have to do it by hand, sorry.
Title: Re: PC boots into BIOS
Post by: bevo on 2023/09/06, 08:36:00
@ Teriarch: Bingo :) great job, thank you !!
Title: Re: PC boots into BIOS
Post by: Jeef on 2023/09/06, 12:47:53
One short information to the chroot-helper and  encrypted systems. First you have to open your crypted system before chrooting in to it.
So you have to do it by hand, sorry.

Did you decrypt via cli or from another method. I've been trying luksopen the running chroot-helper but get prompted drive is already in use. Might need to chroot manually
Title: Re: PC boots into BIOS
Post by: titan on 2023/09/06, 13:02:23
I gave up with my original install, and did a clean install, with new ssd of latest siduction but after du it has same problem but Teriarch's solution fixed it
Title: Re: PC boots into BIOS
Post by: hendrikL on 2023/09/06, 13:31:12

Did you decrypt via cli or from another method. I've been trying luksopen the running chroot-helper but get prompted drive is already in use. Might need to chroot manually

Well, I do not have an encrypted harddrive, so I can't test it
But I think you are right, you have to chroot manually, sorry folks.
Title: Re: PC boots into BIOS
Post by: titan on 2023/09/06, 15:23:58
I see there have been two updates to grub since yesterday has anyone tried the latest version rc1-9
Title: Re: PC boots into BIOS
Post by: sotnik on 2023/09/06, 15:26:57
I booted using super grub2
my booting disk specification is

Quote
Device             Start       End   Sectors   Size Type
/dev/nvme0n1p1      2048   1023999   1021952   499M Windows recovery environment
/dev/nvme0n1p2   1024000   1228799    204800   100M EFI System
/dev/nvme0n1p3   1228800   1261567     32768    16M Microsoft reserved
/dev/nvme0n1p4   1261568 368642047 367380480 175,2G Microsoft basic data
/dev/nvme0n1p5 368642048 369256447    614400   300M EFI System
/dev/nvme0n1p6 369256448 493160447 123904000  59,1G Linux filesystem
/dev/nvme0n1p7 493160448 909664255 416503808 198,6G Linux filesystem
/dev/nvme0n1p8 909664256 976773119  67108864    32G Linux swap

Wich partition I have to use in grub-install ?
Title: Re: PC boots into BIOS
Post by: towo on 2023/09/06, 15:31:54
If you are in your siduction system and since your system is using efi, a simple

Code: [Select]
grub-install
is needed.
Title: Re: PC boots into BIOS
Post by: sotnik on 2023/09/06, 16:04:09
Whatever I have try does not work
For example

Code: [Select]
grub-install
Installing for i386-pc platform.
grub-install: error: install device isn't specified.

Quote
# grub-install /dev/nvme0n1
Installing for i386-pc platform.
grub-install: warning: this GPT partition label contains no BIOS Boot Partition; embedding won't be possible.
grub-install: warning: Embedding is not possible.  GRUB can only be installed in this setup by using blocklists.  However, blocklists are UNRELIABLE and their use is discouraged..
grub-install: error: will not proceed with blocklists.
Title: Re: PC boots into BIOS
Post by: Teriarch on 2023/09/06, 16:12:42
@titan
The files will be overwritten by the new release and you have to repeat the quick and dirty fix.
Most of the time the problem can be resolved by a grub-install, but it depends
on the ability of the scripts to find the grubx64.efi loader. esp. on dual boot
systems different from a vanilla siduction install. Once successfully booted run a
"efibootmgr -v" command, i.g.:

BootCurrent: 0005
Timeout: 1 seconds
BootOrder: 0005,0001,0000,0009,000A,000B,000C,0002,0003,0004,0006
Boot0000* debian        HD(10,GPT,14336d57-7fb1-49b6-92ff-b4a20578619c,0xcfe058b0,0x32000)/File(\EFI\debian\grubx64.efi)
Boot0001* CD/DVD Drive  BBS(CDROM,,0x0)...
Boot0002* Hard Drive    BBS(HD,,0x0)...
Boot0003* UEFI:CD/DVD Drive     BBS(129,,0x0)
Boot0004* UEFI:Removable Device BBS(130,,0x0)
Boot0005* UEFI OS       HD(10,GPT,14336d57-7fb1-49b6-92ff-b4a20578619c,0xcfe058b0,0x32000)/File(\EFI\BOOT\BOOTX64.EFI)

I boot siduction with secure boot enabled (although I dropped the sec policies afterwards):

$ mokutil --sb-state
SecureBoot enabled

The replacement of  modified BOOTX64.EFI by the standard unsigned grubx64.efi would therefore have resulted
into a complete disaster.

Hence in your case find the recent grubx64.efi  bootloader with the above command and replace it manually
by the new one, if update-grub fails for some reason.


Title: Re: PC boots into BIOS
Post by: towo on 2023/09/06, 16:18:52
@sotnik

what does

Code: [Select]
mount
say?
Title: Re: PC boots into BIOS
Post by: Teriarch on 2023/09/06, 16:28:08
@sotnig:

> # grub-install /dev/nvme0n1
> Installing for i386-pc platform.

In your case grub-install is detecting your platform as legacy
and could not find space on the disk for the bootloader. Are you
sure you have uefi enabled in the BIOS?
Title: Re: PC boots into BIOS
Post by: sotnik on 2023/09/06, 17:19:52
@towo

Code: [Select]
# mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=32860892k,nr_inodes=8215223,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=6577208k,mode=755,inode64)
/dev/nvme0n1p6 on / type ext4 (rw,noatime,discard,errors=remount-ro,commit=180)
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=31,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=14391)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,nosuid,nodev,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)
systemd-1 on /efi type autofs (rw,relatime,fd=57,pgrp=1,timeout=120,minproto=5,maxproto=5,direct,pipe_ino=27971)
/dev/sda1 on /mnt/ResearchData type ext4 (rw,noatime,errors=remount-ro,commit=180,x-gvfs-show)
/dev/nvme0n1p4 on /mnt/Data type ext4 (rw,noatime,errors=remount-ro,commit=180,x-gvfs-show)
/dev/sdb2 on /mnt/LData type ext4 (rw,noatime,errors=remount-ro,commit=180,x-gvfs-show)
/dev/sdb3 on /media/sotnik type fuseblk (rw,nosuid,nodev,noexec,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096)
none on /run/shm type tmpfs (rw,noatime,inode64)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,nr_inodes=1048576,inode64)
none on /var/log type tmpfs (rw,noatime,inode64)
/dev/nvme0n1p7 on /home type ext4 (rw,noatime,discard,errors=remount-ro,commit=180)
none on /var/tmp type tmpfs (rw,noatime,inode64)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)
sunrpc on /run/rpc_pipefs type rpc_pipefs (rw,relatime)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=6577204k,nr_inodes=1644301,mode=700,uid=1000,gid=1004,inode64)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1004)
portal on /run/user/1000/doc type fuse.portal (rw,nosuid,nodev,relatime,user_id=1000,group_id=1004)

@Teriarch
I think it is legacy. I will  check and correct and I will let to you know what happens.
Title: Re: PC boots into BIOS
Post by: Teriarch on 2023/09/06, 17:57:35
@sotnik
In the meantime you can also do a

$ sudo fdisk -l /dev/nvme0n1

and post the output to see whether you have
a GPT or DOS formated disk and ESP or BIOS partition.
Title: Re: PC boots into BIOS
Post by: sotnik on 2023/09/06, 19:13:19
@Teriarch

It is gtp (I knew it :) )

Quote
# fdisk -l /dev/nvme0n1
Disk /dev/nvme0n1: 465,76 GiB, 500107862016 bytes, 976773168 sectors
Disk model: Samsung SSD 970 EVO 500GB               
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: gpt
Disk identifier: 4F1DC3A8-0333-4A48-AC33-5C5E6DA5C3DF

Device             Start       End   Sectors   Size Type
/dev/nvme0n1p1      2048   1023999   1021952   499M Windows recovery environment
/dev/nvme0n1p2   1024000   1228799    204800   100M EFI System
/dev/nvme0n1p3   1228800   1261567     32768    16M Microsoft reserved
/dev/nvme0n1p4   1261568 368642047 367380480 175,2G Microsoft basic data
/dev/nvme0n1p5 368642048 369256447    614400   300M EFI System
/dev/nvme0n1p6 369256448 493160447 123904000  59,1G Linux filesystem
/dev/nvme0n1p7 493160448 909664255 416503808 198,6G Linux filesystem
/dev/nvme0n1p8 909664256 976773119  67108864    32G Linux swap

I don't know why but it can not find efi dir

Code: [Select]
# grub-install
Installing for x86_64-efi platform.
grub-install: error: cannot find EFI directory.

same when i specify the partition

Quote
grub-install nvme0n1p5
Installing for x86_64-efi platform.
grub-install: error: cannot find EFI directory.

Title: Re: PC boots into BIOS
Post by: towo on 2023/09/06, 19:42:58
You haven't mounted your efi partition as /boot/efi, that's why grub-install will fail!
Title: Re: PC boots into BIOS
Post by: adix on 2023/09/06, 20:00:11
Saved my day, I had the same issue today    :-[

grub-install from live-cd did the job

Thanks!!!
Title: Re: PC boots into BIOS
Post by: sotnik on 2023/09/06, 20:04:59
@towo

I thought it is not needed. Any way I did it but the problem remains
Title: Re: PC boots into BIOS
Post by: towo on 2023/09/06, 20:15:04
On an efi system, propper mounting of efi partition is indeed needed!
And since you have 2 efi partitions, you have to use the right efi partition!

And btw, if you want really help, you should exact explain, what you are doing.
Title: Re: PC boots into BIOS
Post by: ro_sid on 2023/09/06, 20:20:56
Hello @sotnik

You seem to have have a strange partitioning:

Quote
Device             Start       End   Sectors   Size Type
/dev/nvme0n1p1      2048   1023999   1021952   499M Windows recovery environment
/dev/nvme0n1p2   1024000   1228799    204800   100M EFI System
/dev/nvme0n1p3   1228800   1261567     32768    16M Microsoft reserved
/dev/nvme0n1p4   1261568 368642047 367380480 175,2G Microsoft basic data
/dev/nvme0n1p5 368642048 369256447    614400   300M EFI System
/dev/nvme0n1p6 369256448 493160447 123904000  59,1G Linux filesystem
/dev/nvme0n1p7 493160448 909664255 416503808 198,6G Linux filesystem
/dev/nvme0n1p8 909664256 976773119  67108864    32G Linux swap

There are two(!) partitions marked "EFI" on the same drive-device (p2 and p5). I'm not even sure, if this is "allowed", but it sure makes the choice difficult. Only one of them can be used for booting. Most likely the UEFI-boot-system will select the first one. And I don't think, Linux will make an automatic choice here, which it otherwise does.
Normally the partition to mount as EFI-partition on Linux is an entry in /etc/fstab.
Title: Re: PC boots into BIOS
Post by: Teriarch on 2023/09/06, 20:28:38
@sotnik

Since /dev/nvme0n1p6 is mounted as root partition you somehow managed
to boot into the system (or used chroot?), how? Did you change your bios
settings to do so and is it an uefi boot (efivars are not mounted, though)?

This information is critical, since advice resulting from guessing games can
worsen the situation.

Title: Re: PC boots into BIOS
Post by: sotnik on 2023/09/06, 21:11:59
Hello @ro_sid
Before the problem with grub I had no entry in fstab and I had no issues at all.
Any way, I removed the efi partition /dev/nvme0n1p2 since it is not needed

@Teriarch
I booted in the system using super grub2, therefore chroot is not necessary
Yes, I selected uefi in bios

I don’t think it can be worse than the current state :)

I provide some further information for my system

I have two efi directories

/boot/efi/
and
/efi/EFI/

The /boot/efi/ is empty

The EFI directory contains the following directories:

Quote
ls /efi/EFI/ -l
total 8
drwxr-xr-x 2 root root 4096 Νοε  13  2018 boot
drwxr-xr-x 2 root root 4096 Νοε  13  2018 siduction_2018.3.0

Quote
# ls /efi/EFI/boot/ -l
total 120
-rwxr-xr-x 1 root root 121856 Νοε  13  2018 bootx64.efi

Quote
# ls /efi/EFI/siduction_2018.3.0/ -l
total 120
-rwxr-xr-x 1 root root 121856 Νοε  13  2018 grubx64.efi

Where I have to mount /dev/nvme0n1p5 ?

Thank you
Title: Re: PC boots into BIOS
Post by: towo on 2023/09/06, 21:16:50
/efi/EFI/

is absolutely wrong!

the efi partition has to be mountet as /boot/efi!
Title: Re: PC boots into BIOS
Post by: sotnik on 2023/09/06, 21:30:20
Thank you towo
Problem solved.
I post here what I did just for the case it might be useful to someone else.

Quote
# mount /dev/nvme0n1p5 /boot/efi/

Quote
# grub-install
Installing for x86_64-efi platform.
Installation finished. No error reported.

Quote
# update-grub
Generating grub configuration file ...
Found theme: /usr/share/grub/themes/patience/theme.txt
Found linux image: /boot/vmlinuz-6.4.0-4-amd64
Found initrd image: /boot/initrd.img-6.4.0-4-amd64
Found linux image: /boot/vmlinuz-6.4.0-3-amd64
Found initrd image: /boot/initrd.img-6.4.0-3-amd64
Found memtest86+ 64bit EFI image: /boot/memtest86+x64.efi
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.
Adding boot menu entry for UEFI Firmware Settings ...
done

Reboot and everything work as normal

Thank you again!!!
Title: Re: PC boots into BIOS
Post by: Teriarch on 2023/09/07, 00:03:34
@sotnik

glad your problem got solved! And just in case you like to dual boot your system,
uncomment line

#GRUB_DISABLE_OS_PROBER=false

in file /etc/default/grub and run update-grub again.
Title: Re: PC boots into BIOS
Post by: sotnik on 2023/09/07, 00:20:32
Thank you @Teriarch, I use only siduction in this PC.
Title: Re: PC boots into BIOS
Post by: cliff6056 on 2023/09/07, 16:27:15
Holding off on upgrade since before this issue started, will there be a time when a regular DU will just work without intervention?  Thanks. 

Cliff
Title: Re: PC boots into BIOS
Post by: Taliesin on 2023/09/07, 22:58:20
Once again I'm grateful to the Siduction community, and the advice given to read the Upgrade Warnings before doing an upgrade.
Which thankfully, I always do.
The recent upgrade of Grub, in particular is a classic example of why this is important.
To that end after running
Code: [Select]
apt update
apt full upgrade
at run level 3
I followed the advice on regarding the installation and upgrading of grub, before rebooting.
You folks are legends.
Title: Re: PC boots into BIOS
Post by: hendrikL on 2023/09/08, 18:28:32
Holding off on upgrade since before this issue started, will there be a time when a regular DU will just work without intervention?  Thanks. 

Cliff

You can full-upgrade, dist-upgrade or nala upgrade, depends on what you prefer!
But, if you have the btrfs-filesystem in use, first do

Code: [Select]
apt update
apt install siduction-scripts

after it you can run

Code: [Select]
apt full-upgrade (or what you prefer)
Maybe you need afterwards an "apt -f install" if something went wrong!

Do not reboot yet!

Before rebooting, please run

Code: [Select]
grub-install /dev/foo (foo= your Harddisk like sda or what ever)
update-grub

On an UEFI systems you do not need to address the device!

Now you should be on the save side to reboot!

Good luck!