LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   x86 - running on RAM only (https://www.linuxquestions.org/questions/linux-kernel-70/x86-running-on-ram-only-4175592703/)

zvivered 11-01-2016 11:35 PM

x86 - running on RAM only
 
Hello,

I'm using vanilla 3.18.24 with busybox 1.24.2

Currently the grub, root file system (+bzImage) are burned on the SSD disk.

After boot completion, Linux can write\read from the SSD.

Is it possible to keep only the kernel and compressed image of root file system that will be extracted to RAM ?

Thank you,
Z.V

business_kid 11-02-2016 04:33 AM

Plenty of live distros can do that, although most would prefer a ramdisk as a root drive.

Tomsrtbt is/was a floppy distro that runs purely in ram. Tails likewise never writes to the root drive.

IsaacKuo 11-02-2016 08:55 AM

I have a blog tutorial explaining how to do this with Debian 8 Jessie:

http://www.linuxquestions.org/questi...-jessie-37165/

The only things that are required on the boot drive are:

1) grub bootloader in MBR

2) ext2/3/4 partition with the following files:

grub.cfg
initrd.img-ramboot
vmlinuz-ramboot
image.tar.gz

How much RAM do you have? Depending on what software you wish to run, it would be best to have at least 2GB of RAM with this specific technique. This technique extracts the entire image.tar.gz into RAM in an uncompressed state - for simplicity and sheer speed.

replica9000 11-10-2016 03:23 PM

I've done this before in Debian. The method I used only required a small modification to the initrd, but the filesystem wasn't compressed in RAM.

Xeratul 01-28-2017 03:19 PM

Quote:

Originally Posted by zvivered (Post 5625981)
Hello,

I'm using vanilla 3.18.24 with busybox 1.24.2

Currently the grub, root file system (+bzImage) are burned on the SSD disk.

After boot completion, Linux can write\read from the SSD.

Is it possible to keep only the kernel and compressed image of root file system that will be extracted to RAM ?

Thank you,
Z.V

compile your kernel and put live boot (debian/ubuntu)
do put the necessary modules, overtherweise it wont work.
and you can put into grub "live" and "toram" to tell the kernel you will load the "live" scripts for toram

fatmac 01-29-2017 04:57 AM

Frugal install is what you mean, I think, so check out any howtos about that. :)

(It's a long time since I've done it, so too rusty to describe the details.)

Xeratul 01-30-2017 01:02 PM

Quote:

Originally Posted by fatmac (Post 5661729)
Frugal install is what you mean, I think, so check out any howtos about that. :)

(It's a long time since I've done it, so too rusty to describe the details.)

Frugal Install is only a single or two distro specific.

You probably mean toram or live, which are passed over boot parameter, isn't it?

jefro 01-30-2017 08:08 PM

There are a few terms to get either boot time option or full time for this ram running ability and some the documentation is not easy to find.

Not sure the OP even cares anymore. :(

Xeratul 02-07-2017 03:14 PM

Quote:

Originally Posted by jefro (Post 5662596)
There are a few terms to get either boot time option or full time for this ram running ability and some the documentation is not easy to find.

Not sure the OP even cares anymore. :(

It is not that hard to do at all.

Linus made its kernel suited for this.

There is anyhow this package on Debian that you may keep in mind whiel compiling:
https://packages.debian.org/search?keywords=live-boot


All times are GMT -5. The time now is 11:00 PM.