Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Page 1 of 3 1 2 3 >
Topic Options
#120723 - 13/10/2002 21:13 empeg-preinit v6
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
empeg-preinit v6 has been released.

It provides support for /programs0 and /programs1 mounting at boot time. It will also check to see if /programs0/preinit.d exists, and, if so, will use it as the location to find startup scripts in favor of /etc/preinit.d. This will help in preserving said scripts upon empeg software upgrades.

There is also support for a `B' script which will block at the end of the preinit process, preventing the normal init from being run until it exits. This could be handy for starting the player app with nonstandard options.

It also includes the fixes posted by jaharkes (many thanks) for the crashes that many of you were seeing. (After looking at it, they were remarkably stupid errors.) I did not include the change to allow the execution of arbitary binaries. Your startup scripts must still be scripts. Should any of you like to change this, there are some vague instructions in the code, as well as jaharkes' patch still on the BBS.

This has not been extensively tested, especially the /programs1 and `B' scripts. Use at your own risk. Feedback and patches are appreciated, as ever.
_________________________
Bitt Faulk

Top
#120724 - 13/10/2002 21:22 Re: empeg-preinit v6 [Re: wfaulk]
oliver
addict

Registered: 02/04/2002
Posts: 691
Thanks Bitt,
This has fixed my memory errors, and i got to remove the reservecache setting from my config.ini

Now hopefully maybe i can play pacman with my player switching between aux in and the mp3 player, but only time will tell

Thanks again!
_________________________
Oliver mk1 30gb: 129 | mk2a 30gb: 040104126

Top
#120725 - 14/10/2002 13:44 Re: empeg-preinit v6 [Re: wfaulk]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
If anyone wants to help figure this one out....

It turns out that if I try to remount / read-write at preinit time, preinit goes into an endless loop of stack dumps that causes me to have to reinstall a stock kernel. I think that this is because it's just managed to remount it from the initrd root. I considered sleeping for a second or two, but I didn't want to delay startup, so I haven't even done it to check to see if that's the case yet.

But if anyone has any ideas, please let me know. The offending code is still in the source ifdef'd out.
_________________________
Bitt Faulk

Top
#120726 - 14/10/2002 16:18 Re: empeg-preinit v6 [Re: wfaulk]
ellweber
member

Registered: 14/01/2002
Posts: 156
Loc: Saratoga, CA, USA
I am getting weird results now, see the following exerpt:

Trying to unmount old root ... okay
Freeing unused kernel memory: 4k init
empeg-preinit starting...
Using /programs0/preinit.d as startup script directory
stat: No such file or directory
N10telnetd doesn't exist?
stat: No such file or directory
N20mount doesn't exist?
stat: No such file or directory
N5_vncscript doesn't exist?
empeg-preinit complete
empeg init 0.8
I see this is a developer image!
Mounting proc
Mounting first music partition
Tried to mount /dev/hda4 as reiserfs but got error 19
Mounting second music partition


Seems like it won't run "N..." scripts when they are in /programs0/preinit.d/ because that hasn't been mounted yet. "M..." scripts seem to not give an error but of course they just point to applications that are also in /programs0/ which never got mounted by N20mount. Just curious if this is even close to a correct explanation

Lynn

Top
#120727 - 14/10/2002 16:34 Re: empeg-preinit v6 [Re: ellweber]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
Nope. If it wasn't mounted, it wouldn't see that they exist to try to run them. Probably still a stupid bug on my part, though. I'll take a look.

Damn. Stupid buffer sizing mistake. A new version will be out in a few.


Edited by wfaulk (14/10/2002 16:50)
_________________________
Bitt Faulk

Top
#120728 - 14/10/2002 17:01 Re: empeg-preinit v6 [Re: wfaulk]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
All right. v7's out. Same place.
_________________________
Bitt Faulk

Top
#120729 - 14/10/2002 17:34 Re: empeg-preinit v6 [Re: wfaulk]
ellweber
member

Registered: 14/01/2002
Posts: 156
Loc: Saratoga, CA, USA
Still doing the same thing.

Trying to unmount old root ... okay
Freeing unused kernel memory: 4k init
empeg-preinit starting...
Using /programs0/preinit.d as startup script directory
stat: No such file or directory
N10vncscript doesn't exist?
stat: No such file or directory
N15telnetd doesn't exist?
stat: No such file or directory
N20mount doesn't exist?
empeg-preinit complete
empeg init 0.8
I see this is a developer image!
Mounting proc
Mounting first music partition


It all works fine if I revert to the old /etc/preinit.d. Any idea what I am doing wring?

Lynn


Top
#120730 - 14/10/2002 17:40 Re: empeg-preinit v6 [Re: ellweber]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
It's not you. It's me, I'm sure. Lemme triple-check this stuff.
_________________________
Bitt Faulk

Top
#120731 - 14/10/2002 17:55 Re: empeg-preinit v6 [Re: ellweber]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
Actually, are you sure you installed v7? I didn't check it when I rebuilt it because it was such an obvious flaw that I assumed that I fixed it wrong. But it definitely works for me now.
_________________________
Bitt Faulk

Top
#120732 - 14/10/2002 19:04 Re: empeg-preinit v6 [Re: wfaulk]
ellweber
member

Registered: 14/01/2002
Posts: 156
Loc: Saratoga, CA, USA
You are right. Must have been klutzy work with the mouse/keyboard. Sorry for the false alarm. Back to the baseball game

Lynn

Top
#120733 - 14/10/2002 19:27 Re: empeg-preinit v6 [Re: wfaulk]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31594
Loc: Seattle, WA
Okay, just installing preinint and messing with it now.

Readme file states...
    "In order to use this feature, the /programs0 and /programs1 directories must already exist and those hard drive partitions must already contain a filesystem."

How's that done, again?
_________________________
Tony Fabris

Top
#120734 - 14/10/2002 19:50 Re: empeg-preinit v6 [Re: tfabris]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31594
Loc: Seattle, WA
I have to say, installing preinit IS very painless. Including the FTP script certainly helped. The only thing is that I don't know how to create the /programs0 partition and make its filesystem so that I can install GPSapp.
_________________________
Tony Fabris

Top
#120735 - 14/10/2002 20:08 Re: empeg-preinit v6 [Re: tfabris]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31594
Loc: Seattle, WA
Anyone?

I found Genixia's script for doing a whole bunch of stuff such as creating scripts for emptris and stuff, but I don't know how to extract just the part that builds /programs0.
_________________________
Tony Fabris

Top
#120736 - 14/10/2002 20:21 Re: empeg-preinit v6 [Re: tfabris]
genixia
Carpal Tunnel

Registered: 08/02/2002
Posts: 3411
Ok, I'm back from dinner

My script needs updating - the preinit.d scripts should really be installed per application. And they should now be installed into /programs0/preinit.d

But anyway, it's still going to be easiest to use the script to format the partitions, create the mountpoints etc. It's fairly intelligent - it will only do what it thinks needs to be done. Follow the destructions, and once done;

rw
rwp
cd /etc
mv preinit.d /programs0
cd /programs0/preinit.d
rm {any scripts that you don't want...ensure that N20mount is removed as preinit does this now}
rop

ftp empeg
site rw
cd /programs0/preinit.d
put M50gpsapp
site ro
bye.

Or give me a little while to fix up a new version...
_________________________
Mk2a 60GB Blue. Serial 030102962 sig.mp3: File Format not Valid.

Top
#120737 - 14/10/2002 20:23 Re: empeg-preinit v6 [Re: tfabris]
Waterman981
old hand

Registered: 14/02/2002
Posts: 804
Loc: Salt Lake City, UT
I suck at linux, but it looks like it goes up until the line:

#Create a couple of useful 'binaries', /bin/rwp and /bin/rop. Guess what they do.

Everything before that appears to be the setup stuff. But from Genixia's comments if you already have the preinit.d directory created then it will skip building the scripts. I would just say try running the script since you already have preinit installed. I used the script before I installed preinit, and it worked great. But warning.. I am no linux freak.... I could be totally wrong... but thats my .02
_________________________
-Michael

#040103696 on a shelf
Mk2a - 90 GB - Red - Illuminated buttons

Top
#120738 - 14/10/2002 20:51 Re: empeg-preinit v6 [Re: Waterman981]
genixia
Carpal Tunnel

Registered: 08/02/2002
Posts: 3411
New version coming soon....I had a reason to blast my player back to raw beta13, so I'm taking advantage of the opportunity to rehack the script to use /programs0/preinit.d instead of /etc/preinit.d

And no....you still want rop and rom as ro and rw don't manipulate the new partitions (although SITE ro and SITE rw in ftp do...that's a bug/feature of hijacks kftpd...whichever way you want to consider it!)

Gimme a few cycles for testing...

_________________________
Mk2a 60GB Blue. Serial 030102962 sig.mp3: File Format not Valid.

Top
#120739 - 14/10/2002 21:34 Re: empeg-preinit v6 [Re: tfabris]
genixia
Carpal Tunnel

Registered: 08/02/2002
Posts: 3411
As for limiting which preinit scripts get created, you can either cut out individual scripts (remove every line from it's comment header to the next scripts comment header, or comment them out with '#'.

But it's probably as easy to let them get created and remove unwanted stuff afterwards...

mkprgpt - v2.
_________________________
Mk2a 60GB Blue. Serial 030102962 sig.mp3: File Format not Valid.

Top
#120740 - 15/10/2002 05:59 Re: empeg-preinit v6 [Re: genixia]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31594
Loc: Seattle, WA
Darn, that URL didn't work for me.
_________________________
Tony Fabris

Top
#120741 - 15/10/2002 06:12 Re: empeg-preinit v6 [Re: tfabris]
genixia
Carpal Tunnel

Registered: 08/02/2002
Posts: 3411
Hmmm. Odd. Aahh...

Try this one.
It probably helps if I give you an externally resolvable DNS hostname. I really should start using dyndns.
_________________________
Mk2a 60GB Blue. Serial 030102962 sig.mp3: File Format not Valid.

Top
#120742 - 15/10/2002 06:34 Re: empeg-preinit v6 [Re: genixia]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31594
Loc: Seattle, WA
Okay, got the file. Where do I put it and how do I run it?

Note: Already installed preinit v7.
_________________________
Tony Fabris

Top
#120743 - 15/10/2002 06:40 Re: empeg-preinit v6 [Re: tfabris]
genixia
Carpal Tunnel

Registered: 08/02/2002
Posts: 3411
ftp empeg
site rw
cd / (Probably redundant)
put mkprgpt
bye

serial:
cd /
./mkprgpt

Once completed to your satisfaction, you can remove the script if desired.
_________________________
Mk2a 60GB Blue. Serial 030102962 sig.mp3: File Format not Valid.

Top
#120744 - 15/10/2002 06:45 Re: empeg-preinit v6 [Re: genixia]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31594
Loc: Seattle, WA
Thanks, running now. I'll try to remember to strip the Windows CR/LF problem before putting it on the player....
_________________________
Tony Fabris

Top
#120745 - 15/10/2002 06:50 Re: empeg-preinit v6 [Re: tfabris]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31594
Loc: Seattle, WA
And I am remembering to put it back in RO mode and to chmod 755 the script...
_________________________
Tony Fabris

Top
#120746 - 15/10/2002 06:53 Re: empeg-preinit v6 [Re: tfabris]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31594
Loc: Seattle, WA
Do any of the error messages here indicate a problem, or are they normal?


empeg:/# rw
empeg:/# chmod 755 mkprgpt
empeg:/# ro
empeg:/# ./mkprgpt
VFS: Can't find an ext2 filesystem on dev ide0(3,2).
mount: wrong fs type, bad option, bad superblock on /dev/hda2,
or too many mounted file systems
VFS: Can't find an ext2 filesystem on dev ide0(3,66).
mount: wrong fs type, bad option, bad superblock on /dev/hdc2,
or too many mounted file systems
mke2fs 1.19, 13-Jul-2000 for EXT2 FS 0.5b, 95/08/09
ext2fs_check_if_mount: No such file or directory while determining whether /dev/
hda2 is mounted.
warning: 495 blocks unused.

Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
32768 inodes, 32769 blocks
1663 blocks (5.07%) reserved for the super user
First data block=1
4 block groups
8192 blocks per group, 8192 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
8193, 24577

Writing inode tables: done
Writing superblocks and filesystem accounting information: done
mke2fs 1.19, 13-Jul-2000 for EXT2 FS 0.5b, 95/08/09
ext2fs_check_if_mount: No such file or directory while determining whether /dev/
hdc2 is mounted.
warning: 306 blocks unused.

Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
32768 inodes, 32769 blocks
1653 blocks (5.04%) reserved for the super user
First data block=1
4 block groups
8192 blocks per group, 8192 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
8193, 24577

Writing inode tables: done
Writing superblocks and filesystem accounting information: done
Entry for /dev/hda2 appended to /etc/fstab
Entry for /dev/hdc2 appended to /etc/fstab
mount: /programs0 not mounted already, or bad option
mount: /programs1 not mounted already, or bad option
Old /etc/preinit.d entries found! Moving to /programs0/preinit.d
empeg:/# ro
empeg:/# rom
empeg:/# rop
mount: /programs0 not mounted already, or bad option
mount: /programs1 not mounted already, or bad option
empeg:/# cd /programs0
empeg:/programs0# ls
preinit.d
empeg:/programs0#
_________________________
Tony Fabris

Top
#120747 - 15/10/2002 06:56 Re: empeg-preinit v6 [Re: tfabris]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31594
Loc: Seattle, WA
Also, despite my verification (see end of previous post) that programs0 existed and contained preinit.d, I get the following error on boot of the player:


Trying to unmount old root ... okay
Trying to unmount old root ... okay
empeg-preinit starting...
/programs0/preinit.d doesn't exist
You might want to consider placing your startup scripts there
Using /etc/preinit.d as startup script directory
no /etc/preinit.d
empeg-preinit complete
empeg init 0.8
I see this is a developer image!

_________________________
Tony Fabris

Top
#120748 - 15/10/2002 07:04 Re: empeg-preinit v6 [Re: tfabris]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31594
Loc: Seattle, WA
These problems, by the way, are the whole reason I've been asking for a simple FTP-and-add-to-config method for putting user programs on the player. The average joe is not going to be able to do all of the above. If I can't even do it without hand-holding from Genixia and Bitt, how is anyone else going to be able to do it?
_________________________
Tony Fabris

Top
#120749 - 15/10/2002 07:17 Re: empeg-preinit v6 [Re: tfabris]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31594
Loc: Seattle, WA
When I FTP to the player, I cannot see a preinit.d in the location where I saw it before.

Why did it dissapear, and where can I get this file again?
_________________________
Tony Fabris

Top
#120750 - 15/10/2002 07:26 Re: empeg-preinit v6 [Re: tfabris]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31594
Loc: Seattle, WA
Okay, now my player is completely fux0red.

I was going to try to start FTP'ing the GPSapp files to the player, and I opened up IE and hit my "Set RW" link. I noticed the player was in standby so I tried to wake it from the front panel. That didn't work and I realized it was because the serial shell was still open and I was exited to the bash prompt.

So I tried to set the player back to RO from the web browser and then go to the shell to exit back to the player software, and the shell screen goes nuts with segfaults:



c0871f80: c00c1708 c0012b08 20000013 c02e6610 00000013 00000000 c02e6000 000000
06
c0871fa0: 00000001 c02e6000 c011dc24 c00c2bf0 c01e70c4 c0871fe4 c0871fc4 c02e60
00
c0871fc0: 00000001 c01e70c0 00000001 c011dc24 c00c2bf0 c01e70c4 c0871ffc c0871f
e8
c0871fe0: c00c2c54 c00c2408 00000001 c00c2bf0 c01e70bc c0872000 c000b650 c00c2b
fc
Backtrace: frame pointer underflow
Function entered at [<c001024c>] from [<c00117a4>]
r10 = 00000002 r8 = C087064C r7 = 00000002 r6 = C00F46E8
r5 = C0870000 r4 = BFFFFDA4
Function entered at [<c0011738>] from [<c0011a5c>]
r8 = BFFFFDA4 r7 = C087064C r6 = C0870000 r5 = 00000005
r4 = C087064C

(etc.)


My only recourse was to cycle the power. The player booted and began to play a song, but then locked up completely with garbage on the serial port. Still locked up.

[censored] what do I do?

(Second reboot player seems to work, but now is there something wrong?)
_________________________
Tony Fabris

Top
#120751 - 15/10/2002 07:28 Re: empeg-preinit v6 [Re: tfabris]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31594
Loc: Seattle, WA
Heh, I get:

empeg:/empeg/bin# rw
EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended

Guess I should go FAQ myself now.
_________________________
Tony Fabris

Top
#120752 - 15/10/2002 07:31 Re: empeg-preinit v6 [Re: tfabris]
genixia
Carpal Tunnel

Registered: 08/02/2002
Posts: 3411

empeg:/# rw
empeg:/# chmod 755 mkprgpt
empeg:/# ro
empeg:/# ./mkprgpt
VFS: Can't find an ext2 filesystem on dev ide0(3,2).
mount: wrong fs type, bad option, bad superblock on /dev/hda2,
or too many mounted file systems
VFS: Can't find an ext2 filesystem on dev ide0(3,66).
mount: wrong fs type, bad option, bad superblock on /dev/hdc2,
or too many mounted file systems


This is the script attempting to mount the partitions before we do anything to them. This is neccessary to check that they weren't already formatted. As they weren't mount spews this error. ie...it's all good.


mke2fs 1.19, 13-Jul-2000 for EXT2 FS 0.5b, 95/08/09
ext2fs_check_if_mount: No such file or directory while determining whether /dev/
hda2 is mounted.
warning: 495 blocks unused.

Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
32768 inodes, 32769 blocks
1663 blocks (5.07%) reserved for the super user
First data block=1
4 block groups
8192 blocks per group, 8192 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
8193, 24577

Writing inode tables: done
Writing superblocks and filesystem accounting information: done
mke2fs 1.19, 13-Jul-2000 for EXT2 FS 0.5b, 95/08/09
ext2fs_check_if_mount: No such file or directory while determining whether /dev/
hdc2 is mounted.
warning: 306 blocks unused.

Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
32768 inodes, 32769 blocks
1653 blocks (5.04%) reserved for the super user
First data block=1
4 block groups
8192 blocks per group, 8192 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
8193, 24577

Writing inode tables: done
Writing superblocks and filesystem accounting information: done


Now we have formatted both paritions. Good.

Entry for /dev/hda2 appended to /etc/fstab
Entry for /dev/hdc2 appended to /etc/fstab

...modified /etc/fstab.

mount: /programs0 not mounted already, or bad option
mount: /programs1 not mounted already, or bad option
Old /etc/preinit.d entries found! Moving to /programs0/preinit.d

Now why do we see the mount errors here? mkprgpt has figured out that old /etc/preinit.d scripts were present, and therefore calls rwp before moving them, and this is the call that appears to fail. But later on, we see that /programs0 definately has preinit.d in it - suggesting that it didn't fail. Multiple rwp's should be fine.
But both rop and rom are re-mount scripts - they assume that the paritions were mounted somehow first. Ahhhhhh....they weren't mounted first - the first mount commands failed didn't they. (This is one of those hard to test without destroying you /dev/hda2 parition bugs).
Ironically, what has happened is near exactly what you were asking for. Everything has been done except for the creation/moving of preinit scripts. The /programs0/preinit.d entry that you see is actually on the root drive under /programs0, not on /dev/hda2. Remember that mountpoints in unix are just directories? Well if you create a directory in an unmounted mountpoint like we just did.

empeg:/# ro
empeg:/# rom
empeg:/# rop
mount: /programs0 not mounted already, or bad option
mount: /programs1 not mounted already, or bad option


Same deal as before rop is trying to remount unmounted directories.

Ok. So at this point:
paritions are formatted.
fstab is correct.
rwp and rop are there.
You have /programs0/preinit.d scripts living in the root partition, not /dev/hda2

Ok......this will work.
rw
cd /programs0
mv preinit.d /etc/
ro
./mkprgpt

I've just updated the script so that other people wont see this... (you don't need to upgrade in this situation though)


Edited by genixia (15/10/2002 07:34)
_________________________
Mk2a 60GB Blue. Serial 030102962 sig.mp3: File Format not Valid.

Top
Page 1 of 3 1 2 3 >