PDA

View Full Version : Define initramfs



A_Nonny_Moose
October 7th, 2010, 01:21 AM
I've been running tests on 10.10 and receiving the updates via the normal channels. They always seem to update initramfs, which I assume is key to boot loading the system.

My old computer smarts say it means "initialization Random Access Memory File System", but what is it? Why is it? and what does it do? The various man pages indicate that it is both a script and a table in memory, but there doesn't seem to be a cohesive definition. Oh, and one thing more, when is it?

Windows Nerd
October 7th, 2010, 01:29 AM
Wikipedia says: "An initial ramdisk is a temporary file system used in the boot process of the Linux kernel. initrd and initramfs refer to slightly different schemes for loading this file system into memory. Both are commonly used to make preparations before the real root file system can be mounted."

See more by Googling initramfs.

NightwishFan
October 7th, 2010, 01:34 AM
I think for example it can enable modesetting or the framebuffer to print plymouth, or in my recent case enable compcache for compressed ram swap. Things along that line that need to be done first.

nerdopolis
October 7th, 2010, 02:00 AM
AFIK I think a file system image file. (sort of like a virtual disk file for a virtual machine). Its a ram disk, so its a file system that exits in RAM.

I think linux mounts it on the root folder ( / ), and it has scripts and stuff to allow it to prepare filesystem. I think it can have storage drivers for a RAID, or filesystems. Once it loads all the stuff it needs from it, it switches / to be your normal fs, and unmounts the intramfs.

psusi
October 7th, 2010, 02:55 AM
Essentially it is a .tar.gz ( actually cpio instead of tar and lzma instead of gzip ) of a minimal set of files to make up a bare bones system that is passed to the kernel by the boot loader, unpacked in ram, and is then responsible for detecting hardware, locating the root fs, mounting it, and passing control to it.

del_diablo
October 7th, 2010, 03:04 AM
Does not being a ramdisk just mean that its 1 large archive file, and that its suppose to be read and used in 1 go?

psusi
October 7th, 2010, 03:00 PM
What?

del_diablo
October 7th, 2010, 05:00 PM
A zip archive contains compressed files.
A ramdisk contains the files in the order they are read, so the reading goes faster.

Lucradia
October 7th, 2010, 05:13 PM
init = initial or initialize

ram = random access memory

fs = filesystem

You're thinking too hard.

/thread

Ctrl-Alt-F1
October 7th, 2010, 05:28 PM
init = initial or initialize

ram = random access memory

fs = filesystem

You're thinking too hard.

/thread
What an entirely unhelpful post. The OP stated that much in his own post.


The posts of Nightwish through psusi pretty much contain my understanding of the matter (which coincidentally I was reading about today in a RedHat/SuSe manual).

psusi
October 7th, 2010, 06:29 PM
A zip archive contains compressed files.
A ramdisk contains the files in the order they are read, so the reading goes faster.

No, a ramdisk is just a disk in ram. There is no order about it. initrd stands for initial ram disk, which was a ram disk that was populated from a disk image read by the boot loader, and used as the root fs. Then they did away with the disk and made the tmpfs filesystem to hold files in ram, rather than use a conventional filesystem on top of a block of ram emulating a disk. The initramfs is an lzma compressed cpio archive of files that the kernel unpacks into the tmpfs it mounts as the root.

Lucradia
October 7th, 2010, 10:48 PM
What an entirely unhelpful post. The OP stated that much in his own post.


The posts of Nightwish through psusi pretty much contain my understanding of the matter (which coincidentally I was reading about today in a RedHat/SuSe manual).


What an entirely unhelpful post.

:)

A_Nonny_Moose
October 11th, 2010, 12:40 AM
Thanks to all. I am of the opinion that it is a typical programmer portmanteau symbol. I was as guilty as the next guy when I was coding. Frankly, too much of this stuff leaks over into the public domain.