1. Create bootable ct-desinfect usb drive
2. Instal required tools:
apt-get install squashfs-tools
3. Mount the
filesystem.squashfs:
mount -t squashfs -o loop,ro /media/desinfSYS/casper/filesystem.squashfs /media/desinfect-usb
4. Create filesystem file in your workspace
Note
${WORKSPCAE} is refering to your working directory
dd if=/dev/zero of=${WORKSPACE}/fs.ext2 bs=1M count=4096
mke2fs ${WORKSPACE}/fs.ext2
Note
Ignore the mke2fs warning
5. mount the created filesystem file
mount -o loop ${WORKSPACE}/fs.ext2 ${WORKSPACE}/new
6. Copy the filesystem.squashfs content into the new filesystem:
cp -a /media/desinfect-usb/. new/
7. Unmount the
filesystem.squashfs:
umount /media/desinfect-usb/
8. Prepare and chroot
mount -t proc -o bind /proc ${WORKSPACE}/new/proc
mount -o bind /dev/pts ${WORKSPACE}/new/dev/pts
cp /etc/resolv.conf ${WORKSPACE}/new/etc/
chroot ${WORKSPACE}/new /bin/bash
9. Costumize your instalation:
apt-get install linux-firmware-nonfree
...
Tip
Background: /usr/share/backgrounds/warty-final-ubuntu.png
10. exit the chroot and clean up
exit
unmount ${WORKSPACE}/new/proc
umount ${WORKSPACE}/new/dev/pts
rm ${WORKSPACE}/new/etc/resolv.conf
11. Create the
filesystem.manifest file:
chroot new dpkg-query -W --showformat='${Package} ${Version}n' > filesystem.manifest
Important
--showformat='${Package} ${Version}[BACKSLASH]n'
12. Clean the free space:
dd if=/dev/zero of=${WORKSPACE}/new/foofile
rm ${WORKSPACE}/new/foofile
13. create the squashfs:
cd ${WORKSPACE}/new/
mksquashfs . ${WORKSPACE}/filesystem.squashfs
14. Copy the filesystem files to ct-desinfect usb drive
cp filesystem.* /media/desinfSYS/casper/
Based on:
http://wiki.ubuntuusers.de/LiveCD_manuell_remastern