修复/恢复 HDD 启动数据 (Linux)

修复/恢复 HDD 启动数据 (Linux)

我增加了分区的大小(修改大小后EBS Volume

调整大小之前我收到以下警告:

GPT fdisk (gdisk) version 1.0.1

Partition table scan:
  MBR: MBR only
  BSD: not present
  APM: not present
  GPT: not present


***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format
in memory. THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by
typing 'q' if you don't want to convert your MBR partitions
to GPT format!
***************************************************************

转换为 GPT 似乎造成了一些损害。

分区大小调整似乎成功,我可以挂载和访问文件。

调整大小后,我无法再使用该 EBS 卷启动机器,该卷似乎不是启动卷。

机器在启动时挂起:

在此处输入图片描述

这是磁盘信息,如果您需要查看其他信息,请告诉我

$ lsblk
NAME    MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
xvda    202:0    0   50G  0 disk
└─xvda1 202:1    0   50G  0 part /
xvdf    202:80   0  120G  0 disk
└─xvdf1 202:81   0  120G  0 part
$ sudo gdisk /dev/xvdf
GPT fdisk (gdisk) version 1.0.1

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.

Command (? for help): p
Disk /dev/xvdf: 251658240 sectors, 120.0 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): EDA0C666-2A70-4C8A-A1A8-77908890A1A8
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 251658206
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048       251658206   120.0 GiB   EF00  EFI System

我如何恢复该磁盘的启动功能?

答案1

没有找到解决 mbr/gpt 启动数据损坏的方法。

parted相反,我使用而不是gdisk(使用快照备份)重新执行了调整大小的过程。

相关内容