LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 07-05-2005, 02:00 PM   #1
OneSeventeen
Member
 
Registered: Oct 2004
Location: Albuquerque, NM
Posts: 41

Rep: Reputation: 16
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)
 
Old 07-05-2005, 02:48 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
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.
 
Old 07-05-2005, 02:54 PM   #3
fouldsy
Senior Member
 
Registered: Jan 2002
Location: St Louis, MO
Distribution: Ubuntu
Posts: 1,284

Rep: Reputation: 47
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.
 
Old 07-05-2005, 03:00 PM   #4
OneSeventeen
Member
 
Registered: Oct 2004
Location: Albuquerque, NM
Posts: 41

Original Poster
Rep: Reputation: 16
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?
 
Old 07-05-2005, 03:09 PM   #5
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
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.
 
Old 07-05-2005, 03:12 PM   #6
fouldsy
Senior Member
 
Registered: Jan 2002
Location: St Louis, MO
Distribution: Ubuntu
Posts: 1,284

Rep: Reputation: 47
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.
 
Old 07-05-2005, 04:40 PM   #7
OneSeventeen
Member
 
Registered: Oct 2004
Location: Albuquerque, NM
Posts: 41

Original Poster
Rep: Reputation: 16
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?
 
Old 07-06-2005, 04:56 AM   #8
fouldsy
Senior Member
 
Registered: Jan 2002
Location: St Louis, MO
Distribution: Ubuntu
Posts: 1,284

Rep: Reputation: 47
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?
 
Old 07-06-2005, 05:07 AM   #9
cs-cam
Senior Member
 
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,545

Rep: Reputation: 57
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
 
Old 07-06-2005, 05:08 AM   #10
oneandoneis2
Senior Member
 
Registered: Nov 2003
Location: London, England
Distribution: Ubuntu
Posts: 1,460

Rep: Reputation: 48
You could dd it and then gzip it to cure all the wasted space
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
creating a bootable usb thumb drive tlarkin Linux - Software 13 02-21-2006 06:39 AM
USB Drive Format and Image aeuzent Linux - Newbie 2 06-25-2005 12:39 AM
Microadvantage USB Flash drive not creating sda scuzzman Linux - Hardware 8 04-11-2005 04:31 AM
Creating a Drive image Earl_UK Linux - Newbie 1 02-16-2005 08:49 PM
Slightly OT : Restoring Drive Image to Resized Partition dlocalized Linux - Newbie 10 11-28-2003 02:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:23 AM.

Main Menu
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