クローンのSDカードが動かん (The replica SD card doesn't work.) → 動きました(It works) writable: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY,


症状:Win32 Disk Imageで作ったラズパイのSDカードのクローンでシステムが起動しない。

Symptom:  RaspBerry PI's SD card replica made with Win32 Disk Image does not boot the system.

ラズパイ SDカード イメージ コピー レプリカ

writable: recovering Journal
writable: Superblock needs-recovery flag is Clear, but Journal has data.
writable: Run Journal anyway
(i.e., without -a or -p options)
fsck exited with status code 4
The root filesysten on /dev/mmcblk0p2 requires a manual fsck

BusyBox v1.30.1 (Ubuntu 1:1.30.1-7ubuntu3) built-in shell (ash)
Enter 'help' for a list of built-in commands.
(initramfs) fsck /dev/mmcblk0p2
fsck from util-linux 2.37.2
e2fsck 1.46.5 (30-Dec-2021)
writable: recovering Journal
Superblock needs_recovery flag is clear, but Journal has data.
Run journal anyway<y> yes
fsck.ext4:unable to set superblock flags on writable

writable: **********WARNING: Filesystem still has errors **********


原因判明: マスタの128GBのSDカードが、クローンの128GBのSDカードの容量より、ほんのちょっと大きかった為に、システム全体がフルコピーできなかった(そう言えば、Win32 Disk Imageでそういう警告が出ていた)

Cause discovered: The 128GB SD card in the master was slightly larger than the capacity of the 128GB SD card in the replica, so the entire system could not be fully copied (come to think of it, Win32 Disk Image was giving that warning).

対応方法: Linux のddコマンドとか使えば、対応できそうであることは分かったが、現在、手元にLinuxBoxがない。WSLを使ってでできるかと思ったが、「失敗した」という報告もある。無理するとWindows11 Box壊すかもしれない(研究の内容がパーになりかねない)。

How to do it: I found out I can use Linux's dd command or something like that, but I don't have a Linux box. If I try too hard, I might break my Windows 11 Box (which might ruin my research).

考察: ddコマンド対応は、面倒くさい、時間かかりそう。途中で失敗するとPCの方を壊しそう。

Consideration: dd command support is tedious and time-consuming. If it fails in the process, it might break the PC.

現在対応中: たまたま、256GBのメモリカードがあったので、そっちにイメージをコピー中

I have a 256GB memory card, so I'm copying the image.
(If all goes well, I'll buy a 256 card at my own expense, which is cheap considering the risk of breaking my PC. However, it is annoying to buy a 256GB memory card for just a few blocks.)

How "little" is "just 0.027% short"?

This one (256G clone) was confirmed to boot successfully.

Here's what I tried and it didn't work

起動途中で /dev/sda5: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY. と出て止まるな

But the following method worked.

Raspberry Pi の 起動OSバックアップで、サイズの違う MicroSDカードにイメージコピーする方法

AOMEI Partition Assistant(無償版)をインストールしました。
I installed AOMEI Partition Assistant (free version).

It seems possible to copy images from SD cards of different sizes, but 256G (which I successfully cloned above) -> 128G is too other.

I had no choice but to make a clone using the 128G currently in operation as the master (although I don't want to mess with it too much because if I break it, there is no way to fix it).

The left side is the master, and the right side is the clone. The SD card reader on the right side was included in the Raspi kit (thank goodness).

It took forever to finish, so I checked the "Automatically shut down the PC after all processing is complete" checkbox above and went straight to bed last night.

This morning, I started Raspi using the newly created SD card, which booted up fine.

I am relieved that I no longer have to buy a 256G card alone.




Posted by ebata