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

 

 

 

Moved motherboard to a new chassis and then Debian11 wouldn't boot

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
bookie
Posts: 370
Joined: 2007-12-07 11:49

Moved motherboard to a new chassis and then Debian11 wouldn't boot

#1 Post by bookie »

Hi guys :D
Really not sure what happened but I will give details here...
This isn't a follow on of this thread viewtopic.php?f=10&t=150391&p=743835&hi ... ie#p743835 but it is the same hardware.
I have had a NZXT Classic Series H2 for a number of years ...had a really good motherboard which will be moved.....just didn't play well with the new versions of VMWare Workstation etc.
I have customers that come with computers with failing drives etc and will not pay for an upgrade....the motherboard is a lot newer than my old server one and he didn't want it back...
I used installed Debian 11 as shown in above thread and then moved it to my NZXT chassis....this is where things went wrong..
I had two ssd drives for testing...one for Windows and the Debian 11 one...
By mistake I moved the Windows one and it fired up no problems....I changed it for the Debian one and I ended up with a blinking cursor in left corner....I went into bios and saw the drive wasn't marked as uefi..... so I realised the efi partition had been corrupted on the move?!
I saw in the wiki about rEFInd and created a bootable usb with it....I could then boot into Debian 11 no problems...

I then set about fixing efi. I followed the wik1

Code: Select all

# mount /dev/sda1 /mnt/boot/efi
I then reinstalled grub:

Code: Select all

# apt-get install --reinstall grub-efi
I ran the grub-install:

Code: Select all

grub-install /dev/sda
Installing for x86_64-efi platform.
efibootmgr: Could not set variable Boot0005: No such file or directory
efibootmgr: Could not prepare boot variable: No such file or directory
Installation finished. No error reported.
I then updated grub:

Code: Select all

$ sudo update-grub
That went without a hitch and I rebooted into bios and there I had a uefi link on my drive, so I knew it would work....as it did!

Bit strange why the efi became damaged....
Any thoughts on as to why?

bookie

seeker5528
Posts: 61
Joined: 2021-09-18 00:37
Been thanked: 2 times

Re: Moved motherboard to a new chassis and then Debian11 wouldn't boot

#2 Post by seeker5528 »

It doesn't seem likely that there was any damage to the stuff in the efi partition.

There are two parts to the equation the part in the firmware that has to recognize what is in the efi partition and the part in the partition that has to have what the firmware is looking for. When you run update-grub it doesn't just write stuff to the efi partition it also writes something in the firmware to make sure the firmware has what it needs to recognize the stuff in the partition.

I don't know enough about this stuff to know why it would be necessary to write something into the firmware if you are not doing secure boot, but from my limited 2 or 3 times taking a hard drive with efi boot out of one computer and putting into another one it does seem to be necessary.

One of those computers also needed a bios update to make it work. so age and how well the UEFI stuff was implemented in the firmware also makes a difference. So maybe as you get into newer motherboards with better implementations of UEFI this might be less of an issue?

User avatar
sunrat
Administrator
Administrator
Posts: 6412
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 462 times

Re: Moved motherboard to a new chassis and then Debian11 wouldn't boot

#3 Post by sunrat »

@seeker5528 is right. It's not the ESP which was damaged but the EFI entry in NVRAM was not correct as shown by efibootmgr. Reinstalling GRUB fixed that.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

bookie
Posts: 370
Joined: 2007-12-07 11:49

Re: Moved motherboard to a new chassis and then Debian11 wouldn't boot

#4 Post by bookie »

Thanks guys!
One lives and learns.....hopefully...;)

bookie

Post Reply