Re: [Dorset] Backing up Disc Images
On Saturday 11 Feb 2012 14:35:43 Terry Coles wrote: > On Saturday 11 Feb 2012 14:18:59 Ralph Corderoy wrote: > > Also, it sounds like you've made a filesystem in the destination > > partition and want the copy to appear there as a file or two. That > > filesystem will use up some of the partition's space for its own data, > > e.g. what you see with `ls -l', so to image a 1GiB partition to a file > > in a filesystem needs at least 1GiB of free space in that filesystem, as > > reported by `df'. > Right. So I definitely need a bigger target partition. > It sounds as if it might be easier to use the technique that you've > suggested and accept that I've got to span the image across two dual-layer > disks. The trouble is that I only have one left... Well after a bit of thought, I decided against using dd etc on the grounds that it requires a fair amount of confidence in using the shell and I couldn't guarantee being around if the hardisk fails again. I also thought about why I had failed before when using clonezilla and PartImage and decided they were both down to insufficient space in the target partition. As a result, I used clonezilla (which didn't say that NTFS is experimental) and wrote the image to the Windows partition, (which has around 600 GB of free space). What I ended up with is a 10.7 GB image, consisting of a folder with five 2 GB chunks inside. I have copied this to my NAS box. I then wrote a User Manual which I copied to the same location as the image on the NAS box and put a print out into the laptop box with the drivers disk, paperwork for the machine, etc. I'm now a bit more comfortable that we can recover from another HD failure without too much grief. I do have a fall-back in that I could use the original disk we created when the machine was brand new, or an OEM install disk if I can lay my hands on one. And they say that Linux is 'too hard' for ordinary users! If the machine had been running Linux, recovery would have been no harder than redoing the original installation. An 'ordinary' Windows user would have been totally helpless in this situation and reliant on paying for it to be fixed by a computer support company or buying a new copy of Windows, (which I consider to be totally unreasonable, especially since the OEMs pay only a few dollars and the user pays £60 to £100 for a one user copy). -- Terry Coles 64 bit computing with Kubuntu Linux -- Next meeting: Bournemouth, Tuesday 2012-03-06 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ New thread on mailing list: mailto:dorset@mailman.lug.org.uk How to Report Bugs Effectively: http://goo.gl/4Xue
Re: [Dorset] Backing up Disc Images
On Saturday 11 Feb 2012 19:35:06 Peter Merchant wrote: > Rather than working with the recovery partition, why not create an > empty partition and use clonezilla to back up the good system and then > write that to DVD? I presume that you have system and data separated > on different partitions? Well that was Plan A. However, even a clean install of Windows 7 takes up around 20 GB or so. By the time I'd broached the subject, my son (who is the prime user of Lynn's laptop), had boosted that to 50 GB. Microsoft, of course, have never heard of dividing the installation into separate partitions to make maintenance easier, so we had a 600 GB partition with over 50 GB used. Even with compression that would have taken quite a few dual-layer DVDs, so Plan B was to back up the recovery partition -- Terry Coles 64 bit computing with Kubuntu Linux -- Next meeting: Bournemouth, Tuesday 2012-03-06 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ New thread on mailing list: mailto:dorset@mailman.lug.org.uk How to Report Bugs Effectively: http://goo.gl/4Xue
Re: [Dorset] Backing up Disc Images
On Sat, 2012-02-11 at 13:43 +, Terry Coles wrote: > Hi, > > Being an obstinate type, I wasn't going to be defeated by crappy Windows > software, so I looked around for another way. I thought I had the answer! > Using PartedMagic, I would create an image of the recovery partition, burn > that to a dual-layer DVD from within PartedMagic and then, if the hardisk > failed again, we could restore it. Only one problem; the partition is 12.5 > Gigs (and is nearly full) and the DVD can only take 8.5 GB. Even that seemed > surmountable; both Clonezilla and PartImage can do compressed images, so I > gave them a try. Rather than working with the recovery partition, why not create an empty partition and use clonezilla to back up the good system and then write that to DVD? I presume that you have system and data separated on different partitions? Cheers, Peter M. -- Next meeting: Bournemouth, Tuesday 2012-03-06 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ New thread on mailing list: mailto:dorset@mailman.lug.org.uk How to Report Bugs Effectively: http://goo.gl/4Xue
Re: [Dorset] Backing up Disc Images
Hi Terry On 11/02/12 13:43, Terry Coles wrote: I then tried PartImage again and ignored the Warning about NTFS support. This went almost all the way through, but stopped with the message that the disc was full and where should it put the second volume. Don't know whether this is any help, but I've used G4U a fair bit to back up partitions. It doesn't care about filesystems - does a byte-by-byte image, and can ftp to a big disk on a backup machine running your favourite ftp server. So it overcomes two fundamental problems - filesystems, and trying to burn CD's/DVD's, which is almost always a futile exercise. http://www.feyrer.de/g4u/ Tim -- Next meeting: Bournemouth, Tuesday 2012-03-06 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ New thread on mailing list: mailto:dorset@mailman.lug.org.uk How to Report Bugs Effectively: http://goo.gl/4Xue
Re: [Dorset] Backing up Disc Images
Hi Terry, > I think I can overcome that, because the plan is to restore the image > to a 12 GB partition on the replaced disk, to recreate the original > recovery partition. Right. In case the recovery code is finicky about its partition size and location you may want to record the drive's partition table to aid re-creating it. On the basis of not knowing what'll be needed then I normally save the commands and output of sudo parted /dev/sda unit B print sudo sfdisk -l -uS /dev/sda The sfdisk is only really used for the partitions' IDs; parted doesn't give them. I get parted to work in bytes out of habit; IIRC some other commands work in bigger blocks and discard fractions! Cheers, Ralph. -- Next meeting: Bournemouth, Tuesday 2012-03-06 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ New thread on mailing list: mailto:dorset@mailman.lug.org.uk How to Report Bugs Effectively: http://goo.gl/4Xue
Re: [Dorset] Backing up Disc Images
Hi Terry, > Once you've got the two image files on disk you can see if they match > the source. Either > > sudo sha1sum $src I forgot to say, I tend to keep the digest around, e.g. written on the media or envelope, so in the future I have that extra bit of confidence that the original has been restored correctly. Not just that the media's is OK but that I've got all the right bytes and necessarily in the right order, sunshine. Don't be surprised if the digest of the source changes if you mount it; some filesystems store data so they can tell they weren't unmounted cleanly, and may also have a count of how often it has been mounted so an fsck(8) can be done every N mounts. Cheers, Ralph. -- Next meeting: Bournemouth, Tuesday 2012-03-06 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ New thread on mailing list: mailto:dorset@mailman.lug.org.uk How to Report Bugs Effectively: http://goo.gl/4Xue
Re: [Dorset] Backing up Disc Images
Ah sorry Yes you'll need a reasonably large target for the save Partition, large portable hard drives are cheap, just get one of those ?? Martin On Saturday, 11 February 2012, Terry Coles wrote: > On Saturday 11 Feb 2012 14:44:17 Peter Washington wrote: >> The biggest problem with using 2 DVD's is that the Recovery Partition >> almost certainly includes a programme to perform the recovery and that >> may well try and access the recovery data from internally defined >> locations within the partition, so if this data is spread across 2 >> disks, it may fail to locate the data it's trying to recover :-( > > I think I can overcome that, because the plan is to restore the image to a 12 > GB partition on the replaced disk, to recreate the original recovery > partition. > > -- >Terry Coles >64 bit computing with Kubuntu Linux > > -- > Next meeting: Bournemouth, Tuesday 2012-03-06 20:00 > Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ > New thread on mailing list: mailto:dorset@mailman.lug.org.uk > How to Report Bugs Effectively: http://goo.gl/4Xue > -- -- Martin Hepworth Oxford, UK -- Next meeting: Bournemouth, Tuesday 2012-03-06 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ New thread on mailing list: mailto:dorset@mailman.lug.org.uk How to Report Bugs Effectively: http://goo.gl/4Xue
Re: [Dorset] Backing up Disc Images
On Saturday 11 Feb 2012 14:44:17 Peter Washington wrote: > The biggest problem with using 2 DVD's is that the Recovery Partition > almost certainly includes a programme to perform the recovery and that > may well try and access the recovery data from internally defined > locations within the partition, so if this data is spread across 2 > disks, it may fail to locate the data it's trying to recover :-( I think I can overcome that, because the plan is to restore the image to a 12 GB partition on the replaced disk, to recreate the original recovery partition. -- Terry Coles 64 bit computing with Kubuntu Linux -- Next meeting: Bournemouth, Tuesday 2012-03-06 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ New thread on mailing list: mailto:dorset@mailman.lug.org.uk How to Report Bugs Effectively: http://goo.gl/4Xue
Re: [Dorset] Backing up Disc Images
Hi Folks, On 11 February 2012 14:35, Terry Coles wrote: > On Saturday 11 Feb 2012 14:18:59 Ralph Corderoy wrote: >> Let me get this right, you want to an image of a partition split across >> two files so each can be burned to a DVD? Ensure the source partition >> is unmounted, we don't want it changing during the copy, then > > Well. What I really wanted was one file that could be burnt to a single dual- > layer DVD. The Novatech disk creation program somehow does that, but it > invokes Windows burner, which throws up the error. > > It sounds as if it might be easier to use the technique that you've suggested > and accept that I've got to span the image across two dual-layer disks. The > trouble is that I only have one left... > >> dd can be used to copy back the image files into a partition. One word >> of caution, is everything need for recovery definitely in the one >> partition? No hidden bits around the disk anywhere? That would catch >> out PartedMagic as well, of course. > > I think so, but who knows with Microsoft? It would seem stupid to me to rely > on a recovery strategy that may need files on the possibly damaged partition. > However, it is Microsoft that designed it. The biggest problem with using 2 DVD's is that the Recovery Partition almost certainly includes a programme to perform the recovery and that may well try and access the recovery data from internally defined locations within the partition, so if this data is spread across 2 disks, it may fail to locate the data it's trying to recover :-( As you say Terry, it's Microsoft !! Good luck, I think you'll need it ! -- Cheers Peter -- Next meeting: Bournemouth, Tuesday 2012-03-06 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ New thread on mailing list: mailto:dorset@mailman.lug.org.uk How to Report Bugs Effectively: http://goo.gl/4Xue
Re: [Dorset] Backing up Disc Images
On Saturday 11 Feb 2012 14:18:59 Ralph Corderoy wrote: > I'd expect a recovery partition would already have compressed contents > with high entropy so your compression is probably just burning CPU time > and coming up with a slightly larger result; "Here's a large number of > bytes that aren't compressed" followed by the original data. The > exception to that may be the filesystem's data, but it's probably a > small amount of the partition. > > Also, it sounds like you've made a filesystem in the destination > partition and want the copy to appear there as a file or two. That > filesystem will use up some of the partition's space for its own data, > e.g. what you see with `ls -l', so to image a 1GiB partition to a file > in a filesystem needs at least 1GiB of free space in that filesystem, as > reported by `df'. Right. So I definitely need a bigger target partition. > Let me get this right, you want to an image of a partition split across > two files so each can be burned to a DVD? Ensure the source partition > is unmounted, we don't want it changing during the copy, then Well. What I really wanted was one file that could be burnt to a single dual- layer DVD. The Novatech disk creation program somehow does that, but it invokes Windows burner, which throws up the error. It sounds as if it might be easier to use the technique that you've suggested and accept that I've got to span the image across two dual-layer disks. The trouble is that I only have one left... > dd can be used to copy back the image files into a partition. One word > of caution, is everything need for recovery definitely in the one > partition? No hidden bits around the disk anywhere? That would catch > out PartedMagic as well, of course. I think so, but who knows with Microsoft? It would seem stupid to me to rely on a recovery strategy that may need files on the possibly damaged partition. However, it is Microsoft that designed it. -- Terry Coles 64 bit computing with Kubuntu Linux -- Next meeting: Bournemouth, Tuesday 2012-03-06 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ New thread on mailing list: mailto:dorset@mailman.lug.org.uk How to Report Bugs Effectively: http://goo.gl/4Xue
Re: [Dorset] Backing up Disc Images
On Saturday 11 Feb 2012 14:18:18 Martin Hepworth wrote: > Or just use clonezilla to create the image > On Saturday, 11 February 2012, Terry Coles wrote: > > Clonezilla went all the way through and then exited with a bunch of error > > messages I couldn't make head or tail of. There was nothing usable in > > the target partition. I did. (I accept that the information was buried in the 'saga'. -- Terry Coles 64 bit computing with Kubuntu Linux -- Next meeting: Bournemouth, Tuesday 2012-03-06 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ New thread on mailing list: mailto:dorset@mailman.lug.org.uk How to Report Bugs Effectively: http://goo.gl/4Xue
Re: [Dorset] Backing up Disc Images
Hi Terry, > So (at long last) here is the question. Why does PartImage need a > bigger partition to store its image into than the one it came from, > even though I am using compression? Compression, as I'm sure you know, can make things larger sometimes. Otherwise I'd just compress the compressed output. And then compress that some more. And... Profit! I'd expect a recovery partition would already have compressed contents with high entropy so your compression is probably just burning CPU time and coming up with a slightly larger result; "Here's a large number of bytes that aren't compressed" followed by the original data. The exception to that may be the filesystem's data, but it's probably a small amount of the partition. Also, it sounds like you've made a filesystem in the destination partition and want the copy to appear there as a file or two. That filesystem will use up some of the partition's space for its own data, e.g. what you see with `ls -l', so to image a 1GiB partition to a file in a filesystem needs at least 1GiB of free space in that filesystem, as reported by `df'. > Secondary question; is it creating temporary files in the target > directory? If so, how much bigger does the target partition need to > be? You'd hope not, wouldn't you, but it may be. Let me get this right, you want to an image of a partition split across two files so each can be burned to a DVD? Ensure the source partition is unmounted, we don't want it changing during the copy, then src=/dev/sda1 n=7000 cd /destination/partition/with/space/for/images sudo dd if=$src of=win7.1_of_2.img bs=1M count=$n sudo dd if=$src of=win7.2_of_2.img bs=1M skip=$n The block size, `bs', is 1MiB, i.e. 2^20 not 10^6; that's how much dd will read(2) and write(2) at a time. `count' is how many of those blocks to copy; you may want to change n from 7000 so you're happy both parts will fit on a DVD each. Once you've got the two image files on disk you can see if they match the source. Either sudo sha1sum $src cat win7.?_of_2.img | sha1sum to see both give the same digest or sudo cmp $src <(cat win7.?_of_2.img) The former will allow the hard disk to read all the data sequentially, the latter will have it keep seeking between the two partitions, and seeks and settle time are slow. You can do similar checks once the files are on DVDs. dd can be used to copy back the image files into a partition. One word of caution, is everything need for recovery definitely in the one partition? No hidden bits around the disk anywhere? That would catch out PartedMagic as well, of course. Cheers, Ralph. -- Next meeting: Bournemouth, Tuesday 2012-03-06 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ New thread on mailing list: mailto:dorset@mailman.lug.org.uk How to Report Bugs Effectively: http://goo.gl/4Xue
Re: [Dorset] Backing up Disc Images
Or just use clonezilla to create the image Martin On Saturday, 11 February 2012, Terry Coles wrote: > Hi, > > The intro to this is off-topic, but the question isn't. It's a bit long > winded, but it does illustrate why we prefer Linux. Feel free to jump down to > the problem below if you don't want to read about the saga :-) > > My wife's MSI Laptop popped its clogs a week or two back and after a bit of > investigative work, I realised that the hard disc had failed. In fact this > diagnosis was much harder than it needed to be because I couldn't find a > hardisk diagnosis tool that would run properly on Win7 and the disc > manufacturer's test disc claimed that it couldn't find a compatible disc. > > In the end I booted the machine from the PartedMagic disc and used their disc > testing tool and Bob's your Uncle. Novatech were their usual helpful selves > and told us to return it to them for repair because it was inside the MSI 2 > year warranty (not theirs) and a few days alter we had a nice new disc with > Win7 SP2 installed. So far so good. > > Now for the problem. That miserable company, Microsoft, no longer allow OEMs > to include a Windows Installation disc with their computers and they don't > allow them to create one either (they are currently suing Comet over this). > What they do allow is that the OEMs can put a recovery partition on the disc > and provide a program for the user to create a recovery DVD from it. When the > laptop was new, we used this program to create a Win 7 Recovery DVD, (which we > still have). > > Win7 is now at SP2 of course and Novatech re-imaged the machine with their SP2 > image. Being a conscientious type, I thought I would redo the recovery DVD, > but Windows burner exited with a Windows system error (0x80004005), which > basically translates to 'I haven't got a clue'). After wasting lots of dual- > layer DVDs, I came to the conclusion that there is nothing wrong with the DVD > writer, the problem is somewhere in Windows. > > Being an obstinate type, I wasn't going to be defeated by crappy Windows > software, so I looked around for another way. I thought I had the answer! > Using PartedMagic, I would create an image of the recovery partition, burn > that to a dual-layer DVD from within PartedMagic and then, if the hardisk > failed again, we could restore it. Only one problem; the partition is 12.5 > Gigs (and is nearly full) and the DVD can only take 8.5 GB. Even that seemed > surmountable; both Clonezilla and PartImage can do compressed images, so I > gave them a try. > > I started with PartImage, but it warned me that NTFS support is experimental, > so I went over to Clonezilla. Neither tool can burn to the DVD directly, so I > created a 15 GB partition at the end of the hardisk and formatted it to ext2. > Clonezilla went all the way through and then exited with a bunch of error > messages I couldn't make head or tail of. There was nothing usable in the > target partition. > > I then tried PartImage again and ignored the Warning about NTFS support. This > went almost all the way through, but stopped with the message that the disc > was full and where should it put the second volume. > > So (at long last) here is the question. Why does PartImage need a bigger > partition to store its image into than the one it came from, even though I am > using compression? > > Secondary question; is it creating temporary files in the target directory? > If so, how much bigger does the target partition need to be? > > I've Read The Fine Manual. It doesn't say much. > > -- >Terry Coles >64 bit computing with Kubuntu Linux > > -- > Next meeting: Bournemouth, Tuesday 2012-03-06 20:00 > Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ > New thread on mailing list: mailto:dorset@mailman.lug.org.uk > How to Report Bugs Effectively: http://goo.gl/4Xue > -- -- Martin Hepworth Oxford, UK -- Next meeting: Bournemouth, Tuesday 2012-03-06 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ New thread on mailing list: mailto:dorset@mailman.lug.org.uk How to Report Bugs Effectively: http://goo.gl/4Xue