Role of initramfs

General support questions
Post Reply
ranshalit
Posts: 39
Joined: 2015/12/28 17:01:59

Role of initramfs

Post by ranshalit » 2019/08/18 13:48:43

Hello,

On install of centOS there is also initramfs which starts at boot.

Does it have any significance in boot, or can it be just totally skipped ?

Thanks

User avatar
TrevorH
Forum Moderator
Posts: 26572
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Role of initramfs

Post by TrevorH » 2019/08/18 14:08:51

It contains a filesystem that is mounted and used to boot. It contains all the drivers and code necessary to get your system to recognise and run all the hardware on your system. So, yes, it's required.
CentOS 5 died in March 2017 - migrate NOW!
CentOS 6 goes EOL sooner rather than later, get upgrading!
Full time Geek, part time moderator. Use the FAQ Luke

ranshalit
Posts: 39
Joined: 2015/12/28 17:01:59

Re: Role of initramfs

Post by ranshalit » 2019/08/18 20:16:50

Hi,

But kernel is the same, and all modules exist in final rootfs, so initramfs is usually not required in most distributions.
Does it detect hardware and load kernel modules ?

Thanks

User avatar
jlehtone
Posts: 2307
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Role of initramfs

Post by jlehtone » 2019/08/18 21:45:55

How do those "most distributions" mount the "final rootfs"? Do they have modules built into (monolithic) kernel?

User avatar
TrevorH
Forum Moderator
Posts: 26572
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Role of initramfs

Post by TrevorH » 2019/08/19 10:16:11

But kernel is the same, and all modules exist in final rootfs, so initramfs is usually not required in most distributions.
You've obviously used a different set of "most distributions" than I have because all of the ones that I've used have initramfs files. The only time it is not required is if you have built a monoilithic kernel containing all required modules as built-in parts of the kernel. Almost all distros use kernels that are mostly modularised so initramfs files are required.
CentOS 5 died in March 2017 - migrate NOW!
CentOS 6 goes EOL sooner rather than later, get upgrading!
Full time Geek, part time moderator. Use the FAQ Luke

ranshalit
Posts: 39
Joined: 2015/12/28 17:01:59

Re: Role of initramfs

Post by ranshalit » 2019/08/19 10:52:02

I understand now. Thanks.

( This concern with initramfs was actually related to another thing I am trying to do, and obviously I am not doing it right.
I opened a new issue for this here:
viewtopic.php?f=47&t=71422 )

Post Reply

Return to “CentOS 7 - General Support”