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 was wondering if anyone can make a back up of the entire hard drive in linux (suse10.2 x64)
i did taht a lot of times in windows with norton ghost. but since in linux we have at least 3 partitions on the same hard drive i don't know if that's posible, ? i know there is a partition and tere is a hard drive back up,
i don't know if any of you has done that and how ? doesn't really matter if it is ghost as long as it works.
If you use any kind of low-level utility, it does not matter how many partitions there are.
The ultimate power tool is dd---look up the thread by AwesomeMachine (here at LQ)
Be very very reluctant to use dd. You can trash a partition table quite handily with minimal effort and then what do you do? (I thought I'd ruined the disk for awhile.) You'd do much better using "cp -a". I used that to successfullly make a copy of my boot drive where I had one large partition on the "from" disk and a smaller partition on the "to" disk. I do admit to using "dd" to copy only the boot sector.
im using dd to backup my partition table only
and using partimage for make image for backup file even a system, so if there anything goes wrong i just restore the image. the concept between norton ghost and partimage is the same. create image and restore. this kinda useful when u have many clients/computers with the same hardware. just install OS on one computer and copy/restore default image to the others (NTFS experimental).
dd is the topic of the thread I posted in the first reply and it can do just about anything you need with regard to copying/backing up. Avoiding the dd command just because it can potentially cause data loss when incorrectly used doesn't sound reasonable to me...
It is also possible to use rsync locally or through your network and I feel that both 'dd' and 'rsync' should be known by all linux users. They make life easier!
The problem with dd is the file size is the same size as the partition. Something like partition image skips the unused disk bytes, making a much smaller image.
I'm not such an expert but according to the post, "The "conv=notrunc" part of the dd command line is to prevent the output file from being trucated. The way dd behaves is not intuitive. You would think if you copy a hard drive that dd would copy the whole hard drive, but it doesn't. It will stop when it gets to all unused sectors, and truncate the copy."
So according to that it seems that dd, without the 'conv=notrunc' option, will not necessarily copy the full partition size.
I'll try both i guess, i don't necessary want the easiest one, i don't mind if i have to learn a lot but i will like the best one. the one that can compress a the complete disc, (root, home, swap) with it's mbr , so i can decompressed if any problems at least to the same hdd size, i think i can manage to partition a bigger hhd
I use Bootitng from bootitng.com, you can also use it for free, it's a boot manager with all the features Ghost has and probably more. If you don't install it directly to HDD you are limited to standard MBR and a max. of four primary partitions. You can create partitions, resize, wipe out, secure wipe, create compressed images of your OS's, slide. It is the "Cat's meow" if you install it, you get 30 day free trial, cost around $35 American if you want to pay for a license. After the 30 days you get warnings and it takes a couple extra minutes to boot the OS you choose, but no ill effects. You can create over 200 primary partitions which protects one system from others because when installed, it creates an EMBR with MPT (master partition table, max. 255 entries) which in turn boots the operating system you choose who's boot loader will be installed in first sector of root directory instead of traditional MBR. Making them all independent of each other, making it easy to set up a multi-boot system with over 200 systems if that's your fancy.
Question is: Where are you considering storing your image? In a fat32 file system, you are limited to max. 4GB file size, storing an entire HDD image requires a NTFS, or Linux Native file system which I believe have unlimited file size.
With bootitng I would make 2 images, one for /root and one for /home, you do not need to image swap. As long as when restoring the images, /home and swap have to be in same area of HDD as original position. Actually, I have double back up system for data, a 100GB data partition accessible from all OS on HDD, and everything there is backed up to 120GB external USB HDD. So all data in /home gets transferred over to those, eliminating /home image. Just as long as I create same size /home partition in same area of HDD (or other HDD), and users will need to be deleted with new ones created from root upon re-loading /root image as users folder/settings will be gone. (Normally I don't touch /home & swap, they just stay where they are, only OS's get imaged, they all use same /home & swap). I also keep a copy of those images on data partition and USB backup HDD. Everything is backed up on fat32 file system. I have mentioned this in many different threads, to wipe out my test copy of Fedora 6 and re-load image takes 10 minutes. I build OS on 10GB partition but allocate 25GB, when happy with the copy I want to keep, I use bootitng to resize the partition to it's 25GB allocated size than boot Fedora and from terminal issue command: #resize2fs /dev/sda1 so it expands Linux file system to 25GB partition size.
Starting at 10GB helps me do a wipe and re-load in less than ten minutes. images are made with fresh install, configured, updated and third party compiled drivers only. All extra software gets re-installed off 100GB data partition, keeping image size usually around 1.5GB in size for Linux, 2GB for XP. All software originally on CD's get copied to data drive, no working with CD's after initial installation. My box is in one room, keyboard & mouse in another, Monitor in dust proof cabinet behind glass.
PS: I have not transferred Linux partitions from one HDD to another, but in theory it will work if they are same size in same position, except /root I've put the same FC6 or Mandrake image in three different spots at the same time and they all boot up no problem using same /home and swap. (Except for Debian 3.0r2 who's boot sector had to be within first 1024 cylinders), (may be the same for other older distros or 2.4 and lower kernels).
Windows, I've done many times without problems, and Bootitng only copies files, not free space. Partition size has to be same for any restoration, than re-sized after if required. If you want to migrate to new larger HDD, easy with Windows image but Linux /home & swap have to be in same position (at least for my Mandrake, not sure about other, probably the same).
Keep in mind, I have bootitng installed & paid for, which consists of a 7mb primary partition for EMBR, and all others are primary partitions. With Windows/Linux partitioning scheme (4 primary, one extended, & logicals), you'll have to read the manual before attempting procedures I use.
Last edited by Junior Hacker; 02-01-2007 at 09:59 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.