LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-16-2013, 03:49 AM   #16
wigry
Member
 
Registered: Jul 2004
Distribution: slackware
Posts: 222

Rep: Reputation: 52

The purpose of mkinitrd command is to make a small ramdrive containing your filesystem driver. This is used in the cases when your kernel does not contain the filesystem driver but it still needs to read the disk. So the ramdrive is read just after kernel has finished booting, the filesystem driver is loaded from there and now the kernel can start the boot process from the disk as it has access to the files on it.

If your kernel however contain both disk and filesystem drivers as compiled-in options then you don't need initrd and can do without. Initrd allows you to make a custom kernel and reduce its size to absolute minimum. Only one driver must be compiled in - the disk controller driver and everything else can be external modules resulting in a very small kernel.
 
Old 01-16-2013, 06:47 AM   #17
micflunu
Member
 
Registered: Oct 2012
Posts: 73

Original Poster
Rep: Reputation: Disabled
wellfor ubuntu it is mkinitramfs.But you don't need to mkinitrd at all what seems to be the problem??
 
Old 01-16-2013, 08:25 AM   #18
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,604

Rep: Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241
I would think it depends on what the error was. IF the command wasn't necessary in your specific environment, then it may not make a difference.

The need for mkinitrd is to package up a mini-root filesystem with all necessary drivers (and commands) needed to mount the real root filesystem.

The advantage this has is that you can use the same kernel (and initrd) on vastly different hardware platforms without having to rebuild a kernel. You MIGHT need to rebuild an initrd if the driver you happen to need isn't there (I did this to add the virtio subsystem to use enhanced virtual disk drivers for use in a VM). No need to rebuild the kernel... or even any drivers - just add them to the initrd.

The memory for the mini-root (initrd) filesystem is released after the real root (on disk) is mounted via a "pivot root" command used in the initrd followed by a umount.

reference: http://linux.die.net/man/8/pivot_root
 
  


Reply


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
Problem installing LILO and booting [Solved] Kubuntu Slackware - Installation 3 04-25-2011 08:19 PM
Installing to one drive and booting from another - lilo? fogpipe Linux - Newbie 4 03-12-2011 04:58 PM
Single RHEL5 installation support booting both 32/64-bit kernels? bkimura66 Linux - Software 3 08-11-2009 03:42 PM
RedHat support booting 32-bit & 64-bit kernels from single installation? bkimura66 Linux - Server 1 08-11-2009 08:45 AM
Installing Lilo to external harddrive from different computer that's not booting it? zefer Linux - General 10 10-03-2007 01:30 PM


All times are GMT -5. The time now is 02:25 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration