Initial copy to the git repo, wrote a readme etc.

This commit is contained in:
Izaya 2015-12-22 22:51:18 +11:00
parent 2ea16b2871
commit e9336be8ba
9 changed files with 86 additions and 0 deletions

View File

@ -1,2 +1,22 @@
# Debian-CD-Scripts
A set of simple scripts for modifying and working with the Debian installer CDs.
This repo is divided into i386 and amd64 versions as the CDs use different directories, though the process aside from that is the same.
## Dependancies
- rsync
- cpio
- genisoimage (cdrkit)
## Usage
`./extractcd.sh debian-8.2.0-i386-netinst.iso`
To extract a CD into the cd/ directory
`./extractrd.sh`
To extract an init RAMdisk into the irmod/ directory
`./genrd.sh`
To convert the irmod directory back into a RAMdisk in the cd/ directory
`./gencd.sh custom.iso`
To convert the cd/ directory back into a CD image for use.

10
amd64/extractcd.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
if [ ! -d iso ]; then
mkdir iso
fi
if [ ! -d cd ]; then
mkdir cd
fi
mount $1 iso/
rsync -aP -H --exclude=TRANS.TBL iso/ cd
umount iso

6
amd64/extractrd.sh Executable file
View File

@ -0,0 +1,6 @@
if [ ! -f irmod ]; then
mkdir irmod
fi
cd irmod
gzip -d < ../cd/install.amd/initrd.gz | cpio --extract --verbose --make-directories --no-absolute-filenames
cd ..

9
amd64/gencd.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
if [ -d cd ]; then
cd cd
md5sum `find -follow -type f` | tee md5sum.txt
cd ..
genisoimage -o $1 -r -J -no-emul-boot -boot-load-size 4 -boot-info-table -b isolinux/isolinux.bin -c isolinux/boot.cat ./cd
else
echo "wat error (cd directory not found)"
fi

8
amd64/genrd.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash
if [ -d irmod ]; then
cd irmod
find . | cpio -H newc --create --verbose | gzip -9 > ../cd/install.amd/initrd.gz
cd ..
else
echo "wat error (irmod directory not found)"
fi

10
i386/extractcd.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
if [ ! -d iso ]; then
mkdir iso
fi
if [ ! -d cd ]; then
mkdir cd
fi
mount $1 iso/
rsync -aP -H --exclude=TRANS.TBL iso/ cd
umount iso

6
i386/extractrd.sh Executable file
View File

@ -0,0 +1,6 @@
if [ ! -f irmod ]; then
mkdir irmod
fi
cd irmod
gzip -d < ../cd/install.386/initrd.gz | cpio --extract --verbose --make-directories --no-absolute-filenames
cd ..

9
i386/gencd.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
if [ -d cd ]; then
cd cd
md5sum `find -follow -type f` | tee md5sum.txt
cd ..
genisoimage -o $1 -r -J -no-emul-boot -boot-load-size 4 -boot-info-table -b isolinux/isolinux.bin -c isolinux/boot.cat ./cd
else
echo "wat error (cd directory not found)"
fi

8
i386/genrd.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash
if [ -d irmod ]; then
cd irmod
find . | cpio -H newc --create --verbose | gzip -9 > ../cd/install.386/initrd.gz
cd ..
else
echo "wat error (irmod directory not found)"
fi