Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
read kernel's initramfs
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
unghio
n00b
n00b


Joined: 28 Mar 2008
Posts: 12

PostPosted: Thu Jul 02, 2009 7:31 am    Post subject: read kernel's initramfs Reply with quote

hi, 've tried to search for it and i've found a lot of nice "how-to include your initramfs into the kernel"... but... actually i have to know the content of the initramfs included in a ******* kernel... how do i should, perhaps, even?
_________________
--
spiacere è il mio piacere, io amo essere odiato.
Back to top
View user's profile Send private message
desultory
Bodhisattva
Bodhisattva


Joined: 04 Nov 2005
Posts: 9410

PostPosted: Thu Jul 02, 2009 8:44 am    Post subject: Reply with quote

It is typically a, possibly compressed, ext2 or cramfs image, as such simply mounting it as a loop device, after possibly decompressing it, should work.

Moved from Gentoo Chat to Kernel & Hardware.
Back to top
View user's profile Send private message
165177
Apprentice
Apprentice


Joined: 27 Apr 2007
Posts: 156

PostPosted: Thu Jul 02, 2009 8:21 pm    Post subject: Reply with quote

That's an initial ramdisk (initrd). An initial ram filesystem (initramfs) is a possibly compressed cpio archive, whose contents are extracted into a "tmpfs" upon boot. Modern linux systems typically use an initramfs, because such images are easier to create, faster and do not require a filesystem driver compiled into the kernel. Such images can simply be extracted using "cpio".

More background is available at "/usr/src/linux/Documentation/initrd.txt".
Back to top
View user's profile Send private message
unghio
n00b
n00b


Joined: 28 Mar 2008
Posts: 12

PostPosted: Fri Jul 03, 2009 2:38 pm    Post subject: Reply with quote

yes, you'r right... well, i was drunk when i wrote the message :)

well, the real question is (was, read ahead for more on this): AFAIK the kernel has always an initramfs "compiled" in, (no matter if it's empty or you've putted something in it), and i was wondering how *** **** i can see if it's emty or not... ill' try using cpio on the kernel (well, another kernel...)... i don't think it'll work... but it could be :D

now... actually, the kernel i'm working on is a 2.4.something... so... it can't have an initramfs in it, i think :) i'm wrong?
_________________
--
spiacere è il mio piacere, io amo essere odiato.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum