Author Topic: SL 5500 TCK ROM 2.0 Aplha 3 with Home on SD script  (Read 26386 times)

dovregubb

  • Newbie
  • *
  • Posts: 8
    • View Profile
    • http://chasvag.com/
SL 5500 TCK ROM 2.0 Aplha 3 with Home on SD script
« on: March 06, 2004, 09:04:57 am »
Hi

I as the header say I am using a SL5500 with TKC ROM Alpha 3 with the home on SD script found in ZUGs mirrored devnet pages.

This works extremley well (after owning a Zaurus for 2 years I finally find it usefull) However here the other day I had to perform a HARD reset.

I know this is because for some reason the ROM dosent udnerstand the SD is a /home or something. Because of the way the script mounts the SD device.

The error message is something like this: Invalid argument while trying to open /dev/mtdblock1

I am not a computer litterate, but I am quite ill-literate when it comes to Linux commands. So please help me what I need to do to get it up and running again.

Thanks

- Dovregubb

Anonymous

  • Guest
SL 5500 TCK ROM 2.0 Aplha 3 with Home on SD script
« Reply #1 on: March 06, 2004, 09:15:06 am »
Hi,

I had a similar problem with my sd card 256mb sandisk. Records on my card were corrupted and then the OS did crash. I could fix it by changing the mout option in the generated rc script. There is used the async option during mount. I changed it to sync and all worked fine up to now.

Axel

dovregubb

  • Newbie
  • *
  • Posts: 8
    • View Profile
    • http://chasvag.com/
SL 5500 TCK ROM 2.0 Aplha 3 with Home on SD script
« Reply #2 on: March 06, 2004, 09:48:05 am »
Well, ok but I am not able to use vi as it gives error message: Can\'t create temporary file, errno=no. So how do I edit it then?

- Dovregubb

dovregubb

  • Newbie
  • *
  • Posts: 8
    • View Profile
    • http://chasvag.com/
SL 5500 TCK ROM 2.0 Aplha 3 with Home on SD script
« Reply #3 on: March 06, 2004, 12:20:02 pm »
Ok, I have managed to get to the TKC Loading screen. However it is not able to pass this screen and keeps lookping back to the wait 5 seconds screen and restarting the TKC loading screen... again and again...

Desperatly in need of help here.

derekp

  • Full Member
  • ***
  • Posts: 154
    • View Profile
SL 5500 TCK ROM 2.0 Aplha 3 with Home on SD script
« Reply #4 on: March 06, 2004, 12:40:56 pm »
If you want, try the most recent prep-home-sd.sh script (uploaded here, file name \"prep-home-sd_test5.zip\").  One thing, do not use the prep-home-sd.sh that ships with the tkc alpha3 rom.  This one was more betta, and after I originally sent it to Proto for inclusion we were discussing ways to make it more interesting.  One of the things that was added to it was a mkswap at the end of it to turn the ramdisk into swap.  The effect of this was that once the swap started being used, if you rebooted the Zaurus then an earlier part of the boot scripts would try to do an fsck on the ramdisk and end up hanging.
This newer version of the script is more elabrate, it allows you to specify the size of an optional swap file to put within the filesystem of the ramdisk, and the generated rc.card script will remember that value to recreate the swap file if you hard-reset.  It also has a few other options in it that is documented within the script.  I\'ve exhaustive tested this new one, with multiple soft and hard resets, even re-flashing the rom, and it appears to not have any issues (at least for me).
The options combination I end up using is:
$  prep-home-sd.sh -s 20 -t -c -f
This gives you a 20-meg swapfile (-s 20), mount /tmp as a ramfs filesystem (-t), copies your existing /home to the SD (-c) (instead of initilizing an SD with default values, which would be -i), and mounts the SD card via the loopback driver for faster speed (-f).  You might want to leave off the -f flag... it makes writes to the SD card faster, but may also fail in some configurations.

If you do a smaller or no swapfile, then leave off the -t flag.  (With a big swapfile there is little room left on the ramdisk for /tmp files, but with no swap file you will run low on memory by having /tmp mounted as a ramfs.  And I don\'t put /tmp on the SD for speed reasons.)  Also, instead of specifying the -f flag (which speeds up writes but can cause potential hanging issues for some people), you can install the async io kernel that I uploaded here the other day.  It\'s in the sl-5500 kernel downloads section.

Also note that if you are having issues where your Zaurus hangs on suspend with using /home on SD, that is because some brands of SD cards are simply incompatible with surviving a suspend/resume cycle.  The effect is that on resume, the card is unreadable until it is unmounted/remounted (normally handled by the sdmgr program).  And it can\'t be unmounted if it is in use, which would be the case when you are running your environment off of it.  My recomendation is to use Lexar cards, stay away from Sandisk and PNY cards (from various reports I\'ve had).

I\'m also about to relase a howto and some scripts that will automatically rebuild a regular Sharp 3.10 or TKC 1.0 rom (with a modified /root/etc/rc.d/rc.sysinit script) so that it will work with this /home on SD method.  I\'ve got to take a bit more time to test it out to make sure I don\'t have any errors in it.

dovregubb

  • Newbie
  • *
  • Posts: 8
    • View Profile
    • http://chasvag.com/
SL 5500 TCK ROM 2.0 Aplha 3 with Home on SD script
« Reply #5 on: March 09, 2004, 12:14:14 pm »
I did as you suggested. Downloaded the newest version of the script. Reflashed and started up from scratch. Not only is this script working on resets. But it is also seemlessy faster than before. Actually my SL5500 is now faster than it ever were. Its AMAZING to think that your script can bring so much life into a 2 years old PDA.

Thanks for all the effort!
- Dovre

Anonymous

  • Guest
SL 5500 TCK ROM 2.0 Aplha 3 with Home on SD script
« Reply #6 on: March 09, 2004, 03:55:07 pm »
I made the same experience! Thanks a lot!

revdjenk

  • Newbie
  • *
  • Posts: 48
    • View Profile
    • http://
SL 5500 TCK ROM 2.0 Aplha 3 with Home on SD script
« Reply #7 on: March 09, 2004, 05:33:36 pm »
Can someone lead me by the hand (or at least pointing me to a site, old Devnet location or other thread in ZUG) in the process of preparing to run this script; especially keeping these things in mind:
Does tkcrom backup do both apps and docs? (I have never tried this.) Is it better to send to pc or cf?
Then do format of sd?
Script run here, correct?
Will restore put the apps and docs back \"in place\" to run from the newly ext formatted sd?
God Bless
Doug

These are the words of him who has the Sharp...
Revelation 2:12

n8a

  • Full Member
  • ***
  • Posts: 235
    • View Profile
    • http://
SL 5500 TCK ROM 2.0 Aplha 3 with Home on SD script
« Reply #8 on: March 09, 2004, 06:55:17 pm »
derekp - I have a few questions:

I read through a few threads regarding your async kernel - out of curiosity, is there a way to upgrade the kernel that would not require a full ROM flash?  Not a big prob, but I have things setup nicely on my 5500 right now   If not, I\'ll just flash with the zimage that you posted on 3/5/04.

To clarify, if I go with the async kernel, I would not with the -f fast SD mount option, right?

In your description of the script, you wrote the following: \"copies your existing /home to the SD (-c)\".  And in the code I see: \"-c -- copy existing ramdisk-based /home contents to the SD card\".  Does this mean that the ram contents are left on the ramdisk as well?  If so, won\'t they take up too much space on the ramdisk, which is the space that we\'re trying to free up via home-on-sd?

What\'s the advantage/difference of the -c option versus -i?

For the -t option, the code mentions: \"(should be used with ramdisk option)\"  What option is that referring to?


Thanks in advance.  Oh, and If your answer is \"wait til I freakin finish the docs$@#$!!\", I certainly understand
- Nate

derekp

  • Full Member
  • ***
  • Posts: 154
    • View Profile
SL 5500 TCK ROM 2.0 Aplha 3 with Home on SD script
« Reply #9 on: March 09, 2004, 08:52:48 pm »
Quote
derekp - I have a few questions:  
First of all, you are using the TKC 2.0-alpha 3 rom right?  (I think you mentioned that before, but I\'m to lazy to look that up right now)
If not, then the prep-home-sd script won\'t do you much good (until I release modrom script in a few days, which will modify your existing rom to support home-on-sd).
Quote
I read through a few threads regarding your async kernel - out of curiosity, is there a way to upgrade the kernel that would not require a full ROM flash?  Not a big prob, but I have things setup nicely on my 5500 right now   If not, I\'ll just flash with the zimage that you posted on 3/5/04.
Updating the rom requires you to hit the reset button afterwards, which will wipe out your ramdisk.  However, I think that if you are just rewriting the kernel, you might not have to hit the reset button a second time.
Quote
To clarify, if I go with the async kernel, I would not with the -f fast SD mount option, right?
Yes, this is correct.  In fact, the async kernel is a bit faster than using the -f flag (-f just builds the rc.card script on the SD with the \"-o loop\" option on the mount command).
Quote
In your description of the script, you wrote the following: \"copies your existing /home to the SD (-c)\".  And in the code I see: \"-c -- copy existing ramdisk-based /home contents to the SD card\".  Does this mean that the ram contents are left on the ramdisk as well?  If so, won\'t they take up too much space on the ramdisk, which is the space that we\'re trying to free up via home-on-sd?
What\'s the advantage/difference of the -c option versus -i?
Yes, the ramdisk contents are untouched either way.
If you wanted to free up your ramdisk, then you could either do that manually, or hit the reset button which will re-initialize the ramdisk.
The general idea is that after the procedure, you could continue to boot up either with or without the SD card to switch between /home on ram, or /home on SD.  So you aren\'t committed to keeping your SD slot tied up all the time.
So, for example, if you use the -i switch, then your SD card will resemble a freshly reset zaurus.  If you use -c, then your existing settings and all installed apps should be preserved onto the SD.  You can then feel free to wipe out your ramdisk after testing out booting off the SD.
Quote
For the -t option, the code mentions: \"(should be used with ramdisk option)\"  What option is that referring to?
The way I set it up, is that the /tmp directory still points to the ramdisk.  If you create a large swap file, then there won\'t be enough room on your ramdisk for /tmp.  Therefore, by making /tmp a ramfs filesystem type, you end up with one pool of storage to share between virtual memory and /tmp files (it dynamically resizes itself to store the files as needed). However, if you don\'t create a swap file, or have a small one, then if you use /tmp as a ramfs filesystem, you will be eating into your application memory.  I didn\'t want to commit to any cutoff values for one way or the other, so I leave it up to the individual to do what works the best.

BTW, most of these options only affect how the rc.card script is built.  You can always tweek the script afterwards, i.e, if you want to switch from the loopback /home mount you modify a variable at the top of the script.

Hope this answers most of you questions.

--derek

n8a

  • Full Member
  • ***
  • Posts: 235
    • View Profile
    • http://
SL 5500 TCK ROM 2.0 Aplha 3 with Home on SD script
« Reply #10 on: March 10, 2004, 12:49:41 am »
Tremendous, derek!  To confirm, I\'m using the TKC 2.0-alpha 3 rom on a 5500.

Last Q: So once I perform the home-on-sd, I assume that all apps that I install to internal ROM will actually be installed to the SD card, correct?  Would installing to SD then become redundant, or would it somehow install packages differently if I use -dest /mnt/card?  

Thanks a lot for your feedback - I\'ll be giving this a try tomorrow morning...

n8a

  • Full Member
  • ***
  • Posts: 235
    • View Profile
    • http://
SL 5500 TCK ROM 2.0 Aplha 3 with Home on SD script
« Reply #11 on: March 10, 2004, 04:14:58 pm »
I did it, and it worked great!  I applied derek\'s async zImage and flashed with tkcROM 2.0-alpha3, then ran the script:

# prep-home-sd.sh -s 20 -t -c

I really wish that I would have benchmarked writes and reads on my SD card beforehand, as they seem VERY fast now comparatively.  Thanks for the excellent work, derek!

Then.... my card could not recover from a suspend (SanDisk 512MB).  

For the benefit of anyone that wants to know (???), I will share my experiences:

After a hard reboot, my 5500 spewed a TON of error messages until I finally decided on a hard reset.  I received a bunch of error messages during the load after the reset, but eventually QT loaded up and to my amazement, the apps that I installed were still there and functioning.  The home-on-sd was still in effect.

I then reflashed from the CF card with the async zImage and tkcROM 2.0-alpha3, and I got the same results.  

Finally, I took the SD out, did a hard reboot (wouldn\'t respond to suspend or reboot commands), and things seemed to work as if the SD card never existed (as derek indicated it would).  I then reformatted my SD card as ext2, and I was officially back in business with the normal functionality of the async zImage and tkcROM 2.0-alpha3.  For good measure, I performed another hard reset, and the tkcROM loaded normally with no errors.

Doug - I wanted to help you with some other questions, but only after I had this working fully on my end.  I will try to exchange my SanDisk 512MB card tonight for a Lexar 512MB card at Circuit City (hoping that it\'s not past the return window of time), then I will try this again with that card...  

Quote
Can someone lead me by the hand (or at least pointing me to a site, old Devnet location or other thread in ZUG) in the process of preparing to run this script; especially keeping these things in mind:  

I\'ll try

Quote
Does tkcrom backup do both apps and docs? (I have never tried this.) Is it better to send to pc or cf?  
Then do format of sd?

I have only backed up to/from my Windows XP system, so I can\'t really talk regarding backups to CF.  As a note, IIRC due to a bug, the tkcROM 2.0-alpha3 will not allow you to backup to CF.  In addition, when I restore from my backups on my PC with this ROM, I am never able to suspend my 5500 (another bug in this version of tkcROM).  Thus, ASAIK, there is no effective backup method for tkcROM 2.0-alpha3.  Brutal.

Quote
Will restore put the apps and docs back \"in place\" to run from the newly ext formatted sd?

The restore process (in general) should fully restore everything to your zaurus\' ramdisk, so since the zaurus \"thinks\" that the SD card is a part of internal ram (that\'s what it seems like to me), IMO it should backup the ramdisk and SD accordingly.  Perhaps derek could add to this.

Quote
Script run here, correct?

As indicated above, I put the script from this site (hosted in ZUG downloads) on my CF card, as well as the async zimage.  I then flashed my 5500 with the async zImage (let me know if you need more of an explanation for any of this), then I ran the script from the terminal (see command above) at the location of the script on my CF card.  The script ran successfully, then I had to reboot to see the effects of home-on-sd in place.

I know this is LOOONG, but I hope that it\'s helpful in terms of the steps and what to expect.
God bless!
Nate

n8a

  • Full Member
  • ***
  • Posts: 235
    • View Profile
    • http://
SL 5500 TCK ROM 2.0 Aplha 3 with Home on SD script
« Reply #12 on: March 11, 2004, 05:27:30 pm »
derekp - I went out and grabbed a Lexar 256MB SD card, and I was having the same results that I described in the last thread with my SanDisk 512MB: It will not suspend, and once I try to do so, I am forced to do a hard reset.  

However, I finally figured out that if I remove the 5500 from the cradle when I perform the suspend, it suspends fine and recovers as expected!  Not sure what\'s going on here, but I\'ll make a personal note NOT to suspend while it is in the cradle anymore.

I will retest my SanDisk SD card again and see if it is working all right-
Nate

EDIT: I tested this successfully with my SanDisk card and it\'s working great.  I am using the asyncio zImage and the improved mmcsd.o module and things seem to be working great now!  So much swap and the SD-write improvements have made my 5500 INCREDIBLY fast compared to my old configuration.  Thanks again for sharing this knowledge!

On a side note, I left my 5500 on in the cradle last night, and when I woke up all that I would get is the following:

The system booted to this:
I had a shell and it complained that the file system was corrupt. It then gave me these options: Enter password to repair or press Control-D.  Then:
1) reboot... after which it dies and can\'t be started unless I flash it again
2) I get a prompt that comes up like the following

(Repair FS) #

So, once again I had to flash it.  Pretty unstable from my usage thus far...

n8a

  • Full Member
  • ***
  • Posts: 235
    • View Profile
    • http://
SL 5500 TCK ROM 2.0 Aplha 3 with Home on SD script
« Reply #13 on: March 12, 2004, 07:08:13 pm »
Well, as much fun as it\'s been to use the asyncio kernel, I just encountered a dealbreaker... at least for the present.  It seems that the asyncio kernel has affected the serial_cs.o, to the effect that I get the following messages when installing bluetooth (as usual on tkcROM):

Code: [Select]
# ipkg install bluez-zaurus_2[1].3-2.4.18d_arm.ipk

Unpacking bluez-zaurus...Done.

Configuring bluez-zaurus...depmod: *** Unresolved symbols in /lib/modules.rom/2.4.18-rmk7-pxa3-embedix/kernel/drivers/char/pcmcia/serial_cs.o

Starting Bluetooth... Can\'t open serial port: No such device

Can\'t initialize device: No such device

Done.

Done.

# modprobe serial_cs

/lib/modules.rom/2.4.18-rmk7-pxa3-embedix/kernel/drivers/char/pcmcia/serial_cs.o: unresolved symbol unregister_serial

/lib/modules.rom/2.4.18-rmk7-pxa3-embedix/kernel/drivers/char/pcmcia/serial_cs.o: unresolved symbol register_serial

/lib/modules.rom/2.4.18-rmk7-pxa3-embedix/kernel/drivers/char/pcmcia/serial_cs.o: insmod /lib/modules.rom/2.4.18-rmk7-pxa3-embedix/kernel/drivers/char/pcmcia/serial_cs.o failed

/lib/modules.rom/2.4.18-rmk7-pxa3-embedix/kernel/drivers/char/pcmcia/serial_cs.o: insmod serial_cs failed

#


Any ideas here, Derek?  I\'d like to get this working, but replacing the existing driver with another copy of serial_cs.o that I have (then doing a depmod -a and modprobe) did not seem to work, so I\'m off to the original tkcROM zImage for now...

revdjenk

  • Newbie
  • *
  • Posts: 48
    • View Profile
    • http://
SL 5500 TCK ROM 2.0 Aplha 3 with Home on SD script
« Reply #14 on: March 15, 2004, 12:01:14 am »
derek...
I cannot find the \"prep-home-sd_test5.zip\" file anywhere, and your \"here\" is not a link. Help!
God Bless
Doug

These are the words of him who has the Sharp...
Revelation 2:12