Boot CentOS to RAM

General support questions
Post Reply
LionGod88
Posts: 1
Joined: 2018/11/20 16:30:20

Boot CentOS to RAM

Post by LionGod88 » 2018/11/20 16:58:19

Hello all,

I would like to configure CentOS 7 with GNOME to be able to load to RAM and run from it, creating the effect of a fast "read-only" OS.
I have installed CentOS on my disk and configured it the way I like. Now I want to pack the whole OS files into a file (maybe SquashFS?), and be able to load this file to RAM and boot from there.
I have seen many posts on this subject but failed to connect all the points.

In general here are the steps I've been through:
1. copy all the files to a local directory, using rsync.
2. make a squashfs file, using mksquashfs command.
3. add a menuentry to grub which is supposed to load the squashfs file to RAM and boot into it - here the struggle began.
I'm not sure which vmlinuz and initrd (or maybe initramfs) I should use, and the most important, which parameters to add.
I figured that maybe I need to create a initrd file that suits to my configuration. I read about dracut, a tool to make it, but I don't really know how to use it.

I would really appreciate if someone could guide me step by step (with explanations so I'll understand what I'm doing) how to accomplish a working environment that run CentOS 7 with GNOME all from RAM.

Thanks a lot in advance.

SamLee
Posts: 66
Joined: 2015/08/05 08:13:26
Location: ShenZhen China
Contact:

Re: Boot CentOS to RAM

Post by SamLee » 2018/11/21 09:35:08

Hi LionGod88 ,

Good day.
As a quick reference, you can please refer to CentOS live USB iso.

Regards,
Sam
Study More, work hard

Post Reply