Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Not booting after hardware change

Ask for help with issues regarding the Installations of the Debian O/S.
Post Reply
Message
Author
Thierry91
Posts: 14
Joined: 2018-11-24 23:37

Not booting after hardware change

#1 Post by Thierry91 »

Hi,

My home server hardware running debian 11 has died (was only one year old). I bought a new one very similar (but next generation), and I thought it would be pretty easy to swap the disks and boot on the new computer. But it did not boot...
-I did quite a lot of investigations before writing this post.
-I made an install usb disk and I can boot on it and access the rescue mode .
-I discovered that on the previous computer it was booting in bios legacy mode, but this mode is not implemented in the new computer bios, . So I have created a EFI partition and I have converted the tables to GPT. No problem on this part. I can mount the partitions which are on the disk.
-I restarted in rescue mode and launched a grub reinstall. I said OK, but next reboot, it did not boot.
-I tried it a second time and it said grub reinstall failed with error 1
-I turned off the secured boot in the bios. It did not change anything.
-I restarted in rescue mode and launched a shell on my disk. Rescue mode is detecting my system on /dev/sda1 and a UEFI partition on /dev/sda3 and is able to mount them. I tried an "apt install grub-efi" (being root) and it says "grub-efi not found"
-so I tried an "apt update" (again being root) and it gives many errors saying "couldn't create temporary file /tmp/apt.conf.XXXX for passing config to apt-key". But I can access /tmp from the shell and I can create a file in it.

This is a summary of hours of tries. If someone could help, it would be great not to have to reinstall all my services from scratch. Thanks a lot.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Not booting after hardware change

#2 Post by p.H »

You need to install grub-efi-amd64 to be able to boot in EFI mode.

Thierry91
Posts: 14
Joined: 2018-11-24 23:37

Re: Not booting after hardware change

#3 Post by Thierry91 »

I already tried, apt tels me grub-efi-amd64 not found. Same as for grub-efi. From documentation grub-efi is a virtual package that will install the grub-efi package corresponding to the architecture. So grub-efi should install grub-efi-amd64 on intel x86 64 bits architectures

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Not booting after hardware change

#4 Post by p.H »

No, grub-efi is a real package which depends on grub-efi-amd64 on amd64 architecture.
Did you check the sources.list ? What does "apt-cache policy" say ?

Thierry91
Posts: 14
Joined: 2018-11-24 23:37

Re: Not booting after hardware change

#5 Post by Thierry91 »

Here is a photo with the sources list and the cache policy. Sorry I don't know how to easily get the text since I am booted in rescue.
IMG_20230202_172157.jpg

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Not booting after hardware change

#6 Post by p.H »

sources.list looks good but apt policy is empty. You need to apt update first.

Regarding the /tmp error, apt drops root privileges so check permissions on /tmp, it should be 1777/drwxrwxrwt.
Or if /tmp is supposed to be a mount point for a separate filesystem or tmpfs (check /etc/fstab), mount it first.

Thierry91
Posts: 14
Joined: 2018-11-24 23:37

Re: Not booting after hardware change

#7 Post by Thierry91 »

So I have mounted the /tmp which was not mounted. I don't know where it was pointing since I could write in the /tmp I was seeing, but never mind.
I've also seen that the EFI partition was not mounted as the rescue interface had told me that it had done it. So I did mount it on /boot/EFI
Once mounted, the rights came back to 1777/drwxrwxrwt.
So I could "apt update" and apt "upgrade" with no error. Same for "apt install grub-efi"
grub-install sent a warning , something like "this machine is not supporting UEFI variables"
I did a "update-grub", and a reboot.
And wonderful, the grub boot screen appears! The first boot took a long time and ended up in rescue mode. I understood it was a question of EFI partition not mounted. I checked fstab and the uuid of the EFI partition was wrong. Don't ask me why.
Now it's booting "normally" with a few ACPI warnings for unresolved symbols.
And now I have a bit of work to load the drivers corresponding to the new hardware.

Thanks a lot p.H, you have been really helpful.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Not booting after hardware change

#8 Post by p.H »

Thierry91 wrote: 2023-02-02 23:41 So I have mounted the /tmp which was not mounted. I don't know where it was pointing since I could write in the /tmp I was seeing
/tmp was not pointing anywhere, it is a normal directory with default permissions (root:root rwxr-xr-x) so only root can write to it.
Thierry91 wrote: 2023-02-02 23:41 grub-install sent a warning , something like "this machine is not supporting UEFI variables"
I always forget that rescue mode does not automatically mount efivarfs which is required to update UEFI boot variables (but "reinstall the GRUB boot loader" does). When installing grub-efi-amd64, did you choose to install in the "removable media path" ? It allows to boot without EFI boot entry.

Thierry91
Posts: 14
Joined: 2018-11-24 23:37

Re: Not booting after hardware change

#9 Post by Thierry91 »

/tmp was not pointing anywhere, it is a normal directory with default permissions (root:root rwxr-xr-x) so only root can write to it.
Of course you are right, I've realized after posting that it was the mounting point that I was seeing. It was late :)
When installing grub-efi-amd64, did you choose to install in the "removable media path" ?
No
I always forget that rescue mode does not automatically mount efivarfs which is required to update UEFI boot variables (but "reinstall the GRUB boot loader" does)
So I've done:
apt-get install --reinstall grub-efi =>no error
grub-install =>no error
update-grub =>no error

And now "efibootmgr --verbose | grep debian" does not give an error saying that UEFI variables are not supported on this machine

But still have some ACPI errors at boot time

Code: Select all

Feb 03 14:10:21 HS2-deb11 kernel: ACPI Error: Aborting method \_SB.PC00.XHCI.RHUB.SS02._PLD due to previous error (AE_NOT_FOUND) (20200925/psparse-529)
Feb 03 14:10:21 HS2-deb11 kernel: ACPI BIOS Error (bug): Could not resolve symbol [\_SB.UBTC.RUCC], AE_NOT_FOUND (20200925/psargs-330)
Feb 03 14:10:21 HS2-deb11 kernel: ACPI Error: Aborting method \_SB.PC00.XHCI.RHUB.SS01._PLD due to previous error (AE_NOT_FOUND) (20200925/psparse-529)
Feb 03 14:10:21 HS2-deb11 kernel: ACPI BIOS Error (bug): Could not resolve symbol [\_SB.UBTC.RUCC], AE_NOT_FOUND (20200925/psargs-330)
Feb 03 14:10:21 HS2-deb11 kernel: ACPI Error: Aborting method \_SB.PC00.XHCI.RHUB.HS04._PLD due to previous error (AE_NOT_FOUND) (20200925/psparse-529)
Feb 03 14:10:21 HS2-deb11 kernel: ACPI BIOS Error (bug): Could not resolve symbol [\_SB.UBTC.RUCC], AE_NOT_FOUND (20200925/psargs-330)
Feb 03 14:10:21 HS2-deb11 kernel: ACPI Error: Aborting method \_SB.PC00.XHCI.RHUB.HS03._PLD due to previous error (AE_NOT_FOUND) (20200925/psparse-529)
Feb 03 14:10:21 HS2-deb11 kernel: ACPI BIOS Error (bug): Could not resolve symbol [\_SB.UBTC.RUCC], AE_NOT_FOUND (20200925/psargs-330)

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Not booting after hardware change

#10 Post by p.H »

It surprises me that GRUB could boot if EFI variables were not updated and GRUB was not installed in the removable media path.
After booting the installed system in EFI mode, EFI variables are available so grub-install can update them without error.
Reinstalling grub-efi does nothing, it is just a dummy metapackage and it won't reinstall its dependencies.
ACPI errors are not related with GRUB or boot, they are caused by faulty ACPI implementation in the UEFI/BIOS firmware and usually harmless.

Thierry91
Posts: 14
Joined: 2018-11-24 23:37

Re: Not booting after hardware change

#11 Post by Thierry91 »

Ok, thanks again for your help. I will not bother with ACPI errors.

Post Reply