PDA

View Full Version : mfslive cd partition copy with dd not working



unitron
04-19-2010, 01:28 AM
Using the MFS Live cd (1.4) and trying to do "dd if=/dev/hdxn of=/dev/hdyn " (where x or y is a,b,c, or d and n is a partition number) I get---

dd: can't open '/dev/hdxn' No such device or address


I can use dd from this cd all day long to wipe the MBR and partition table of /dev/hdx with /dev/zero, so I assume the dd binary is good.

I've tried booting both byteswapped and regular, I've tried copying from one drive to another and I've tried copying partition 6 over partition 3 on the same drive.

Every search I've done for someone with the same problem just returns pages where someone says it *can* be done.


Any theories? Any questions other than why I want to do this? (The reason why is a looooong story)

thanks in advance for any insights,

unitron

PlainBill
04-19-2010, 12:09 PM
Using the MFS Live cd (1.4) and trying to do "dd if=/dev/hdxn of=/dev/hdyn " (where x or y is a,b,c, or d and n is a partition number) I get---

dd: can't open '/dev/hdxn' No such device or address


I can use dd from this cd all day long to wipe the MBR and partition table of /dev/hdx with /dev/zero, so I assume the dd binary is good.

I've tried booting both byteswapped and regular, I've tried copying from one drive to another and I've tried copying partition 6 over partition 3 on the same drive.

Every search I've done for someone with the same problem just returns pages where someone says it *can* be done.


Any theories? Any questions other than why I want to do this? (The reason why is a looooong story)

thanks in advance for any insights,

unitron
The command you are quoting uses symbolic drive and partition designations. You must use actual designations. As an example, copying partition 6 to partition 3 of the primary master the correct syntax should be:
dd if=/dev/hda6 of=/dev/hda3 You might try verifying the partition exists with pdisk -l /dev/hda (that is '... space dash el space....' not 'one' or upper case 'eye'). Of course, if you are using accessing the drive through a USB adapter, it would be sda, not hda.

PlainBill

unitron
04-19-2010, 07:06 PM
Bill, thanks for the quick reply.

I'm not actually using algebraic variables like x and y, or n. That was just to indicate my having tried a number of combinations without success.

What I'm really trying to do is /dev/hda10 to /dev/hdc10 (and 11 to 11 and 12 to 12 and 13 to 13). I tried /dev/hdc6 to /dev/hdc3 as an experiment in case there was some "hda isn't byteswapped and hdc is" weirdness interfering.

No matter what I try, booting byteswap or DMA, dd can't find whatever I specify as 'inputfile', i.e., "if".

That's the dd on the MFS Live cd.

The dd on the PTVupgrade cd just returns
"0+0 records in"
"0+0 records out"


The pdisk on the MFS Live cd can see my partitions, or at least what the partition table claims. A "dd if=/dev/hda of=/dev/hdc" allowed to run for a few minutes before being interrupted with "^c" actually transferred hda's partition table to hdc, 'cause pdisk showed hdc claiming to have the same larger size swap and MFS partitions as hda. (I've since wiped hdc and re "backup | restore" 'ed it.)

The pdisk on the PTV cd can't find any partition tables anywhere, and that's booting both "swap" and regular.


I'm running hda = a Samsung 250G drive (originally out of Buffalo LinkStation, where I replaced it with a 500G WD) and hdb = an 80G Maxtor that was masquerading as a 30G in a Sony 2000. I replaced it in the Sony with an 80G WD, and put it in a Philips Series 1 SA in place of another 80G WD with which I had replaced the original 30G Quantum. Recently I "backup | restore" 'ed from the Maxtor to the Samsung and expanded the Samsung and then later "mfsadd" 'ed the Maxtor to the Samsung.

All this got started when I tried to use 2 160G Seagate ST3160815A drives, first in the Philips and then in the Sony.

(I've got another post planned on the reason why one of the Seagates will work, alone or with another drive of a different brand, but 2 won't. It's not about drawing too much power, it's about "challenging security")

I've got the two Seagates installed as hdc and sda (in a Belkin USB case which the MFS Live cd can detect, but not the PTV).

This is all on an old PCChips LM748 (Slot 1/Socket 370) that's shown a surprising knack for survival for a piece of junk. It only sees drives up to 137G, but the MFS cd can see the full size.

The Samsung/Maxtor combo were the most recent drives actually running and recording in the Philips but backup -s | restore to either of the Seagates will boot it just fine as long as the other Seagate isn't in there as well.

I've already copykerned the LBA48 kernal from the PTV cd into the Samsung (with a 250 M swap) and it works just fine, so when I backup | restore to either of the Seagates with a 160 M swap, that works as well.

So dd from the MFS cd can see the drives, it just can't see the partitions. I could accept that if it weren't for all the places I googled up where people claim you can use dd to copy partitions just fine.

Is this a limitation of the versions of dd and/or Linux on the Tivo hacking cd's, or just some problem specific only to me and my particular situation?

Again, thanks in advance for any insights,

unitron

PlainBill
04-20-2010, 01:48 PM
Bill, thanks for the quick reply.

I'm not actually using algebraic variables like x and y, or n. That was just to indicate my having tried a number of combinations without success.

What I'm really trying to do is /dev/hda10 to /dev/hdc10 (and 11 to 11 and 12 to 12 and 13 to 13). I tried /dev/hdc6 to /dev/hdc3 as an experiment in case there was some "hda isn't byteswapped and hdc is" weirdness interfering.

No matter what I try, booting byteswap or DMA, dd can't find whatever I specify as 'inputfile', i.e., "if".

That's the dd on the MFS Live cd.

The dd on the PTVupgrade cd just returns
"0+0 records in"
"0+0 records out"


The pdisk on the MFS Live cd can see my partitions, or at least what the partition table claims. A "dd if=/dev/hda of=/dev/hdc" allowed to run for a few minutes before being interrupted with "^c" actually transferred hda's partition table to hdc, 'cause pdisk showed hdc claiming to have the same larger size swap and MFS partitions as hda. (I've since wiped hdc and re "backup | restore" 'ed it.)

The pdisk on the PTV cd can't find any partition tables anywhere, and that's booting both "swap" and regular.


I'm running hda = a Samsung 250G drive (originally out of Buffalo LinkStation, where I replaced it with a 500G WD) and hdb = an 80G Maxtor that was masquerading as a 30G in a Sony 2000. I replaced it in the Sony with an 80G WD, and put it in a Philips Series 1 SA in place of another 80G WD with which I had replaced the original 30G Quantum. Recently I "backup | restore" 'ed from the Maxtor to the Samsung and expanded the Samsung and then later "mfsadd" 'ed the Maxtor to the Samsung.

All this got started when I tried to use 2 160G Seagate ST3160815A drives, first in the Philips and then in the Sony.

(I've got another post planned on the reason why one of the Seagates will work, alone or with another drive of a different brand, but 2 won't. It's not about drawing too much power, it's about "challenging security")

I've got the two Seagates installed as hdc and sda (in a Belkin USB case which the MFS Live cd can detect, but not the PTV).

This is all on an old PCChips LM748 (Slot 1/Socket 370) that's shown a surprising knack for survival for a piece of junk. It only sees drives up to 137G, but the MFS cd can see the full size.

The Samsung/Maxtor combo were the most recent drives actually running and recording in the Philips but backup -s | restore to either of the Seagates will boot it just fine as long as the other Seagate isn't in there as well.

I've already copykerned the LBA48 kernal from the PTV cd into the Samsung (with a 250 M swap) and it works just fine, so when I backup | restore to either of the Seagates with a 160 M swap, that works as well.

So dd from the MFS cd can see the drives, it just can't see the partitions. I could accept that if it weren't for all the places I googled up where people claim you can use dd to copy partitions just fine.

Is this a limitation of the versions of dd and/or Linux on the Tivo hacking cd's, or just some problem specific only to me and my particular situation?

Again, thanks in advance for any insights,

unitron

Short answer: It is NOT a problem with dd, the PTV or the MFSLive cds. I have personally used it to copy partitions this way. Granted, it was several years ago, and neither the computer I used or the drives are available any more.

I have had countless problems with properly configuring drives. The best results are obtained by correctly configuring the Master / Slave / Only drive jumpers on every drive. Using Cable Select usually works provided both drives are set for it. The fact that you cannot get two Seagate drives to coexist on the same computer indicates to me it is a jumper problem.

PlainBill

Jamie
04-20-2010, 02:02 PM
Short answer: It is NOT a problem with dd, the PTV or the MFSLive cds. I have personally used it to copy partitions this way. Granted, it was several years ago, and neither the computer I used or the drives are available any more.

I have had countless problems with properly configuring drives. The best results are obtained by correctly configuring the Master / Slave / Only drive jumpers on every drive. Using Cable Select usually works provided both drives are set for it. The fact that you cannot get two Seagate drives to coexist on the same computer indicates to me it is a jumper problem.

PlainBillIf the OP can dd the raw full disk device (e.g. /dev/hdc) but not a partition (/dev/hdc10), it would indicate a problem with the kernel recognition of the partition table, not a drive configuration problem. Given that the OP seems to have an S1, I'm betting it is still a byte swapping problem. I don't think the kernel will recognize the partition table if it is incorrectly byte swapped.

unitron
04-20-2010, 02:56 PM
Short answer: It is NOT a problem with dd, the PTV or the MFSLive cds. I have personally used it to copy partitions this way. Granted, it was several years ago, and neither the computer I used or the drives are available any more.

I have had countless problems with properly configuring drives. The best results are obtained by correctly configuring the Master / Slave / Only drive jumpers on every drive. Using Cable Select usually works provided both drives are set for it. The fact that you cannot get two Seagate drives to coexist on the same computer indicates to me it is a jumper problem.

PlainBill

Thanks again for your reply and your time.

I can get the Seagates working in x86 (inc. AMD) computers just fine, it's just that when I try to run both in a Tivo I get this

IDEprom: reset, success
IDE err = 0x4
Need to lock unit 0
Initialize IDE security on unit 0
IDE err = 0x4
Can't set security keys
IDE err = 0x4
IDE drive 0 doesn't challenge security.. Assume insecure device
IDEprom: We have waited too long, giving up!!
Need to lock unit 1
Initialize IDE security on unit 1
IDEprom: We have waited too long, giving up!!
Can't set security keys
IDEprom: We have waited too long, giving up!!
IDE drive 1 doesn't challenge security.. Assume insecure device

and then this

IDEprom: Invalid block 0. signature=0x1490

If I stick them back in a PC and boot with Steve Jenkin's CD the partion check during boot shows 1492 for both, not 1490, so it isn't what it looks like.


If I only put one of the Seagates in the Tivo, either by itself or with a different brand slave/B drive I get

IDE err = 0x4
IDE drive 0 doesn't challenge security.. Assume insecure device
IDE drive 1 challanges with 0xa500a5
Respond with 0x6ff369f1
Check keys a few more times
Respond with 0x6ff369f1
Respond with 0x6ff369f1
Respond with 0x6ff369f1
Drive should be unlocked now.

Yep, that's right, with only one drive installed a phantom second drive will give it the answer it wants, just like a real drive would, provided that real drive isn't the second Seagate.

and now I'm seriously off-topic.

If you say that the dd's on the MFS and PTV cd's will copy partitions from one Tivo disk to another I believe you and thank you for the confirmation and I'll take a tip from Jamie and try it byte-swapped mode some more.

Thanks again.

unitron
04-20-2010, 03:00 PM
If the OP can dd the raw full disk device (e.g. /dev/hdc) but not a partition (/dev/hdc10), it would indicate a problem with the kernel recognition of the partition table, not a drive configuration problem. Given that the OP seems to have an S1, I'm betting it is still a byte swapping problem. I don't think the kernel will recognize the partition table if it is incorrectly byte swapped.


Thanks for putting your 2 cents in. It's worth considerably more. As I indicated to Bill I'm going to take your advice and play around with byte-swapping some more and see where that gets me.