Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's 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've got a couple of rather large USB drives lying around, and I'd like to make disk images of my laptop's hard drive every now and again, just in case.
I will be dual booting windows and linux (linux primary, windows for photoshop CS 2), and would like everything in the image, from the partition table to the boot loader to the files themselves.
The goal is, if I wanted to, I could write zeros to the drive a few times, boot using a CD (or the usb hard drive, if that would work) then typing a quick command to install one of the images from my usb drive to my laptop's hard drive.
Once it's done, I'd want to restart, boot from the laptop's hard drive, and have it look as though I never did anything.
Does this make sense? Is it possible? (I'm sure it is, but most imaging software I've used doesn't do well with dual booting, and requires an imaging server)
dd would make an exact replica but you may want to use partimage which can create images without duplicating unused space. You can also do a network backup/restore.
I'd agree with the comment on partimage - I've used it for a couple of years to maintain backups of entire hard drives and it works flawlessly, and doesn't necessarily require any command line stuff to handle as it's ran from a nice menu system. Very quick too, and compresses the image if you tell it to, saving space on your external USB drive.
I don't think it is actually possible to backup a hard drive that is currently mounted, i.e. you would have to use a Live CD, or I have a small install of Debian on a little partition on the drive I backup, meaning I boot into this basic system, run partimage to create the backup, the boot back into my normal working system.
Well, I just booted knoppix and ran partimage.
It showed all of my hard drives, including the USB drive. Unfortunately, they were all of type "[unknown]" and therefore could not be imaged.
I'm using a copy of Knoppix 3.6 I had lying around with Partition Image 0.6.4 on it, and none of the drives are mounted. Any ideas?
Could you possibly try a more recent version of Knoppix? It seems a pretty old version, but I still don't see why partimage couldn't understand the filetypes. What filesystem have you used for your drives?
dd will create an exact replica which isn't necessarily the best idea in the world. I'm pretty sure cat doesn't but I may be wrong, this is what I use to image DVDs
Code:
cat /dev/cdroms/cdrom0 > file.iso
# so in theory...
cat /dev/sda1 > usb_stick.img
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.