Page 1 sur 1

Image Sys Linux, problème au démarrage

Publié : jeu. 15 mai 2014 16:04
par kalistyan
:hello:

J'ai actuellement une Debian (vm sous ESXi) prête à l'emploi. Le but étant de la migrer sur un de mes serveurs hébergé chez Gandi.
La création ainsi que la restauration ne pose aucun problème, mais malheureusement au démarrage le système indique :

Code : Tout sélectionner

Checking root file system...fsck from util-linux-ng 2.17.2
/dev/xvda1 contains a file system with errors, check forced.
Inodes that were part of a corrupted orphan linked list found.                             

/dev/xvda1: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
        (i.e., without -a or -p options)
fsck died with exit status 4
failed (code 4).
An automatic file system check (fsck) of the root filesystem failed. A manual fsck must be performed, then the system restarted. The fsck should be performed in maintenance mode with the root filesystem mounted in read-only mode. ... failed!
The root filesystem is currently mounted in read-only mode. A maintenance shell will now be started. After performing system maintenance, press CONTROL-D to terminate the maintenance shell and restart the system. ... (warning).
Give root password for maintenance
(or type Control-D to continue):
Ci-dessous la procédure réalisée :

Création :

Code : Tout sélectionner

dd if=/dev/sda | gzip -v6 | dd of=/mnt/sdadisk.gz conv=sync
Upload de l'image via SCP.

Restauration :

Code : Tout sélectionner

zcat  sdadisk.gz | dd  of=/dev/xvde
Une idée ? :jap:

Image Sys Linux, problème au démarrage

Publié : jeu. 15 mai 2014 22:37
par Zedoune
ton système de fichiers était démonté pendant le dd ??? le /mnt/ était pas sur /dev/sda quand même aussi ? :D

sinon en 1 commande (pigz peut être remplacé par gzip -c -f, c'est un gzip multithread)

cat /dev/sda | pigz -c -p2 | ssh root@machine_distante cat | tee /home/ton_user/disk_sda.img.gz | gunzip -c -f > /dev/xvde

ça va copier le disque directement sur l'autre en faisant une copie dans /home/ton_user/disk_sda.img.gz sur la machine distante