Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a copy of ghost and am trying to ghost a copy of mandrake 10.1 to a different hard drive but when I try to boot with the hard drive I just get a GRUB when it should start booting in to linux. I am looking for a way to get the copied hard drive to boot up.
Bobymc - if you have nothing to add to the discussion, please do not contribute. Since you have elected not to receive emails, I will ask you here - please add a space after each of the commas in your sig block, you break the tables otherwise.
im wondering abot the same issue. i intend to try out suse 10.1 but i vcurrenty have debian installed and have it set just right and i dont want to have to go through all the rigmarole again of setting up if i dotn like suse (im using the entire drive). So with partimage i can create an image of the drive to a bootable cdrom then put the cd rom in and it will then copy the contents of the image to the harddrive again. Am i understanding this correct?
You can clone any partitions/disks irrespective whether they contain linux/windows or anything else. Only issue is that the partitions that you are cloning to should have enough space for the image to be loaded on that particular patition.
Now comes the problem how to make them bootable?
1. Install bootloader in the partition of that particular OS, rather than in MBR
2. Now use an external bootloader like GAG/XOSL etc. to boot your newly loaded harddisk with say 5 different kind of OS, which you just cloned and say not installed ;-)
btw. if you find partimage difficult to use, there is a GUI avavilable, or in case you want the Mic**$**t way then, Norton Ghost and Acronis Disk Director are the market leaders in the field.
I did NorGHOST on \boot patition , it doesnt work.
\EXT & ReiserFS is OK.
Supposed it works, how do I retable to an empty HDD whlist OS multipleBOOT
e.g
=FED
=SUSE
=Windoze
from a single HDD?
[Origin Ghost is partial>not the whole disk]
I have stopped using Ghost after I found in Linux we can "dd" the partitions or the entire drive.
Ghost works in the same way as the "dd" command by copying byte by byte. The default size is one sector of 512 bytes at a time but one can speed up to the entire track of 64 sectors by specifying bs=32758.
To clone a source hardisk hda into target disk hdc, which should be the same size or bigger, there is nothing simpler than issue one line of command in a Linux terminal
Code:
dd if=/dev/hda of=/dev/hdc bs=32768
In the above cloning the target disk will boot exactly as the original. I have done this with up to 60 partitions in a disk and every partition, regardless if it is a Linux, Dos, Windows, BSD or Solaris, boots. "dd" copies the bytes and so the filing system is immaterial but one must do it for one entire partition or the whole disk.
If only the partition is cloned then the system will not boot. This is because the address to start the OS in the target disk is no long correct because the partition has been moved to a different area of a different hard drive.
To make the disk/partition bootable again is dead simple. Just restore the boot loader again with "grub-install" or "lilo -b" for Grub and Lilo respectively. Full commands are list in the last link, Task B refers, of my signature.
I would just use dd for that. In fact, I DO just use dd for that.
dd is terminally cool.
In fact, I have used dd to recover/repair Windows systems too: http://williamaford.com/CloningaHDD.php (scroll down to "cloning a HDD using Linux" - that site reproduced my work with permission)
I would just use dd for that. In fact, I DO just use dd for that.
dd is terminally cool.
One problem with dd is that it doesn't allows you to compress the image file, others disk cloning tools will allow you to compress the image as much as half their initial size, so to clone a say 4 GB patition you will require just 2GB.
One problem with dd is that it doesn't allows you to compress the image file, others disk cloning tools will allow you to compress the image as much as half their initial size, so to clone a say 4 GB patition you will require just 2GB.
One problem with dd is that it doesn't allows you to compress the image file, others disk cloning tools will allow you to compress the image as much as half their initial size, so to clone a say 4 GB patition you will require just 2GB.
I beg to differ.
Here I'll make a compressed copy of my /boot partition in a one-liner:
Code:
jschiwal@hpamd64:~> dd if=/dev/hda5 bs=1024 | gzip >boot.iso.gz
dd: opening `/dev/hda5': Permission denied
jschiwal@hpamd64:~> sudo dd if=/dev/hda5 bs=1024 | gzip >boot.iso.gz
152586+0 records in
152586+0 records out
156248064 bytes (156 MB) copied, 30.2342 seconds, 5.2 MB/s
jschiwal@hpamd64:~> ls -lh boot.iso.gz
-rw-r--r-- 1 jschiwal users 23M 2006-05-21 18:46 boot.iso.gz
The 156 MB partition was copied and compressed in one step, resulting in a 23 MB compressed image.
Suppose that you wanted to make a compressed backup of a large partition as insurance before a fresh install, but your external USB drive is fat32 and can't save files greater than 2GB.
You could pipe the output of gzip to the "split" command. Then as extra insurance, you could use par2 on the split files.
-----
OK, I probably should have named the file with a .img extension instead of an .iso extension. Someone could take it as a cd image.
Last edited by jschiwal; 05-22-2006 at 12:51 AM.
Reason: fixed typo and added post-script.
You could pipe the output of the dd command to the md5sum command to produce a checksum.
Also run the output of your compressed image file "zcat backupfile.img | md5sums" through the same md5sums. If they differ they will have different checksum results.
You could also use the "cmp" command. These both would take a very long time and if a single byte is changed (i.e. the drive isn't mount readonly, and the system modifies an access time of a file in a directory) it will fail.
Using par2 on the segments will add some protection against corruption of some of the slices occurring.
Normally, backups are done using tar, star, dar or kdar, instead of cloning a drive or partition.
I used a "tar | split" type oneliner to make a backup of a very large directy so that I could store the results on a fat32 drive. Then I can restore it by first using cat to rejoin the archive and pipe the results to the tar command. I also used split and then par2 to backup a dvd iso for openSuSE 10.1 so I could store the results on a USB Fat32 externel drive before doing a fresh install. If there is a problem with the burned DVD, after reformatting, you can reassemble the original iso using a rescue disk and the cat command.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.