How can I change my Arch ISO's ramdisk to get it to use the designated swap space?
ArchThis Forum is for the discussion of Arch Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How can I change my Arch ISO's ramdisk to get it to use the designated swap space?
Okay, so I managed to get networking on my Arch Linux live setup by tethering it to my Android tablet. Once it was tethered, I went online and started installing some packages. I noticed that it quickly ran out of space on the ramdisk used by the live distro to emulate a hard drive (I can only guess that this ramdisk is what is referenced by tmpfs, though I haven't been able to verify this either way). When I installed new packages, I kept getting an error saying that a write operation failed because the disk was full. So I connected my external SSD, on which I had set up a Linux Swap partition, and I ran mkswap and swapon on that partition to set it up. However, I found that I continued to have out-of-memory errors, and indeed, when I did a hexdump of the device file for the swap partition, I found it completely empty except for the formatting information in the first 4096 bytes. So it's clear that even though I have a swap space set up, Arch isn't using it for whatever reason. After some digging through the Arch Wiki, I have deduced that this is probably due to the fixed size of the ramdisk, which is limited not by the size of available memory, but by configuration in the software. So I believe what I need to do is somehow expand the ramdisk. The Arch Wiki says that the maximum size for tmpfs is configured in /etc/fstab, but the problem here is that the fstab file is empty in the live distro, so there's no configuration for me to edit. Advice?
A live ISO's for such things are not set up for such things as installing loads of new apps to use in the Live Distro running in RAM. it is more for a look see, or "back door" to get into your system for damage control if needed, or hacking someone else system if possible, and stuff like that. it loses everything. The changes and installed programs when you shut it down.
I'd suggest figuring out and accomplishing installing a full blown Linux Distro onto a USB Stick (pen drive) that can accommodate your needs to install other apps. Because that can be done, with slack, void, and a few others I've tried. or use something like puppy or one from its litter.
I'd be surprised if it was using RAMdisk in this day and age, but I haven't booted an Arch livecd in years. Post the following when you get the "out of memory".
By default tmpfs is half your physical RAM without swap. I believe you can can resize tmpfs to include swap on the fly by using the following command but if you oversize your tmpfs your system will deadlock.
mount -o remount,size=<max size> tmpfs <mount point>
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.