Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Booting to RAM
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
rabcor
Apprentice
Apprentice


Joined: 05 Apr 2012
Posts: 200

PostPosted: Fri May 30, 2014 4:40 am    Post subject: Booting to RAM Reply with quote

I was wondering about ways to make gentoo boot from RAM.

There is one cross-distro method here which simply loads the root partition to RAM as it is.

But I think this method is a lot more elegant as it zips up (with GZIP, I would prefer LZMA) the root partition and then booots off of the zip as if it were an initramfs or so I think. I really like this method because I think if I use this, I can update my system while it is loaded to RAM by simply upadting it as I normally would, and then zipping it up again from there before I reboot. However this method is not cross distro, would it work with Gentoo? If not is there a Gentoo alternative or can I somehow just make it work with Gentoo?

PS: I would also like to load certain files to other hard drive partitions, like for example /usr/portage can get pretty huge so I can save a lot of space by storing it on a HDD/SSD partition, can I do this somehow with fstab or should I just use symlinks to do something like this?
_________________
This picture was my biggest reason for ever trying Gentoo <3
Back to top
View user's profile Send private message
chithanh
Developer
Developer


Joined: 05 Aug 2006
Posts: 2158
Location: Berlin, Germany

PostPosted: Fri May 30, 2014 9:33 am    Post subject: Reply with quote

One option is to stay in initramfs even after boot. You never need to leave your initramfs, and it can be compressed to reduce on-disk size. A downside is that the decompressed initramfs needs to fit into LOWMEM (which is 896 MB by default on 32-bit systems).

Another option is to create a ramdisk which has the size of your root filesystem during early boot, then copy everything there and continue to boot from the ramdisk. You can use zram on memory-constrained systems to preserve memory.

There are some older threads here and here which might give you some pointers to get started.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum