SlideShare ist ein Scribd-Unternehmen logo
1 von 3
Downloaden Sie, um offline zu lesen
#!/bin/bash
#Script p/ Clonar HDs
#nome_da_empresa_cliente
#Luiz Francisco Bozo - MAR/2011
function mensagem()
{
echo "####################################"
echo " CLONADOR DE HDs SATA"
echo "VERIFICANDO DISPOSITIVOS MONTADOS:"
df -h
echo ""
echo "LISTANDO HDs SATA CONECTADOS AO COMPUTADOR:"
ls -l /dev/sd*
echo ""
echo "LISTANDO IMAGENS EXISTENTES"
ls -d */
echo""
}
function listaimg()
{
echo "Qual imagem vai utilizar?(obs.:não digite a barra '/')"
read imgdir
cd $imgdir
ls -lia
}
function qtdhd()
{
echo ""
echo "Qtd HDs?"
read nr
case $nr in
1)clona1;;
2)clona2;;
3)clona3;;
*)echo "Qtd incorreta";;
esac
}
function clona1()
{
echo "Digite o nome HD:"
read hd1
echo "Clonagem do WIN7 p/:" $hd1
dd if=mbr.bin of=/dev/${hd1}
echo "MBR" ${hd1} "OK!"
partprobe /dev/${hd1}
echo "Partprobe" ${hd1} "OK!"
partimage -b restore /dev/${hd1}1 imgsd1.img.000
echo ${hd1}1 "OK!"
partimage -b restore /dev/${hd1}2 imgsd2.img.000
echo ${hd1}2 "OK!"
partprobe /dev/${hd1}
echo "Partprobe" ${hd1} "OK!"
}
function clona2()
{
echo "Digite o nome do HD1:"
read hd1
echo "Digite o nome do HD2:"
read hd2
echo "Clonagem do WIN7 p/:" $hd1 $hd2
dd if=mbr.bin of=/dev/$hd1
echo "MBR" ${hd1} "OK!"
dd if=mbr.bin of=/dev/$hd2
echo "MBR" ${hd2} "OK!"
partprobe /dev/${hd1}
echo "Partprobe" ${hd1} "OK!"
partprobe /dev/${hd2}
echo "Partprobe" ${hd2} "OK!"
partimage -b restore /dev/${hd1}1 imgsd1.img.000
echo ${hd1}1 "OK!"
partimage -b restore /dev/${hd1}2 imgsd2.img.000
echo ${hd1}2 "OK!"
partimage -b restore /dev/${hd2}1 imgsd1.img.000
echo ${hd2}1 "OK!"
partimage -b restore /dev/${hd2}2 imgsd2.img.000
echo ${hd2}2 "OK!"
partprobe /dev/${hd1}
echo "Partprobe" ${hd1} "OK!"
partprobe /dev/${hd2}
echo "Partprobe" ${hd2} "OK!"
}
function clona3()
{
echo "Digite o nome do HD1:"
read hd1
echo "Digite o nome do HD2:"
read hd2
echo "Digite o nome do HD3:"
read hd3
echo "Clonagem do WIN7 p/:" $hd1 $hd2 $hd3
dd if=mbr.bin of=/dev/$hd1
echo "MBR" ${hd1} "OK!"
dd if=mbr.bin of=/dev/$hd2
echo "MBR" ${hd2} "OK!"
dd if=mbr.bin of=/dev/$hd3
echo "MBR" ${hd3} "OK!"
partprobe /dev/${hd1}
echo "Partprobe" ${hd1} "OK!"
partprobe /dev/${hd2}
echo "Partprobe" ${hd2} "OK!"
partprobe /dev/${hd3}
echo "Partprobe" ${hd3} "OK!"
partimage -b restore /dev/${hd1}1 imgsd1.img.000
echo ${hd1}1 "OK!"
partimage -b restore /dev/${hd1}2 imgsd2.img.000
echo ${hd1}2 "OK!"
partimage -b restore /dev/${hd2}1 imgsd1.img.000
echo ${hd2}1 "OK!"
partimage -b restore /dev/${hd2}2 imgsd2.img.000
echo ${hd2}2 "OK!"
partimage -b restore /dev/${hd3}1 imgsd1.img.000
echo ${hd3}1 "OK!"
partimage -b restore /dev/${hd3}2 imgsd2.img.000
echo ${hd3}2 "OK!"
partprobe /dev/${hd1}
echo "Partprobe" ${hd1} "OK!"
partprobe /dev/${hd2}
echo "Partprobe" ${hd2} "OK!"
partprobe /dev/${hd3}
echo "Partprobe" ${hd3} "OK!"
}
mensagem
listaimg
qtdhd

Weitere ähnliche Inhalte

Was ist angesagt?

Configuration surgery with Augeas (OggCamp 12)
Configuration surgery with Augeas (OggCamp 12)Configuration surgery with Augeas (OggCamp 12)
Configuration surgery with Augeas (OggCamp 12)Dominic Cleal
 
Cis 216 – shell scripting
Cis 216 – shell scriptingCis 216 – shell scripting
Cis 216 – shell scriptingDan Morrill
 
Process monitoring in UNIX shell scripting
Process monitoring in UNIX shell scriptingProcess monitoring in UNIX shell scripting
Process monitoring in UNIX shell scriptingDan Morrill
 
Clojure + MongoDB on Heroku
Clojure + MongoDB on HerokuClojure + MongoDB on Heroku
Clojure + MongoDB on HerokuNaoyuki Kakuda
 
How to stand on the shoulders of giants
How to stand on the shoulders of giantsHow to stand on the shoulders of giants
How to stand on the shoulders of giantsIan Barber
 
Absolute Beginners Guide to Puppet Through Types - PuppetConf 2014
Absolute Beginners Guide to Puppet Through Types - PuppetConf 2014Absolute Beginners Guide to Puppet Through Types - PuppetConf 2014
Absolute Beginners Guide to Puppet Through Types - PuppetConf 2014Puppet
 
Tomáš Čorej - OpenSSH
Tomáš Čorej - OpenSSHTomáš Čorej - OpenSSH
Tomáš Čorej - OpenSSHwebelement
 
PHPerのためのPerl入門@ Kansai.pm#12
PHPerのためのPerl入門@ Kansai.pm#12PHPerのためのPerl入門@ Kansai.pm#12
PHPerのためのPerl入門@ Kansai.pm#12Kazuki KOMORI
 
Laporan setting dns
Laporan setting dnsLaporan setting dns
Laporan setting dnsSeptian Adi
 
ZeroMQ Is The Answer: DPC 11 Version
ZeroMQ Is The Answer: DPC 11 VersionZeroMQ Is The Answer: DPC 11 Version
ZeroMQ Is The Answer: DPC 11 VersionIan Barber
 
Biicode OpenExpoDay
Biicode OpenExpoDayBiicode OpenExpoDay
Biicode OpenExpoDayfcofdezc
 
PuppetCamp SEA @ Blk 71 - Nagios in under 10 mins with Puppet
PuppetCamp SEA @ Blk 71 -  Nagios in under 10 mins with PuppetPuppetCamp SEA @ Blk 71 -  Nagios in under 10 mins with Puppet
PuppetCamp SEA @ Blk 71 - Nagios in under 10 mins with PuppetWalter Heck
 
PuppetCamp SEA @ Blk 71 - Nagios in under 10 mins with Puppet
PuppetCamp SEA @ Blk 71 -  Nagios in under 10 mins with PuppetPuppetCamp SEA @ Blk 71 -  Nagios in under 10 mins with Puppet
PuppetCamp SEA @ Blk 71 - Nagios in under 10 mins with PuppetOlinData
 
Devinsampa nginx-scripting
Devinsampa nginx-scriptingDevinsampa nginx-scripting
Devinsampa nginx-scriptingTony Fabeen
 

Was ist angesagt? (20)

Shell Script
Shell ScriptShell Script
Shell Script
 
Configuration surgery with Augeas (OggCamp 12)
Configuration surgery with Augeas (OggCamp 12)Configuration surgery with Augeas (OggCamp 12)
Configuration surgery with Augeas (OggCamp 12)
 
Cis 216 – shell scripting
Cis 216 – shell scriptingCis 216 – shell scripting
Cis 216 – shell scripting
 
Clojure入門
Clojure入門Clojure入門
Clojure入門
 
Puppet Camp 2012
Puppet Camp 2012Puppet Camp 2012
Puppet Camp 2012
 
Process monitoring in UNIX shell scripting
Process monitoring in UNIX shell scriptingProcess monitoring in UNIX shell scripting
Process monitoring in UNIX shell scripting
 
Yg byev2e
Yg byev2eYg byev2e
Yg byev2e
 
Clojure + MongoDB on Heroku
Clojure + MongoDB on HerokuClojure + MongoDB on Heroku
Clojure + MongoDB on Heroku
 
How to stand on the shoulders of giants
How to stand on the shoulders of giantsHow to stand on the shoulders of giants
How to stand on the shoulders of giants
 
Absolute Beginners Guide to Puppet Through Types - PuppetConf 2014
Absolute Beginners Guide to Puppet Through Types - PuppetConf 2014Absolute Beginners Guide to Puppet Through Types - PuppetConf 2014
Absolute Beginners Guide to Puppet Through Types - PuppetConf 2014
 
Tomáš Čorej - OpenSSH
Tomáš Čorej - OpenSSHTomáš Čorej - OpenSSH
Tomáš Čorej - OpenSSH
 
PHPerのためのPerl入門@ Kansai.pm#12
PHPerのためのPerl入門@ Kansai.pm#12PHPerのためのPerl入門@ Kansai.pm#12
PHPerのためのPerl入門@ Kansai.pm#12
 
Linux Command Line
Linux Command LineLinux Command Line
Linux Command Line
 
ES6 generators
ES6 generatorsES6 generators
ES6 generators
 
Laporan setting dns
Laporan setting dnsLaporan setting dns
Laporan setting dns
 
ZeroMQ Is The Answer: DPC 11 Version
ZeroMQ Is The Answer: DPC 11 VersionZeroMQ Is The Answer: DPC 11 Version
ZeroMQ Is The Answer: DPC 11 Version
 
Biicode OpenExpoDay
Biicode OpenExpoDayBiicode OpenExpoDay
Biicode OpenExpoDay
 
PuppetCamp SEA @ Blk 71 - Nagios in under 10 mins with Puppet
PuppetCamp SEA @ Blk 71 -  Nagios in under 10 mins with PuppetPuppetCamp SEA @ Blk 71 -  Nagios in under 10 mins with Puppet
PuppetCamp SEA @ Blk 71 - Nagios in under 10 mins with Puppet
 
PuppetCamp SEA @ Blk 71 - Nagios in under 10 mins with Puppet
PuppetCamp SEA @ Blk 71 -  Nagios in under 10 mins with PuppetPuppetCamp SEA @ Blk 71 -  Nagios in under 10 mins with Puppet
PuppetCamp SEA @ Blk 71 - Nagios in under 10 mins with Puppet
 
Devinsampa nginx-scripting
Devinsampa nginx-scriptingDevinsampa nginx-scripting
Devinsampa nginx-scripting
 

Andere mochten auch

Window tinting Melbourne
Window tinting Melbourne Window tinting Melbourne
Window tinting Melbourne glamatint111
 
Apresentacao Espírito Colaborativo
Apresentacao Espírito ColaborativoApresentacao Espírito Colaborativo
Apresentacao Espírito ColaborativoDiego Lisboa
 
Sas07.13.15
Sas07.13.15Sas07.13.15
Sas07.13.15swimber
 
como aprender 400 palavras em Inglês em apenas em um minuto.
como aprender 400 palavras em Inglês em apenas em um minuto.como aprender 400 palavras em Inglês em apenas em um minuto.
como aprender 400 palavras em Inglês em apenas em um minuto.luciana09
 
050914 being mortal / SOMOS MORTALES, VERDAD? Retador texto alrededor del fin...
050914 being mortal / SOMOS MORTALES, VERDAD? Retador texto alrededor del fin...050914 being mortal / SOMOS MORTALES, VERDAD? Retador texto alrededor del fin...
050914 being mortal / SOMOS MORTALES, VERDAD? Retador texto alrededor del fin...José Piscoya
 
Deananeas 2-humanities (1)
Deananeas 2-humanities (1)Deananeas 2-humanities (1)
Deananeas 2-humanities (1)408Huendell
 
Manual de business intelligence BI4ALL
Manual de business intelligence BI4ALLManual de business intelligence BI4ALL
Manual de business intelligence BI4ALLBI4ALL
 
Maes publicitárias
Maes publicitáriasMaes publicitárias
Maes publicitáriasVilmaJanete
 
Teste de inteligência
Teste de inteligênciaTeste de inteligência
Teste de inteligênciaisto-e-curioso
 
Minha Apresentação AD1
Minha Apresentação AD1Minha Apresentação AD1
Minha Apresentação AD1cederj edu
 

Andere mochten auch (20)

Window tinting Melbourne
Window tinting Melbourne Window tinting Melbourne
Window tinting Melbourne
 
Apresentacao Espírito Colaborativo
Apresentacao Espírito ColaborativoApresentacao Espírito Colaborativo
Apresentacao Espírito Colaborativo
 
Resume - Tina Fey[1]
Resume - Tina Fey[1]Resume - Tina Fey[1]
Resume - Tina Fey[1]
 
Sas07.13.15
Sas07.13.15Sas07.13.15
Sas07.13.15
 
como aprender 400 palavras em Inglês em apenas em um minuto.
como aprender 400 palavras em Inglês em apenas em um minuto.como aprender 400 palavras em Inglês em apenas em um minuto.
como aprender 400 palavras em Inglês em apenas em um minuto.
 
050914 being mortal / SOMOS MORTALES, VERDAD? Retador texto alrededor del fin...
050914 being mortal / SOMOS MORTALES, VERDAD? Retador texto alrededor del fin...050914 being mortal / SOMOS MORTALES, VERDAD? Retador texto alrededor del fin...
050914 being mortal / SOMOS MORTALES, VERDAD? Retador texto alrededor del fin...
 
FINAL uploads
FINAL uploadsFINAL uploads
FINAL uploads
 
CVPLAING
CVPLAINGCVPLAING
CVPLAING
 
Twitter chats in EDU
Twitter chats in EDUTwitter chats in EDU
Twitter chats in EDU
 
Sequência didática
Sequência didáticaSequência didática
Sequência didática
 
Deananeas 2-humanities (1)
Deananeas 2-humanities (1)Deananeas 2-humanities (1)
Deananeas 2-humanities (1)
 
Manual de business intelligence BI4ALL
Manual de business intelligence BI4ALLManual de business intelligence BI4ALL
Manual de business intelligence BI4ALL
 
Maes publicitárias
Maes publicitáriasMaes publicitárias
Maes publicitárias
 
Company profile ipal bio seven stp biofilter wwtp
Company profile ipal bio seven stp biofilter wwtpCompany profile ipal bio seven stp biofilter wwtp
Company profile ipal bio seven stp biofilter wwtp
 
Calculo2
Calculo2Calculo2
Calculo2
 
Teste de inteligência
Teste de inteligênciaTeste de inteligência
Teste de inteligência
 
Sandhya S
Sandhya SSandhya S
Sandhya S
 
Pasta1
Pasta1Pasta1
Pasta1
 
Minha Apresentação AD1
Minha Apresentação AD1Minha Apresentação AD1
Minha Apresentação AD1
 
Unidad 9
Unidad 9Unidad 9
Unidad 9
 

Ähnlich wie clonehd01

Docker in Action
Docker in ActionDocker in Action
Docker in ActionSimon Su
 
DEF CON 27 - PATRICK WARDLE - harnessing weapons of Mac destruction
DEF CON 27 - PATRICK WARDLE - harnessing weapons of Mac destructionDEF CON 27 - PATRICK WARDLE - harnessing weapons of Mac destruction
DEF CON 27 - PATRICK WARDLE - harnessing weapons of Mac destructionFelipe Prado
 
Into The Box 2018 Going live with commandbox and docker
Into The Box 2018 Going live with commandbox and dockerInto The Box 2018 Going live with commandbox and docker
Into The Box 2018 Going live with commandbox and dockerOrtus Solutions, Corp
 
Going live with BommandBox and docker Into The Box 2018
Going live with BommandBox and docker Into The Box 2018Going live with BommandBox and docker Into The Box 2018
Going live with BommandBox and docker Into The Box 2018Ortus Solutions, Corp
 
Docker Introductory workshop
Docker Introductory workshopDocker Introductory workshop
Docker Introductory workshopRuncy Oommen
 
Getfilestruct zbksh
Getfilestruct zbkshGetfilestruct zbksh
Getfilestruct zbkshBen Pope
 
Getfilestruct zbksh(1)
Getfilestruct zbksh(1)Getfilestruct zbksh(1)
Getfilestruct zbksh(1)Ben Pope
 
Im trying to run make qemu-nox In a putty terminal but it.pdf
Im trying to run  make qemu-nox  In a putty terminal but it.pdfIm trying to run  make qemu-nox  In a putty terminal but it.pdf
Im trying to run make qemu-nox In a putty terminal but it.pdfmaheshkumar12354
 
Groovy on the Shell
Groovy on the ShellGroovy on the Shell
Groovy on the Shellsascha_klein
 
Using docker for data science - part 2
Using docker for data science - part 2Using docker for data science - part 2
Using docker for data science - part 2Calvin Giles
 
Apache Hadoop Shell Rewrite
Apache Hadoop Shell RewriteApache Hadoop Shell Rewrite
Apache Hadoop Shell RewriteAllen Wittenauer
 
Composer: putting dependencies on the score
Composer: putting dependencies on the scoreComposer: putting dependencies on the score
Composer: putting dependencies on the scoreRafael Dohms
 
Docker & CoreOS at Utah Gophers
Docker & CoreOS at Utah GophersDocker & CoreOS at Utah Gophers
Docker & CoreOS at Utah GophersJosh Braegger
 
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
파이썬 개발환경 구성하기의 끝판왕 - Docker Composeraccoony
 
Deploying Docker (Provisioning /w Docker + Chef/Puppet) - DevopsDaysPGH
Deploying Docker (Provisioning /w Docker + Chef/Puppet) - DevopsDaysPGHDeploying Docker (Provisioning /w Docker + Chef/Puppet) - DevopsDaysPGH
Deploying Docker (Provisioning /w Docker + Chef/Puppet) - DevopsDaysPGHErica Windisch
 
The Unbearable Lightness: Extending the Bash shell
The Unbearable Lightness: Extending the Bash shellThe Unbearable Lightness: Extending the Bash shell
The Unbearable Lightness: Extending the Bash shellRoberto Reale
 

Ähnlich wie clonehd01 (20)

Docker in Action
Docker in ActionDocker in Action
Docker in Action
 
DEF CON 27 - PATRICK WARDLE - harnessing weapons of Mac destruction
DEF CON 27 - PATRICK WARDLE - harnessing weapons of Mac destructionDEF CON 27 - PATRICK WARDLE - harnessing weapons of Mac destruction
DEF CON 27 - PATRICK WARDLE - harnessing weapons of Mac destruction
 
Into The Box 2018 Going live with commandbox and docker
Into The Box 2018 Going live with commandbox and dockerInto The Box 2018 Going live with commandbox and docker
Into The Box 2018 Going live with commandbox and docker
 
Going live with BommandBox and docker Into The Box 2018
Going live with BommandBox and docker Into The Box 2018Going live with BommandBox and docker Into The Box 2018
Going live with BommandBox and docker Into The Box 2018
 
Docker Introductory workshop
Docker Introductory workshopDocker Introductory workshop
Docker Introductory workshop
 
Getfilestruct zbksh
Getfilestruct zbkshGetfilestruct zbksh
Getfilestruct zbksh
 
Getfilestruct zbksh(1)
Getfilestruct zbksh(1)Getfilestruct zbksh(1)
Getfilestruct zbksh(1)
 
Docker by Example - Basics
Docker by Example - Basics Docker by Example - Basics
Docker by Example - Basics
 
Im trying to run make qemu-nox In a putty terminal but it.pdf
Im trying to run  make qemu-nox  In a putty terminal but it.pdfIm trying to run  make qemu-nox  In a putty terminal but it.pdf
Im trying to run make qemu-nox In a putty terminal but it.pdf
 
Shell scripting
Shell scriptingShell scripting
Shell scripting
 
Groovy on the Shell
Groovy on the ShellGroovy on the Shell
Groovy on the Shell
 
Using docker for data science - part 2
Using docker for data science - part 2Using docker for data science - part 2
Using docker for data science - part 2
 
Apache Hadoop Shell Rewrite
Apache Hadoop Shell RewriteApache Hadoop Shell Rewrite
Apache Hadoop Shell Rewrite
 
Composer: putting dependencies on the score
Composer: putting dependencies on the scoreComposer: putting dependencies on the score
Composer: putting dependencies on the score
 
Puppet @ Seat
Puppet @ SeatPuppet @ Seat
Puppet @ Seat
 
Docker & CoreOS at Utah Gophers
Docker & CoreOS at Utah GophersDocker & CoreOS at Utah Gophers
Docker & CoreOS at Utah Gophers
 
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
 
Deploying Docker (Provisioning /w Docker + Chef/Puppet) - DevopsDaysPGH
Deploying Docker (Provisioning /w Docker + Chef/Puppet) - DevopsDaysPGHDeploying Docker (Provisioning /w Docker + Chef/Puppet) - DevopsDaysPGH
Deploying Docker (Provisioning /w Docker + Chef/Puppet) - DevopsDaysPGH
 
ES6 is Nigh
ES6 is NighES6 is Nigh
ES6 is Nigh
 
The Unbearable Lightness: Extending the Bash shell
The Unbearable Lightness: Extending the Bash shellThe Unbearable Lightness: Extending the Bash shell
The Unbearable Lightness: Extending the Bash shell
 

Mehr von Luiz Francisco Bozo (11)

player01
player01player01
player01
 
abrasivosrevestidos02
abrasivosrevestidos02abrasivosrevestidos02
abrasivosrevestidos02
 
totem2
totem2totem2
totem2
 
qualifmea01
qualifmea01qualifmea01
qualifmea01
 
kerneldriver01
kerneldriver01kerneldriver01
kerneldriver01
 
multiappliance02
multiappliance02multiappliance02
multiappliance02
 
chassis02
chassis02chassis02
chassis02
 
modeloplanest01
modeloplanest01modeloplanest01
modeloplanest01
 
criarimagemplacag01
criarimagemplacag01criarimagemplacag01
criarimagemplacag01
 
Tutorialclonehdg01
Tutorialclonehdg01Tutorialclonehdg01
Tutorialclonehdg01
 
criaimg02
criaimg02criaimg02
criaimg02
 

clonehd01

  • 1. #!/bin/bash #Script p/ Clonar HDs #nome_da_empresa_cliente #Luiz Francisco Bozo - MAR/2011 function mensagem() { echo "####################################" echo " CLONADOR DE HDs SATA" echo "VERIFICANDO DISPOSITIVOS MONTADOS:" df -h echo "" echo "LISTANDO HDs SATA CONECTADOS AO COMPUTADOR:" ls -l /dev/sd* echo "" echo "LISTANDO IMAGENS EXISTENTES" ls -d */ echo"" } function listaimg() { echo "Qual imagem vai utilizar?(obs.:não digite a barra '/')" read imgdir cd $imgdir ls -lia } function qtdhd() { echo "" echo "Qtd HDs?" read nr case $nr in 1)clona1;; 2)clona2;; 3)clona3;; *)echo "Qtd incorreta";; esac } function clona1() { echo "Digite o nome HD:" read hd1 echo "Clonagem do WIN7 p/:" $hd1 dd if=mbr.bin of=/dev/${hd1} echo "MBR" ${hd1} "OK!" partprobe /dev/${hd1} echo "Partprobe" ${hd1} "OK!" partimage -b restore /dev/${hd1}1 imgsd1.img.000 echo ${hd1}1 "OK!" partimage -b restore /dev/${hd1}2 imgsd2.img.000 echo ${hd1}2 "OK!" partprobe /dev/${hd1} echo "Partprobe" ${hd1} "OK!" }
  • 2. function clona2() { echo "Digite o nome do HD1:" read hd1 echo "Digite o nome do HD2:" read hd2 echo "Clonagem do WIN7 p/:" $hd1 $hd2 dd if=mbr.bin of=/dev/$hd1 echo "MBR" ${hd1} "OK!" dd if=mbr.bin of=/dev/$hd2 echo "MBR" ${hd2} "OK!" partprobe /dev/${hd1} echo "Partprobe" ${hd1} "OK!" partprobe /dev/${hd2} echo "Partprobe" ${hd2} "OK!" partimage -b restore /dev/${hd1}1 imgsd1.img.000 echo ${hd1}1 "OK!" partimage -b restore /dev/${hd1}2 imgsd2.img.000 echo ${hd1}2 "OK!" partimage -b restore /dev/${hd2}1 imgsd1.img.000 echo ${hd2}1 "OK!" partimage -b restore /dev/${hd2}2 imgsd2.img.000 echo ${hd2}2 "OK!" partprobe /dev/${hd1} echo "Partprobe" ${hd1} "OK!" partprobe /dev/${hd2} echo "Partprobe" ${hd2} "OK!" } function clona3() { echo "Digite o nome do HD1:" read hd1 echo "Digite o nome do HD2:" read hd2 echo "Digite o nome do HD3:" read hd3 echo "Clonagem do WIN7 p/:" $hd1 $hd2 $hd3 dd if=mbr.bin of=/dev/$hd1 echo "MBR" ${hd1} "OK!" dd if=mbr.bin of=/dev/$hd2 echo "MBR" ${hd2} "OK!" dd if=mbr.bin of=/dev/$hd3 echo "MBR" ${hd3} "OK!" partprobe /dev/${hd1} echo "Partprobe" ${hd1} "OK!" partprobe /dev/${hd2} echo "Partprobe" ${hd2} "OK!"
  • 3. partprobe /dev/${hd3} echo "Partprobe" ${hd3} "OK!" partimage -b restore /dev/${hd1}1 imgsd1.img.000 echo ${hd1}1 "OK!" partimage -b restore /dev/${hd1}2 imgsd2.img.000 echo ${hd1}2 "OK!" partimage -b restore /dev/${hd2}1 imgsd1.img.000 echo ${hd2}1 "OK!" partimage -b restore /dev/${hd2}2 imgsd2.img.000 echo ${hd2}2 "OK!" partimage -b restore /dev/${hd3}1 imgsd1.img.000 echo ${hd3}1 "OK!" partimage -b restore /dev/${hd3}2 imgsd2.img.000 echo ${hd3}2 "OK!" partprobe /dev/${hd1} echo "Partprobe" ${hd1} "OK!" partprobe /dev/${hd2} echo "Partprobe" ${hd2} "OK!" partprobe /dev/${hd3} echo "Partprobe" ${hd3} "OK!" } mensagem listaimg qtdhd