Results 1 to 2 of 2

Thread: Swap is not mounted

  1. #1

    Swap is not mounted

    hi,
    i have configured this:

    Code:
    mkdir -p /usr/local/sbin/
    touch /usr/local/sbin/post-boot
    touch /usr/local/sbin/post-firewall 
    touch /usr/local/sbin/post-mount
    touch /usr/local/sbin/pre-shutdown
    chmod +x /usr/local/sbin/*
    
    fdisk /dev/discs/disc0/disc //create partitions
    
    mkswap /dev/discs/disc0/part1
    swapon /dev/discs/disc0/part1
    
    mke2fs -j /dev/discs/disc0/part2 
    mke2fs -j /dev/discs/disc0/part3
    
    vi /usr/local/sbin/post-boot
    
    flashfs save && flashfs commit && flashfs enable && reboot
    post-boot:
    Code:
    # test if USB disc has been attached
    # if not - then insert needed modules
    #
    # Die folgenden 4 Rauten entfernen, wenn eine USB-Platte angeschlossen ist. Beim WL-HDD nicht notwendig, da IDE.
    #if [ ! -d /dev/discs ]
    #then
    #insmod scsi_mod && insmod sd_mod && insmod usb-storage && sleep 5s
    #fi
    
    #Wait for /opt to mount
    mount /dev/discs/disc0/part2 /opt
    i=0
    while [ $i -le 30 ]
    do
    if [ -d /opt/etc ]
    then
    break
    fi
    sleep 1
    i=`expr $i + 1`
    done
    
    # Activate swap
    swapon /dev/discs/disc0/part1
    
    # Mount the rest
    mount /dev/discs/disc0/part3 /tmp/harddisk
    
    # Run all active services - active means starts with S
    /opt/etc/init.d/rc.unslung
    Code:
    [admin@WL-HDD root]$ free
                  total         used         free       shared      buffers
      Mem:        13876        11060         2816            0         1364
     Swap:            0            0            0
    Total:        13876        11060         2816
    
    [admin@WL-HDD root]$ df
    Filesystem           1k-blocks      Used Available Use% Mounted on
    /dev/root                 3008      3008         0 100% /
    /dev/discs/disc0/part2    988244     16432    921612   2% /tmp/harddisk
    /dev/discs/disc0/part3  37017900    131228  35006264   0% /tmp/harddisk/part1
    
    [admin@WL-HDD root]$ fdisk -l
    
    Disk /dev/ide/host0/bus0/target0/lun0/disc: 40.0 GB, 40060403712 bytes
    255 heads, 63 sectors/track, 4870 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    
                                    Device Boot    Start       End    Blocks   Id  System
    /dev/ide/host0/bus0/target0/lun0/part1               1          63      506016   82  Linux swap
    /dev/ide/host0/bus0/target0/lun0/part2              64         188     1004062+  83  Linux
    /dev/ide/host0/bus0/target0/lun0/part3             189        4870    37608165   83  Linux
    swap is not mounted and part2 is not mounted in /opt

  2. #2
    Join Date
    Feb 2007
    Location
    Moscow, Russia
    Posts
    3,805
    as to "part2 is not mounted in /opt":
    you may try to insert
    PHP Code:
    sleep 15s 
    before
    PHP Code:
    mount /dev/discs/disc0/part2 /opt 
    Alternatively you may try to use:
    PHP Code:
    mount -o bind /tmp/harddisk /opt 
    If it helps you may try to decrease the above mentioned delay.

Similar Threads

  1. Swap change priority
    By Rejan in forum WL-700g Firmware Discussion
    Replies: 0
    Last Post: 31-12-2007, 15:48
  2. WL-HDD keine Swap aktiv :(
    By Albert2002 in forum German Discussion - Deutsch (DE)
    Replies: 10
    Last Post: 14-09-2007, 13:24
  3. Replies: 2
    Last Post: 03-08-2007, 23:49
  4. Swap partition causing USB instability?
    By Buld in forum WL-500g Q&A
    Replies: 4
    Last Post: 16-11-2006, 18:52

Posting Permissions

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