PDA

Bekijk de volledige versie : swapon pre-boot problem



elpaso
07-03-2005, 10:58
Hello, I wish to thank all of you for this wonderful firmware,

I'm trying to set up a server on my WL-HDD but I was'nt able to activete swap automatically, here is my setup, immediately after reboot:

[admin@wl root]$ ls -l /usr/local/sbin/
-rwxr-xr-x 1 admin root 19 Mar 7 10:51 post-boot
-rwxr-xr-x 1 admin root 62 Mar 7 11:34 pre-boot

[admin@wl root]$ cat /usr/local/sbin/pre-boot
#!/bin/sh
/sbin/swapon /dev/ide/host0/bus0/target0/lun0/part1

[admin@wl root]$ free
total used free shared buffers
Mem: 14148 10196 3952 0 1224
Swap: 0 0 0
Total: 14148 10196 3952

[admin@wl root]$ /usr/local/sbin/pre-boot

[admin@wl root]$ free
total used free shared buffers
Mem: 14148 10252 3896 0 1224
Swap: 64220 0 64220
Total: 78368 10252 68116

Now it's on!!

It seems like pre-boot is not executed, or maybe something is wrong in it.

Should I move the swapon command in post-boot?

Styno
07-03-2005, 11:47
Search this forum first please, your problem has been detected and solved before.

http://wl500g.info/showthread.php?t=1343&highlight=mount+post-boot

elpaso
07-03-2005, 12:20
Search this forum first please, your problem has been detected and solved before.

Thanks for your quick reply,
I've been searching for swap* and pre-boot but I did'nt find a solution :(

http://wl500g.info/showthread.php?t=1343&highlight=mount+post-boot

You mean the watchdog issue?

This does'nt seem the same problem, I was trying to activate a swap, not to mount a partition, is it the same?

BTW: I'm now mounting root filesystem from ide, and swap is on.

Styno
07-03-2005, 12:41
For the WL-500g with current firmwares the harddisk is detected AFTER the boot process has been completed. Because this is behavious is caused by the firmware and the sources for WL-HDD and WL-500g are identical (at least for the custom firmwares from Oleg) this is also the case for the WL-HDD.

Because mounting an partition is practically the same as enabling swap this can only be done AFTER the harddisk is detected.

But this all depends on what firmware you are using.
Asus WL-HDD: I don't know
JOCKEY2000: I don't know
Oleg: newer firmwares behave as described above.

elpaso
07-03-2005, 13:19
For the WL-500g with current firmwares the harddisk is detected AFTER the boot process has been completed. Because this is behavious is caused by the firmware and the sources for WL-HDD and WL-500g are identical (at least for the custom firmwares from Oleg) this is also the case for the WL-HDD.

Thanks, now it's clear to me.


Because mounting an partition is practically the same as enabling swap this can only be done AFTER the harddisk is detected.

But this all depends on what firmware you are using.
Asus WL-HDD: I don't know
JOCKEY2000: I don't know
Oleg: newer firmwares behave as described above.
I'm using the latest from oleg with WL-HDD.

Now that I'm booting from IDE, is it possibile that swapon works since IDE is obviously already detected?

Thanks for helping.

BTW: this small silver box is really GREAT !!!

Oleg
08-03-2005, 19:53
The problem is that pre-boot is executed before ide modules are get loaded, so if you want to activate swap at this point you will need to insmod ide stuff.