We have upgraded the community system as part of the upgrade a password reset is required for all users before login in.

extend ram (swapon command) dismounts microsd card issue



  • Hi

    i mentioned this in another post, but it was a reply to another OP problem so shouldn't of

    https://wiki.onion.io/Tutorials/Extending-RAM-with-a-swap-file

    as i go through step by step in this tutorial, which is to extend the ram by making a swap file on your USB
    which i am doing it on my microsd instead to free up the usb port, perhaps this is the problem?
    i create the swap file of 256 MIB fine
    But typing in 'swapon' and the directing to the swap.page
    i get -ash: swapon: not found
    and the sd card is no longer accessible via df -h
    to get it visible i have eject and re-insert sd card (some times multiple times)

    microsd has been formatted to ext4

    any suggestions on what i could try?



  • Hi

    i did the exact same process with USB

    USB isn't dismounting however 'swapon' command doesn't seem to work? same as the sd problem
    i was hoping to at least get the swap file to work on USB then i can repeat process with SD

    so focusing on the 'swapon' command issue

    error i am seeing is -ash: swapon: not found

    which is the same error i get if i type in a failed command

    and to be clear i have installed this
    opkg update
    opkg install swap-utils

    is there another package to install perhaps? i wouldn't know how to find it

    or has anyone got any suggestions on trouble shooting initiating swap ?



  • @Shanan-Clark How did you create the swap-file? It works all fine and dandy on mine.

    Something along the lines of this should do:

    opkg update
    opkg install swap-utils block-mount
    dd if=/dev/zero of=/path/to/swap.file bs=1M count=howmanymegabytesyouwant
    mkswap /path/to/swap.file
    swapon /path/to/swap.file
    


  • hi @WereCatf

    i think i had 2 issues and because im inexperienced was hard to identify which

    first issue is (this one resolved) the command swapon was not installed with swap_utlis (following the tutorial)
    and as you said block-mount (which is the solution) had it, but not part of the tutorial or packages accessible without changing a file so i was supper confused and had to google the hell out of it, but i got there thanks to another post

    but i mean logically swapon should be part of swap_utils right? i mean that would make sense
    but as i said this is fixed as i followed some advice on how to access okpg that wasn't available as a normal package
    so thanks for that

    secondly dunno my microsd keeps becoming un accessible, i actually think its random and not associated with the command error, however it was still under the temp directory as i wasn't mounting it on startup - maybe that was the issue

    so my next step was now that i can make a USB swap file and now that i can make it automatically mount on boot ( which was actually the tutorial to use USB not SD) i was going to try the whole thing again with SD

    i really appreciate your response, i think because its in such an early stage and im inexperienced i struggle to tell if i am doing somehting incorrect or its broken, so knowing you have it going helps alot



  • @Shanan-Clark said in extend ram (swapon command) dismounts microsd card issue:

    but i mean logically swapon should be part of swap_utils right? i mean that would make sense

    Sure, it would. It's not the Onion-devs who decided to place it in block-mount, though -- the decision is made upstream.

    secondly dunno my microsd keeps becoming un accessible, i actually think its random and not associated with the command error, however it was still under the temp directory as i wasn't mounting it on startup - maybe that was the issue

    Maybe you could try with another card? Perhaps the one you're trying is bad or doesn't sit entirely properly in the slot. Or, perhaps mountd (the application that handles automatic mounting of stuff) is buggy -- have you tried manually mounting it? Something like e.g. mount /dev/mmcblk0p1 /where/you/want/it/mounted -o noatime -t ext4 should work. Personally, I don't like the automount-thingamabob.

    i really appreciate your response, i think because its in such an early stage and im inexperienced i struggle to tell if i am doing somehting incorrect or its broken, so knowing you have it going helps alot

    No worries, mate!



Looks like your connection to Community was lost, please wait while we try to reconnect.