当我安装 Ubuntu 20.04 时,一切完成后我丢失了我的 Windows 10。我无法启动它,并且我的 GRUB 没有显示 Windows 10。我非常需要我的数据,因为我没有任何备份。
============================= Boot Repair Summary ==============================
Recommended repair: ____________________________________________________________
The default repair of the Boot-Repair utility will reinstall the grub-efi-amd64-signed of
nvme0n1p2,
using the following options: nvme0n1p1/boot, nvme0n1p6/boot/efi,
Additional repair will be performed: unhide-bootmenu-10s use-standard-efi-file
/boot/efi added in nvme0n1p2/fstab
nvme0n1p2/boot/efi not empty
Unhide GRUB boot menu in nvme0n1p2/etc/default/grub
=============== Reinstall the grub-efi-amd64-signed of nvme0n1p2 ===============
grub-install --version
grub-install (GRUB) 2.04-1ubuntu26
efibootmgr -v from chroot before grub install
BootCurrent: 0001
Timeout: 0 seconds
BootOrder: 0001,2001,2002,2003
Boot0001* ubuntu HD(6,GPT,883ccb28-24dd-4bdb-9a2b-a43e027fe1d7,0x8127000,0x3d0800)/File(EFIubuntushimx64.efi)
Boot2001* EFI USB Device RC
Boot2002* EFI DVD/CDROM RC
Boot2003* EFI Network RC
uname -r
5.4.0-26-generic
grub-install --efi-directory=/boot/efi --target=x86_64-efi --uefi-secure-boot
Installing for x86_64-efi platform.
Installation finished. No error reported.
df /dev/nvme0n1p6
mv /boot/efi/EFI/Boot/bootx64.efi /boot/efi/EFI/Boot/bkpbootx64.efi
cp /boot/efi/EFI/ubuntu/shimx64.efi /boot/efi/EFI/Boot/bootx64.efi
cp /boot/efi/EFI/ubuntu/grubx64.efi /boot/efi/EFI/Boot/
grub-install --efi-directory=/boot/efi --target=x86_64-efi --uefi-secure-boot
Installing for x86_64-efi platform.
Installation finished. No error reported.
efibootmgr -v from chroot after grub install
BootCurrent: 0001
Timeout: 0 seconds
BootOrder: 0001,2001,2002,2003
Boot0001* ubuntu HD(6,GPT,883ccb28-24dd-4bdb-9a2b-a43e027fe1d7,0x8127000,0x3d0800)/File(EFIubuntushimx64.efi)
Boot2001* EFI USB Device RC
Boot2002* EFI DVD/CDROM RC
Boot2003* EFI Network RC
Warning: NVram was not modified.
update-grub
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.4.0-26-generic
Found initrd image: /boot/initrd.img-5.4.0-26-generic
Adding boot menu entry for UEFI Firmware Settings
Unhide GRUB boot menu in nvme0n1p2/boot/grub/grub.cfg
Boot successfully repaired.
You can now reboot your computer.
Please do not forget to make your UEFI firmware boot on the The OS now in use - Ubuntu 20.04 LTS CurrentSession entry (nvme0n1p6/EFI/ubuntu/shimx64.efi file) !
============================ Boot Info After Repair ============================
=> No boot loader is installed in the MBR of /dev/nvme0n1.
nvme0n1p1: _____________________________________________________________________
File system: ext4
Boot sector type: -
Boot sector info:
Operating System:
Boot files: /grub/grub.cfg
nvme0n1p2: _____________________________________________________________________
File system: ext4
Boot sector type: -
Boot sector info:
Operating System: Ubuntu 20.04 LTS
Boot files: /etc/fstab /etc/default/grub
nvme0n1p3: _____________________________________________________________________
File system: ext4
Boot sector type: -
Boot sector info:
Operating System:
Boot files:
nvme0n1p4: _____________________________________________________________________
File system: ext4
Boot sector type: -
Boot sector info:
Operating System:
Boot files:
nvme0n1p5: _____________________________________________________________________
File system: swap
Boot sector type: -
Boot sector info:
nvme0n1p6: _____________________________________________________________________
File system: vfat
Boot sector type: FAT32
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files: /efi/BOOT/bkpbootx64.efi /efi/BOOT/bootx64.efi
/efi/BOOT/fbx64.efi /efi/BOOT/grubx64.efi
/efi/BOOT/mmx64.efi /efi/ubuntu/grubx64.efi
/efi/ubuntu/mmx64.efi /efi/ubuntu/shimx64.efi
/efi/ubuntu/grub.cfg
================================ 1 OS detected =================================
OS#1: The OS now in use - Ubuntu 20.04 LTS CurrentSession on nvme0n1p2
============================ Architecture/Host Info ============================
CPU architecture: 64-bit
BOOT_IMAGE of the installed session in use:
/vmlinuz-5.4.0-26-generic root=UUID=8602cbdb-6e70-405f-9c2e-fc87246ec967 ro quiet splash vt.handoff=7
===================================== UEFI =====================================
BIOS is EFI-compatible, and is setup in EFI-mode for this installed-session.
SecureBoot enabled.
efibootmgr -v
BootCurrent: 0001
Timeout: 0 seconds
BootOrder: 0001,2001,2002,2003
Boot0001* ubuntu HD(6,GPT,883ccb28-24dd-4bdb-9a2b-a43e027fe1d7,0x8127000,0x3d0800)/File(\EFI\ubuntu\shimx64.efi)
Boot2001* EFI USB Device RC
Boot2002* EFI DVD/CDROM RC
Boot2003* EFI Network RC
bed45d1c9554cea09924d3814cb7c446 nvme0n1p1/BOOT/fbx64.efi
4487628005555bfd4a4c0a47211e0700 nvme0n1p1/BOOT/mmx64.efi
98bea152fadd26c4e9136916f6cc32a8 nvme0n1p1/ubuntu/grubx64.efi
4487628005555bfd4a4c0a47211e0700 nvme0n1p1/ubuntu/mmx64.efi
f7a57b08bc7c1c85417ae4cea582d1d4 nvme0n1p1/ubuntu/shimx64.efi
f7a57b08bc7c1c85417ae4cea582d1d4 nvme0n1p1/BOOT/BOOTX64.efi
bed45d1c9554cea09924d3814cb7c446 nvme0n1p6/BOOT/fbx64.efi
4487628005555bfd4a4c0a47211e0700 nvme0n1p6/BOOT/mmx64.efi
98bea152fadd26c4e9136916f6cc32a8 nvme0n1p6/ubuntu/grubx64.efi
4487628005555bfd4a4c0a47211e0700 nvme0n1p6/ubuntu/mmx64.efi
f7a57b08bc7c1c85417ae4cea582d1d4 nvme0n1p6/ubuntu/shimx64.efi
f7a57b08bc7c1c85417ae4cea582d1d4 nvme0n1p6/BOOT/BOOTX64.efi
============================= Drive/Partition Info =============================
Disks info: ____________________________________________________________________
nvme0n1 : is-GPT, no-BIOSboot, has---ESP, not-usb, not-mmc, has-os, 2048 sectors * 512 bytes
Partitions info (1/3): _________________________________________________________
nvme0n1p2 : is-os, 64, apt-get, signed grub-pc grub-efi , grub2, grub-install, grubenv-ok, update-grub, not-far
nvme0n1p1 : no-os, 32, nopakmgr, no-docgrub, nogrub, nogrubinstall, grubenv-ok, noupdategrub, not-far
nvme0n1p3 : no-os, 32, nopakmgr, no-docgrub, nogrub, nogrubinstall, no-grubenv, noupdategrub, not-far
nvme0n1p4 : no-os, 32, nopakmgr, no-docgrub, nogrub, nogrubinstall, no-grubenv, noupdategrub, not-far
nvme0n1p6 : no-os, 32, nopakmgr, no-docgrub, nogrub, nogrubinstall, no-grubenv, noupdategrub, not-far
Partitions info (2/3): _________________________________________________________
nvme0n1p2 : isnotESP, fstab-has-goodEFI, no-nt, no-winload, no-recov-nor-hid, no-bmgr, notwinboot
nvme0n1p1 : isnotESP, part-has-no-fstab, no-nt, no-winload, no-recov-nor-hid, no-bmgr, notwinboot
nvme0n1p3 : isnotESP, part-has-no-fstab, no-nt, no-winload, no-recov-nor-hid, no-bmgr, notwinboot
nvme0n1p4 : isnotESP, part-has-no-fstab, no-nt, no-winload, no-recov-nor-hid, no-bmgr, notwinboot
nvme0n1p6 : is---ESP, part-has-no-fstab, no-nt, no-winload, no-recov-nor-hid, no-bmgr, notwinboot
Partitions info (3/3): _________________________________________________________
nvme0n1p2 : not-sepboot, with-boot, fstab-has-goodBOOT, not-sep-usr, with--usr, fstab-without-usr, std-grub.d, nvme0n1
nvme0n1p1 : is-sepboot, no-boot, part-has-no-fstab, not-sep-usr, no---usr, part-has-no-fstab, std-grub.d, nvme0n1
nvme0n1p3 : maybesepboot, no-boot, part-has-no-fstab, not-sep-usr, no---usr, part-has-no-fstab, std-grub.d, nvme0n1
nvme0n1p4 : maybesepboot, no-boot, part-has-no-fstab, not-sep-usr, no---usr, part-has-no-fstab, std-grub.d, nvme0n1
nvme0n1p6 : not-sepboot, no-boot, part-has-no-fstab, not-sep-usr, no---usr, part-has-no-fstab, std-grub.d, nvme0n1
fdisk -l (filtered): ___________________________________________________________
Disk nvme0n1: 238.49 GiB, 256060514304 bytes, 500118192 sectors
Disk identifier: F31AD3FB-8A65-4B51-8499-D53619D076D5
Start End Sectors Size Type
nvme0n1p1 2048 3999743 3997696 1.9G Linux filesystem
nvme0n1p2 3999744 33574911 29575168 14.1G Linux filesystem
nvme0n1p3 33574912 106870783 73295872 35G Linux filesystem
nvme0n1p4 106870784 119216127 12345344 5.9G Linux filesystem
nvme0n1p5 119216128 135426047 16209920 7.7G Linux swap
nvme0n1p6 135426048 139425791 3999744 1.9G EFI System
parted -lm (filtered): _________________________________________________________
nvme0n1:256GB:nvme:512:512:gpt:HFS256GD9TNG-62A0A:;
1:1049kB:2048MB:2047MB:ext4::;
2:2048MB:17.2GB:15.1GB:ext4::;
3:17.2GB:54.7GB:37.5GB:ext4::;
4:54.7GB:61.0GB:6321MB:ext4::;
5:61.0GB:69.3GB:8299MB:linux-swap(v1)::swap;
6:69.3GB:71.4GB:2048MB:fat32::boot, esp;
blkid (filtered): ______________________________________________________________
NAME FSTYPE UUID PARTUUID LABEL PARTLABEL
nvme0n1
├─nvme0n1p1 ext4 90a97514-25c0-4435-bef6-08b05f620792 052a5884-1d89-48ef-b82a-b0deeed1fbd8
├─nvme0n1p2 ext4 8602cbdb-6e70-405f-9c2e-fc87246ec967 a1939e1c-02df-4694-8dc1-b2284000e309
├─nvme0n1p3 ext4 9c32159e-4ed8-4ee2-942a-3200a1e5f6f2 03def592-43e5-4689-a23a-737772d23660
├─nvme0n1p4 ext4 43338a6b-cbf3-491d-a8f0-47c1849d490d 7cc26fca-aff4-4102-9c7d-cf57313f7172
├─nvme0n1p5 swap ea705563-b645-4ab3-813b-5d76b0d9b706 a6b1be88-4210-44f4-b171-487e1f878a59
└─nvme0n1p6 vfat C0DA-04E1 883ccb28-24dd-4bdb-9a2b-a43e027fe1d7
df (filtered): _________________________________________________________________
Avail Use% Mounted on
nvme0n1p1 1.7G 4% /boot
nvme0n1p2 9.3G 28% /
nvme0n1p3 32.3G 0% /home
nvme0n1p4 4.7G 14% /var
Mount options: __________________________________________________________________
nvme0n1p1 rw,relatime
nvme0n1p2 rw,relatime,errors=remount-ro
nvme0n1p3 rw,relatime
nvme0n1p4 rw,relatime
====================== nvme0n1p1/grub/grub.cfg (filtered) ======================
Ubuntu 8602cbdb-6e70-405f-9c2e-fc87246ec967
Ubuntu, with Linux 5.4.0-26-generic 8602cbdb-6e70-405f-9c2e-fc87246ec967
### END /etc/grub.d/30_os-prober ###
UEFI Firmware Settings uefi-firmware
### END /etc/grub.d/30_uefi-firmware ###
================= nvme0n1p1: Location of files loaded by Grub ==================
GiB - GB File Fragment(s)
0.000980377 = 0.001052672 grub/grub.cfg 1
0.149410248 = 0.160428032 vmlinuz 2
0.149410248 = 0.160428032 vmlinuz-5.4.0-26-generic 2
0.336093903 = 0.360878080 initrd.img 1
0.336093903 = 0.360878080 initrd.img-5.4.0-26-generic 1
0.336093903 = 0.360878080 initrd.img.old 1
======================== nvme0n1p2/etc/fstab (filtered) ========================
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/nvme0n1p2 during installation
UUID=8602cbdb-6e70-405f-9c2e-fc87246ec967 / ext4 errors=remount-ro 0 1
# /boot was on /dev/nvme0n1p1 during installation
UUID=90a97514-25c0-4435-bef6-08b05f620792 /boot ext4 defaults 0 2
# /boot/efi was on /dev/nvme0n1p6 during installation
# /home was on /dev/nvme0n1p3 during installation
UUID=9c32159e-4ed8-4ee2-942a-3200a1e5f6f2 /home ext4 defaults 0 2
# /var was on /dev/nvme0n1p4 during installation
UUID=43338a6b-cbf3-491d-a8f0-47c1849d490d /var ext4 defaults 0 2
# swap was on /dev/nvme0n1p5 during installation
UUID=ea705563-b645-4ab3-813b-5d76b0d9b706 none swap sw 0 0
UUID=C0DA-04E1 /boot/efi vfat defaults 0 1
==================== nvme0n1p2/etc/default/grub (filtered) =====================
GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
=================== nvme0n1p2: ls -l /etc/grub.d/ (filtered) ===================
-rwxr-xr-x 1 root root 17123 Apr 15 17:01 10_linux
-rwxr-xr-x 1 root root 42128 Apr 15 17:01 10_linux_zfs
-rwxr-xr-x 1 root root 12894 Apr 15 17:01 20_linux_xen
-rwxr-xr-x 1 root root 12059 Apr 15 17:01 30_os-prober
-rwxr-xr-x 1 root root 1424 Apr 15 17:01 30_uefi-firmware
-rwxr-xr-x 1 root root 214 Apr 15 17:01 40_custom
-rwxr-xr-x 1 root root 216 Apr 15 17:01 41_custom
=================== nvme0n1p6/efi/ubuntu/grub.cfg (filtered) ===================
search.fs_uuid 90a97514-25c0-4435-bef6-08b05f620792 root
set prefix=($root)'/grub'
configfile $prefix/grub.cfg
磁盘分区:
答案1
我不想带来坏消息,但除非您的 Windows 10 安装在 2GB 分区上(不太可能),否则它就消失了。您是手动选择分区结构还是让 Ubuntu 安装程序处理它?您在安装过程中是否选择了双启动/多启动?
仅从您的 gparted 屏幕截图来看,我认为您恢复数据的唯一希望是使用磁盘恢复工具。除非我遗漏了什么?
答案2
有两个选项:
- 数据恢复使用时
photorec
您将需要另一个具有足够可用空间的磁盘来存储恢复的数据。
从 USB 磁盘启动 Ubuntu,打开终端并运行:
sudo apt-get install photorec
安装完成后,photorec
输入终端并按照说明进行操作这里。它基于终端命令,您可以选择要恢复的文件,如*.JPG、*.pdf、*.doc 等。继续操作之前,请仔细阅读此页面程序。
- 数据恢复使用时,
testdisk
您需要另一个具有足够可用空间的磁盘来存储恢复的数据。这样做的好处是,您可以按照目录结构和相同的目录/文件名恢复数据。
从 USB 磁盘启动 Ubuntu,打开终端并运行:
sudo apt-get install testdisk
安装完成后,testdisk
输入终端并按照说明进行操作这里. 仔细阅读说明。使用testdisk
命令,您可能可以恢复 Windows 分区。