I don’t think you can, and I think it makes sense: it would be weird for the compiler to unexpectedly generate hidden variables for you.
For all the compiler knows, the temporary variable could hold a file handle, a database transaction, a Mutex, or other side effects in their Drop implementation that would make when it’s dropped matter. Or it could just be a very large struct you might not expect to keep around until the end of the function (or even, the end of the program if that’s a main loop).
So you should be aware of it, and thus you need the temporary variable like you did even if you just immediately shadow it. But at least you know you’re holding on to it until the end of the function.
That looks like a normal kernel to me. The mention of the surface is the hostname which comes from
/etc/hostname
.Exactly how does it not work? Does the kernel even try to boot? Tried verbose mode?
You might need to regenerate your initramfs for the new hardware, I think on Fedora that’s Dracut? That usually does include machine specific drivers that needs to be available during early boot, but just regenerating it should fix that.