Author Topic: Idea: Adding second hard disk  (Read 24260 times)

0 Members and 1 Guest are viewing this topic.

Offline AndyMan

  • Getting the hang of things.
  • **
  • Posts: 75
Re: Idea: Adding second hard disk
« Reply #20 on: June 26, 2005, 09:50:19 pm »
..... NO GO, IT'S NOT MOUNTING hdb  .....

Offline sbingner

  • Administrator
  • Veteran.
  • *****
  • Posts: 1301
Re: Idea: Adding second hard disk
« Reply #21 on: June 27, 2005, 05:28:32 am »
I went to compusa, bought three of these: http://www.compusa.com/products/product_info.asp?ref=froogle&pfp=froogle&product_code=294956&cm_ven=froogle&cm_cat=&cm_pla=&cm_ite=feed  made the system think the dms was always connected by shorting pins 44 and 20, rolled over the cable by sticking pins in the end of the cable that normally connects to the thing with the DMS and the adaptor and melding them... otherwise I had pin 1=2 and 2=1

Code: [Select]

hda: PhatNoise DMS 10GB, ATA DISK drive
hdb: IBM-DJSA-220, ATA DISK drive
ide0 at 0xfe100000-0xfe100007,0xfe10000e on irq 6
hda: 19640880 sectors (10056 MB), CHS=19485/16/63
hdb: 39070080 sectors (20004 MB) w/1874KiB Cache, CHS=38760/16/63
Partition check:
hda: hda1 hda2 < hda5 hda6 >
hdb: hdb1 hdb2 < hdb5 >


I then created the dev nodes for hdb, hdb1 and hdb5.  I then mounted /dev/hdb5 over /dos/Data and killed 51d and phatd... when they restarted they were happily playing the music off the second drive

I'll put up more info when I get pics or something

Offline AndyMan

  • Getting the hang of things.
  • **
  • Posts: 75
Re: Idea: Adding second hard disk
« Reply #22 on: June 27, 2005, 12:26:49 pm »
How do you create the "dev nodes" for hdb... I think that's where I was failling

Offline sbingner

  • Administrator
  • Veteran.
  • *****
  • Posts: 1301
Re: Idea: Adding second hard disk
« Reply #23 on: June 27, 2005, 05:46:56 pm »
Code: [Select]
mknod /dev/hdb b 3 64
mknod /dev/hdb1 b 3 65
mknod /dev/hdb5 b 3 69



Code: [Select]
brw-rw----  1 root disk 3, 64 Feb 23  2004 /dev/hdb
brw-rw----  1 root disk 3, 65 Feb 23  2004 /dev/hdb1
brw-rw----  1 root disk 3, 69 Feb 23  2004 /dev/hdb5

Offline AndyMan

  • Getting the hang of things.
  • **
  • Posts: 75
Re: Idea: Adding second hard disk
« Reply #24 on: June 28, 2005, 11:20:04 pm »
Much appreciated!... So, the next question is how do I help in the re-creation of the phatbox code?

... other than that, now all I have to do is load up the secondary hard drive and go for it.

Thanks
Andy

Offline ryanmc

  • A few posts under my belt.
  • *
  • Posts: 17
Re: Idea: Adding second hard disk
« Reply #25 on: July 06, 2005, 08:19:28 pm »
Quote
I went to compusa, bought three of these: http://www.compusa.com/products/product_info.asp?ref=froogle&pfp=froogle&product_code=294956&cm_ven=froogle&cm_cat=&cm_pla=&cm_ite=feed  made the system think the dms was always connected by shorting pins 44 and 20, rolled over the cable by sticking pins in the end of the cable that normally connects to the thing with the DMS and the adaptor and melding them... otherwise I had pin 1=2 and 2=1

Code: [Select]
hda: PhatNoise DMS 10GB, ATA DISK drive
hdb: IBM-DJSA-220, ATA DISK drive
ide0 at 0xfe100000-0xfe100007,0xfe10000e on irq 6
hda: 19640880 sectors (10056 MB), CHS=19485/16/63
hdb: 39070080 sectors (20004 MB) w/1874KiB Cache, CHS=38760/16/63
Partition check:
 hda: hda1 hda2 < hda5 hda6 >
 hdb: hdb1 hdb2 < hdb5 >

I then created the dev nodes for hdb, hdb1 and hdb5.  I then mounted /dev/hdb5 over /dos/Data and killed 51d and phatd... when they restarted they were happily playing the music off the second drive

I'll put up more info when I get pics or something

Very nice. would you be willing to make a how to..
or supply me with enough info to make this mod work and i could make a how to.... or was this method just a test and not a good way of using the pn for one reason or another ?

Offline sbingner

  • Administrator
  • Veteran.
  • *****
  • Posts: 1301
Re: Idea: Adding second hard disk
« Reply #26 on: July 06, 2005, 11:59:21 pm »
Quote
Very nice. would you be willing to make a how to..
or supply me with enough info to make this mod work and i could make a how to.... or was this method just a test and not a good way of using the pn for one reason or another ?



All you need to do is make a 3-ended 44-pin IDE cable... AndyMan knows the parts that would be required.  Once you have that, set the second laptop drive to slave and connect them both up.... one has to be in th DMS cradle so the little button is depressed

Offline AndyMan

  • Getting the hang of things.
  • **
  • Posts: 75
Re: Idea: Adding second hard disk
« Reply #27 on: July 07, 2005, 12:23:00 am »
REMEMBER:  The *new* DMS (secondary) has to contain the idx files etc...

The only thing I'm *unsure* of, is how to KILL and restart 51d and phatd automatically so that this can be a seamless "fix"

Any ideas?

Offline AndyMan

  • Getting the hang of things.
  • **
  • Posts: 75
Re: Idea: Adding second hard disk
« Reply #28 on: July 07, 2005, 12:27:04 am »
Tell u what, those 2mm Jumpers are expensive little suckers...  especially when you only need 1 of them <Aargh>

Offline sbingner

  • Administrator
  • Veteran.
  • *****
  • Posts: 1301
Re: Idea: Adding second hard disk
« Reply #29 on: July 07, 2005, 01:38:57 am »
Quote
REMEMBER:  The *new* DMS (secondary) has to contain the idx files etc...

The only thing I'm *unsure* of, is how to KILL and restart 51d and phatd automatically so that this can be a seamless "fix"

Any ideas?


I could probably write a replacement 51d that would take care of that... it could mount the drive, and overwrite the mountpoints.  The only possible problem would be if it takes too long and the 8051 decides to kill it before the second drive mounts

Offline judb

  • Administrator
  • Veteran.
  • *****
  • Posts: 1329
  • ph4t l3wtz
Re: Idea: Adding second hard disk
« Reply #30 on: July 07, 2005, 02:00:29 am »
you forget that it checks the sigs during the boot loader portion for the 51d file.  so we cant replace it.

Changing the start up sound to flac or something and having a script that does the mounting etc would be a good way i think.

Offline bushing

  • Senior Member
  • Needs to get outside.
  • *****
  • Posts: 119
  • props to my peeps
Re: Idea: Adding second hard disk
« Reply #31 on: July 07, 2005, 03:50:31 am »
Quote
you forget that it checks the sigs during the boot loader portion for the 51d file.  so we cant replace it.

Changing the start up sound to flac or something and having a script that does the mounting etc would be a good way i think.



You'd think so, but, it doesn't.  (Oops.) The bootloader only checks:  hard disk id sector, linux, ramdisk, rc.sh, and phatd.

http://wiki.phathack.com/Bootloader_FAQ

51d doesn't get checked until phatd runs; everything from then on seems to use the same bad code that gets fooled by plsign.

I think the easiest way to prepackage a "hack" (at least, in the sense of getting a terminal on the serial port or whatever) is to put out a shell script called 51d, and have it run a hack.sh and then run the real 51d.  Sign it, then anyone can download those two files, rename 51d to 51d.real or something, and then copy them to the drive and be off (without having to lose a filetype or whatever).
-b

Offline judb

  • Administrator
  • Veteran.
  • *****
  • Posts: 1329
  • ph4t l3wtz
Re: Idea: Adding second hard disk
« Reply #32 on: July 07, 2005, 01:49:59 pm »
well as long as 51d will work as another name then we should be okay.  if we have to copy 51d back and remove the shell script we also have to find a way to put it back on shutdown.

we could change the shutdown scripts in the ramdisk using our hacked 51d script perhaps... so that files get moved back and forth on boot and shutdown.

Offline sbingner

  • Administrator
  • Veteran.
  • *****
  • Posts: 1301
Re: Idea: Adding second hard disk
« Reply #33 on: July 07, 2005, 06:17:08 pm »
Quote
well as long as 51d will work as another name then we should be okay.  if we have to copy 51d back and remove the shell script we also have to find a way to put it back on shutdown.

we could change the shutdown scripts in the ramdisk using our hacked 51d script perhaps... so that files get moved back and forth on boot and shutdown.


51d can't be a shell script, it calls via exec() from phatd.  I've replaced it with a compiled program that just exec'd strace 51d-real and it works fine

Offline ryanmc

  • A few posts under my belt.
  • *
  • Posts: 17
Re: Idea: Adding second hard disk
« Reply #34 on: July 07, 2005, 06:42:21 pm »
What about shorting pins 44 and 20 will people need to do this ? sbingner initially from what i read you used a 3.5 ?I think id like to go that route because of the prices of them .
« Last Edit: July 07, 2005, 06:45:52 pm by ryanmc »

Offline sbingner

  • Administrator
  • Veteran.
  • *****
  • Posts: 1301
Re: Idea: Adding second hard disk
« Reply #35 on: July 07, 2005, 07:48:32 pm »
Quote
What about shorting pins 44 and 20 will people need to do this ? sbingner initially from what i read you used a 3.5 ?I think id like to go that route because of the prices of them .


you only need to short them if you don't have the DMS cradle connected... depressing the button does that.  I actually used only laptop drives, but I used a 40-pin IDE cable so I couldnt connect the DMS cradle and had to short them