EFI 시스템 파티션 삭제

EFI 시스템 파티션 삭제

실수로 EFI 시스템 파티션을 삭제했습니다. Linux Mint와 Windows 듀얼 부팅 시스템인데 Windows를 제거하고 싶습니다. Windows 파티션을 삭제한 후에는 Windows 부팅 관리자 파티션을 삭제하는 것을 의미합니다. 그런데 실수로 EFI 파티션을 삭제했습니다. 이제 내 BIOS에 부팅 옵션이 표시되지 않습니다. Mint 부팅 가능한 라이브 부팅 USB가 있습니다.
다른 efi 파티션을 생성하고 grub을 다시 로드하는 방법을 안내해 줄 수 있는 사람이 있습니까?

답변1

이전 EFI 파티션을 덮어쓰지 않은 경우 SystemRescue를 사용하여 testdisk파티션을 부팅하고 복구할 수 있습니다.

답변2

아직 디스크 변경을 시도하지 않았고 EFI 파티션의 정확한 크기를 알고 있는 경우 파티션을 다시 생성할 수 있지만(포맷하지 않음) 파티션을 다시 생성한 후 다음을 실행합니다 dosfsck /dev/disk/part<n>(일반적으로 파티션 #1). ) 또는 실행하여 fsck.vfat /dev/disk/part<n>파일 시스템을 인식하는지 확인합니다. 복구를 시도하기 전에 확인 전용 모드에서 실행하는 것이 좋습니다(복구가 필요한 경우).

fsck.vfat --help
Usage: fsck.vfat [OPTIONS] DEVICE
Check FAT filesystem on DEVICE for errors.

Options:
  -a              automatically repair the filesystem
  -A              toggle Atari variant of the FAT filesystem
  -b              make read-only boot sector check
  -c N            use DOS codepage N to decode short file names (default: 850)
  -d PATH         drop file with name PATH (can be given multiple times)
  -f              salvage unused chains to files
  -F NUM          specify FAT table NUM used for filesystem access
  -l              list path names
  -n              no-op, check non-interactively without changing
  -p              same as -a, for compat with other *fsck
  -r              interactively repair the filesystem (default)
  -S              disallow spaces in the middle of short file names
  -t              test for bad clusters
  -u PATH         try to undelete (non-directory) file that was named PATH (can be
                    given multiple times)
  -U              allow only uppercase characters in volume and boot label
  -v              verbose mode
  -V              perform a verification pass
  --variant=TYPE  handle variant TYPE of the filesystem
  -w              write changes to disk immediately
  -y              same as -a, for compat with other *fsck
  --help          print this message

최악의 시나리오는 파티션을 복구할 수 없는 경우 다시 생성할 수 있다는 것입니다. 나중에 참고하기 위해 저는 이것을 시도한 적이 없지만 정확한 파티션 크기가 무엇인지 모른다면 파티션이 시작되는 볼륨 헤더(파티션이 시작되는 곳에서 오프셋된 dd)를 보고 몇 가지 정보를 수집할 수 있습니다. 존재하고 16진수 편집기에서 보지만 나는 이것을 시도한 적이 없습니다):

https://www.win.tue.nl/~aeb/linux/fs/fat/fat-1.html

처음부터 시작하려면: GRUB EFI 실행 파일을 다시 포맷/다시 설치하고 먼저 다음 명령을 사용하여 파티션을 다시 생성하십시오.parted

예를 들어:

sudo parted /dev/hda<n> mkpart primary fat32 1 256

256MB 파티션을 제공합니다하지만이것을 참고해서 사용하고 있는지 확인해야 합니다.정밀한원시 파티션 크기(시도하려는 경로인 경우):

https://www.gnu.org/software/parted/manual/html_node/unit.html

다음 단계는 포맷하는 것입니다. mkfs.vfat -F32 /dev/hda<n>

부트로더를 설치하기 위해 전체 chroot를 수행해야 하는 경우:

  • 마운트 루트 mount /dev/sda<n> /mnt
  • 설치 설명서 mount /dev/sda<n> /mnt/boot
  • efi 마운트 mount /dev/sda<n> /mnt/boot/efi
  • 마운트 개발자 mount -o rbind /dev/ /mnt/dev
  • 장착 과정 mount -t proc proc /mnt/proc
  • chroot chroot /mnt/ /bin/bash
  • grub-install grub-install또는 update-bootloader운영 체제에 따라 다름

이후:

  • umount /mnt/boot/efi
  • umount /mnt/boot
  • sync ; sync ; mount -o remount,ro /mnt
  • sync ; sync ; reboot -f

관련 정보