硬碟壞掉處理
我的Intel Nuc小電腦的電源不知道什麼原因按了都沒反應,本來以為是電源線接觸不良或變壓器壞掉,送檢測結果是硬碟壞掉,但是不知道為什麼連開機BIOS也沒出現。
總之就把硬碟拆下來接外接盒,其他電腦也是讀不到。
fdisk
有看到sdb device,想要手動mount,出現以下錯誤。
mount: /mnt/mydisk: wrong fs type, bad option, bad superblock on /dev/sdb1, ...
以下靠Chat-GPT亂試,至少把資料救回來了。
用 lsblk
看也是有device,但是沒有partition。
用fsck
檢查 (忘記這個可以幹嘛)
看仔細
會有以下幾種狀況
Situation | Meaning | Action |
---|---|---|
Blank disk | Partition and format | Partition and format |
Corrupted disk | Broken partition table or FS | Try recovery |
Filesystem directly on disk but not detected | Rare, but possible | Try force mounting or inspecting |
重新請Chat-GPT統整
Step 1: Identify the Device
Step 2: Check Filesystem Signature
Step 3: Recovery or Format?
=> Recover data
先安裝testdisk
這個神奇工具
進入文字互動介面
testdisk 操作
- [Create] a new log file
- Select /dev/sdb
- Choose partition table type (Intel = MBR, or EFI GPT if it's a newer disk)
- [Analyse] to find lost partitions
- [Quick Search] or [Deeper Search] if needed
- When partitions are found, press P to list files inside
- If files are there, you can:
- Copy files (press C)
- Or [Write] to restore the partition table
reboot
重開機,用lsblk
看,partition回來了。testdisk太神了!!!
開機磁區還是壞的,開機抓不到硬碟,但是可以用外接盒讀回其他資料,至少資料有救回來。
重灌作業系統,分割磁區後就又可以正常使用了。