How to customize Deepin-os 15.x iso live ?
Tofloor
poster avatar
lahcen-maghrebi
deepin
2016-10-22 23:53
Author
Edited by lahcen-maghrebi at 2016-10-22 07:53

How to customize Deepin-os 15.x  iso live ?

1 Install Required Applications :

# sudo aptitude install squashfs-tools genisoimage


2 Setting up working directories :

# mkdir Deeepin_custom
# cd  Deeepin_custom             (your deepin-15.2-amd64.iso is inside this folder)
# mkdir mnt
# sudo mount -o loop deepin-15.2-amd64.iso mnt
# mkdir extract
# sudo rsync --exclude=/live/filesystem.squashfs -a mnt/ extract
# sudo unsquashfs mnt/live/filesystem.squashfs
# sudo mv squashfs-root edit

3. Prepare network connection in the temporary system:

# sudo cp /etc/resolv.conf edit/etc/
# sudo cp /etc/hosts edit/etc/

4.Chroot Environment:

# sudo mount --bind /dev/ edit/dev
# sudo chroot edit
# mount -t proc none /proc
# mount -t sysfs none /sys
# mount -t devpts none /dev/pts
# export HOME=/root
# export LC_ALL=C

5. Customization:

# dbus-uuidgen > /var/lib/dbus/machine-id
# dpkg-divert --local --rename --add /sbin/initctl      (ignore warning in this command)
# ln -s /bin/true /sbin/initctl                                           (ignore warning in this command)

now we are in the filesystem folder named (edit)
you can open this folder by root and make your all costumisations by  copy your themes icons fonts ...etc to the appropriate folders
but first we make update for system
# apt update
# apt upgrade
# apt install synaptic vokoscreen telegram firefox kazam

7. Cleanup your new system:

aptitude clean
rm -r /var/cache/apt/archives/*
rm -r /mydir
rm -rf /tmp/* ~/.bash_history
rm /var/lib/dbus/machine-id
rm /sbin/initctl
dpkg-divert --rename --remove /sbin/initctl
umount /proc || umount -lf /proc
umount /sys
umount /dev/pts
exit   
sudo umount edit/dev  

8. Regenerate manifest:

sudo su
chmod +w extract/live/filesystem.manifest
chroot edit dpkg-query -W --showformat='${Package} ${Version}\n' > extract/live/filesystem.manifest
cp extract/live/filesystem.manifest extract/live/filesystem.manifest-desktop
sed -i '/live/d' extract/live/filesystem.manifest-desktop

9. Compress and update some files:

rm extract/live/filesystem.squashfs
mksquashfs edit extract/live/filesystem.squashfs -comp xz
printf $(sudo du -sx --block-size=1 edit | cut -f1) > extract/live/filesystem.size
cd extract
rm md5sum.txt
find -type f -print0 | sudo xargs -0 md5sum | grep -v isolinux/boot.cat | sudo tee MD5SUMS

10 Create the iso image:

genisoimage -D -r -V "$IMAGE_NAME" -cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o ../Deepin-15.3-amd64.iso .

cd ..
exit
sudo chmod 777  Deepin-15.3-amd64.iso

that is
thanks
excuse my bad english !!











Reply Favorite View the author
All Replies

No replies yet

New Thread

Popular Ranking

Change

Popular Events

More
国际排名
WHLUG