Unoffical empeg BBS

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

Topic Options
#106758 - 23/07/2002 13:00 puca puca puca puca
tarkie
journeyman

Registered: 28/12/2001
Posts: 99
Ok, ive tried to install empacman, but i've failed, so before I dig much deeper has anyone else seen this issue?

I've installed preinitv3

The binaries have been put in thus:

empeg:/sbin# ls -l init
-rwxr-xr-x 1 0 0 232092 Feb 8 18:45 init
empeg:/sbin# ls -l hijack
-rwxr-xr-x 1 0 0 231380 Jul 21 22:40 hijack

The preinit.d directory has been created :

empeg:/etc# ls -ld preinit.d
drwxr-xr-x 2 0 0 1024 Jul 21 23:04 preinit.d

I have created the M10empacman script:

empeg:/etc# ls -ld preinit.d
drwxr-xr-x 2 0 0 1024 Jul 21 23:04 preinit.d

and it contains:

empeg:/etc/preinit.d# cat M10empacman
#!/bin/bash
/programs0/empacman/empacman

Now i believe that when preinit runs, that /programs0 isnt mounted, for whatever reason.

Now, I've added /programs0 (and /programs1) to the /etc/fstab:

empeg:/programs0# cat /etc/fstab
#
# /etc/fstab
#
# <device> <mountpoint> <filesystemtype> <options> <dump> <fsckorder>
/dev/hda5 / ext2 defaults,ro 1 1
/dev/hda4 /drive0 ext2 defaults,ro 1 1
/dev/hda2 /programs0 ext2 defaults,ro 1 1
/dev/hdc2 /programs1 ext2 defaults,ro 1 1
none /proc proc defaults

But when I reboot the empeg, I get:

hijack: removed menu entry: "Hard Disk Detection"
khttpd: listening on port 80
kftpd: listening on port 21
player.cpp : 385:empeg-car 2.00-beta11 2002/02/08.
/etc/preinit.d/M10empacman: /programs0/empacman/empacman: No such file or direct
ory
Prolux 4 empeg car - 2.1434 Feb 7 2002

So, at this point I am presuming that HiJack refuses to add a non-existant (because its not mounted) script to the menu's and therefore nothing happens.

Anyone any ideas?

_________________________
M2a/Smoke/60gb/Tuner!! Thanks Joe M2a/Blue10gb Thanks Ian!

Top
#106759 - 23/07/2002 13:14 Re: puca puca puca puca [Re: tarkie]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
I think you need to add a command to explicitly mount the filesystem that /programs0 is pointing to. If I remember right, the "M" scripts only guarantee that the *music* partition (/dev/hd[ab]4) is up, not that any other user partitions (/dev/hda2) are mounted.

Something along the lines of changing your M10pacman script to:

#!/bin/bash
mount -n -o remount,ro /programs0
/programs0/empacman/empacman

.

Try that and see if it works.
_________________________
- Tony C
my empeg stuff

Top
#106760 - 23/07/2002 13:45 Re: puca puca puca puca [Re: tonyc]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
That's correct. In addition, modifying the fstab doesn't really do anything, as the player is the only stock process that ever mounts filesystems (besides the kernel mounting the root filesystem on boot), and it doesn't look at that file; it just has some hard-coded partitions that it mounts, which happen to match the fstab's entries. If you want another filesystem mounted, you have to explicitly use the mount program somewhere.
_________________________
Bitt Faulk

Top
#106761 - 23/07/2002 14:18 Re: puca puca puca puca [Re: tonyc]
tarkie
journeyman

Registered: 28/12/2001
Posts: 99
That fixed it!

Ta!
_________________________
M2a/Smoke/60gb/Tuner!! Thanks Joe M2a/Blue10gb Thanks Ian!

Top
#106762 - 23/07/2002 14:26 Re: puca puca puca puca [Re: tonyc]
canuckInOR
carpal tunnel

Registered: 13/02/2002
Posts: 3212
Loc: Portland, OR
Something along the lines of changing your M10pacman script to:

#!/bin/bash
mount -n -o remount,ro /programs0
/programs0/empacman/empacman


A better solution would be to have a script in preinit.d called N01mountdrives:

#!/bin/bash
echo "Mounting /programs0..."
mount -n /programs0


The "N", instead of an "M" causes that script to be run after / is mounted on boot, but before anything else is done. Or something like that. I added the echo line there so you can see exactly where in the boot sequence it runs.

With the introduction of empacman, this topic is probably deserving of an FAQ entry now...

Top
#106763 - 23/07/2002 14:30 Re: puca puca puca puca [Re: canuckInOR]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
Unfortunately, I've been too lazy to actually sort the execution of the scripts based on the numbers (which is what I intended to do). I guess now that there are a good number of things that might want to be executed this way, I should get around to it.

For now, they get executed in the order that they were created, so, for now, just make sure you create your mount script before you create your empacman script and it'll work right. Just make sure to include the numbers, too, so that it'll continue to work right when I fix it.
_________________________
Bitt Faulk

Top
#106764 - 23/07/2002 19:09 Re: puca puca puca puca [Re: wfaulk]
genixia
Carpal Tunnel

Registered: 08/02/2002
Posts: 3411
It also appears as if they scripts executed if they have 000 permissions...although I can't understand why. Can you make it so that this doesn't happen?
_________________________
Mk2a 60GB Blue. Serial 030102962 sig.mp3: File Format not Valid.

Top
#106765 - 23/07/2002 19:38 Re: puca puca puca puca [Re: genixia]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
Sure. I'll do that in the next version, too. In the mean time, I usually just rename them to start with a lowercase letter.

Edit: Oh, and they still get executed because I was initially having intermittent problems with executing files directly (it may have something to do with them happening so early in the startup process), so I changed preinit before the initial release to run the scripts as arguments to /bin/sh, which is also why they must be scripts. Didn't think to check for executability, as Solaris (which is what I based this on) doesn't check, either. But it makes sense, and I can add it.


Edited by wfaulk (23/07/2002 19:45)
_________________________
Bitt Faulk

Top
#106766 - 24/07/2002 07:25 Re: puca puca puca puca [Re: tarkie]
BREmpeg
new poster

Registered: 06/05/2002
Posts: 20
Can you write down your entire M10empacman script here so I can try it? I'm receiving the "No such File or directory" message and can't make it work.

Thanks in advance

Top
#106767 - 24/07/2002 11:56 Re: puca puca puca puca [Re: BREmpeg]
AndrewT
old hand

Registered: 16/02/2002
Posts: 867
Loc: Oxford, UK
My M10empacman looks like:
#!/bin/sh
/drive0/empacman

IIRC, I had that exact same problem due to CR+LF (0x0D+0x0A) pairs in my M10empacman script.
Assuming you created the script on a Windows PC, one simple way to check is to open a DOS window on your PC where you have a copy of the script and issue the following commands:

debug M10empacman<ret>
d<ret>

You should get something like this if everything is ok:
-d
XXXX:0100 23 21 2F 62 69 6E 2F 73-68 0A 2F 64 72 69 76 65 #!/bin/sh./drive
XXXX:0110 30 2F 65 6D 70 61 63 6D-61 6E 0A xx xx xx xx xx 0/empacman.


(ignore the X's)

If you do have this problem you can use a text editor like Textpad and save the file as type 'Unix'.

Top
#106768 - 24/07/2002 12:27 Re: puca puca puca puca [Re: AndrewT]
BREmpeg
new poster

Registered: 06/05/2002
Posts: 20
It worked! Thanks a LOT!!!

Top