You are not logged in.
Pages: 1
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 I like Landuke!
Offline
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
No it makes sense, that is what initramfs basically does, thinking if I can add root filesystem to initramfs...
Mr Green I like Landuke!
Offline
How tiny is tiny? Do changes need to persist across reboots?
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
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 I like Landuke!
Offline
The system is not live it is a real install of base... booting via grub
Mr Green I like Landuke!
Offline
*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
Offline
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 I like Landuke!
Offline
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
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
Offline
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
Pages: 1