partimageのリストア処理のエラー [Linux]
1. 発生事象
2. 対処方法
3. 備考
partimage のリストア時に、下記のエラーが発生し、リストア処理が異常終了する。
can't read block 0 from image ...
2. 対処方法
下記のスクリプトを実行し、リストア処理を行う。
#!/bin/sh # # usage: partimage-restore.sh dev img # options: # dev: device path of partition # img: image files # DEVICE=$1 BACKUPSET=$* RESTORE_OPTS="-b" VIEWER="gzip -dc" # this bash-code expects the backup files as $BACKUPSET.000, # $BACKUPSET.001, etc. Modify to match your environment. toskip=0 { for partfile in $BACKUPSET; do $VIEWER $partfile | dd skip=$toskip 2>/dev/null toskip=1 done; } | partimage $RESTORE_OPTS restore $DEVICE stdin
3. 備考
上記スクリプトは、下記の Web page を参考に作成。
・http://www.partimage.org/forums/viewtopic.php?t=420
・http://blog.hirsky.com/changelog/2009-09-22-1.html
コメント 0