LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Arch
User Name
Password
Arch This Forum is for the discussion of Arch Linux.

Notices


Reply
  Search this Thread
Old 08-26-2018, 10:15 AM   #1
Erentigionation
LQ Newbie
 
Registered: May 2016
Location: Somewhere between order and chaos
Distribution: Ubuntu, Slackware, Arch Linux
Posts: 28

Rep: Reputation: Disabled
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?
 
Old 08-26-2018, 04:16 PM   #2
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: MID-SOUTH USA
Distribution: Slackware 14.2 current / Linux Mint / Debian / Void Linux
Posts: 8,136

Rep: Reputation: 1678Reputation: 1678Reputation: 1678Reputation: 1678Reputation: 1678Reputation: 1678Reputation: 1678Reputation: 1678Reputation: 1678Reputation: 1678Reputation: 1678
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.

Last edited by BW-userx; 08-27-2018 at 06:03 AM.
 
1 members found this post helpful.
Old 08-26-2018, 05:47 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 17,625

Rep: Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777
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
 
Old 08-26-2018, 07:04 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 18,216

Rep: Reputation: 2545Reputation: 2545Reputation: 2545Reputation: 2545Reputation: 2545Reputation: 2545Reputation: 2545Reputation: 2545Reputation: 2545Reputation: 2545Reputation: 2545
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
 
Old 08-27-2018, 01:46 AM   #5
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 11,046
Blog Entries: 7

Rep: Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780
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.
 
  


Reply

Tags
arch linux, live boot, ramdisk, swap, tmpfs


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Arch Anywhere ISO Lets You Install a Fully Custom Arch Linux System in Minutes LXer Syndicated Linux News 0 01-22-2017 11:45 PM
LXer: Extend Swap Space using Swap file in Linux LXer Syndicated Linux News 0 06-18-2015 01:20 PM
how much swap space is needed; how to increase swap space? johnpaulodonnell Linux - Newbie 5 03-23-2007 03:20 AM
possible to change swap space after installation? hari_mj23 Linux - Software 1 06-17-2005 02:10 PM
Change swap space on the fly RajRed Linux - Newbie 2 04-26-2005 04:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Arch

All times are GMT -5. The time now is 06:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration