Linux - Newbie This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
07-05-2005, 02:00 PM
|
#1
|
Member
Registered: Oct 2004
Location: Albuquerque, NM
Posts: 41
Rep:
|
Creating/restoring drive image on USB drive
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)
|
|
|
07-05-2005, 02:48 PM
|
#2
|
Moderator
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047
Rep:
|
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.
|
|
|
07-05-2005, 02:54 PM
|
#3
|
Senior Member
Registered: Jan 2002
Location: St Louis, MO
Distribution: Ubuntu
Posts: 1,284
Rep:
|
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.
|
|
|
07-05-2005, 03:00 PM
|
#4
|
Member
Registered: Oct 2004
Location: Albuquerque, NM
Posts: 41
Original Poster
Rep:
|
Unfortunately the partimage page is down currently, is it possible to boot partimage from a CD and store the image to USB then?
Once again, I'm trying to get away from anything that requires a network connection.
Can I boot into linux to create/restore images? or do I need to do all this imaging magic when the hard drive is not in use?
|
|
|
07-05-2005, 03:09 PM
|
#5
|
Moderator
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047
Rep:
|
The sourceforge page will let you download it:
http://sourceforge.net/projects/partimage
You can do it from a cd. I think it is on knoppix and probably a few other live cds.
The network bit is optional. A local backup/restore is much faster.
It would be better doing it when the partitions are not in use.
|
|
|
07-05-2005, 03:12 PM
|
#6
|
Senior Member
Registered: Jan 2002
Location: St Louis, MO
Distribution: Ubuntu
Posts: 1,284
Rep:
|
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.
|
|
|
07-05-2005, 04:40 PM
|
#7
|
Member
Registered: Oct 2004
Location: Albuquerque, NM
Posts: 41
Original Poster
Rep:
|
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?
|
|
|
07-06-2005, 04:56 AM
|
#8
|
Senior Member
Registered: Jan 2002
Location: St Louis, MO
Distribution: Ubuntu
Posts: 1,284
Rep:
|
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?
|
|
|
07-06-2005, 05:07 AM
|
#9
|
Senior Member
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,545
Rep:
|
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
The simple linux commands are the best
|
|
|
07-06-2005, 05:08 AM
|
#10
|
Senior Member
Registered: Nov 2003
Location: London, England
Distribution: Ubuntu
Posts: 1,460
Rep:
|
You could dd it and then gzip it to cure all the wasted space
|
|
|
All times are GMT -5. The time now is 11:36 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.
|
Latest Threads
LQ News
|
|