แล้วกัน วันก่อนพูดถึง messed-up laptop และ recovery KDE neon instance ใน eight-boot Windows-and-Linux setup ตัว distributions ต่างๆ ไม่บูทเพราะ configured mount non-existent partition เกิดจาก Linux systems ใหม่ใช้ sub-optimal way marking devices ด้วย UUID strings meaningless human-unreadable แทน simple numbers
เราต้อง fix Windows 10 instance ด้วย issue ค่อนข้างคล้าย Windows 10 เริ่มบูท แล้ว message diagnosing PC automatic repair แล้ว predictable automatic repair fails ในบทความก่อน establish แล้วว่า Windows 10 partition healthy data อยู่ทั้งหมด ไม่อยาก reset ใดๆ มา show วิธี fix gracefully
ปัญหาในรายละเอียด
มาถึง pale blue Windows 10 recovery console screen อ่านว่า:
The automatic repair couldn't repair your PC.
Press "Advanced Options" to try other options to repair your PC or "Shut Down" to turn off your PC.
Log file: C:\Recovery\WindowsRE\Winre.wim\System32\Logfiles\Srt\SrtTrail.txt.
ในฐานะ good techie ผมตัดสินใจ best course คือ advanced options start command line prompt navigate ไป log file อ่าน contents แต่ file ไม่อยู่ที่นั่น เราจะ explore เร็วๆ นี้
จุดนี้ผมคิดว่า recent system image recovery test อาจ partially หรือ wholly responsible สำหรับ issues Windows 10 bootloader ต้อง fixing doubtful เพราะใช้ Linux bootloader control sequence แต่ eliminate the obvious ลอง simple bootloader fix:
bootrec.exe /rebuildbcd
bootrec.exe /fixmbr
bootrec.exe /fixboot
เจอปัญหาทันที รัน command จาก Windows 10 USB thumb drive หาไม่เจออะไร มีเหตุผล จะถึง รันจาก recovery console หาเจอหนึ่ง แต่ reference D:\ drive แทน C:\ และพยายาม add entry command complain couldn't complete operation:
The system cannot find the path specified.
command ตัวสุดท้าย error:
Access is denied.
ข้อเท็จจริง log file supposed to be under C:\ แต่มันไม่อยู่ และ bootrec.exe หา OS เจอที่ D:\ ทำให้เชื่อว่า drive letters ไม่ได้ assigned correctly ต้อง fix นั้น มาเริ่ม solution
Solution 1
Launch diskpart tool จาก cmd disk manager tool ที่ปกติใช้ใน Windows GUI ที่นี่ต้องใช้ command-line commands ถ้าไม่แน่ใจ type ? ดู options flags มาก่อน check volume letters
diskpart
list volumes
ในตัวอย่างผม C:\ drive assigned ผิด เปลี่ยนมัน ถ้า C: taken ต้อง two steps assign drive holding ไป free letter แล้ว assign correct drive เช่น (ignore actual numbers unique setup):
select volume 2
assign letter=(something that is not C):
select volume 5
assign letter=C:
กลับไปรัน bootrec.exe ทำ progress แต่ system ยังไม่บูท
Solution 2
จุดนี้แน่ใจ issue ไม่ใช่ bootloader move up next step boot process ในกรณีนี้ boot image อยู่บน EFI partition อาจมีเหตุผล file corrupt rebuild จำเป็น
Boot into recovery console รัน diskpart อีกครั้ง ตอนนี้ two steps first right volume mapped to C:\ second ensure working with EFI partition ระวัง drive letter ถ้ากลัว mess up select volume assign new letter แล้ว rebuild boot image ถ้า letters correct skip ได้
diskpart
list volumes
# select partition corresponds to C:
select volume X
assign letter=C:
# select EFI partition (FAT32, boot flag often hidden)
select volume Y
assigned letter=F:
exit
ผมใช้ F สำหรับ EFI เลือกได้อะไรก็ได้ ตอนนี้ boot image repair step:
bcdboot.exe C:\Windows /s F: /f UEFI
อะไรเกิดขึ้น? รัน bcdboot ดังนี้:
- Source — initializes system partition โดยใช้ BCD files จาก C:\Windows
- /s — specifies letter ของ system (EFI) partition
- /f — specifies firmware type
Both /s และ /f optional check technical reference for details
จบ step นี้ reboot Windows 10 launch fine everything intact Linux distributions อื่นๆ working GRUB2 untouched no data loss
สรุป
ผมพบ exercise นี้ frustrating แต่ enjoyable ด้วย deep technical stuff Windows behaves pretty much like Linux equally vague non-resilient system boot errors wonder ทำไม automatic repair ไม่ทำได้สิ่งที่ผมทำ nothing special magic sequence steps logs not easily accessible why not allow user read them first error screen right there?
Another issue discrepancies system expects things drive letters suddenly encounter half dozen other issues distract you solution not too difficult but waste time troubleshooting nonsense modern software for you hope clarify slightly what you could potentially do multi-booting issues starting Windows 10 data intact start simple work through boot sequence step by step philosophy same as Linux future ain't rosy enjoy technical freedom before all becomes abstract nightmare
Cheers.