Re: Peeking inside initrd
On Fri, Jan 06, 2006 at 03:04:47PM -0800, Carl Johnson wrote:
> Ross Boylan <RossBoylan@stanfordalumni.org> writes:
>
> > How do I peek inside an initrd produce by make-kpkg (2.6.14 kernel, I
> > think yaird produced the file)?
> >
> > zcat initrd-flavor > tinit
> > and then mounting tinit on a loopback, but I always got errors that
> > the file system was unreadable.
>
> The following should give you some ideas:
>
> # mount -r -t cramfs /boot/initrd.img-2.6.8-11-amd64-k8 /mnt -o loop=/dev/loop1
> # df /mnt
> Filesystem 1K-blocks Used Available Use% Mounted on
> /boot/initrd.img-2.6.8-11-amd64-k8
> 10940 10940 0 100% /mnt
> # ls -l /boot/initrd.img-2.6.8-11-amd64-k8
> -rw-r--r-- 1 root root 4182016 Oct 1 14:21 /boot/initrd.img-2.6.8-11-amd64-k8
>
> I got the information from mount(8), and you may want to look at the
> -x option in cramfsck(8) (in the cramfsprogs package). I am sure
> there are other ways to do this.
>
That's odd: cramfs doesn't work either. However, if I unzip the file
I can then look at it directly with cpio.
Ross
Reply to: