[Discuss] Knoppix to the rescue
Murray Strome
wmstrome at shaw.ca
Tue Oct 23 18:17:49 PDT 2007
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
More information about the Discuss
mailing list