我安装了新的主板、CPU 和 RAM,但不幸的是我的 Windows 无法启动。
我有双启动 - Elementary OS 和 Windows 10。Elementary 运行良好,但当我在引导加载程序 (grub 2) 中选择 Windows 时,我的屏幕要么冻结,要么变黑。我尝试重新安装 grub 和 elementary 几次,但没有解决问题。一位朋友向我推荐了引导修复,我试了一下,但没有用。以下是输出:
boot-repair-4ppa125 [20210107_2036]
============================= Boot Repair Summary ==============================
The disk contains an unclean file system (0, 0).
Metadata kept in Windows cache, refused to mount.
Falling back to read-only mount because the NTFS partition is in an
unsafe state. Please resume and shutdown Windows fully (no hibernation
or fast restarting.)
Windows is hibernated, refused to mount.
The disk contains an unclean file system (0, 0).
Metadata kept in Windows cache, refused to mount.
Falling back to read-only mount because the NTFS partition is in an
unsafe state. Please resume and shutdown Windows fully (no hibernation
or fast restarting.)
The disk contains an unclean file system (0, 0).
Metadata kept in Windows cache, refused to mount.
Falling back to read-only mount because the NTFS partition is in an
unsafe state. Please resume and shutdown Windows fully (no hibernation
or fast restarting.)
Recommended repair: ____________________________________________________________
The default repair of the Boot-Repair utility will reinstall the grub2 of
sda6 into the MBR of sda.
Grub-efi will not be selected by default because: legacy-win no-win-efi
Additional repair will be performed: unhide-bootmenu-10s win-legacy-basic-fix
Quantity of real Windows: 1
=================== Several (2) /boot folders exist in sda1/ and may disturb os-prober, boot renamed into oldbooot.
mv: cannot move '/mnt/boot-sav/sda1/boot' to '/mnt/boot-sav/sda1/oldbooot': Read-only file system
GRUB detected inside Windows partition. sda1/boot/grub renamed into boot/grub_old
mv: cannot move '/mnt/boot-sav/sda1/boot/grub' to '/mnt/boot-sav/sda1/boot/grub_old': Read-only file system
========================= Reinstall the grub2 of sda6 ==========================
grub-install --version
grub-install (GRUB) 2.02-2ubuntu8.20+elementary25~ubuntu5.1.7.1
==> Reinstall the GRUB of sda6 into the MBR of sda
grub-install /dev/sda
Installing for i386-pc platform.
Installation finished. No error reported.
update-grub
Sourcing file `/etc/default/grub'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.4.0-42-generic
Found initrd image: /boot/initrd.img-5.4.0-42-generic
File descriptor 63 (pipe:[61649]) leaked on lvs invocation. Parent PID 18255: /bin/sh
Found Windows 10 on /dev/sda1
The disk contains an unclean file system (0, 0).
Metadata kept in Windows cache, refused to mount.
Falling back to read-only mount because the NTFS partition is in an
unsafe state. Please resume and shutdown Windows fully (no hibernation
or fast restarting.)
Windows is hibernated, refused to mount.
The disk contains an unclean file system (0, 0).
Metadata kept in Windows cache, refused to mount.
Falling back to read-only mount because the NTFS partition is in an
unsafe state. Please resume and shutdown Windows fully (no hibernation
or fast restarting.)
Unhide GRUB boot menu in sda6/boot/grub/grub.cfg
Boot successfully repaired.
You can now reboot your computer.
============================ Boot Info After Repair ============================
=> Grub2 (v2.00) is installed in the MBR of /dev/sda and looks at sector 1 of
the same hard drive for core.img. core.img is at this location and looks
for (,msdos6)/boot/grub. It also embeds following components:
modules
---------------------------------------------------------------------------
fshelp ext2 part_msdos biosdisk
---------------------------------------------------------------------------
sda1: __________________________________________________________________________
File system: ntfs
Boot sector type: Windows 8/2012: NTFS
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files: /bootmgr /Boot/BCD /boot/grub/i386-pc/core.img
sda2: __________________________________________________________________________
File system: ntfs
Boot sector type: Windows 8/2012: NTFS
Boot sector info: No errors found in the Boot Parameter Block.
Operating System: Windows 8 or 10
Boot files: /bootmgr /Windows/System32/winload.exe
sda3: __________________________________________________________________________
File system: ntfs
Boot sector type: Windows 8/2012: NTFS
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files:
sda4: __________________________________________________________________________
File system: Extended Partition
Boot sector type: Unknown
Boot sector info:
sda5: __________________________________________________________________________
File system: vfat
Boot sector type: FAT32
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files: /efi/BOOT/fbx64.efi /efi/ubuntu/grubx64.efi
/efi/ubuntu/mmx64.efi /efi/ubuntu/shimx64.efi
/efi/ubuntu/grub.cfg
sda6: __________________________________________________________________________
File system: ext4
Boot sector type: -
Boot sector info:
Operating System: elementary OS 5.1.7 Hera
Boot files: /boot/grub/grub.cfg /etc/fstab /etc/default/grub
/boot/grub/i386-pc/core.img
================================ 3 OS detected =================================
OS#1: The OS now in use - elementary OS 5.1.7 Hera CurrentSession on sda6
OS#2: Windows 10 (boot) on sda1
OS#3: Windows 8 or 10 on sda2
============================ Architecture/Host Info ============================
CPU architecture: 64-bit
BOOT_IMAGE of the installed session in use:
/boot/vmlinuz-5.4.0-42-generic root=UUID=30cc4cf0-7fec-4a6d-ab4d-41dd4d88c422 ro quiet splash vt.handoff=1
===================================== UEFI =====================================
This installed-session is not in EFI-mode.
2895d47544fd587b26c7e29be1295c27 sda5/BOOT/fbx64.efi
8397fda3d5c75c13763a6e89721948f7 sda5/ubuntu/grubx64.efi
dc3c47be2f78a78e5e57d097ae6c5c84 sda5/ubuntu/mmx64.efi
78415fb8fb9b909f8029858113f1335f sda5/ubuntu/shimx64.efi
78415fb8fb9b909f8029858113f1335f sda5/BOOT/BOOTX64.efi
============================= Drive/Partition Info =============================
Disks info: ____________________________________________________________________
sda : notGPT, no-BIOSboot, has---ESP, not-usb, not-mmc, has-os, 2048 sectors * 512 bytes
Partitions info (1/3): _________________________________________________________
sda6 : is-os, 64, apt-get, grub-pc , grub2, grub-install, grubenv-ok, update-grub, farbios
sda1 : is-os, 32, nopakmgr, no-docgrub, nogrub, nogrubinstall, grubenv-ok, noupdategrub, not-far
sda2 : is-os, 32, nopakmgr, no-docgrub, nogrub, nogrubinstall, no-grubenv, noupdategrub, farbios
sda3 : no-os, 32, nopakmgr, no-docgrub, nogrub, nogrubinstall, no-grubenv, noupdategrub, farbios
sda5 : no-os, 32, nopakmgr, no-docgrub, nogrub, nogrubinstall, no-grubenv, noupdategrub, farbios
Partitions info (2/3): _________________________________________________________
sda6 : isnotESP, fstab-without-efi, no-nt, no-winload, no-recov-nor-hid, no-bmgr, notwinboot
sda1 : isnotESP, part-has-no-fstab, no-nt, no-winload, no-recov-nor-hid, bootmgr, is-winboot
sda2 : isnotESP, part-has-no-fstab, no-nt, haswinload, no-recov-nor-hid, bootmgr, notwinboot
sda3 : isnotESP, part-has-no-fstab, no-nt, no-winload, recovery-or-hidden, no-bmgr, notwinboot
sda5 : is---ESP, part-has-no-fstab, no-nt, no-winload, no-recov-nor-hid, no-bmgr, notwinboot
Partitions info (3/3): _________________________________________________________
sda6 : not-sepboot, with-boot, fstab-without-boot, not-sep-usr, with--usr, fstab-without-usr, std-grub.d, sda
sda1 : not-sepboot, no-kernel, part-has-no-fstab, not-sep-usr, no---usr, part-has-no-fstab, std-grub.d, sda
sda2 : not-sepboot, no-boot, part-has-no-fstab, not-sep-usr, no---usr, part-has-no-fstab, std-grub.d, sda
sda3 : not-sepboot, no-boot, part-has-no-fstab, not-sep-usr, no---usr, part-has-no-fstab, std-grub.d, sda
sda5 : not-sepboot, no-boot, part-has-no-fstab, not-sep-usr, no---usr, part-has-no-fstab, std-grub.d, sda
fdisk -l (filtered): ___________________________________________________________
Disk sda: 232.9 GiB, 250059350016 bytes, 488397168 sectors
Disk identifier: 0xcf505f64
Boot Start End Sectors Size Id Type
sda1 2048 206847 204800 100M 7 HPFS/NTFS/exFAT
sda2 * 206848 434887182 434680335 207.3G 7 HPFS/NTFS/exFAT
sda3 434888704 435967999 1079296 527M 27 Hidden NTFS WinRE
sda4 435970046 488396799 52426754 25G 5 Extended
sda5 487397376 488396799 999424 488M ef EFI (FAT-12/16/32)
sda6 435970048 487397375 51427328 24.5G 83 Linux
Partition table entries are not in disk order.
parted -lm (filtered): _________________________________________________________
sda:250GB:scsi:512:512:msdos:ATA Samsung SSD 850:;
1:1049kB:106MB:105MB:ntfs::;
2:106MB:223GB:223GB:ntfs::boot;
3:223GB:223GB:553MB:ntfs::diag;
4:223GB:250GB:26.8GB:::;
6:223GB:250GB:26.3GB:ext4::;
5:250GB:250GB:512MB:fat32::esp;
blkid (filtered): ______________________________________________________________
NAME FSTYPE UUID PARTUUID LABEL PARTLABEL
sda
├─sda1 ntfs B4FC7F32FC7EEE4C cf505f64-01
├─sda2 ntfs B6E05206E051CCED cf505f64-02 SSD
├─sda3 ntfs 30FCE42EFCE3EBD2 cf505f64-03
├─sda5 vfat EC09-B3B3 cf505f64-05
└─sda6 ext4 30cc4cf0-7fec-4a6d-ab4d-41dd4d88c422 cf505f64-06
df (filtered): _________________________________________________________________
Avail Use% Mounted on
sda1 61.7M 38% /mnt/boot-sav/sda1
sda2 106.3G 49% /mnt/boot-sav/sda2
sda3 88.9M 83% /mnt/boot-sav/sda3
sda5 481M 1% /mnt/boot-sav/sda5
sda6 17.2G 23% /
Mount options: __________________________________________________________________
sda1 ro,relatime,user_id=0,group_id=0,allow_other,blksize=4096
sda2 ro,relatime,user_id=0,group_id=0,allow_other,blksize=4096
sda3 ro,relatime,user_id=0,group_id=0,allow_other,blksize=4096
sda5 rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro
sda6 rw,relatime,errors=remount-ro
==================== sda1: Location of files loaded by Grub ====================
GiB - GB File Fragment(s)
?? = ?? boot/grub/i386-pc/core.img 1
===================== sda5/efi/ubuntu/grub.cfg (filtered) ======================
search.fs_uuid 30cc4cf0-7fec-4a6d-ab4d-41dd4d88c422 root hd0,msdos6
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg
====================== sda6/boot/grub/grub.cfg (filtered) ======================
elementary 30cc4cf0-7fec-4a6d-ab4d-41dd4d88c422
elementary, with Linux 5.4.0-42-generic 30cc4cf0-7fec-4a6d-ab4d-41dd4d88c422
Windows 10 (on sda1) B4FC7F32FC7EEE4C
### END /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_uefi-firmware ###
========================== sda6/etc/fstab (filtered) ===========================
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda6 during installation
UUID=30cc4cf0-7fec-4a6d-ab4d-41dd4d88c422 / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/sda5 during installation
/swapfile none swap sw 0 0
======================= sda6/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=""
==================== sda6: Location of files loaded by Grub ====================
GiB - GB File Fragment(s)
210.120189667 = 225.614835712 boot/grub/grub.cfg 1
212.260025024 = 227.912466432 boot/grub/i386-pc/core.img 1
211.082027435 = 226.647601152 boot/vmlinuz-5.4.0-42-generic 2
211.082027435 = 226.647601152 vmlinuz 2
212.536018372 = 228.208812032 boot/initrd.img-5.4.0-42-generic 2
212.536018372 = 228.208812032 initrd.img 2
212.536018372 = 228.208812032 initrd.img.old 2
===================== sda6: ls -l /etc/grub.d/ (filtered) ======================
-rwxr-xr-x 1 root root 12798 Nov 24 16:13 10_linux
-rwxr-xr-x 1 root root 11298 Nov 24 16:13 20_linux_xen
-rwxr-xr-x 1 root root 12059 Nov 24 16:13 30_os-prober
-rwxr-xr-x 1 root root 1418 Nov 24 16:13 30_uefi-firmware
-rwxr-xr-x 1 root root 214 Nov 24 16:13 40_custom
-rwxr-xr-x 1 root root 216 Nov 24 16:13 41_custom
======================== Unknown MBRs/Boot Sectors/etc =========================
Unknown BootLoader on sda4
=============================== StdErr Messages ================================
hexdump: /dev/sda4: No such device or address
hexdump: /dev/sda4: No such device or address
File descriptor 63 (pipe:[61649]) leaked on lvs invocation. Parent PID 6443: /bin/bash
paste2.org ko (http://paste2.org/)
在 Gparted 中,/dev/sda2(Windows)旁边有一个警告符号,并且“右键单击 -> 检查”给了我下面的错误。我还将“ntfsfix”和“fdisk -l”输出放在底部。我读到,直接从启动菜单运行 Windows 会有所帮助,但不幸的是我的启动菜单没有给我这个选择。另外,我不认为重新安装 Windows 是一个选项。我所有的重要文件都已备份,但 Windows 已预装在 PC 上,而我没有产品密钥。因此,重新安装 Windows 意味着失去我的许可证。
这是我的第一篇帖子,通常我都能自己解决所有问题。所以如果我做错了什么(可能做错了),我很抱歉。
如果有人能帮助我
GParted 输出:
Libparted 3.2
Check and repair file system (ntfs) on /dev/sda2 00:00:04 ( ERROR )
calibrate /dev/sda2 00:00:00 ( SUCCESS )
path: /dev/sda2 (partition)
start: 206848
end: 434887182
size: 434680335 (207.27 GiB)
check file system on /dev/sda2 for errors and (if possible) fix them 00:00:04 ( ERROR )
ntfsresize -i -f -v '/dev/sda2' 00:00:04 ( ERROR )
ntfsresize v2017.3.23 (libntfs-3g)
Device name : /dev/sda2
NTFS volume version: 3.1
Cluster size : 4096 bytes
Current volume size: 222556328448 bytes (222557 MB)
Current device size: 222556331520 bytes (222557 MB)
Checking for bad sectors ...
Checking filesystem consistency ...
100.00 percent completed
Accounting clusters ...
Cluster accounting failed at 7183535 (0x6d9caf): extra cluster in $Bitmap
Filesystem check failed! Totally 1 cluster accounting mismatches.
ERROR: NTFS is inconsistent. Run chkdsk /f on Windows then reboot it TWICE!
The usage of the /f parameter is very IMPORTANT! No modification was
and will be made to NTFS by this software until it gets repaired.
ntfsfix 输出:
ben@BensPC2:~$ sudo ntfsfix /dev/sda2
Mounting volume... Windows is hibernated, refused to mount.
FAILED
Attempting to correct errors...
Processing $MFT and $MFTMirr...
Reading $MFT... OK
Reading $MFTMirr... OK
Comparing $MFTMirr to $MFT... OK
Processing of $MFT and $MFTMirr completed successfully.
Setting required flags on partition... OK
Going to empty the journal ($LogFile)... OK
Windows is hibernated, refused to mount.
Remount failed: Operation not permitted
fdisk 输出:
ben@BensPC2:~$ sudo fdisk -l
Disk /dev/sda: 232,9 GiB, 250059350016 bytes, 488397168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xcf505f64
Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 206847 204800 100M 7 HPFS/NTFS/exFAT
/dev/sda2 * 206848 434887182 434680335 207,3G 7 HPFS/NTFS/exFAT
/dev/sda3 434888704 435967999 1079296 527M 27 Hidden NTFS WinRE
/dev/sda4 435970046 488396799 52426754 25G 5 Extended
/dev/sda5 487397376 488396799 999424 488M ef EFI (FAT-12/16/32)
/dev/sda6 435970048 487397375 51427328 24,5G 83 Linux
Partition table entries are not in disk order.
答案1
无论如何,您都必须全新安装 Windows。无论多少测试、命令和启动修复都无济于事,在更换硬件后,根本无法启动 Windows 10,更换硬件后,无论出于何种目的,它都是另一台计算机。据我所知,目前唯一可以在不同机器上启动的 Windows 产品是 Windows 预安装环境,它用于将 Windows 操作系统安装到计算机上,它非常专业且精简,功能有限,不适合通用操作系统。
曾经有类似于 Linux LiveCD 的 WindowsToGo,它可以在不同的计算机上启动并作为通用操作系统,但不幸的是它已经停产了。
由于驱动程序的原因,您无法在不同的计算机上启动 Windows,驱动程序是充当操作系统和硬件之间的媒介的软件,它可以与硬件对话,从操作系统接收命令并将其发送给硬件。
每个硬件都需要一个驱动程序,例如,您需要 CPU、RAM、GPU、HDD、主板、鼠标和键盘的驱动程序……您计算机中的所有东西都需要一个驱动程序,否则它根本无法工作。
有些驱动是通用的,对于同一类型的所有设备只需要一个驱动程序,例如,Windows 对所有磁盘存储设备只有一个驱动程序,因为它们符合 SATA 标准,它们使用同一种语言,这种类型的驱动程序是通用的;
但是,不同的主板、CPU、GPU 和声卡需要不同的驱动程序,因为它们是按照不同的标准构建的,它们使用不同的语言;一个硬件无法理解另一个硬件的驱动程序。
您可以在不同的计算机上启动 WinPE,因为它没有专门的驱动程序,所以任何计算机都可以理解它,但由于它的驱动程序是通用的,它们没有针对硬件进行定制,因此无法有效地利用硬件。
驱动程序存储在 C:\Windows\System32\drivers 文件夹中。Windows 安装时,它会自动检测硬件并安装适合该硬件的驱动程序,以便使用。此过程称为初始化。驱动程序是特定于硬件的,不能用于不同的硬件。