我今天嘗試在新的 SD 卡上建立 Ubuntu Mate 安裝。 Raspberry Pi 無法啟動(只有紅色 LED 亮起),因此我檢查了 SD 卡:
ole:$ sudo fsck -y -b 163840 -B 4096 /dev/mmcblk0p1
fsck from util-linux 2.29
e2fsck 1.43.4 (21-Nov-2017)
fsck.ext2: Bad magic number in super-block while trying to open
/dev/mmcblk0p1
The superblock could not be read or does not describe a valid
ext2/ext3/ext4
filesystem. If the device is valid and it really contains an
ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the
superblock is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
我還嘗試使用備用超級區塊運行 e2fsck,但看起來它們都很糟糕。不過運行badblocks
並沒有報任何錯誤。
ole@mki:~/Downloads$ sudo badblocks -o ./badblocks.list -w -s -v -b 4096 -c 16 /dev/mmcblk0p1
Checking for bad blocks in read-write mode
From block 0 to 7817983
Testing with pattern 0xaa: done
Reading and comparing: done
Testing with pattern 0x55: done
Reading and comparing: done
Testing with pattern 0xff: done
Reading and comparing: done
Testing with pattern 0x00: done
Reading and comparing: done
Pass completed, 0 bad blocks found. (0/0/0 errors)
重新格式化卡片可以修復錯誤嗎?我嘗試將圖像重新安裝到卡上 3 次,但這沒有幫助,所以只是好奇這是否可能只是格式問題?
更新
我使用 ubuntu 磁碟實用程式重新格式化了整個內容,現在看起來沒問題:
ole:$ sudo fsck /dev/mmcblk0p1
fsck from util-linux 2.29
fsck.fat 4.0 (2016-05-06)
/dev/mmcblk0p1: 1 files, 1/1953541 clusters
我將嘗試再次編寫 Ubuntu Mate 映像,看看 Raspberry Pi 是否可以啟動它。
另一個更新
嘗試將 Ubuntu Mate 刻錄到上面,完成後該卡將無法安裝在 Nautilus 中,仍然無法啟動 Raspberry Pi:
ole@$ sudo ddrescue -D --force ubuntu-mate-16.04.2-desktop-armhf-raspberry-pi.img /dev/mmcblk0p1
GNU ddrescue 1.21
Press Ctrl-C to interrupt
ipos: 4999 MB, non-trimmed: 0 B, current rate: 6550 kB/s
opos: 4999 MB, non-scraped: 0 B, average rate: 13192 kB/s
未嘗試:0 B,錯誤大小:0 B,運行時間:6m 19s 救援:5000 MB,錯誤:0,剩餘時間:n/a 救援百分比:100.00% 自上次成功讀取以來的時間:0s 已完成
答案1
簡短的回答是肯定的。在這種情況下,重新格式化磁碟有效。為了正式測試它,我安裝了 Raspbian 而不是 Ubuntu Mate,現在它工作正常。
這是一個跟進問題關於我安裝 Ubuntu Mate 時發生的損壞。