LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Arch (https://www.linuxquestions.org/questions/arch-29/)
-   -   How can I change my Arch ISO's ramdisk to get it to use the designated swap space? (https://www.linuxquestions.org/questions/arch-29/how-can-i-change-my-arch-isos-ramdisk-to-get-it-to-use-the-designated-swap-space-4175637165/)

Erentigionation 08-26-2018 10:15 AM

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?

BW-userx 08-26-2018 04:16 PM

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.

syg00 08-26-2018 05:47 PM

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".
Code:

df -hT
swapon -s
free -m


michaelk 08-26-2018 07:04 PM

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>

/https://www.kernel.org/doc/Documentation/filesystems/tmpfs.txt

ondoho 08-27-2018 01:46 AM

different approach:

before you start the upgrades,
  1. mount the external drive
  2. edit /etc/pacman.conf to use paths on the external drive
then try again.

it just might be all that was needed.


All times are GMT -5. The time now is 10:18 AM.