LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Thread Tools
Old 02-27-2008, 05:37 PM   #1
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Lenny
Posts: 1,212
Thanked: 5
Initramfs & initrd - Confusion - Do I have to use them


[Log in to get rid of this advertisement]
Hello,

I always get confused in any literature on Linux which mentions about initrd or initramfs.

I know the default debian installation uses an initrd image during the boot (in the GRUB).

Some time back, I freed my boot process from using initrd image by compiling all the IDE and filesystem modules that are required into the kernel so that I don't have to use the "initrd" line in my GRUB config file(menu.lst).

Recently I installed a package called splashy and I encountered error and I was suggested to use the splashy program from initramfs.

I researched and found that initramfs will eventually replace initrd image.

How do I know if I am using initramfs right now during my boot process?

Does using initramfs image means appending an "initramfs" line in the GRUB just like we use to do for initrd?

How do we create an initramfs?

Can anyone give some concise explanation?

Will really appreciate it.
kushalkoolwal is offline     Reply With Quote
Old 02-27-2008, 05:52 PM   #2
jailbait
Guru
 
Registered: Feb 2003
Location: atop the Blue Ridge
Distribution: Debian Lenny, CentOS 5.2
Posts: 7,250
Thanked: 31
Quote:
Originally Posted by kushalkoolwal View Post

How do I know if I am using initramfs right now during my boot process?
Check your boot log:

dmesg | grep initramfs


Quote:
Originally Posted by kushalkoolwal View Post


Does using initramfs image means appending an "initramfs" line in the GRUB just like we use to do for initrd?

How do we create an initramfs?

Can anyone give some concise explanation?
The initramfs is now part of the kernel. Grub must have a pointer to the kernel but it doesn't need a separate pointer to the initramfs. You don't have to create an initramfs because it was installed with the kernel.

-------------------
Steve Stites
jailbait is offline     Reply With Quote
Old 02-27-2008, 05:56 PM   #3
Dutch Master
Senior Member
 
Registered: May 2006
Posts: 1,268
Thanked: 11
I don't know the precise answers, but afaik Debian already uses the initramfs tools: when I build a kernel not so long ago, I couldn't use the familiar mkinitrd command, as it wasn't installed (despite having the build-essential package installed though!). I had to install the initramfs tools to get an initrd image.
Dutch Master is offline     Reply With Quote
Old 02-27-2008, 06:02 PM   #4
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Lenny
Posts: 1,212
Thanked: 5

Original Poster
Quote:
Originally Posted by jailbait View Post
Check your boot log:

dmesg | grep initramfs


The initramfs is now part of the kernel. Grub must have a pointer to the kernel but it doesn't need a separate pointer to the initramfs. You don't have to create an initramfs because it was installed with the kernel.
-------------------
Steve Stites
Ok, I see thanks for your quick response. So is it possible to boot a debian system without initramfs just like I am currently booting my kernel without an initrd system.

Also what do it mean when the README file of the package "splashy" says, you should use splashy from initramfs. Does it mean that I should be using initramfs during my boot?
kushalkoolwal is offline     Reply With Quote
Old 02-27-2008, 06:12 PM   #5
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Lenny
Posts: 1,212
Thanked: 5

Original Poster
Quote:
Originally Posted by Dutch Master View Post
I don't know the precise answers, but afaik Debian already uses the initramfs tools: when I build a kernel not so long ago, I couldn't use the familiar mkinitrd command, as it wasn't installed (despite having the build-essential package installed though!). I had to install the initramfs tools to get an initrd image.
Hmm I thought initramfs tools should be for initramfs and not initrd.
mkinitrd or yaird should be for initrd.

This is what confuses me.
kushalkoolwal is offline     Reply With Quote
Old 02-27-2008, 06:20 PM   #6
jailbait
Guru
 
Registered: Feb 2003
Location: atop the Blue Ridge
Distribution: Debian Lenny, CentOS 5.2
Posts: 7,250
Thanked: 31
Quote:
Originally Posted by kushalkoolwal View Post

Does it mean that I should be using initramfs during my boot?
If your kernel came with an initramfs installed then you are using an initramfs. There is no kernel parameter to turn initramfs on or off.

Quote:
Originally Posted by kushalkoolwal View Post

Also what do it mean when the README file of the package "splashy" says, you should use splashy from initramfs.

If you have splashy installed in the kernel initramfs the you can tell the kernel to run splashy from the initramfs by passing the kernel a parameter in /boot/grub/menu.lst:

"vga=791 splash"

http://splashy.alioth.debian.org/wiki/installation

-------------------
Steve Stites
jailbait is offline     Reply With Quote
Old 02-27-2008, 07:12 PM   #7
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Lenny
Posts: 1,212
Thanked: 5

Original Poster
Quote:
Originally Posted by jailbait View Post
If your kernel came with an initramfs installed then you are using an initramfs. There is no kernel parameter to turn initramfs on or off.

If you have splashy installed in the kernel initramfs the you can tell the kernel to run splashy from the initramfs by passing the kernel a parameter in /boot/grub/menu.lst:

"vga=791 splash"

http://splashy.alioth.debian.org/wiki/installation

-------------------
Steve Stites
I apologize for still not being able to understand this picture and hence my question to this forum.

I do use vga=791 in my menu.lst. But I still don't know if I installed splashy in the kernel initramfs or not? How can I install something in initramfs?

Also, what do you mean when you say "your kernel came with an initramfs installed "? What if I just download 2.6.24 kernel from debian and using my 2.6.23 config file and just install it the regular way. Where does the initramfs come into the picture? Is that an option in the kernel config somewhere?
kushalkoolwal is offline     Reply With Quote
Old 02-27-2008, 07:33 PM   #8
jailbait
Guru
 
Registered: Feb 2003
Location: atop the Blue Ridge
Distribution: Debian Lenny, CentOS 5.2
Posts: 7,250
Thanked: 31
Quote:
Originally Posted by kushalkoolwal View Post

Also, what do you mean when you say "your kernel came with an initramfs installed "? What if I just download 2.6.24 kernel from debian and using my 2.6.23 config file and just install it the regular way. Where does the initramfs come into the picture? Is that an option in the kernel config somewhere?
Yes initramfs is a kernel config option:

To make the kernel use initramfs, set the following two options in the kernel’s .config file:

CONFIG_RAMFS=y
CONFIG_INITRAMFS_SOURCE="[initramfs file]"

http://www.mazleg.com/palmtelinux/doku.php?id=kernel

Debian seems to be compiling the initramfs into Debian kernels. My /boot/config-2.6.18-6-486 file contains:

CONFIG_RAMFS=y

Quote:
Originally Posted by kushalkoolwal View Post

How can I install something in initramfs?
All I can tell you on that is to look at the install instructions:

http://splashy.alioth.debian.org/wiki/installation

----------------------
Steve Stites
jailbait is offline     Reply With Quote
Old 02-27-2008, 08:30 PM   #9
Japser
LQ Newbie
 
Registered: Dec 2007
Posts: 15
Thanked: 0
Quote:
Originally Posted by kushalkoolwal View Post
Hello,

I always get confused in any literature on Linux which mentions about initrd or initramfs.

I know the default debian installation uses an initrd image during the boot (in the GRUB).

Some time back, I freed my boot process from using initrd image by compiling all the IDE and filesystem modules that are required into the kernel so that I don't have to use the "initrd" line in my GRUB config file(menu.lst).

Recently I installed a package called splashy and I encountered error and I was suggested to use the splashy program from initramfs.

I researched and found that initramfs will eventually replace initrd image.

How do I know if I am using initramfs right now during my boot process?

Does using initramfs image means appending an "initramfs" line in the GRUB just like we use to do for initrd?

How do we create an initramfs?

Can anyone give some concise explanation?

Will really appreciate it.

Initramfs replaces initrd. (filesystem instead of ramdisk)
But in /boot and in /boot/grub/menu.lst it is still -called- an initrd (if you have it). I think that is what confuses you.

If everything needed at boottime is in the kernel then you don't need it.

You create an initramfs with mkinitramsf wich comes in a package called initramfs-tools.

HTH, --Japser.

Last edited by Japser; 02-27-2008 at 08:31 PM..
Japser is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Initrd/initramfs problem during suse10.2 installation ph73nt Suse/Novell 3 08-09-2008 08:31 AM
Making a livecd without initrd or initramfs unitedroad Linux - General 3 01-14-2008 03:40 AM
Confusion PLEASE HELP!!!! Initrd + initramfs aroche Linux - General 2 08-18-2006 02:59 PM
difference between initrd and initramfs shrndegruv Linux - General 1 02-14-2006 01:03 AM
Trying to understand how a boot loader handles initrd/initramfs/ramdisk ... cyril Linux - Software 0 04-08-2004 06:10 AM


All times are GMT -5. The time now is 12:05 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration