You are not logged in.

#1 2016-03-21 11:38:40

archibald33
Member
Registered: 2016-03-21
Posts: 3

grow live rootfs ?

Hello, I tried the wiki but cowspace and airootfs doesn't really return much and google just searches for whatever it thinks I ought to be searching for instead, mainly installation issues, so after hours of trying, I'm here for a hint or a solution. This is my first post here, but I'm not a newby, I just lost my old account.  I'm trying to run a live usb and keep it live because I have hard disk issues at the moment. But I'm running out of space because my root fs is only 256 MB, despite having 4GB RAM on board. I read something somewhere that make me think I have a chance of fixing this by booting with the copy2ram option which could start my system with more space, but would also load the 1.7 GB image into memory. I've yet to make the experiment, and it's still not ideal.  I remember LVM being flexible and maybe just creating and mounting some tmpfs could do the trick, but I'm afraid my skills are rusty atm. Anyone ?

df -h
Filesystem      Size  Used Avail Use% Mounted on
dev             1.9G     0  1.9G   0% /dev
run             1.9G   46M  1.9G   3% /run
/dev/sdc1       1.8G  1.8G     0 100% /run/archiso/bootmnt
cowspace        256M  225M   32M  88% /run/archiso/cowspace
/dev/loop0      1.7G  1.7G     0 100% /run/archiso/sfs/airootfs
airootfs        256M  225M   32M  88% /
tmpfs           1.9G   48M  1.9G   3% /dev/shm
tmpfs           1.9G     0  1.9G   0% /sys/fs/cgroup
tmpfs           1.9G   13M  1.9G   1% /tmp
tmpfs           1.9G  1.1M  1.9G   1% /etc/pacman.d/gnupg
tmpfs           390M   36K  389M   1% /run/user/1000 

Offline

#2 2016-04-19 12:48:44

archibald33
Member
Registered: 2016-03-21
Posts: 3

Re: grow live rootfs ?

After a month of nobody answering here, I accidentally noticed something at boot allowing me to google differently. It turns out there is some file somewhere on my live boot stick, I bet somewhere in-editably archived within an image, namely the, archiso / initcpio / hooks / archiso file, that contains a line like:

run_hook() {
108    [[ -z "${arch}" ]] && arch="$(uname -m)"
109    [[ -z "${copytoram_size}" ]] && copytoram_size="75%"
110    [[ -z "${archisobasedir}" ]] && archisobasedir="arch"
111    [[ -z "${dm_snap_prefix}" ]] && dm_snap_prefix="arch"
112    [[ -z "${archisodevice}" ]] && archisodevice="/dev/disk/by-label/${archisolabel}"
113    [[ -z "${archisoflags}" ]] && archisoflags="defaults"
114    [[ -z "${cow_spacesize}" ]] && cow_spacesize="256M"        <<<<<<<<<<<<<<<<<<<<<<<<<<<<

instead of something like what i found on atergos' site:

run_hook() {
    [[ -z "${arch}" ]] && arch="$(uname -m)"
    [[ -z "${cowspace_size}" ]] && cowspace_size="75%"
    [[ -z "${copytoram_size}" ]] && copytoram_size="75%"
    [[ -z "${archisobasedir}" ]] && archisobasedir="arch"
    [[ -z "${dm_snap_prefix}" ]] && dm_snap_prefix="arch"
    [[ -z "${archisodevice}" ]] && archisodevice="/dev/disk/by-label/${archisolabel}"
    if [[ -z "${cowfile_size}" ]]; then
        cowfile_size="100"

I also found this: https://bbs.archlinux.org/viewtopic.php?id=210662 where a poor guy ends up creating it's own base arch linux iso, and runs into the same wall, and is being told that there's nothing left to be done, as a live media's partitions can't be editet, instead of being helped to create a proper image, by pointing out that he only needs to edit this file, I suppose, before he makes that iso, and try again.

This leads me to believe that 256M is an upstream default and the guys from antergos had to fix this. Which is simply bad policy from archlinux. I had several freezes and lost data many times, because I'm forced to use a live system and it runs out of space just while browsing, and I happen to be an arch fan and run constantly into trouble because someone thinks 256M is a good default. Not only that, but nobody seems to care to help either me or this other guy.

Meanwhile although I found the file on my stick, within an .xz named archiso.img... I'm unable to edit it, cause somehow the whole partition is write protected although the permissions tab shows I ought to have permission.

Does anyone know how I gain access please ?

Offline

#3 2016-04-19 13:15:48

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: grow live rootfs ?

archibald33 wrote:

Hello, I tried the wiki but cowspace and airootfs doesn't really return much

I find this hard to believe.  If you search the wiki for cowspace you get exactly one result and it is exactly what you are looking for.

archibald33 wrote:

I also found this: https://bbs.archlinux.org/viewtopic.php?id=210662 where a poor guy ... is being told that there's nothing left to be done, as a live media's partitions can't be editet

I don't know why you think he is a "poor guy" as his question was quickly answered with a good solution.  But you are correct that an iso is read only once it is created.

archibald33 wrote:

This leads me to believe that 256M is an upstream default and the guys from antergos had to fix this. Which is simply bad policy from archlinux.

Then go use Antergos.  Please.  There is no reason for the iso to be bigger than it's contents.  The problem here is not "bad policy" from arch devs, but rather the combination of your ignorance and arrogance: you are doing this completely wrong.  If you want a persistent usb install, follow the wiki page for that.  If you want to create an iso of your own with different content, follow the wiki page for that.  If you want to bitch and moan and blame others for your own mistakes ... sorry, there's no wiki page for that.

archibald33 wrote:

... cause somehow the whole partition is write protected

Yes, it's an iso.

Mod note: not a system administration issue.  Not sure if there's an issue at all really.  Moved to N.C. for now.

EDIT: in case you have a problem with my tone, note that it is merely a toned-down reflection of your own.  I also find it odd that you "lost" your old account.  Are you sure it wasn't removed from the forum for good cause?


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#4 2016-04-19 19:40:19

archibald33
Member
Registered: 2016-03-21
Posts: 3

Re: grow live rootfs ?

Well, first of all, thank you very much for pointing at a solution. You saved me time and the trouble to move to another distro.

I have no issues with your tone. It was to be expected and since there is no non-verbal communication coming with it, you are welcome to read it however you feel inspired to do so. Bitchy or calm, it's all your choice while reading the same. But since I complain, it is only natural to not consider that the person writing might be actually just cool and outspoken, despite complaining objectively. Your very last question where you ask yourself if I wasn't maybe just banned only underlines the fact that you are having a ride on a train of thought that is sliding way too willingly in labeling-for-no-real-reason-land. The reason I'm here is that I couldn't find a solution and not because I feel like ranting. Pointing out flaws are part of solving problems and not a problem.

The topic I linked to isn't solved. The guy is being dismissed with a "A live system is something else, is not like a normal installation. It is read-only and can't be changed." Which according to what I just read is false. All the guy needs to do is press TAB at boot and add cow_spacesize=3 GB and would be able to install everything he mentioned and is unable at the moment. He was saying: "The reason I want to use all diskspace or at least much more than the current size, is that 256M is too small to install extra packages like Xorg, Openbox,.." again, he wrote: "or at least much more than the current size". He was open to alternatives, and was under the false impression that growing the partition on his sd card would also give him equivalently bigger room after boot.

Nobody seemed to care to mention to him that he could have more than the 256Mbs available without changing a thing on the card and that trying to change the "live system" -'s partition, is a false approach, and he really doesn't have to install arch if he is not yet willing to get the job done.

I also find it very intuitive - irony intented - to have cowspace mentioned buried between hundreds of lines of text revolving around pacman, yet we don't have a page about cowspace itself. Surely, I'm the one on the wrong foot here.  Not only that but on top of it all: "This section is being considered for removal." Then again, I might have had stumbled upon that paragraph, read it, and not understood at that time, what to do with it.

I also don't think that the wording is fortunate: "you can override the allotment by setting the cow_spacesize= kernel option for the ISO manually, ". So we're supposed to be "setting" a kernel option that is non existent manually to existence. Does that make sense to anyone ? If you ask me, one sets something to a certain value, and a kernel option isn't a value. Maybe inserting or defining or even setting up would do. Or something like "You can override this allotment by using the cow_spacesize= kernel option together with your desired value by manually editing a boot entry"

I wouldn't even need to search a flawed wiki if it wasn't for the flawed live media, which instead of using 75% of that low-end system's memory and also let high-end systems take advantage of their potential seamlessly, is crippling things for the later. It is  people on low end machines who have it very much more necessary to be manually setting a value to this then the others.

Saying that the live medium isn't intended to be used that way is not an excuse, considering that meanwhile you get a question every week on this. (the other guy posted a week later.).

Offline

#5 2016-04-20 00:00:56

djgera
Developer
From: Buenos Aires - Argentina
Registered: 2008-12-24
Posts: 723
Website

Re: grow live rootfs ?

too much to read, just answering the tittle, all you need to do is...

mount / -o remount,size=8E

So you have a 9223372036854775808 bytes wink

Offline

#6 2016-05-20 03:43:02

msifland
Member
Registered: 2016-03-01
Posts: 12

Re: grow live rootfs ?

djgera wrote:

too much to read, just answering the tittle, all you need to do is...

mount / -o remount,size=8E

So you have a 9223372036854775808 bytes wink

To expand on this you could create a script to run on every boot of your live usb.
I did this:
Create script called expand_cowsize.sh
and put this in it

#!/bin/bash

echo 'password' | sudo -S mount -o remount,size=4G /run/archiso/cowspace

Put this file in your live environment folder/airootfs/etc/profile.d/expand_cowsize.sh
You will have to create the profile.d folder
Change file permissions to executable

Now rebuild your archiso and it will put this in the live system and every time it boots it will run this script.

If you're booting as root then you may not need the first part of the script "echo 'password' | sudo -S"
I create a user profile in my archiso build and boot to that so I need the sudo part.

Hope this helps. It works for me.

Offline

#7 2016-05-21 16:45:49

djgera
Developer
From: Buenos Aires - Argentina
Registered: 2008-12-24
Posts: 723
Website

Re: grow live rootfs ?

The purpose of 256M instead on default percent of RAM has one purpose: Stop users from installing Arch Linux in the volatile storage at early stage!. For example users that do not follow/read proper documented instructions. There are lots of example in this forum.
Since for installation purposes there is no need such "big" 256M free space, is just sufficient. Also for users that know what are doing, they read the documentation, will know how easy is change this simply setting to grow the rootfs.

Some related ticket here: FS#45618

Offline

#8 2017-12-30 06:48:09

c_explosive
Member
Registered: 2014-05-27
Posts: 4

Re: grow live rootfs ?

If you want use arch-linux live with more root space (cow space), you can press e in archlinux's live menu and edit the boot options adding cow_spacesize=4G, where "4G" is the size (4GB) of the root when live device will booting.

Offline

#9 2017-12-30 07:49:24

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,079

Re: grow live rootfs ?

You really think they're still looking for an answer a year and a half later? There's a reason that necro-bumping is against the rules.
https://wiki.archlinux.org/index.php/Co … bumping.22

Offline

#10 2017-12-30 08:48:09

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: grow live rootfs ?

Closing


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB