如何将 EC2 Windows 实例的启动模式从“旧版 BIOS”转换为 UEFI 或 UEFI 安全启动?
我想将 Amazon Elastic Compute Cloud (Amazon EC2) Windows 实例的启动模式从“旧版 BIOS”更改为 UEFI 或 UEFI 安全启动。
解决方法
先决条件
- 运行 Windows Server 2019 或 2022 且带有 Amazon Elastic Block Store (Amazon EBS) 卷的工作中 EC2 实例。
- 验证您的实例类型是否支持 UEFI。
- 查看实例类型默认启动模式的注意事项。
- 操作系统的启动模式必须为旧版。要进行验证,请使用 Windows 远程桌面协议 (RDP) 连接到实例。然后,在系统信息中检查 BIOS 模式。
**注意:**转换后,现有实例或根卷不可用。最佳实践是在执行这些解决方法步骤之前创建数据备份。您可以通过创建 AMI 或快照来创建备份。
将启动模式从“旧版 BIOS”转换为 UEFI
步骤 1.将实例根卷更改为 GPT 分区:
**注意:**使用 mbr2gpt 工具来完成此步骤。此工具在 Windows 2019 和 2022 上可用。如需将 Windows Server 2016、2012 或 2012 R2 操作系统转换为 UEFI 启动,请分离根卷。然后,将根卷附加到运行 Windows Server 2019 或 2022 的救援实例。
1. 登录或使用 RDP 连接到现有 Windows 2019 或 2022 实例。或者,启动一个新实例。
2. 运行 diskpart 命令以识别磁盘号:
在命令提示符下,输入 diskpart,然后按 Enter。
在 diskpart 提示符下,输入 list disk,然后按 Enter。
使用生成的列表来识别根卷。
注意:默认情况下,磁盘 0 会作为根卷附加到现有实例。对于 Windows Server 2016、2012 和 2012 R2,磁盘号与磁盘 0 不同,具体取决于驱动器映射。
3. 使用管理员权限运行命令提示符。
4. 运行以下命令来验证磁盘:
C:\Users\Administrator> mbr2gpt /validate /disk:0 /allowFullOS
下面是预期输出的示例:
MBR2GPT: Attempting to validate disk 0 MBR2GPT: Retrieving layout of disk MBR2GPT: Validating layout, disk sector size is: 512 bytes MBR2GPT: Validation completed successfully
5. 运行以下命令来将 MBR 分区转换为 GPT:
C:\Users\Administrator> mbr2gpt /convert /disk:0 /allowFullOS
下面是预期输出的示例:
MBR2GPT will now attempt to convert disk 0. If conversion is successful the disk can only be booted in GPT mode. These changes cannot be undone! MBR2GPT: Attempting to convert disk 0 MBR2GPT: Retrieving layout of disk MBR2GPT: Validating layout, disk sector size is: 512 bytes MBR2GPT: Trying to shrink the system partition MBR2GPT: Creating the EFI system partition MBR2GPT: Installing the new boot files MBR2GPT: Performing the layout conversion MBR2GPT: Migrating default boot entry MBR2GPT: Adding recovery boot entry MBR2GPT: Fixing drive letter mapping MBR2GPT: Conversion completed successfully MBR2GPT: Before the new system can boot properly you need to switch the firmware to boot to UEFI mode!
6. 从控制台或从实例内部关闭实例。
步骤 2.创建根卷的快照
Amazon EC2 控制台
有关更多信息,请参阅创建快照。
Amazon 命令行界面 (Amazon CLI)
**注意:**如果在运行 Amazon CLI 命令时收到错误,请确保您使用的是最新版本的 Amazon CLI。或者,您可以使用 Amazon CloudShell 来运行这些命令。
在以下示例命令中,请将 region、volume-id 和 description 替换为适用于您的用例的正确值。务必正确输入 volume-id 和 description,如下例所示。
aws ec2 create-snapshot --region <region> --volume-id <vol-0xxxxxxxxxxxxx> --description <add text>
监控快照过程,直至快照创建完成。然后,记下 snapshot-id。
aws ec2 describe-snapshots --region <region> --snapshot-ids <snap-xx>
步骤 3.从快照创建 AMI
Amazon EC2 控制台
1. 打开 EC2 控制台。
2. 在 Elastic Block Store 下,选择快照。
3. 选择您的快照,然后选择操作、创建映像。
4. 在根据 EBS 快照创建映像对话框中,填写以下字段:
**名称和描述:**输入您选择的名称和描述。
**架构:**x86_64
**虚拟化类型:**硬件辅助虚拟化 (HVM, Hardware Assisted Virtualization)
根设备名称:/dev/sda1
**内核 ID:**使用默认内核 ID。
**RAM 磁盘 ID:**使用默认 RAM 磁盘 ID。
**启动模式:**UEFI
5. 选择创建。
Amazon CLI
运行以下命令。在以下示例命令中,请将 region、description、name 和 snapshotID 替换为适合您的用例的值。
aws ec2 register-image --region <region> --description <description> --name <ami-new_ami_xxx> --block-device-mappings "DeviceName=/dev/sda1,Ebs={SnapshotId=snap-0xxxxxxxx,DeleteOnTermination=true}" --architecture x86_64 --root-device-name /dev/sda1 --virtualization-type hvm --ena-support --boot-mode uefi
下面是预期输出的示例:
{ "ImageId": "ami-new_ami_xxx" }
步骤 4.验证新 AMI 的启动模式是否为 UEFI
有关更多信息,请参阅确定 AMI 的启动模式参数。
步骤 5.使用新的 AMI 启动新实例
有关更多信息,请参阅如何从自定义 AMI 启动 EC2 实例?从此 AMI 启动的所有新实例都将继承相同的启动模式。
步骤 6.验证实例的启动模式是否为 UEFI
使用 RDP 连接到您的新实例,然后验证启动模式。有关更多信息,请参阅确定操作系统的启动模式。
**注意:**终止现有实例,或者删除您在其上运行 mbr2gpt 命令的根卷。转换后,现有实例无法使用。
将实例的启动模式从“旧版 BIOS”转换为 UEFI 安全启动
**注意:**在创建 AMI 期间,您可以自定义 UEFI 安全启动变量。有关更多信息,请参阅如何创建亚马逊云科技二进制 blob。
1. 如步骤 1.将实例根卷更改为 GPT 分区所示,将实例的根卷修改为 GPT 分区。
2. 创建根卷的快照。
3. 从快照创建 AMI。在创建 AMI 期间,指定 uefi-data 字符串以启用 UEFI 安全启动。
运行以下 Amazon CLI 命令,以便在不支持 TPM 的情况下启用 UEFI 安全启动:
在以下示例命令中,请将 region、description、name 和 snapshotID 替换为适合您的用例的值。
aws ec2 register-image --region <region> --description <description> --name <ami-new_ami_xxx> --block-device-mappings "DeviceName=/dev/sda1,Ebs={SnapshotId=snap-0xxxxxxxx,DeleteOnTermination=true}" --architecture x86_64 --root-device-name /dev/sda1 --virtualization-type hvm --ena-support --boot-mode uefi --uefi-data QU1aTlVFRkmbIrz8AAAAAHj5a7fZ9+2cZVRc3ZaucXd3J8EDBJIAgQCB4BYgOCR4cPfgTkio4BCCFRY8eOHuTrAQ3N1D0O7T93yj++59zh33jvP17e5xqn7Vj2fU2FBrr7nmO59dqP/BofjL639lb3+J3qTt3hjbmP0xMUMEDk/REf4YUCMgqCpw/fUd8P/OBfj4//gC/lH3/wbD8H9pEP8xNVSQV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EFI 安全启动:
aws ec2 register-image --region <region> --description <description> --name <ami-new_ami_xxx> --block-device-mappings "DeviceName=/dev/sda1,Ebs={SnapshotId=snap-0xxxxxxxx,DeleteOnTermination=true}" --architecture x86_64 --root-device-name /dev/sda1 --virtualization-type hvm --ena-support --boot-mode uefi --tpm-support v2.0 --uefi-data QU1aTlVFRkmbIrz8AAAAAHj5a7fZ9+2cZVRc3ZaucXd3J8EDBJIAgQCB4BYgOCR4cPfgTkio4BCCFRY8eOHuTrAQ3N1D0O7T93yj++59zh33jvP17e5xqn7Vj2fU2FBrr7nmO59dqP/BofjL639lb3+J3qTt3hjbmP0xMUMEDk/REf4YUCMgqCpw/fUd8P/OBfj4//gC/lH3/wbD8H9pEP8xNVSQVvjjq/4zl8C/n7//+Y5pf++a/0HN7n8rIvAZ0H/VDOif7biFiAAP4/+5w/g/s+z8UQBNjf+SAyH890x9/u4O/p/qfv65l/qPPUcDLjhwueP/j9zxfyo4/+2VUkCp+Tuf/Q9KzndPeKStT1vW2GpnaT9G/sCcoupWxHpkbvV+l3oKJSafghyaWrcszv/IraNVt6t5FaVlm2y8qN3ywLjop4aNKq927o7PbVye8ofTXZ9QZ622l4zOAron2ZGvelBm0TH3LqJWhk59P5QcnmNHYlw966V18lOv3WkyWVwR5TMrC1g7Lhokg6aL5pentkmOxAQbadDeRWzDaGVi7MuclSXSxdON1jI5vhFCnCMZ2Q6H5p2FjMQK9V/vLiAT5I9jbp2eJ4RU+6mFm8tQRmeVEYkGcFiiutdDFI29q1vRu2FeYQLIeArGXslbfddD8o97uaFaPjS3onO1+LqXkx0VSCFIwtsVM3arbxkfzweMnrtSolqMx2oZslML9exzLw2uSjvrjYwNeRWSUQa+0B4xTAuosCi1ETxuWHvGsiyYheWKdk7xKnnCg2sUlXpnJBwx7SvBEeoCzJfLpAYtlZmx47eHzbI2OdojTggR8gB05pgb9jsuTXyPQvpoKFLfWqwQedyBggPLatFIZvS7CRb/cenUI3oOB901SR0MRwUtmG9QwCHj01Oa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e3NWDu3pwVw/u6sFdPbirB3f14K4e3NWDu3pwVw/u6sFdPbirB3f14K4e3NWDu3pwV+/PdPVA59tJQ3IlmXF3rkq+bZ1UmFutBfZlDkFAhFbCcx6e8xf0QJ4O8pEcy9NaAZsEoT51dkNvaTjUQZ8bv+cqbaQT0TpWBJRHjfiLsarObMQEpixVXZDKDKReraeqBThY7lbN1ntFgPodNgn1jRH5dApffdHmJe97TsUPGkcpj713PeLIayBJ6iA/YW+sX9PJjqBwbzdts89gjy1lKrZQ5C3lqEmP620rw+fvoPyhpLMj+ZVLvlzr6BMpk5MyTt1c1px2hmuVjZl67VzmpL/1s4az6MhoxISk/88/a/gv/QCQAw==
4. 运行以下命令以验证新 AMI 的启动模式:
aws ec2 describe-images --image-id ami-077eabcxxxxaxdfx --query "Images[*].{BootMode:BootMode,TpmSupport:TpmSupport}"
如果 AMI 启用了 UEFI 安全启动和 TPM 支持,则输出将如下例所示:
[ { "BootMode": "uefi", "TpmSupport": "v2.0" } ]
如果 AMI 已启用 UEFI 安全启动,则输出如下所示:
[ { "BootMode": "uefi", "TpmSupport": "null" } ]
5. 从新 AMI 启动实例。确保使用支持 UEFI 和 TPM 的实例类型。
6. 要验证安全启动和 TPM 状态,请使用 RDP 连接到实例。然后,在 Amazon PowerShell 管理员模式下运行以下命令。
如果实例支持 UEFI 安全启动且安全启动已启用,则以下 cmdlet 会返回 $True。否则,响应为 $False。
PS> Confirm-SecureBootUEFI
运行以下命令以检查 TpmPresent 属性。如果实例上存在 TPM,则响应为 $True。否则,响应为 $False。
PS> Get-Tpm
注意:
- NitroTPM 和 UEFI 安全启动是独立的功能,可以在创建 AMI 时独立启用。
- 在为 AMI 激活 TPM 后,无法将其停用。
- UEFI 支持安全启动。nitroTPM 提供测量启动。
相关内容
- 已提问 3 个月前lg...
- AWS 官方已更新 2 年前
- AWS 官方已更新 1 年前
- AWS 官方已更新 1 年前
- AWS 官方已更新 1 年前