You are not logged in.

#1 2017-05-07 11:14:34

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Tiny base install

Am installing Arch on a small usb drive, simply a base install. Is there a way to either boot without initramfs or build root filesystem into initramfs?


Mr Green

Offline

#2 2017-05-07 11:27:54

tom.ty89
Member
Registered: 2012-11-15
Posts: 897

Re: Tiny base install

To boot without initramfs, you need to at least have the kernel rebuilt with the drivers required for mounting the real root built in (ehci, xhci, usb-storage, sd and filesystem driver).

Not sure if the latter makes sense.

Offline

#3 2017-05-07 11:31:56

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Re: Tiny base install

No it makes sense, that is what initramfs basically does, thinking if I can add root filesystem to initramfs...


Mr Green

Offline

#4 2017-05-07 11:55:19

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

Re: Tiny base install

How tiny is tiny?  Do changes need to persist across reboots?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#5 2017-05-07 11:57:36

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Re: Tiny base install

Filesystem     Type      Size  Used Avail Use% Mounted on
/dev/sdb1      ext4      3.7G  740M  2.7G  22% /
udev           devtmpfs  3.0G     0  3.0G   0% /dev
shm            tmpfs     3.0G     0  3.0G   0% /dev/shm
run            tmpfs     3.0G     0  3.0G   0% /run
tmp            tmpfs     3.0G     0  3.0G   0% /tmp
/dev/sda2      ext4       32G   12G   19G  40% /etc/resolv.conf

perl removed.....


Mr Green

Offline

#6 2017-05-07 11:58:21

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Re: Tiny base install

The system is not live it is a real install of base... booting via grub


Mr Green

Offline

#7 2017-05-07 12:00:43

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

Re: Tiny base install

*confused*

I wanted to know what your goal/requirements were.  If that installation on your usb then clearly the answer is "yes it can be installed on that usb".  If changes need to be persistent, then no, you cannot put everything in the initramfs (unless you had some acrobatics around rebuilding the initramfs at every shutown - but this wouldn't save much space).


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#8 2017-05-07 12:13:44

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Re: Tiny base install

Think goal is to get a booting system with as few tools as possible, like to get near to 500mb. I do not think trying to build into initramfs is not really going to work that well.


Mr Green

Offline

#9 2017-05-07 12:21:23

tom.ty89
Member
Registered: 2012-11-15
Posts: 897

Re: Tiny base install

Mr Green wrote:

No it makes sense, that is what initramfs basically does, thinking if I can add root filesystem to initramfs...

That's not what I mean. There's certainly a "rootfs" before the init in it mounts and switch to the real root, but what do you mean by adding a "root filesystem" to it? Like daily programs you use? Even if it can work, why? It doesn't make anything "tiny".

If you really want it to be as small as possible, you should see if there's anything you don't really need in the base group. To make the initramfs smaller, you include only the modules there are really necessary for mounting the real root (varies in different cases, i've listed those you mostly need for the usb case) and only the base and udev hook. Omit the fallback image. Custom kernel build makes a point here as well.

Last edited by tom.ty89 (2017-05-07 12:26:00)

Offline

#10 2017-05-07 12:31:32

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

Re: Tiny base install

The total installed size of my base packages is 330 MiB.  There is more that is used by files created after the packages are installed, but not that much.  So yes, it should be possible to get a minimal install under 500 MiB.

But again, I'm still confused about what (or perhaps why) you are asking.  You are asking a yes/no question that you could readily just confirm for yourself in less time than waiting for us to answer.

But if you need space for user configs and data, then there likely wont be much left.  Arch is not a small distro.  There are many distros targetted at being small as they use busybox (and sometimes a slimmer libc).  You may want to try Alpine.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#11 2017-05-07 12:47:19

tom.ty89
Member
Registered: 2012-11-15
Posts: 897

Re: Tiny base install

Why not put just Arch ISO on the USB btw? (use the grub + loop boot way for some persistent storage, if it still has capacity)

Last edited by tom.ty89 (2017-05-07 12:47:36)

Offline

Board footer

Powered by FluxBB