PDA

View Full Version : Trasferire distro da hda ad hdb.


Dcromato
18-04-2005, 15:00
Ho l'esigenza di cambiare disco e so che con linux si puo fare un salto al volo.Ho collegato hdb in slave.Che devo fare?

kibuzo
18-04-2005, 15:10
I due dischi hanno la stessa dimensione? se sì potresti provare a fare un diskdump... non ricordo la sintassi esatta, ma dovrebbe essere dd if=/dev/hda of=/dev/hdb conv=notrunc

Non prendere queste parole come oro colato, l'ho fatto tempo fa, e per quanto abbia funzionato non son sicuro al 100% che gli argomenti fossero così, fai le dovute prove, ed eventualmente "man dd"

per farlo dovresti avere entrambi i dischi smontati, quindi ti conviene partire con un livecd, inoltre hdb dovrà poi essere messo al posto di hda per partire correttamente.

Dcromato
18-04-2005, 15:21
No lo slave è piu grande.Comunque sono gia in live perchè gia ricordavo una cosa simile.
Su questo forum ho letto una cosa come

cp -a -v /mnt/olddisk/* /mnt/newdisk

ma non funziona.

_YTS_
18-04-2005, 16:01
prova cosi:

cp -avx /mnt/olddisk/* /mnt/newdisk

byez

Dcromato
18-04-2005, 16:17
Ho risolto col comando di kibuzo.Grazie a entrambi comunque.

Dcromato
19-04-2005, 17:27
Semmbrava fosse risolto invece no nessuno ha un alternativa?Mi sono trovato una partizione da 5 giga come il vecchio disco....

HexDEF6
19-04-2005, 17:36
Semmbrava fosse risolto invece no nessuno ha un alternativa?Mi sono trovato una partizione da 5 giga come il vecchio disco....


funziona benissimo col cp...
unica accortezza e' che devi editare il lilo.conf (o la configurazione di grub) e fstab... altrimenti non ti montera mai la root!

Ciao!

Dcromato
19-04-2005, 17:38
Non mi cpia nulla a dir la verita col cp...

HexDEF6
19-04-2005, 17:51
Non mi cpia nulla a dir la verita col cp...

mi scuso in anticipo se le seguenti domande sono "stupide"

hai partizionato hdb?
hai formattato i vari hdb1 hdb2 ecc.?
hai montato sia hdaX sia hdbX?

dopo di questo hai lanciato cp -a /mnt/hda2 /mnt/hdb2 ? o quale comando?
magari prova a fare un copia usando il midnight commander (ricorda di preservare gli attributi)

Ovviamente tutto questo lo devi fare da una livecd!

Ciao!

wubby
19-04-2005, 18:02
Preso da un vecchio messaggio in una ML (erlug):

telinit 1
mount disco1
mount disco2

cp -ax disco1 disco2

-a conserva il piu` possibile la struttura dei file (attributi dei file ecc)

-x rimane su un file system (utile per non copiare proc e amici).

Dcromato
19-04-2005, 18:35
faccio un po di prove, scusate ma certe cose non mi entrano in testa... :muro:

Dcromato
19-04-2005, 18:47
Ho fatto cp -ax /mnt/hda2 / /mnt/hdb2 mi da una serie di errori.

root@1[root]# cp -ax /mnt/hda2 /mnt/hdb2
cp: impossibile creare il file normale `/mnt/hdb2/hda2/usr/kde/3.4/share/mimelnk
/uri/rtspt.desktop': Input/output error
cp: impossibile creare il file normale `/mnt/hdb2/hda2/usr/kde/3.4/share/mimelnk
/uri/mmsu.desktop': Input/output error
cp: impossibile creare il file normale `/mnt/hdb2/hda2/usr/kde/3.4/share/mimelnk
/uri/pnm.desktop': Input/output error
cp: impossibile creare il file normale `/mnt/hdb2/hda2/usr/kde/3.4/share/mimelnk
/uri/mms.desktop': Input/output error
cp: impossibile creare il file normale `/mnt/hdb2/hda2/usr/kde/3.4/share/applnk/
.hidden/filebehavior.desktop': Input/output error
cp: impossibile creare il file normale `/mnt/hdb2/hda2/usr/kde/3.4/share/applnk/
.hidden/kcmkonq.desktop': Input/output error
cp: impossibile creare il file normale `/mnt/hdb2/hda2/usr/kde/3.4/share/applnk/
.hidden/passwords.desktop': Input/output error
cp: impossibile creare il file normale `/mnt/hdb2/hda2/usr/kde/3.4/share/applnk/
.hidden/kcmkxmlrpcd.desktop': Input/output error
cp: impossibile creare il file normale `/mnt/hdb2/hda2/usr/kde/3.4/share/applnk/
.hidden/kwinactions.desktop': Input/output error
cp: impossibile creare il file normale `/mnt/hdb2/hda2/usr/kde/3.4/share/applnk/
.hidden/virtualdesktops.desktop': Input/output error
cp: impossibile creare il file normale `/mnt/hdb2/hda2/usr/kde/3.4/share/applnk/
.hidden/kicker_config.desktop': Input/output error
cp: impossibile creare il file normale `/mnt/hdb2/hda2/usr/kde/3.4/share/applnk/
.hidden/energy.desktop': Input/output error
cp: impossibile creare il file normale `/mnt/hdb2/hda2/usr/kde/3.4/share/applnk/
.hidden/power.desktop': Input/output error

:confused:

HexDEF6
19-04-2005, 19:36
Ho fatto cp -ax /mnt/hda2 / /mnt/hdb2 mi da una serie di errori.

root@1[root]# cp -ax /mnt/hda2 /mnt/hdb2
cp: impossibile creare il file normale `/mnt/hdb2/hda2/usr/kde/3.4/share/mimelnk
/uri/rtspt.desktop': Input/output error
cp: impossibile creare il file normale `/mnt/hdb2/hda2/usr/kde/3.4/share/mimelnk
/uri/mmsu.desktop': Input/output error
cp: impossibile creare il file normale `/mnt/hdb2/hda2/usr/kde/3.4/share/mimelnk
/uri/pnm.desktop': Input/output error
cp: impossibile creare il file normale `/mnt/hdb2/hda2/usr/kde/3.4/share/mimelnk
/uri/mms.desktop': Input/output error
cp: impossibile creare il file normale `/mnt/hdb2/hda2/usr/kde/3.4/share/applnk/
.hidden/filebehavior.desktop': Input/output error
cp: impossibile creare il file normale `/mnt/hdb2/hda2/usr/kde/3.4/share/applnk/
.hidden/kcmkonq.desktop': Input/output error
cp: impossibile creare il file normale `/mnt/hdb2/hda2/usr/kde/3.4/share/applnk/
.hidden/passwords.desktop': Input/output error
cp: impossibile creare il file normale `/mnt/hdb2/hda2/usr/kde/3.4/share/applnk/
.hidden/kcmkxmlrpcd.desktop': Input/output error
cp: impossibile creare il file normale `/mnt/hdb2/hda2/usr/kde/3.4/share/applnk/
.hidden/kwinactions.desktop': Input/output error
cp: impossibile creare il file normale `/mnt/hdb2/hda2/usr/kde/3.4/share/applnk/
.hidden/virtualdesktops.desktop': Input/output error
cp: impossibile creare il file normale `/mnt/hdb2/hda2/usr/kde/3.4/share/applnk/
.hidden/kicker_config.desktop': Input/output error
cp: impossibile creare il file normale `/mnt/hdb2/hda2/usr/kde/3.4/share/applnk/
.hidden/energy.desktop': Input/output error
cp: impossibile creare il file normale `/mnt/hdb2/hda2/usr/kde/3.4/share/applnk/
.hidden/power.desktop': Input/output error

:confused:

probabilmente il tuo disco sta morendo!
ti consiglio di dare un'occhio a dd_rescue

Ciao!

Dcromato
19-04-2005, 21:05
Ma quale sta morendo quello vecchio?hda?:confused: