Edit initrd.img

From Halfface
Revision as of 14:37, 20 October 2008 by Ekaanbj (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
5) mkdir /cdinitimg
6) find the initrd.gz or initrd.img in /cdiso
7) gunzip -c /cdiso/isolinux/initrd.img > /cdinitimg/initrd.img
- believe it or not the image is compressed
8) cd /cdinitimg
9) mdkir point
10) mount initrd.img point -o loop
11) mkdir /cdimgextract
12) cp -av /cdinitimg/point/* /cdimgextract
13) umount /cdinitimg/point
14) rm -rf /cdinitimg
15) make any changes you need to the initrd.img in /cdimgextract

REMAKE MODIFIED INITRD.IMG

16) mkdir /cdinitrd
17) dd if=/dev/zero of=initrd.img bs=1k count=60960
18) mke2fs -i 1024 -b 1024 -m 5 -F -v initrd.img
19) mount initrd.img cdinitrd -t ext2 -o loop
20) cp -av /cdimgextract/* /cdinitrd
21) umount /cdinitrd
22) gzip --best initrd.img
23) cp initrd.img /cdiso/isolinux/
24) rm -rf /cdinitrd
25) rm -rf /cdimgextract