You are not logged in.

#1 2021-01-21 23:58:50

Bendilock
Member
Registered: 2021-01-21
Posts: 10

From where does Arch run and store files on first boot?

Hi everyone!

This is my first post. I've only installed and used Arch a few times, and I come from a Ubuntu background, so bear with me.

As the topic reads: I'm wondering how Arch runs and stores files after booting for the first time from either a USB-drive, CD-drive or some virtualization software like vmWare.

Is Arch completely loaded into RAM from the ISO and then run from there? If I save a file, is that file stored into RAM, then? If so, does increasing the amount of available RAM increase the available space for saving files/installing packages or is that a fixed amount?

I'm aware it's common to be able to try linux distros from a USB drive before installing, and my guess is that Arch first time boot works the same? So it might not be an Arch specific question, but it sure is related to Arch!

Thanks smile

//Bendilock

Offline

#2 2021-01-22 00:28:44

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

Re: From where does Arch run and store files on first boot?

Bendilock wrote:

I'm wondering how Arch runs and stores files after booting for the first time from either a USB-drive, CD-drive or some virtualization software like vmWare.

If you are talking about the installation iso, then nothing is stored except in RAM.  An iso filesystem is read only.  The RAM available is just whatever is available on the machine in use.


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

Offline

#3 2021-01-22 00:50:40

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: From where does Arch run and store files on first boot?

Ubuntu has a special program (part of their "casper" package) that looks for read/write partitions with magic labels. If it finds those partitions, it mounts them on top of the ISO, to the /home directory. This is "persistence". I believe you need to set it up while customizing the USB media... obviously it does not work with CDs. wink

It doesn't affect anything other than /home, as far as I know.

Arch doesn't implement anything like this, but you can probably customize a USB, and mount your own partition however you like. Or you could just use a second USB drive for persistent files.

Given Arch has no GUI on the installation media, nor any sample programs (just the programs we expect people might need while installing Arch) there isn't much call for remembering program configs anyway.

Last edited by eschwartz (2021-01-22 00:54:05)


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#4 2021-01-22 00:50:44

luser
Member
Registered: 2016-08-27
Posts: 115

Re: From where does Arch run and store files on first boot?

It's self-evident that you would need some kind of writeable hardware to be able to save a file, and considering that you are the one who creates the arch installation, it depends on the hardware you choose. USB will be writeable, and CD's or DVD's generally will not. However, you could use a cd and after it loads, mount a USB drive, and write to that, but that isn't at all how one is likely to use Arch. There are no demo versions of Arch that you can run with a graphical interface, which is what you seem to believe. The download is a command line operated interface for installing Arch on a piece of hardware, which can be a pc's hard drive or a USB thumb drive, or a virtual hardware VM. You choose and install the graphical interface components then, and you will need to finish the install and boot to the new system to use the graphical interface.

You can probably find something more like what you're looking for by investigating offshoots of Arch, Manjaro for instance. I saw a thumb drive with Manjaro already installed on Amazon.

If you really want to stick with Arch, RTFW (Read The Fine Wiki) on Installation, and expect to take some time. The upside is that you can get or assemble exactly the desktop environment you want, instead of being forced to accept someone else's choices.

Last edited by luser (2021-01-22 01:16:46)


luser: an epithet applied by Windows users to linux users

Offline

#5 2021-01-22 01:02:38

Bendilock
Member
Registered: 2021-01-21
Posts: 10

Re: From where does Arch run and store files on first boot?

Trilby wrote:
Bendilock wrote:

I'm wondering how Arch runs and stores files after booting for the first time from either a USB-drive, CD-drive or some virtualization software like vmWare.

If you are talking about the installation iso, then nothing is stored except in RAM.  An iso filesystem is read only.  The RAM available is just whatever is available on the machine in use.

Thanks for your reply.

Yes, I'm talking about the installation ISO on medium like a USB.

I'm just curious how it works. Is the ISO read from the USB and completely loaded into RAM and then read from there? Then I should be able to pull the USB after boot. I did so on a virtual machine and the machine kept running, but I don't trust the result completely. The VM might have locked the virtual CD-drive because it was in use.

Or is the ISO read from the USB as you go along? So if I boot up arch from an installation medium and then... cat /etc/fstab or something, it's a read operation off of the USB drive?

And if I save a file, it's written into RAM (As you said, the iso filesystem is read only). That would have to be a disk/partition made from RAM, so that my file doesn't disappear when RAM is freed up by the system for use somewhere else?

Sorry if the questions aren't specific to Arch.

//Bendilock

Offline

#6 2021-01-22 01:13:21

Bendilock
Member
Registered: 2021-01-21
Posts: 10

Re: From where does Arch run and store files on first boot?

eschwartz wrote:

Arch doesn't implement anything like this, but you can probably customize a USB, and mount your own partition however you like. Or you could just use a second USB drive for persistent files.

Right, that makes sense. Thanks for the input. I started thinking about this after I booted up arch and started creating a Discord Bot and was very happy about how fast I could get started, in comparison with how long it takes to install Ubuntu server. That is, until I rebooted.

EDIT: I know files don't persist on a drive if I don't actually you know.. save the files on the drive. I just wasn't thinking of it smile

Last edited by Bendilock (2021-01-22 01:17:16)

Offline

#7 2021-01-22 01:16:35

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: From where does Arch run and store files on first boot?

Actually scratch that, I'm wrong. We *do* have persistence support in archiso, the optional kernel boot parameters for enabling it are described at https://gitlab.archlinux.org/archlinux/ … bootparams

Also documented here: the copytoram kernel parameter which is used for, well, copying the entire live OS to RAM so you can then pull out the USB safely while still running the machine.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#8 2021-01-22 01:25:56

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

Re: From where does Arch run and store files on first boot?

But also note that unless you have a very limited internet connection a base install should take minutes, then you could just run from an actual persistent install without jumping through hoops on every boot.  Even with a poor internet connection, it'd still only be a few minutes of interaction, but you might need to go for coffee during the downloading stage of the pacstrap command.


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

Offline

Board footer

Powered by FluxBB