[Discuss] Knoppix to the rescue

John Blomfield jabfield at shaw.ca
Tue Oct 23 20:18:27 PDT 2007


Murray, thanks again for the further info. I have found a couple of 
links on dd that you may be interested in. 
http://en.wikipedia.org/wiki/Dd_(Unix) and 
http://www.debianhelp.co.uk/ddcommand.htm
The compressing with gzip as described could be very useful for large 
drives, although it would probably slow things down a bit.  One thought, 
if you dd a drive without compressing does it store the whole drive 
irrespective of whether there is any data in the blocks??  The MS 
Windows program "True Image" that I have used will compress and clone a 
windows partition but will only clone a Linux partition and is unable to 
"recognise" the data as files.  So if you have a 10GB linux partition 
you get a 10GB image no matter how much data is on it!  Hence my 
question if you dd a half full 10GB linux partition what do you get??

John Blomfield

Murray Strome wrote:
> pw wrote:
>> John Blomfield wrote:
>>> In case I every want to try using dd to backup a Window's partition, 
>>> what is the syntax, i.e. the options on the command line "dd 
>>> .............."???
>>>
>>> Thanks
>>> John Blomfield
>>
>>
>> You need to know what device the windows partitions are first.
>>
>> ie:
>>
>> /dev/hda1
>> /dev/sda1
>> ....???
>>
>> The command to make a file image of the partition would be:
>>
>> dd if=/dev/<whats_your_partition>  of=/somedirectory/somefile.bin
>>
>>
>> To recover the partition just do the reverse using the binary file
>> as the 'if' <input file> and the device as 'of' <output file>.
>>
>> As is sometimes the case, my memory may be a bit hazey, so use
>> the 'dd' man page as a guide.
>>
>> ie:
>>
>> man dd
>>
>>
>> Peter
> Before I used dd, I first made some partitions on my external USB 
> drive that were essentially the same size as the ones on my laptop.  I 
> used fdisk /dev/sda (which corresponded to my laptop) and noted the 
> beginning and ending blocks of each partition.  I then used fdisk 
> /dev/sdb (my external hard drive) to make three partitions with the 
> same number of blocks. Because they were all primary on the laptop HD, 
> I made these new ones also primary. I then used the "fdisk t" command 
> to change the type to be the same as that of the laptop.  In my case, 
> the first partition started on block 1 and ended on 192 and was type 
> 27.  The second and third partitions were both type 7, NTFS.  Also, if 
> I remember correctly, the second partition (corresponding to the 
> laptop C drive) was set bootable.
>
> I had already used the first partition on the drive to backup the C 
> drive of my XP desktop computer. So, in my case, the commands I used 
> were:
>
> dd if=/dev/sda1 /dev/sdb2
> dd if=/dev/sda2 /dev/sdb3
>
> I didn't need to used dd for the D drive (though I could have done 
> so)  as I could just copy all the files, either from within LINUX or 
> back in Windows.
>
> I do not as yet have LINUX actually installed on the laptop. I used a 
> Knoppix Live DVD to do all this, and it worked just fine.   As I 
> mentioned earlier, things had gone weird on my Windows VISTA on the 
> laptop.  Luckily, I had already done this backup before I went away.  
> I was able to recover proper operation simply by doing the reverse 
> step on only that little peculiar partition:
>
> dd if=/dev/sdb2 of=/dev/sda1
>
> This was sure a lot simpler than what I would have had to go through 
> if I had had to start with the Toshiba recovery disk, which would have 
> resulted in losing all my software installations since I first bought 
> the computer. I was expecting to have to also copy the C drive back, 
> which turned out to be unnecessary.
>
> Murray
> _______________________________________________
> Discuss mailing list
> Discuss at vlug.org
> http://ladybug.vlug.org/cgi-bin/mailman/listinfo/discuss
>



More information about the Discuss mailing list