LinuxQuestions.org
Visit Jeremy's Blog.
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, 03: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, 03:48 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 65
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, 03: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, 04: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, 04:09 PM   #5
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 65
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, 04: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, 05: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, 05: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, 06:07 AM   #9
cs-cam
Senior Member
 
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,544
Blog Entries: 4

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

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 07:39 AM
USB Drive Format and Image aeuzent Linux - Newbie 2 06-25-2005 01:39 AM
Microadvantage USB Flash drive not creating sda scuzzman Linux - Hardware 8 04-11-2005 05:31 AM
Creating a Drive image Earl_UK Linux - Newbie 1 02-16-2005 09:49 PM
Slightly OT : Restoring Drive Image to Resized Partition dlocalized Linux - Newbie 10 11-28-2003 03:36 PM


All times are GMT -5. The time now is 09:25 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration