You are not logged in.

#1 2014-05-28 06:26:19

rabcor
Banned
Registered: 2013-02-09
Posts: 500

Booting from RAM

I was trying to follow this guide to configure my system to load my root partition to RAM on startup. I get stuck at the:

cd /usr/share/initramfs-tools/scripts/

part. Does anyone know how I can finish this guide? or perhaps know about a guide that suits arch better?

Edit: From what I've seen, it seems that this is usually done by loading the initramfs to the RAM. Arch uses mkinitcpio to build an initramfs but it does not include a copy of the entire root partition which is what I need to do.

In short: How do I create an image of my entire system with mkinitcpio?

I found a kernel paramater called "copytoram" (added to the commandline of grub in /etc/default/grub) and this of course does not deliver the desired result (i.e. does not suffice) as it's only loading the kernel itself into ram, not the whole root partition.

Last edited by rabcor (2014-05-28 07:40:15)

Offline

#2 2014-05-28 16:32:36

jackwild
Member
Registered: 2014-01-15
Posts: 30

Re: Booting from RAM

mkinitrd/mkinitramfs in now mkinitcpio
https://wiki.archlinux.org/index.php/Mkinitcpio
https://bbs.archlinux.org/viewtopic.php?pid=1215085
Those instructions will need to be converted

Offline

#3 2014-05-28 22:01:38

KairiTech
Member
From: Toronto, Canada
Registered: 2011-06-04
Posts: 275

Re: Booting from RAM

I either copy root or a compressed archive of root to RAM from within init. Most important advantage is it's easy to keep current. Look here.

Offline

#4 2014-05-29 08:44:55

rabcor
Banned
Registered: 2013-02-09
Posts: 500

Re: Booting from RAM

Thanks guys smile two very nice replies.

If I understood correctly,
KairiTech's version stores the system installed normally on an SSD and maintenance can be done by booting off of the SSD instead of booitng with the initramfs.
jackwild's version stores the entire root partition and the initramfs in a zip file which is extracted into the RAM and booted from.

I like the archtaz version better because of how that is even easier to maintain (no rebooting required)  but the question  about the latter is if I can make it work with other OSes (like say gentoo)

Btw, I did a little check on tmpfs vs ramfs in performance (I mean it really technically doesn't matter which one one would use as long as one keeps the filesystem size in check (ramfs dynamically expands unlike tmpfs)) and it seemed to me like ramfs was outperforming tmpfs by roughly 8%, at least when I tested it's r/w speed with dd.

It showed on a roughly 800mb file (I notice massive speed difference when testing the Ram Read/Write speeds with that method depending on file size, a 40mb file was only at just over 1Gb/s) and tmpfs r/w'd at 4.3Gb/s whereas ramfs r/w'd it at 4.6GB/s implying that ramfs is probably more efficient.

Last edited by rabcor (2014-05-29 08:45:18)

Offline

Board footer

Powered by FluxBB