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/ 의 내용을 번역, 정리한 것임.
'development' 카테고리의 다른 글
[kernel] __read_mostly????? (0) | 2013.05.08 |
---|---|
[etc] Reglar expressions (0) | 2012.09.19 |
[u-boot] u-boot 사용법 (0) | 2012.03.08 |
[etc] 네트웍 용어 정리 (0) | 2012.03.06 |
[program] 2차원 배열 동적 할당 (0) | 2012.02.10 |