PDA

Bekijk de volledige versie : Trouble after preparing the USB drive and post-boot



Tellus1
22-10-2007, 21:26
I've gone through all sorts of instructions around here from preparing USB drive to installing some stuff. However, I've encountered the following problems:
1) The directory /usr/local/sbin could not be found. There is a link to /tmp/local under /usr, but seems like it had trouble going to sbin directly.
2) So I put the "post-boot" file directly in /tmp/local/sbin, and made it executable. After issuing flashfs save && flashfs commit && flashfs enable && reboot, the post-boot file wasn't executed. How come?
3) I manually executed the file, everything was fine but /tmp/disk directory (where part3 was supposed to be mounted) wasn't there. How come it was "forgotten"?
4) Also, aliases weren't working afterwards (I only have 'mc' so far), and the file-type colors in shell are gone. I guess there's something I need to change in the /etc/profile?
5) Is there a guide as to which directories are physically where (in which part of the router), and as such, which can be written, used for various things, and which are not to be used?
6) Is there a limit as to how many commands/changes you can issue before issuing save/commit/enable/reboot?
7) About nload: I have a 20/20 Mbit connection, so I figured the correct syntax is
nload -t 200 -s 7 -i 20480 -o 20480 -u H eth0
But both parts of the screen were showing the same values (eth1 was nothing at all). What am I missing here?

Tellus1
23-10-2007, 19:29
OK, I've solved most of the things, except these two:

/usr/local/sbin/post-boot does not execute after reboot. It's "-rwxr-xr-x".
I have to manually execute it, and in the end I re-discover that the directory "disk" doesn't exist under "/tmp" anymore. Does it not save after all the proper actions? Should I enter "mkdir /tmp/disk" in the post-boot file, so it is created every time?

al37919
23-10-2007, 20:26
3) try to create a file with name :
/usr/local/.files
containing the following line:
/tmp/disk
It works at least for files, I'm not sure abot dirs.

4) put aliases in /usr/local/root/.profile

5) Only the content of /usr/local (= /tmp/local) and the files mentioned in /usr/local/.files are saved by flashfs save && ...

The max size of this part is 64K

6) any

Tellus1
24-10-2007, 19:53
Thanks for your help.

@5: That basically makes everything clear to me now. :)
@4: The .profile is working fine now at all times.
@3: I've tried it, and it works. What it does is save the entire mentioned directory including its contents and subdirs. Meaning if I had anything there it would be saved into flash, if there was enough space at all.
So instead I added this line to my post-boot file:
mkdir /tmp/storage && sleep 5s
before mount /dev/discs/disc0/part3 /tmp/storage takes place. Everything fine now.

Still the mystery remains as to why /usr/local/sbin/post-boot does not execute after reboot...

al37919
24-10-2007, 20:14
How do you decide that it is not executed at all?

May be some command inside makes it crash or something is executed before disk is initialized etc...

I suggest to test something like this as p-b file:


#!/bin/sh

logger "p-b started"

or may be even better /usr/bin/logger "p-b started"

After booting check:


cat /tmp/syslog.log | grep "p-b"

to see if this line was executed

Tellus1
25-10-2007, 18:30
How do you decide that it is not executed at all?


Easily. The USB modules are not loaded, /tmp/storage is not created, no disks are mounted, swap is not activated. That's about everything my post-boot does.

Tellus1
25-10-2007, 18:36
Solved!
How could I've forgotten... there was no line "#!/bin/sh" in the first line. :o
(Regardless, I was able to run it from the shell, manually.)