LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 10-27-2008, 03:03 PM   #1
PlatinumX
Member
 
Registered: May 2008
Location: France
Distribution: Debian / Fedora / Gentoo
Posts: 178

Rep: Reputation: 15
Question Exploring my RAMdisk


Hey all,

I have two different kernels on my PC (the original one and one I compiled).
The one I made stops booting after displaying "Uncompressing Linux...Ok, booting the kernel".

People told me it is related to my ramdisk, which probably does not contain the good modules.

To verify this, I am wondering: is there a way to explore my ramdisk ? Is there a way to mount it somewhere and list files in it ?

Thanks
 
Old 10-27-2008, 03:52 PM   #2
jailbait
Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Wheezy, Debian Jessie
Posts: 7,476

Rep: Reputation: 155Reputation: 155
When you compile a kernel you specify what modules you want compiled and whether these modules will be compiled as part of the kernel or whether they will be loadable modules only loaded when needed.

During boot the kernel needs to access the partition which contains /. So the kernel needs driver modules for such things as the hard drive controller, the hard drive, and the file system that / uses. If these modules have been compiled into the kernel then the kernel will boot OK. If these modules are not compiled into the kernel then the boot will fail unless the necessary modules are made available with an initrd. An initrd loads the necessary modules into a ramdisk for the kernel's use during boot.

Quote:

is there a way to explore my ramdisk ? Is there a way to mount it somewhere and list files in it ?
Have you created an initrd? If so you can find out what modules you have in the initrd from the list of modules you told mkinitrd to include in your initrd. If you have not created an initrd or if you have not told grub to use the initrd you created then there is nothing in the ramdisk.

You should not just assume that the initrd for the old kernel will work for the new kernel. The two kernels are different (or else why did you compile a second kernel?) so the modules included in the initrds may be different.

--------------------------
Steve Stites
 
Old 10-28-2008, 03:44 AM   #3
jf.argentino
Member
 
Registered: Apr 2008
Location: Toulon (France)
Distribution: FEDORA CORE
Posts: 492

Rep: Reputation: 50
By the way, you can explore your initrd by uncompressing it (it's a gzip compression), after that it depends, it could be a file system or a cpio archive, do a "file" on it to be sure...
If it's a file system, just mount it with something like "mount -o FILE /mnt/initrd", if it's a cpio archive, extract its content with something like "cpio -i < FILE".
 
Old 10-28-2008, 06:20 AM   #4
PlatinumX
Member
 
Registered: May 2008
Location: France
Distribution: Debian / Fedora / Gentoo
Posts: 178

Original Poster
Rep: Reputation: 15
Thanks for all the info.

Quote:
Have you created an initrd?
I used "make-kpkg --initrd" syntax to compile my kernel. So when you install the .deb kernel package generated by the compilation of the kernel, dpkg calls mkinitramfs to generate a initrd.
Quote:
you can find out what modules you have in the initrd from the list of modules you told mkinitrd to include in your initrd.
As I used the macro "make-kpkg --initrd" I don't know which modules have been included in the initrd.
Quote:
You should not just assume that the initrd for the old kernel will work for the new kernel.
I did not

I compiled a new kernel because i needed to patch it.
Therefore, I used the previous config file.
Then, with "make menuconfig", I ticked the new feature.
But it seems (I don't know why) that also some options were removed.
I will go on comparing the config of the two kernels.

Last edited by PlatinumX; 10-28-2008 at 06:22 AM.
 
  


Reply

Tags
ramdisk


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
RAMDISK: couldn't find valid ramdisk image starting at 0. iotc247 Slackware 10 12-10-2010 03:08 PM
exploring linux jeff80 Linux - Newbie 5 05-26-2008 10:16 PM
Exploring folders janjam_640 Linux - Newbie 11 01-27-2005 03:58 PM
creating a ramdisk runtime from another ramdisk code123 Linux From Scratch 0 10-11-2004 08:59 AM


All times are GMT -5. The time now is 01:48 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