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
 
LinkBack Search this Thread
Old 01-19-2012, 06:35 AM   #1
Anisha Kaul
Senior Member
 
Registered: Dec 2008
Location: Gurgaon, India
Distribution: Slackware 13.37, OpenSuse 11.3
Posts: 4,370
Blog Entries: 21

Rep: Reputation: 706Reputation: 706Reputation: 706Reputation: 706Reputation: 706Reputation: 706Reputation: 706
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 5x,6.0,6.2, centOS 5x,6.0,6.2
Posts: 1,039
Blog Entries: 4

Rep: Reputation: 191Reputation: 191
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: 332

Rep: Reputation: 118Reputation: 118
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: Laptop: Slackware 13.37 // Desktop: Slackware64 13.37 // Netbook: Slackware 13.37
Posts: 5,478
Blog Entries: 48

Rep: Reputation: 641Reputation: 641Reputation: 641Reputation: 641Reputation: 641Reputation: 641
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
Anisha Kaul
Senior Member
 
Registered: Dec 2008
Location: Gurgaon, India
Distribution: Slackware 13.37, OpenSuse 11.3
Posts: 4,370
Blog Entries: 21

Original Poster
Rep: Reputation: 706Reputation: 706Reputation: 706Reputation: 706Reputation: 706Reputation: 706Reputation: 706
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


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
Trackbacks are Off
Pingbacks are On
Refbacks are 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


All times are GMT -5. The time now is 12:31 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
Open Source Consulting | Domain Registration