== Extract the current initrd ==
Rename the initrd image:
mv /boot/initrd-2.6.23.13-grsec-sg1.img /boot/initrd-2.6.23.13-grsec-sg1.cpio.gz
Decompress the cpio image:
gzip -d /boot/initrd-2.6.23.13-grsec-sg1.cpio.gz
Create a directory where you want to extract the initrd:
mkdir /root/initrd
Extract the files from the cpio image:
cd /root/initrd
cpio -idvm < /boot/initrd-2.6.23.13-grsec-sg1.cpio.gz
== Create the new initrd ==
cd /root/initrd
find .|cpio -o -Hnewc > /boot/initrd-2.6.23.13-grsec-sg2.cpio
gzip /boot/initrd-2.6.23.13-grsec-sg2.cpio
mv /boot/initrd-2.6.23.13-grsec-sg2.cpio.gz /boot/initrd-2.6.23.13-grsec-sg2.img
!!! NOTE: This is how it should be working on most distributions but not on all of them. !!!
Rename the initrd image:
mv /boot/initrd-2.6.23.13-grsec-sg1.img /boot/initrd-2.6.23.13-grsec-sg1.cpio.gz
Decompress the cpio image:
gzip -d /boot/initrd-2.6.23.13-grsec-sg1.cpio.gz
Create a directory where you want to extract the initrd:
mkdir /root/initrd
Extract the files from the cpio image:
cd /root/initrd
cpio -idvm < /boot/initrd-2.6.23.13-grsec-sg1.cpio.gz
== Create the new initrd ==
cd /root/initrd
find .|cpio -o -Hnewc > /boot/initrd-2.6.23.13-grsec-sg2.cpio
gzip /boot/initrd-2.6.23.13-grsec-sg2.cpio
mv /boot/initrd-2.6.23.13-grsec-sg2.cpio.gz /boot/initrd-2.6.23.13-grsec-sg2.img
!!! NOTE: This is how it should be working on most distributions but not on all of them. !!!
Последна модификация: Thursday, 23 October 2008, 08:10 PM