LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Blogs > sathiyadev
User Name
Password

Notices


Rate this Entry

Linux Imaging

Posted 12-31-2008 at 03:23 AM by sathiyadev

hi friends,

I have some basic doubts regarding imaging Linux Operating System (OS).

I have a complete back-up of my root partition and boot partition. Back-up is done using DD Utility. Below are the command i followed for back-up

dd if=/dev/sda1 bs=1k conv=sync,noerror | gzip > /tmp/boot_backup.gz (boot partition of 1 GB in size).

dd if=/dev/sda2 bs=1k conv=sync,noerror | gzip > /tmp/root_backup.gz (root partition of 20GB in size).

/tmp is separate partition has enough place to hold both the back-up image. Then i boot the machine with knoppix boot CD and format the both boot and root partition using DD Utility (dd if=/dev/zero of=/dev/sda1 bs=4k). Then mount the /tmp partition to /mnt (mount /dev/sda5 /mnt) and reimaged both the boot and root partition, command i followed to reimage is given below

gzip -dc /mnt/boot_backup.gz | dd of=/dev/sda1 bs=1k conv=sync,noerror

then reboot the machine, image is uploaded properly without any problem. When i try the same with another machine (different architecture) image dumped (reimaged) properly using DD Utility but when i tried to boot the system i am getting message as GRUB and system get hangs. I can able to see the content of both boot partition and root partition by mounting (all the files visible).

My query is simple i need to reimage the certain number
(with different mother board and hard disk) of system with same image (back-up from one of the system using DD Utility), I can able to archive this one ?
can someone point me to the right direction?

thanks in advance
sathiyadev
Posted in Uncategorized
Views 1384 Comments 1
« Prev     Main     Next »
Total Comments 1

Comments

  1. Old Comment
    Are you sure it is a nice blog entry? It looks more like a question to me.

    As far as I understand, you created an image on one architecture and used it on another. If so, the direction is as follows:

    1. If the original and the restored partitions are of different size (naturally, the restored one may be only larger), figure out if the additional space is available. Do that studying the docs on the file system you use or just try to use that space - no worry, you have a backup anyway. BTW, check the same architecture too since it may blow up later.

    2. Try to chroot and reinstall grub. If it fails, forget it.

    3. If grub is reinstalled OK, check if the /etc files you copied are still valid for the new system. You know, X may fail to start, network may be down, things like that.

    I guess the right direction is to use some kind of unattended install to install your distro on all machines, use tar.bz to transfer personal data, and handle issues like X drivers and network manually (or write a script to automate that).

    The most you may hope to get with DD is to prepare a separate image for each architecture and use it for similar systems. In general, DD is to revert to a previous state on the same system, tar.gz is for backups, and /etc is system specific.

    Go to questions and ask how to clone a PC. Do not tell what you did with DD! Specify all hardware details, the distro in use, additional packages you installed. Somebody may have created the necessary scripts already.
    Posted 01-02-2009 at 02:07 PM by AGer AGer is offline
 

  



All times are GMT -5. The time now is 06:34 PM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration