Can't boot from physical drive on new system
Posted: 20. Mar 2023, 07:19
VirtualBox 7.0, UEFI Shell v2.2, Windows 10 host, Ubuntu client
I have an NVMe drive with Ubuntu on it which I originally created for an old desktop machine. (It was running a hard disk, but I later dd-ed everything over onto the NVMe.) I also later used it on an old laptop under VirtualBox, and it worked fine. Now I'm trying to use it in a newer desktop system under VirtualBox, and I can't get it to boot. It smells like it has something to do with SecureBoot.
If I boot with SecureBoot off, it gets into the Linux boot but gives a slew of error messages saying it can't write to the Linux partition, and eventually drops to an initramfs prompt. It complains that an fsck is needed, but fsck can't write anything to the disk, so I can't get past that.
If I boot with SecureBoot turned on, it errors in the EFI shell saying "Access Denied" when it tries to run \EFI\ubuntu\grubx64.efi. I can "type" that file to the console (funny that Ctrl-C doesn't work), but I can't copy it to a junk file (says "failed to open with create"), so it looks like the boot partition isn't writable either. Also, as soon as that fails, the prompt changes from FS0:\> to Shell>, most commands just complain "Current directory not specified", and a dir of fs0:\ shows nothing. Rebooting brings everything back.
So it smells to me like SecureBoot is causing a problem. Does it smell like that to anyone else? The old desktop and laptop machines I used this on never had SecureBoot, and this drive is certainly not encrypted.
Oh, and this drive is definitely Offline in Windows, so that's not the issue.
I have an NVMe drive with Ubuntu on it which I originally created for an old desktop machine. (It was running a hard disk, but I later dd-ed everything over onto the NVMe.) I also later used it on an old laptop under VirtualBox, and it worked fine. Now I'm trying to use it in a newer desktop system under VirtualBox, and I can't get it to boot. It smells like it has something to do with SecureBoot.
If I boot with SecureBoot off, it gets into the Linux boot but gives a slew of error messages saying it can't write to the Linux partition, and eventually drops to an initramfs prompt. It complains that an fsck is needed, but fsck can't write anything to the disk, so I can't get past that.
If I boot with SecureBoot turned on, it errors in the EFI shell saying "Access Denied" when it tries to run \EFI\ubuntu\grubx64.efi. I can "type" that file to the console (funny that Ctrl-C doesn't work), but I can't copy it to a junk file (says "failed to open with create"), so it looks like the boot partition isn't writable either. Also, as soon as that fails, the prompt changes from FS0:\> to Shell>, most commands just complain "Current directory not specified", and a dir of fs0:\ shows nothing. Rebooting brings everything back.
So it smells to me like SecureBoot is causing a problem. Does it smell like that to anyone else? The old desktop and laptop machines I used this on never had SecureBoot, and this drive is certainly not encrypted.
Oh, and this drive is definitely Offline in Windows, so that's not the issue.