News | About | Get Frugalware | Packages | Documentation | Discussion Forums | Bug Tracker | Wiki | Community | Development

Initramfs

From FrugalWiki

Jump to: navigation, search

For now, this is just going to me a dumping ground for my notes as I start work on getting initramfs and some associated tools running in Frugalware, I'll be using a beyond kernel but it should work on any 2.6.16 kernel with initramfs enabled.

Now for starters, here's a scripts I chucked together to help with debugging, just pass it a initramfs image and a directroy to extract it to and off it goes. I'm lead to believe that it's a bit trickier to extract images created with mkinitcpio which is what I'm planning on porting but I'll update this accordingly.

 #!/bin/sh

 ##
 ## This will extract an initramfs image to the specified path
 ## Questions to me.at.camdaniel.com
 ##
 ## Requires cpio
 ##

 usage() {
   cat <<EOF
 extract-initramfs.sh INITRAMFS PATH
 eg. extract-initramfs.sh /boot/initramfs-beyond.img /tmp/beyond
 EOF
 exit 0
 }

 if [ $# == "0" ]; then
   usage
 fi

 if [ ! -f $1 ]; then
   usage
 fi

 if [ ! -d $2 ]; then
   mkdir -p $2
 fi

 cd $2
 gunzip -c $1 | cpio -H newc --extract --quiet --no-absolute-filenames --no-preserve-owner --dot
Personal tools
Namespaces
Variants
Actions