Professional Web Applications Themes

how to clone a Linux hard disk? - Linux Setup, Configuration & Administration

I volunteer for a small charity that tests, refurbishes and prepares donated older (4-6 year old) computers to donate to the needy, homebound elderly, disabled. We presently clone all our Windows 95 hard disks from a master hard disk so that we have a consistent set of software on each computer. We use Western Digital's EZ-BIOS for this process as it is painless and takes about 3 minutes to clone 450MB of FAT32 filesystem data from the MBR on... We are considering loading some of the newer computers with Linux for those wishing to give it a try and to ...

  1. #1

    Default how to clone a Linux hard disk?

    I volunteer for a small charity that tests, refurbishes and prepares donated
    older (4-6 year old) computers to donate to the needy, homebound elderly,
    disabled. We presently clone all our Windows 95 hard disks from a master
    hard disk so that we have a consistent set of software on each computer. We
    use Western Digital's EZ-BIOS for this process as it is painless and takes
    about 3 minutes to clone 450MB of FAT32 filesystem data from the MBR on...

    We are considering loading some of the newer computers with Linux for those
    wishing to give it a try and to cirvent licensing costs and problems
    with newer versions of Windows (we presently have a charity license
    arrangement for Win95 only).

    I am a newbie to the Linux world (2 months). From my reading "dd" may work
    for this task as the next batch of computers we will work on all have the
    same model and size of hard disks. However, I understand 'dd' will not work
    if either disk is mounted?

    Ideally what I would like is easy to use software that clones one HD at a
    time from a master, mounted HD using the MASTER-SLAVE EIDE cable
    arrangement (including MBR, lilo, etc.) without:

    1) having to partition and format each new HD
    2) unmounting the master HD
    3) a long rigamaroule of CLI commands (except for perhaps an easy bash
    script)....

    I have looked at "mondo" as a solution, but have not yet tried it. Does
    anyone have a good, easy suggestion to help us with our task? Will mondo do
    this job?

    Larry Gagnon
    --
    ********************************
    to send direct email remove "fake"
    Larry Guest

  2. #2

    Default Re: how to clone a Linux hard disk?


    Mondo can do it.
    There is also partimage - http://www.partimage.org/ - which is a better
    solution IMHO. It works well, does all i need it to do.

    You probably want to use network backup - mondo and partimage both
    provide for it - otherwise you will get tired of switching hard disks
    around.



    Andrey Guest

  3. #3

    Default Re: how to clone a Linux hard disk?

     
    work 

    well, almost correct. if they are mounted read/write, they are liable to
    have new data written and the data written would then be corrupt...

    However if the read drive is mounted "read only", then that doesnt cause a
    problem...
     


    Well to do it just like that ...
    -------------------------------------------
    telinit 1
    mount -o remount,ro / (and repeat for other partitions)
    sync

    dd if=/dev/hda of=/dev/hdb
    sync
    mount -o remount,rw /


    ------------------------------------------

    Its only a few lines of CLI, and nothing wrong with a script.

    just put the lines in a file called 'clonedrive' in /root/utils
    and run '. /root/utils/clonedrive'.


    Ah the new partitions wont be visible until you reboot...
    OR you write a 'new' partition table to the drive.
    So you check the partitions with '/sbin/fdisk /dev/hdb'
    and then if its happy use 'wq' to write and quit from fdisk.
    then the partitions on hdb would be accessable.


    You could add 'shutdown -h now' to the script when you have decided that
    the process works smoothly.


    If you cant get the same hard drive model, you need to get a larger drive !
    Be careful when you buy the hard drives , because drives of different
    models that are sold as '60 gigabytes' are actually all sorts of sizes ..
    between 55 and 65 gigabytes. You need to compare the actual size.

    If you do get a larger drive that contains significant extra space (or you
    just want to perfect this process) ,you can then reclaim the wasted space by
    adding it to the last partition on the drive..

    Run fdisk /dev/hdb , delete the last partition , and add it back to take up
    the entire space. as the start of the partition is at the same place there
    is no damage done to the partition...

    Run the resize utility for the filesystem (eg e2resize of e2fs,e3fs ... )
    you just have to read the manual page to see how to tell it to grow .. by
    default it should grow to fill the available space...

     
    do 


    there's a few others available free.
    eg ranish partition manager.
    it can clone drives .. but cant fix the larger hard drive problem.

     


    Leon. Guest

Similar Threads

  1. RPM for whitebox linux - RH ES3 Clone
    By Sanjay in forum PostgreSQL / PGSQL
    Replies: 2
    Last Post: March 8th, 02:12 PM
  2. Linux glibc clone(2) vs fork(2)
    By Michael in forum UNIX Programming
    Replies: 3
    Last Post: December 23rd, 09:27 AM
  3. Clone Solaris 8 Hard Drive
    By Tester in forum Linux / Unix Administration
    Replies: 0
    Last Post: October 25th, 02:28 PM
  4. Trying to boot Linux from my second Hard Disk.
    By Rick in forum Linux Setup, Configuration & Administration
    Replies: 11
    Last Post: October 17th, 06:27 AM
  5. What is LVD hard disk ?
    By Jose Perez in forum AIX
    Replies: 1
    Last Post: September 15th, 03:08 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139