Results 1 to 6 of 6

Thread: swapon pre-boot problem

  1. #1

    swapon pre-boot problem

    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?

  2. #2
    Join Date
    Apr 2004
    Location
    Netherlands
    Posts
    1,308
    Search this forum first please, your problem has been detected and solved before.

    http://wl500g.info/showthread.php?t=...ount+post-boot

  3. #3

    now booting from IDE and swap is on

    Quote Originally Posted by Styno
    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=...ount+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.

  4. #4
    Join Date
    Apr 2004
    Location
    Netherlands
    Posts
    1,308
    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.

  5. #5
    Quote Originally Posted by Styno
    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.
    Quote Originally Posted by Styno
    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 !!!

  6. #6
    Join Date
    Dec 2003
    Location
    Russian Federation
    Posts
    8,356
    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.

Similar Threads

  1. Howto run post-boot when ftp is off
    By Jethro in forum WL-500g Q&A
    Replies: 6
    Last Post: 27-08-2005, 22:54
  2. Replies: 9
    Last Post: 18-02-2005, 20:42
  3. WL-500g as boot server
    By monnier in forum WL-500g Q&A
    Replies: 1
    Last Post: 05-08-2004, 01:15
  4. Is it possible to boot from USB disk?
    By erik_bies in forum WL-500g Custom Development
    Replies: 2
    Last Post: 22-03-2004, 19:21

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •