Create an image of HD using (dd), resize NTFS with qparted

How to do things, solutions, recipes, tutorials
Message
Author
GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#21 Post by GuestToo »

you can resize an NTFS partition, though
parted can do this, i think

CypherBit
Posts: 36
Joined: Thu 15 Dec 2005, 22:21
Contact:

#22 Post by CypherBit »

I know I could use a number of commercial applications for this, I've done so in the past. But I don't want to this time around. I'm quite sure they're not needed.

Especially if one looks at http://www.partimage.org/, just wish I could use this in Puppy...or something else.

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#23 Post by GuestToo »

there is a parted package on my dotpups page (untested by me)

in any case, as far as i know, the static partimage binary works in Puppy
http://www.partimage.org/download.en.html

i haven't made it into a dotpup package because it's a little too big (over 1 meg) to upload to the forum

i think that to do what you want it to do, a program requires knowledge of how the NTFS file system works ... and Microsoft will not tell anyone the exact details without being paid and agreeing to a license that forbids the source from being published (which is by definition, not open-source)

CypherBit
Posts: 36
Joined: Thu 15 Dec 2005, 22:21
Contact:

#24 Post by CypherBit »

Thank you GuestToo. I'll give SystemRescueCd a try to see if Partimage does what I want it to and report back my findings.

CypherBit
Posts: 36
Joined: Thu 15 Dec 2005, 22:21
Contact:

#25 Post by CypherBit »

SystemRescueCd/Partimage was not up to the job.

I once again tried dd if=/dev/hda1 of=/dev/sda1 bs=32256 on a different PC and once it completed I was able to boot in the Windows OS without any problems (no missing NTLDR or anything).
Naturally the partition showing up was the same size as the one from the old HDD so I defraged the drive, booted up Knoppix ran qtparted (which unlike parted can resize NTFS) and resized the partition to the size I wanted. Basically making it show how it should have in the first place.

Everything works great! I'll try it on other machines now.
BTW I searched and searched but didn't find qtparted for Puppy are there any plans for it?

CypherBit
Posts: 36
Joined: Thu 15 Dec 2005, 22:21
Contact:

#26 Post by CypherBit »

I tested this again today using a different PC.
Everything went smoothly but was unable to boot into Windows. Used a boot disk (on another PC since my main box lacks a FDD), fixed the MBR and was able to boot it up afterwards (on both PCs). Qparted did its thing again and I'm writting this from the clone.

Just wanted to post my findings, awesome stuff.

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#27 Post by Flash »

How did you get qparted to work in Knoppix? I got frustrated and disgusted with having to get past the requirement for a "locked" password or use su or some such on my own damn computer. :evil:

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#28 Post by MU »

In knoppix you can run
sudo program
to start a program as root.

I often run
sudo konqueror
Like this konqui runs as root, and I can click on programs in /usr/bin to run them as root.
Mark

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#29 Post by Flash »

Thanks, Mark. :)

What's the point of having to use "sudo" to run a program in Knoppix? Is it just a frustrating (for a beginner) but unavoidable side effect of not running as root? It can't be intended to prevent you from screwing up your own computer.

CypherBit
Posts: 36
Joined: Thu 15 Dec 2005, 22:21
Contact:

#30 Post by CypherBit »

Well it's supposed to be a security measure. Ubuntu and other distros are quite fond of it.

But I actually didn't run it as sudo. Don't know if it's related to the version of Knoppix I'm using (4.0.2) or something else.
I just know that qparted (ntfsresize) did a great, great job.

I'm currently DDing (using Puppy) another PC and will probably have to resort to Knoppix once again.
I think qparted does all that cfdisk can do and more, hopefully I'm not the only one that would like this to be added. Don't really know how much more space it would consume.

User avatar
jmarsden
Posts: 265
Joined: Sat 31 Dec 2005, 22:18
Location: California, USA

#31 Post by jmarsden »

CypherBit wrote:Does anyone use anything else (F/OSS) for this same purpose?
Check out g4u at http://www.feyrer.de/g4u/ if you need to do this on any serious scale using FOSS. Allows copying disk and partition images across the network, etc.

Note that copying a smaller drive image to a big drive will not (in my experience) destroy anything, it just wastes space on the bigger drive. You can recover the drive using any fdisk utility to re-write its MBR and partition table. This applies to physical hard drives, I have no experience playing these sorts of games with flash drives.

I highly recommend that you do plenty of "playing" with a couple of spare hard drives before using this stuff on precious "must be saved at all costs" data!

Final comment: Do not use g4l, it is a ripoff of older g4u code, and should be avoided.

Jonathan

CypherBit
Posts: 36
Joined: Thu 15 Dec 2005, 22:21
Contact:

#32 Post by CypherBit »

Thank you for your suggestion jmarsden. I'm aware of both g4u and g4l (and the story behind them). The scale won't be so big and using FTP is almost out of the question, I usually hook up one HDD using an USB/IDE adapter and just copy over.

The above has worked quite well on half a dozen machines the only thing is I'm still using two CDs for the job.

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#33 Post by Flash »

Here's the Qparted home page. There's another partitioning program for Linux called Gparted. One or the other may run in Puppy if you have the right version of Qt installed. If one does, you could either remaster Puppy to include it, or try a multisession Puppy.

User avatar
Ted Dog
Posts: 3965
Joined: Wed 14 Sep 2005, 02:35
Location: Heart of Texas

use last version not current.

#34 Post by Ted Dog »

CypherBit wrote:Thank you GuestToo. I'll give SystemRescueCd a try to see if Partimage does what I want it to and report back my findings.
Yeah, the newer version does not work like the last version. I was able to resize and growisofs backup directly from SystemRescueCD (or DVD multisession also works in the last version) I would reboot after resizing let windows 'cleanup' , then boot puppy and backup drive to DVD.

User avatar
drewmeister
Posts: 30
Joined: Thu 12 Jan 2006, 02:38
Location: Middle of New Orleans
Contact:

#35 Post by drewmeister »

Ted Dog, last Christmas you started this with a list of dd command lines to back up various parts of hard drives to <image>.raw. The next day you posted excellent advice on how to back up /root to CD/DVD-RW that wouldbe in the drive if you booted a multi-session DVD.

growisofs -M /dev/dvd -D -J -R -quiet -new-dir-mode 0755 -graft-points `date "+%Y-%m-%d-%H-%M"`=/root

And how to remake a RW DVD with your own default setting (two cmd lines)

growisofs -Z /dev/dvd -D -J -R -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table /livecd/

growisofs -M /dev/dvd -D -J -R -quiet -new-dir-mode 0755 -graft-points `date "+%Y-%m-%d-%H-%M"`=/root

My problem is that I use Puppy 2.0.1 multi-session, not RW but DVD-R. I have become scared that I don't have a backup of that DVD. Once, ok maybe two or three times, I have put the boot DVD back in the drive upside down (pretty easy to do when the computer is turned on it's side/edge to save space) and Puppy's save said to put a blank DVD in the drive. Then Pup proceeds to save on the new dvd NOT.

So I am looking for dd and/or growisofs commands to write a new dvd (equivilent of writing e.g. puppy-seamonkey-2.02.iso to a new, blank dvd) and then writing /root as the first saved session.

Note: The Puppy I have been using no longer correctly writes an iso file to disc. Don't know what that's about, maybe I should try upgrading to 2.0.2, but I can't as long as this problem exists, and it would be great to make a new disc using growisofs or dd even.

Can ya hep me, Ted Dog?

Still living in New Orleans, if you call this living ...

User avatar
drewmeister
Posts: 30
Joined: Thu 12 Jan 2006, 02:38
Location: Middle of New Orleans
Contact:

#36 Post by drewmeister »

Ted Dog, last Christmas you started this with a list of dd command lines to back up various parts of hard drives to <image>.raw. The next day you posted excellent advice on how to back up /root to CD/DVD-RW that wouldbe in the drive if you booted a multi-session DVD.

growisofs -M /dev/dvd -D -J -R -quiet -new-dir-mode 0755 -graft-points `date "+%Y-%m-%d-%H-%M"`=/root

And how to remake a RW DVD with your own default setting (two cmd lines)

growisofs -Z /dev/dvd -D -J -R -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table /livecd/

growisofs -M /dev/dvd -D -J -R -quiet -new-dir-mode 0755 -graft-points `date "+%Y-%m-%d-%H-%M"`=/root

My problem is that I use Puppy 2.0.1 multi-session, not RW but DVD-R. I have become scared that I don't have a backup of that DVD. Once, ok maybe two or three times, I have put the boot DVD back in the drive upside down (pretty easy to do when the computer is turned on it's side/edge to save space) and Puppy's save said to put a blank DVD in the drive. Then Pup proceeds to save on the new dvd NOT.

So I am looking for dd and/or growisofs commands to write a new dvd (equivilent of writing e.g. puppy-seamonkey-2.02.iso to a new, blank dvd) and then writing /root as the first saved session.

Note: The Puppy I have been using no longer correctly writes an iso file to disc. Don't know what that's about, maybe I should try upgrading to 2.0.2, but I can't as long as this problem exists, and it would be great to make a new disc using growisofs or dd even.

Can ya hep me, Ted Dog?

Still living in New Orleans, if you call this living ...

Post Reply