LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
Search this Thread
Old 07-12-2007, 11:52 PM   #1
KiraII
LQ Newbie
 
Registered: Jul 2007
Posts: 3

Rep: Reputation: 0
Question Question on initial RAM disk?


I am working on put a mini linux system into my U key, I use grub as my bootloader, when booting, grub should load kernel and initrd image into memory.
In my view, initrd is the first root filesystem, but how can the kernel aware of the initrd and mount it as a root filesytem?

Last edited by KiraII; 07-13-2007 at 12:08 AM.
 
Old 07-13-2007, 12:24 AM   #2
reddazz
Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 73
Hi and welcome to LQ.

This article may help you out.
 
Old 07-13-2007, 12:27 AM   #3
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
If I understand your question correctly, the bootloader takes care of this.

In the case of GRUB, this is done with the initrd statement as shown in the sample entry below:

Code:
title           Ubuntu, kernel 2.6.17-11-generic
root            (hd0,0)
kernel          /boot/vmlinuz-2.6.17-11-generic root=/dev/sda1 ro noisy
initrd          /boot/initrd.img-2.6.17-11-generic
quiet
savedefault
boot
 
Old 07-13-2007, 12:55 AM   #4
KiraII
LQ Newbie
 
Registered: Jul 2007
Posts: 3

Original Poster
Rep: Reputation: 0
I think, Grub only load kernel and initrd into memory, but it can't mount ramfs for the kernel, is it?
maybe the bootloader pass information of where is the initrd settled to the kernel, is there a mechenism in kernel to get the information?

Last edited by KiraII; 07-13-2007 at 01:15 AM.
 
Old 07-13-2007, 01:52 AM   #5
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
Quote:
Originally Posted by KiraII
I think, Grub only load kernel and initrd into memory, but it can't mount ramfs for the kernel, is it?
maybe the bootloader pass information of where is the initrd settled to the kernel, is there a mechenism in kernel to get the information?
I am not sure of the details of the magic that happens, but after the kernel boots, the initrd will be mounted and the kernel will be able to pass control to /etc/init, (contained in the initrd) or whatever file was specified on the boot line. My understanding of ramfs is that it is different from initrd, and I don't have much knowledge of it. I believe ramfs is contained in the compressed kernel image itself.
 
  


Reply

Tags
initrd


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
File System / RAM Disk Question xor Linux - General 2 04-27-2007 06:21 PM
How do i make a Initial Ram Disk? carl0ski Linux - Kernel 2 11-19-2006 04:06 AM
Configuring LiLO Error 'Initial RAM disk.... and is too big to fit between 4M-15M..' elliotfuller Linux - General 1 09-07-2005 11:22 PM
Lilo: kernel doesn't support initial ram disks. ecion Mandriva 22 07-22-2004 10:36 AM
Fatal:Kernel doesn't support initial RAM disks techstar25 Linux - Newbie 4 07-18-2003 07:56 PM


All times are GMT -5. The time now is 07:59 PM.

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
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration