Author Topic: Dual boot setup  (Read 29932 times)

Joshp

  • Sr. Member
  • ****
  • Posts: 265
    • View Profile
    • http://
Dual boot setup
« Reply #30 on: March 25, 2004, 03:22:21 pm »
Am going to asume that you wort your own \"/sbin/init\".  And moved the default init to \"/sbin/sys/init\".  In witch case you need to run \"exec /sbin/sys/init\".

JP

jerrybme

  • Hero Member
  • *****
  • Posts: 639
    • View Profile
    • http://
Dual boot setup
« Reply #31 on: March 25, 2004, 04:11:22 pm »
Quote
Am going to asume that you wort your own \"/sbin/init\".  And moved the default init to \"/sbin/sys/init\".  In witch case you need to run \"exec /sbin/sys/init\".

JP

Yes, interestingly, both that command & exec /sbin/telinit (which is what /sbin/sys/init points to) result in the same error listed in previous post \"Usage: init 123456..etc\"

Good news is I didn\'t brick my Z with all of that screwing around
SL-C3100
Angstrom-GPE
Lexar SD 1 GB
PQI 2GB CF
Ambicom WL1100 CF

Joshp

  • Sr. Member
  • ****
  • Posts: 265
    • View Profile
    • http://
Dual boot setup
« Reply #32 on: March 25, 2004, 07:01:29 pm »
OK, download this file and unzip.  Move \"/sbin/telinit\" to \"/sbin/sys/telinit\".  Move the unziped copy of telinit to \"/sbin/telinit\".  Move the unziped copy of \"init.card\" to the root dir of your sd card.  Make sure that \"/sbin/init\" points to \"/sbin/telinit\". Link \"/sbin/sys/telinit\" to \"/sbin/sys/init\".  This two files are based off dearkp\'s scripts.  Make sure that nothing under \"/sbin\" is linked to \"/sbin/sys/telint\" or \"/sbin/sys/init\".  Hope this works.  I counld not test this, don\'t have Cxxx(yet).  
Good Luck.

P.S. this is based off of Cacko rom flashed to internel ram and the pdax rom on sd.

JP

jerrybme

  • Hero Member
  • *****
  • Posts: 639
    • View Profile
    • http://
Dual boot setup
« Reply #33 on: March 25, 2004, 08:43:05 pm »
Quote
OK, download this file and unzip.  Move \"/sbin/telinit\" to \"/sbin/sys/telinit\".  Move the unziped copy of telinit to \"/sbin/telinit\".  Move the unziped copy of \"init.card\" to the root dir of your sd card.  Make sure that \"/sbin/init\" points to \"/sbin/telinit\". Link \"/sbin/sys/telinit\" to \"/sbin/sys/init\".  This two files are based off dearkp\'s scripts.  Make sure that nothing under \"/sbin\" is linked to \"/sbin/sys/telint\" or \"/sbin/sys/init\".  Hope this works.  I counld not test this, don\'t have Cxxx(yet). 
Good Luck. 

P.S. this is based off of Cacko rom flashed to internel ram and the pdax rom on sd.

JP

Thanks, I\'ve give it a whirl. I think I know where you are going with modifying the scripts to use the telinit. I was thinking along the same lines. Got my fingers, toes & eyes crossed

Cheers,
Jerry
SL-C3100
Angstrom-GPE
Lexar SD 1 GB
PQI 2GB CF
Ambicom WL1100 CF

anonuk

  • Full Member
  • ***
  • Posts: 176
    • View Profile
    • http://
Dual boot setup
« Reply #34 on: March 25, 2004, 09:05:30 pm »
good luck, i am dying to try this out on my 860 - but a bit worried i might brick it, no way I could afford to buy another one :-)
* C3100 with Cacko 1.23 and debian (pocketworkstation) - 1Gb SD / 1Gb CF / Prism Wifi
* C-860 with Cacko 1.21b/pdaXrom dualboot with 256Mb CF / 512 Mb SD / Prism Wifi
* SL-5500 with Cacko rom with 128Mb SD home on SD / 96 Mb CF

derekp

  • Full Member
  • ***
  • Posts: 154
    • View Profile
Dual boot setup
« Reply #35 on: March 25, 2004, 09:43:25 pm »
Here\'s a basic dual-boot \"theory of operation\" if it helps.
The first thing that the kernel loads up is /sbin/init.  Now, init can behave in different ways depending on how it\'s called.  If it is the first program that is run, then it will have process id 1.  In this case, it can be called with or without arguments (without means that it will use the default runlevel as specified in /etc/inittab).  If it is run after the system is booted up, then it will have a PID of greater than 1, in which case it will require a command line argument (which is the run level to switch to).
So, for the dualboot setup, the replacement /sbin/init is initally loaded up, and has PID 1.  It then does some stuff (i.e., mount the sd card and inspect it), and depending on what it decides it will transfer control to another copy of init (either internal, or the one on the card).  But for new init to function properly in it\'s primary roll, it will need to have PID 1.  Therefore, the first init script uses the \"exec\" call when it transfers control to another init so it can maintain PID 1.  Otherwise the called init will behave differently (i.e., give you the \"usage...\" message).
So, to get this whole technique working on you C series, you need to make sure that (via using an \"exec\" call at each level) the final copy of init that\'s called has PID 1.
Hope this helps.

--derek

jerrybme

  • Hero Member
  • *****
  • Posts: 639
    • View Profile
    • http://
Dual boot setup
« Reply #36 on: March 26, 2004, 12:01:26 am »
@joshp Well, so far no luck. Your scripts were what I was thinking of trying next. Thanks.
At least I can reboot without pulling the battery now. Not sure why the scripts aren\'t working. I wish there was a way to step through the boot process to find out where the problem is; dmseg is not that informative [or I\'m not smart enough to see where the problem is].

But I\'m not giving up yet..
Cheers
SL-C3100
Angstrom-GPE
Lexar SD 1 GB
PQI 2GB CF
Ambicom WL1100 CF

Stubear

  • Hero Member
  • *****
  • Posts: 1164
    • View Profile
    • http://
Dual boot setup
« Reply #37 on: March 26, 2004, 03:30:08 am »
I\'ve been having the same problem with /sbin/init on the C760, I\'m going to try editing rc or rc.sysinit instead as they are called first by telinit.

I\'ll report back my findings tomorrow

Stu
SL-C1000, Hand converted to English with Japanese Input
Running X apps via X/Qt
iRiver USB host cable; Diatec P-Cord usb power cable (extendable); Acro's Reel Cable USB (A to A, B, Mini-B,  & Mini-B 8pin); GreenHouse 1Gb PicoDrive+; 2x256Mb Hagiwara SD cards; 128Mb Transcend CF card; 512Mb PQI CF card; AmbiCom WL1100C-CF 11B WLAN card

Joshp

  • Sr. Member
  • ****
  • Posts: 265
    • View Profile
    • http://
Dual boot setup
« Reply #38 on: March 26, 2004, 10:50:23 am »
jerrybme, did you comment out \"/\" and \"/home\" in \"/etc/fstab\" on you sd card rom, and do you have pivot_root installed on your internel flash rom?

JP

jerrybme

  • Hero Member
  • *****
  • Posts: 639
    • View Profile
    • http://
Dual boot setup
« Reply #39 on: March 26, 2004, 12:04:06 pm »
Quote
jerrybme, did you comment out \"/\" and \"/home\" in \"/etc/fstab\" on you sd card rom, and do you have pivot_root installed on your internel flash rom?

JP
Not sure about pivot_root being installed. One of derekp\'s ipks copied pivot_root to /home/root/usr/local/bin. So the file\'s there. I didn\'t comment out root & home on the /etc/fstab on the sd. I\'ll try that next.

oh, BTW, I forgot to thank derekp for the explanation on how the init process works above, it was very helpful.

Cheers,
Jerry
SL-C3100
Angstrom-GPE
Lexar SD 1 GB
PQI 2GB CF
Ambicom WL1100 CF

jerrybme

  • Hero Member
  • *****
  • Posts: 639
    • View Profile
    • http://
Dual boot setup
« Reply #40 on: March 26, 2004, 02:36:45 pm »
Quote
jerrybme, did you comment out \"/\" and \"/home\" in \"/etc/fstab\" on you sd card rom, 
JP
Tried it but still not working....
SL-C3100
Angstrom-GPE
Lexar SD 1 GB
PQI 2GB CF
Ambicom WL1100 CF

Joshp

  • Sr. Member
  • ****
  • Posts: 265
    • View Profile
    • http://
Dual boot setup
« Reply #41 on: March 26, 2004, 02:59:26 pm »
Ok, try moveing pivot_root to \"/sbin\".  Make sure that \"/sbin\" is in you path whan your booting up by chacking \"/etc/rc.d/rc.sysinit\" look for a line that starts with PATH.(Based off of tkc10)

Hope this works.

JP

anonuk

  • Full Member
  • ***
  • Posts: 176
    • View Profile
    • http://
Dual boot setup
« Reply #42 on: March 26, 2004, 06:10:03 pm »
Dont know if this will help at all, but pocketworkstation used a script for pivot_root to debian on sd on the c7x0 perhaps this will help? The files are at http://pocketworkstation.org/files/c700-kernel/ it was the scripts in the file http://pocketworkstation.org/files/c700-ke...-2003-03-20.zip that i thought might be of use....
* C3100 with Cacko 1.23 and debian (pocketworkstation) - 1Gb SD / 1Gb CF / Prism Wifi
* C-860 with Cacko 1.21b/pdaXrom dualboot with 256Mb CF / 512 Mb SD / Prism Wifi
* SL-5500 with Cacko rom with 128Mb SD home on SD / 96 Mb CF

derekp

  • Full Member
  • ***
  • Posts: 154
    • View Profile
Dual boot setup
« Reply #43 on: March 26, 2004, 09:39:24 pm »
BTW, has anyone had success / problems with this on thier 5500\'s?  I\'m fixing to finish up a full howto plus a couple minor tweeks to upload to the regular files section on here.  Any constructive comments on how I can make the documentation better?

maslovsky

  • Hero Member
  • *****
  • Posts: 1426
    • View Profile
    • http://my-zaurus.narod.ru
Dual boot setup
« Reply #44 on: March 27, 2004, 08:53:03 am »
Quote
BTW, has anyone had success / problems with this on thier 5500\'s?  I\'m fixing to finish up a full howto plus a couple minor tweeks to upload to the regular files section on here.  Any constructive comments on how I can make the documentation better?

I\'m planning to set up my 5500 with dual boot. If all goes well, I\'mm try to do the same with 750 and Cacko Qtopia/X11 ROMs.