ddrescueで取得したイメージファイルをデバイスに書き込む途中で異常終了してしまった。
$ sudo ddrescue -f system.img /dev/ada0
GNU ddrescue 1.25
Press Ctrl-C to interrupt
ipos: 11565 MB, non-trimmed: 0 B, current rate: 2555 kB/s
opos: 11565 MB, non-scraped: 0 B, average rate: 62178 kB/s
non-tried: 148476 MB, bad-sector: 0 B, error rate: 0 B/s
rescued: 11565 MB, bad areas: 0, run time: 3m 5s
pct rescued: 7.22%, read errors: 0, remaining time: 41m
time since last successful read: n/a
Copying non-tried blocks... Pass 1 (forwards)
ddrescue: Write error: Input/output error
ddrescue: Error closing outfile: Device not configured
$ sudo gpart destroy -F ada0
により、ディスク初期化後に再実行したら今度はうまくいった。
Microsoft Windows [Version 10.0.19042.746]
(c) 2020 Microsoft Corporation. All rights reserved.
C:\Users\Administrator>diskpart
Microsoft DiskPart バージョン 10.0.19041.610
Copyright (C) Microsoft Corporation.
コンピューター: PENTIUM
DISKPART> list disk
ディスク 状態 サイズ 空き ダイナ GPT
### ミック
------------ ------------- ------- ------- --- ---
ディスク 0 オンライン 111 GB 1024 KB
DISKPART> select disk 0
ディスク 0 が選択されました。
DISKPART> list part
Partition ### Type Size Offset
------------- ------------------ ------- -------
Partition 1 プライマリ 350 MB 1024 KB
Partition 2 プライマリ 111 GB 351 MB
DISKPART> select part 2
パーティション 2 が選択されました。
DISKPART> detail part
パーティション 2
種類 : 07
隠し属性 : いいえ
アクティブ : いいえ ←ココに注目
オフセット (バイト): 368050176
Volume ### Ltr Label Fs Type Size Status Info
---------- --- ----------- ---- ---------- ------- --------- --------
* Volume 3 C pentium NTFS Partition 111 GB 正常 ブート
アクティブが「いいえ」になっているのでアクティブ化
DISKPART> active
DiskPart は現在のパーティションをアクティブとしてマークしました。
DISKPART> detail part
パーティション 2
種類 : 07
隠し属性 : いいえ
アクティブ : はい ←ココに注目
オフセット (バイト): 368050176
Volume ### Ltr Label Fs Type Size Status Info
---------- --- ----------- ---- ---------- ------- --------- --------
* Volume 3 C pentium NTFS Partition 111 GB 正常 ブート
DISKPART>
再起動すると、起動に失敗するので、修復ディスクで修復。その後、また再起動。動作確認のために再起動したが、再起動せずに以下を実行すれば修復ディスクの出番は不要だったのかも。
Microsoft Windows [Version 10.0.19042.746]
(c) 2020 Microsoft Corporation. All rights reserved.
C:\Users\Administrator>mbr2gpt /validate /disk:0 /allowFULLOS
MBR2GPT: Attempting to validate disk 0
MBR2GPT: Retrieving layout of disk
MBR2GPT: Validating layout, disk sector size is: 512 bytes
MBR2GPT: Validation completed successfully
C:\Users\Administrator> mbr2gpt /convert /disk:0 /allowFULLOS
MBR2GPT will now attempt to convert disk 0.
If conversion is successful the disk can only be booted in GPT mode.
These changes cannot be undone!
MBR2GPT: Attempting to convert disk 0
MBR2GPT: Retrieving layout of disk
MBR2GPT: Validating layout, disk sector size is: 512 bytes
MBR2GPT: Trying to shrink the OS partition
MBR2GPT: Creating the EFI system partition
MBR2GPT: Installing the new boot files
MBR2GPT: Performing the layout conversion
MBR2GPT: Migrating default boot entry
MBR2GPT: Fixing drive letter mapping
MBR2GPT: Conversion completed successfully
Call WinReReapir to repair WinRE
MBR2GPT: Failed to update ReAgent.xml, please try to manually disable and enable WinRE.
MBR2GPT: Before the new system can boot properly you need to switch the firmware to boot to UEFI mode!
C:\Users\Administrator>
C:\Users\Administrator>diskpart
Microsoft DiskPart バージョン 10.0.19041.610
Copyright (C) Microsoft Corporation.
コンピューター: PENTIUM
DISKPART> select disk 0
ディスク 0 が選択されました。
DISKPART> list part
Partition ### Type Size Offset
------------- ------------------ ------- -------
Partition 1 プライマリ 350 MB 1024 KB
Partition 2 プライマリ 111 GB 351 MB
Partition 3 システム 100 MB 111 GB
DISKPART> exit
残念ながら末尾に追加されてしまった。
再起動。BIOSのブートデバイスの起動順序を確認・設定。システムで予約済み(F:) となってしまったので、コンピューターの管理、ディスクの管理で、ドライブ文字を削除する。
© 退役GGE
2021年3月に定年退職(退役)するオッサンがお届けしております。お断り: 退役という言葉は、「役務から退くこと」の意味で用いています。軍人ではありません。