iso=debian-9.9.0-amd64-netinst.iso
odir=/root/o
mnt=$(mktemp -d);
mkdir ${mnt}/iso ${mnt}/initrd;
losetup /dev/loop1000 ${iso};
mount /dev/loop1000 ${mnt}/iso;
cd ${mnt}/initrd;
zcat ${mnt}/iso/install.amd/initrd.gz|cpio -i;
cp -rp ${mnt}/iso cdrom/
cp $mnt/iso/install.amd/vmlinuz ${odir}/vmlinux
find .|cpio -o -H newc|gzip -9 >${odir}/initrd
cd ${odir};
umount ${mnt}/iso;
losetup -d /dev/loop1000;
rm -rf $mnt
沒有留言:
張貼留言