Table of contents
1. initrd ? initramfs ?
2. initrd, initramfs 구분 방법
3. initrd 편집하기
4. initramfs 편집하기
1. initrd ? initramfs ?
압축 방법의 차이가 있다는 것은 알겠는데 정확한 차이점은 잘 모르겠음. 이건 나중에 업데이트 할 것임.
2. initrd, initramfs 구분 방법
image name : initrd-2.4.19.img.gz
아래와 같이 입력시
gunzip -c /boot/initrd-2.4.19.img.gz | file -
아래와 같이 나오면 initrd
"/dev/stdin: Linux rev 1.0 ext2 filesystem data"
아래와 같이 나오면 initramfs 임.
"/dev/stdin: ASCII cpio archive (SVR4 with no CRC)"
3. initrd 편집하기
3-1. 압출 풀기 & 마운트
step 1. mkdir temp
step 2. gunzip -c /boot/initrd-2.4.19.img.gz > initrd.img
step 3. mount -t ext2 -o loop initrd.img temp/
3-2. 다시 묶기
step 1. umount temp
step 2. gzip -9 -c initrd.img > /boot/initrd-2.4.19.img.gz-NEW
4. initramfs 편집하기
4-1. 압출 풀기 & 마운트
step 1. mkdir temp
step 2. cd temp
step 3. gunzip -c /boot/initrd-2.4.19.img.gz | cpio -i
4-2. 다시 묶기
step 1. pwd
/root/temp
step 2. find . | cpio -H newc -o | gzip -9 > /initrd-2.4.19.img.gz-NEW
이 내용은, http://backreference.org/2010/07/04/modifying-initrdinitramfs-files/ 의 내용을 번역, 정리한 것임.