Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 25 Dec 2014, 20:13
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
Create an image of HD using (dd), resize NTFS with qparted
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 3 [36 Posts]   Goto page: 1, 2, 3 Next
Author Message
cobelloy


Joined: 23 May 2005
Posts: 193
Location: Nth Dinninup W.Australia

PostPosted: Sun 25 Dec 2005, 02:50    Post subject:  Create an image of HD using (dd), resize NTFS with qparted  

Merry Christams!!!

I am trying to use sleuthkit/autopsy to recover deleted photos from my hard drive, but first I need to make an image of the entire drive, I don't know how to use the dd command and the man pages seem like another language to me, I followed some instructions and ended up with a "file".img.gz but I think I need an .iso, or maybe just an .img, can someone cleverer than me tell me what to type at the command line to do this? Or alternately I downloaded a small app called ubercopy (a front end to dd) - but there are no instructions available on how it works...

well, hope u can help - Thanks!!
Back to top
View user's profile Send private message 
Ted Dog


Joined: 13 Sep 2005
Posts: 2558
Location: Heart of Texas

PostPosted: Sun 25 Dec 2005, 13:17    Post subject: dd commands.  

dd if=/dev/hda1 of=/hdimage.raw
will pull the first partion of the first drive. (normal windows drive CSmile

dd if=/dev/hda2 of=/hdimage.raw

will pull the second partion of the first drive.

dd if=/dev/hda3 of=/hdimage.raw

will pull the third partion of the first drive.

dd if=/dev/hdb1 of=/hdimage.raw

will pull the first partion of the second drive.


dd if=/dev/hdb2 of=/hdimage.raw

will pull the second partion of the second drive.

bigger better uncut:
dd if=/dev/hda of=/hdfullimage.raw
will pull total drive with boot MBR included
other methods.
growisofs uses dd to burn direct to DVD (I use this all the time)
growisofs -Z /dev/dvd=/dev/hda
will burn the first 4.7GiB of the first drive directly to DVD in raw format.
Back to top
View user's profile Send private message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 11185
Location: Arizona USA

PostPosted: Sun 25 Dec 2005, 20:19    Post subject: Re: dd commands.  

Ted Dog wrote:
... growisofs uses dd to burn direct to DVD (I use this all the time)
growisofs -Z /dev/dvd=/dev/hda
will burn the first 4.7GiB of the first drive directly to DVD in raw format.

Hey Ted, is that from the very beginning of the hard drive? (I.e., does it include the boot sector or partition with the MBR etc.?) If so, does the reverse command restore the first 4.7 GB of the hd to just the way it was?
Back to top
View user's profile Send private message 
Ted Dog


Joined: 13 Sep 2005
Posts: 2558
Location: Heart of Texas

PostPosted: Mon 26 Dec 2005, 01:30    Post subject: growiosfs and dd happy pair  

yes and yes
this does back up full HD including MBR, hidden Windows storage & unused cruff. The resulting disk image is restored.
after DVD is burned the HD image is restored with
Code:
dd if=/dev/dvd of=/dev/hda

Simple as can be, now package a nice complicated GUI around it and sell it for big bucks!!

One minor flaw and its all my fault. If you backup WinXP then upgrade your LAN & DVD firmware, install new video card. and then hopelessly screwup your windows install. Do not reuse earlier backup, I did and it force a 3 day only forced re-activate of my windows machine, so I am hosed for about three months (I reinstalled it two months-ago). Lession learned firmware upgrades changes the way the hardware reports to windows. Puppy rules badly hosed puppy is only a mv command and reboot away 2 minutes max!
Back to top
View user's profile Send private message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 11185
Location: Arizona USA

PostPosted: Mon 26 Dec 2005, 12:39    Post subject:  

Thanks Ted. Ha ha, I have Windows 2000 so no problems with "reactivating."

I have a notion to put Puppy on a multisession DVD and then use it to backup my W2KPro system partition to the DVD. What commands would you suggest I use to backup my W2KPro partition to the multisession DVD, and what commands to restore from the disk image on the multisession DVD?

Ted Dog wrote:
... Simple as can be, now package a nice complicated GUI around it and sell it for big bucks!!

Don't laugh! I paid good money for a program called Drive Backup! which does pretty much what you describe. I've used it a couple of times and it worked as advertised, but the restore is very slow. The company told me that's because the DVD boots DOS which then restores the hard drive, including the boot sector, from the image on the DVD. I'm hoping to use Puppy Linux to do the same thing only faster.

Thanks again. Smile
Back to top
View user's profile Send private message 
JaDy

Joined: 04 May 2005
Posts: 157
Location: SE PA USA

PostPosted: Mon 26 Dec 2005, 13:27    Post subject:  

built http://puppylinux.org/wikka/BackupHDD
_________________
Felicitations & Facilitations, Rev. John G. Derrickson
Wrote fast. Goofs happen. Tell me.
Back to top
View user's profile Send private message Visit poster's website 
kethd

Joined: 20 Oct 2005
Posts: 451
Location: Boston MA USA

PostPosted: Mon 26 Dec 2005, 21:10    Post subject: guides to dd usage  

Don't miss these more-than-you-ever-imagined guides to dd usage.

This is the most comprehensive documentation and example sheet for one of the most useful, and least understood linux commands, called "dd". This command has been part of UNIX since the 1970's. It is a bitstream duplicator for copying data, but can use input or output pipes to another command.

http://www.linuxquestions.org/linux/answers/Applications_GUI_Multimedia/How_To_Do_Eveything_With_DD
Back to top
View user's profile Send private message 
Ted Dog


Joined: 13 Sep 2005
Posts: 2558
Location: Heart of Texas

PostPosted: Mon 26 Dec 2005, 21:46    Post subject: dd christmas gift  

Those links are great, now I know how to use the partial cylinders at the end of my HD, puppy storage.

warning do not use dd on usb flash drives, I have a worthless dongle.
Back to top
View user's profile Send private message 
kethd

Joined: 20 Oct 2005
Posts: 451
Location: Boston MA USA

PostPosted: Tue 27 Dec 2005, 10:17    Post subject:  

USB broken by dd ?!? Tell us more...
I was certainly intending to do this!
Did you break it by writing, or by just reading with dd?
Back to top
View user's profile Send private message 
Ted Dog


Joined: 13 Sep 2005
Posts: 2558
Location: Heart of Texas

PostPosted: Tue 27 Dec 2005, 18:32    Post subject: dd and usb flash  

I tried to dd same sized usb flash drives(different package types one CF other just USB) . The results are bad the resulting usb drive is still alive but zero length refuses to mount on any OS and can not be recycled with HP's usb flash formater
Back to top
View user's profile Send private message 
kethd

Joined: 20 Oct 2005
Posts: 451
Location: Boston MA USA

PostPosted: Tue 27 Dec 2005, 22:56    Post subject:  

Ted Dog,

Please let us all know whatever more you learn about this important subject...

Interesting details on getting USB device formatted properly for Linux:
http://www.pcc.com/staff/phil/usb_howto.txt
Back to top
View user's profile Send private message 
CypherBit

Joined: 15 Dec 2005
Posts: 35

PostPosted: Sun 05 Feb 2006, 03:18    Post subject:  

I've been thinking of using DD to clone one of my partitions to a new partition on another drive. Both are NTFS and different sizes, are there any problems because of that?

I've also read here: http://episteme.arstechnica.com/groupee/forums/a/tpc/f/96509133/m/807000096731
Quote:
2. The destination disk has to be identical to the source disk (including model
number and geometry). This is because dd copies the entire disk image (including
the label {vtoc}). So, if a 9Gb Seagate drive was dd'd to a 36Gb IBM drive, then
after the operation, the 36Gb IBM drive would show up as a Seagate 9Gb and there
is no easy way to reclaim the missing space.

I just want to make sure that using dd if=/dev/hda1 of=/dev/sdb1 won't have any undesired consequences.
Back to top
View user's profile Send private message Visit poster's website 
GuestToo
Puppy Master

Joined: 04 May 2005
Posts: 4078

PostPosted: Sun 05 Feb 2006, 05:01    Post subject:  

i don't think it matters whether it is NTFS or VFAT or whatever file system it uses

it will usually not work if the source partition is larger than the destination partition

it will probably work if the source partition is smaller than the destination partition, but the destination partition will not use all the space available ... it will be the same size as the original

you can use parted to resize an NTFS partition, i think ... there is a parted dotpup package (untested by me)

Ghost can do this ... and probably Partition Magic

i don't know if Partition Saving can do this or not
Back to top
View user's profile Send private message 
CypherBit

Joined: 15 Dec 2005
Posts: 35

PostPosted: Sun 05 Feb 2006, 18:57    Post subject:  

Guest I'll have to test this on my own.
My hda1 is 12GB (10GB full) and my sdb1 is 18GB I'd very much like to keep it that way, even after using dd. After using dd I'd like my sdb1 to have 8GB free space.

If anyone has any additional input, please let me know.
Back to top
View user's profile Send private message Visit poster's website 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 11185
Location: Arizona USA

PostPosted: Sun 05 Feb 2006, 21:52    Post subject:  

CypherBit wrote:
I've been thinking of using DD to clone one of my partitions to a new partition on another drive. Both are NTFS and different sizes, are there any problems because of that?

I've also read here: http://episteme.arstechnica.com/groupee/forums/a/tpc/f/96509133/m/807000096731
Quote:
2. The destination disk has to be identical to the source disk (including model
number and geometry). This is because dd copies the entire disk image (including
the label {vtoc}). So, if a 9Gb Seagate drive was dd'd to a 36Gb IBM drive, then
after the operation, the 36Gb IBM drive would show up as a Seagate 9Gb and there
is no easy way to reclaim the missing space.

I just want to make sure that using dd if=/dev/hda1 of=/dev/sdb1 won't have any undesired consequences.

I suspect that information is either obsolete or simply incorrect, but I don't really know. I suggest you do some more research before giving up on cloning the small hd to a bigger one. I know there is commercial software that does exactly that.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 3 [36 Posts]   Goto page: 1, 2, 3 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0914s ][ Queries: 12 (0.0110s) ][ GZIP on ]