LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 01-19-2012, 06:35 AM   #1
Aquarius_Girl
Senior Member
 
Registered: Dec 2008
Posts: 4,731
Blog Entries: 29

Rep: Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940
How to create an initrd image?


Code:
linux-dopx:/usr/src/linux-3.2.1 # make install
scripts/kconfig/conf --silentoldconfig Kconfig
sh /usr/src/linux-3.2.1/arch/x86/boot/install.sh 3.2.1-12-desktop arch/x86/boot/bzImage \
                System.map "/boot"
You may need to create an initial ramdisk now.
Code:
linux-dopx:/boot # mkinitrd initrd-3.2.1-12-desktop.img 3.2.1-12-desktop

Kernel image:   /boot/vmlinuz-2.6.34-12-desktop
Initrd image:   /boot/initrd-2.6.34-12-desktop
Kernel Modules: <not available>
Could not find map initrd-3.2.1-12-desktop.img/boot/System.map, please specify a correct file with -M.
There was an error generating the initrd (9)
See the error during mkinitrd command. What's the point that I am missing?
What does this indicate? Kernel Modules: <not available>
 
Old 01-19-2012, 07:02 AM   #2
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: RHEL 7.x, SLES 11 SP2/3/4
Posts: 1,195
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
I am not very much familiar with this but here I found something
might be helpful post #10

http://www.linuxquestions.org/questi...-hangs-591107/
 
Old 01-19-2012, 07:42 AM   #3
millgates
Member
 
Registered: Feb 2009
Location: 192.168.x.x
Distribution: Slackware
Posts: 852

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
It seems that mkinitrd looks for modules and System.map in the wrong place.
In Slackware, I would write something like

Code:
mkinitrd -c -k 3.2.1.12-desktop -m ext3:ext4 -f ext4 -r /dev/sda1
But that might be different for other distros -- your mkinitrd seems to use a different syntax. Does it have some help or a man page?
 
Old 01-19-2012, 08:01 AM   #4
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; SlackwareARM-current (aarch64); Debian 12
Posts: 8,298
Blog Entries: 61

Rep: Reputation: Disabled
This is easy on Slackware, running the script /usr/share/mkinitrd/mkinitrd_command_generator.sh gives you the command to run to create an initrd. It's another bit of Alien Bob's magic.
 
1 members found this post helpful.
Old 01-23-2012, 05:46 AM   #5
Aquarius_Girl
Senior Member
 
Registered: Dec 2008
Posts: 4,731

Original Poster
Blog Entries: 29

Rep: Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940
SOLVED:
The reason for these errors was that I was trying to make an initrd image before running make modules_install. So, now I ran make modules_install and initrd image got automatically created in /boot.

CONCLUSION:
On Kernel 3 onwards we don't have to create an initrd image, it gets created automatically after make modules_install.
 
  


Reply



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
How to create a initrd image without using mkfs, but cpio robertjinx Linux - Server 2 01-27-2011 02:41 AM
How to create new initrd image in sles10.2? venkatesh710 Linux - General 1 08-13-2010 02:38 AM
create bootable floppy image with only kernel and initrd ta0kira Slackware 1 04-02-2009 09:26 PM
How to create new initrd.gz (or initrd.img) file? kkpal Programming 2 12-10-2007 08:38 AM
Trying to create PXE server and can't mount initrd image Nylex Slackware 6 07-08-2007 01:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 11:56 PM.

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
Open Source Consulting | Domain Registration