Skip to content

Commit

Permalink
Tweaks to ISO script
Browse files Browse the repository at this point in the history
  • Loading branch information
falkTX committed Sep 3, 2018
1 parent 45795f9 commit 444ccd0
Showing 1 changed file with 80 additions and 86 deletions.
166 changes: 80 additions & 86 deletions scripts/kxstudio-create-iso
Expand Up @@ -68,9 +68,9 @@ SAVE THIS INFORMATION BELLOW, AND RUN IT ONE AT A TIME:
apt-get update
apt-get install software-properties-common wget
add-apt-repository -y ppa:kxstudio-debian/kxstudio
add-apt-repository -y ppa:kxstudio-debian/kde5-neon
sed -i 's/bionic/trusty/' /etc/apt/sources.list.d/kxstudio-debian-ubuntu-kxstudio-bionic.list
add-apt-repository -y ppa:plasmazilla/releases
sed -i 's/bionic/artful/' /etc/apt/sources.list.d/plasmazilla-ubuntu-releases-bionic.list # FIXME: remove when bionic is supported
apt-get update
apt-get install kxstudio-repos kxstudio-repos-gcc5
rm /etc/apt/sources.list.d/kxstudio-debian-ubuntu-kxstudio-bionic.list
Expand All @@ -92,17 +92,6 @@ deb http://security.ubuntu.com/ubuntu/ bionic-security main restricted universe
deb http://archive.canonical.com/ubuntu/ bionic partner
# deb-src http://archive.canonical.com/ubuntu/ bionic partner
# Neon repos, change to bionic LTS when available
deb [arch=amd64] http://archive.neon.kde.org/user/lts/ xenial main
# deb-src http://archive.neon.kde.org/user/lts/ xenial main
# Stuff to delete later on
deb http://archive.neon.kde.org/dev/stable/ bionic main
# deb-src http://archive.neon.kde.org/dev/stable/ bionic main
deb http://archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
' > /etc/apt/sources.list
# Update System
Expand All @@ -111,26 +100,28 @@ apt-get update; apt-get dist-upgrade
# Base Install
apt-get install --no-install-recommends ubuntu-standard laptop-detect os-prober \
libpam-systemd command-not-found friendly-recovery nano ntfs-3g ufw uuid-runtime \
manpages geoip-database bash-completion irqbalance powermgmt-base ppp pppconfig pppoeconf \
cryptsetup lvm2 dkms fakeroot libc6-dev libc-dev kxstudio-meta-live-conflicts
bash-completion geoip-database irqbalance manpages net-tools powermgmt-base ppp pppconfig pppoeconf \
cryptsetup lvm2 plymouth plymouth-theme-ubuntu-text kxstudio-meta-live-conflicts
# Kernel Install
apt-get install linux-lowlatency linux-image-lowlatency linux-headers-lowlatency kxstudio-meta-live-conflicts # skip grub install/configure to HDD here
apt-get purge linux-headers-3.13.0-46 linux-headers-3.13.0-46-lowlatency linux-image-3.13.0-46-lowlatency
apt-get purge linux-headers-4.15.0-30 linux-headers-4.15.0-30-lowlatency linux-image-4.15.0-30-lowlatency linux-modules-4.15.0-30-lowlatency
apt-get clean
# Install packages (KXStudio)
apt-get install jackd2 kxstudio-meta-audio-plugins-collection kxstudio-desktop-neon kxstudio-meta-all kubuntu-restricted-extras kxstudio-meta-restricted-extras kxstudio-meta-live-conflicts
# Neon repos
echo 'deb [arch=amd64] http://archive.neon.kde.org/user/lts/ bionic main
# deb-src http://archive.neon.kde.org/user/lts/ bionic main
' > /etc/apt/sources.list.d/neon.list
# FIXME: graphics not installable on neon, fix later (also video needs tweaking)
apt-get install jackd2 kxstudio-meta-audio-plugins-collection kxstudio-desktop-neon kxstudio-meta-audio kxstudio-meta-audio-plugins kubuntu-restricted-extras kxstudio-meta-restricted-extras kxstudio-meta-live-conflicts
# Update System
apt-get update; apt-get dist-upgrade
# Install packages (KXStudio)
apt-get install -d jackd2 kxstudio-meta-audio-plugins-collection kxstudio-desktop-neon kxstudio-meta-all kubuntu-restricted-extras kxstudio-meta-restricted-extras kxstudio-meta-live-conflicts
# Test
rm /var/cache/apt/archives/wine-rt*
# needed for a few gtk things
apt-get install --no-install-recommends gnome-themes-standard
apt-get update; apt-get dist-upgrade
apt-get clean
Expand All @@ -139,23 +130,24 @@ dpkg --add-architecture i386
apt-get update; apt-get dist-upgrade
# Install extras
apt-get install kxstudio-docs
apt-get install indicator-cpufreq \
apt-get install kxstudio-docs indicator-cpufreq kxstudio-meta-live-conflicts \
sni-qt libgl1-mesa-dri libgl1-mesa-glx libegl1-mesa libglapi-mesa libgles2-mesa libglu1-mesa \
sni-qt:i386 libgl1-mesa-dri:i386 libgl1-mesa-glx:i386 libegl1-mesa:i386 libglapi-mesa:i386 libgles2-mesa:i386 libglu1-mesa:i386
# Make sure some specific packages are installed
apt-get install zynaddsubfx-git
apt-get purge libpulse0
# Remove deprecated/dummy
apt-get install calf-plugins-git zynaddsubfx-git
apt-get purge kxstudio-meta-live-conflicts \
carla calf-plugins ardour3 amsynth-dssi drumkv1 samplv1 synthv1 composite composite-data flashplugin-installer \
carla calf-plugins-git ardour3 amsynth-dssi drumkv1 samplv1 synthv1 composite composite-data flashplugin-installer \
hydrogen-drumkits hydrogen-drumkits-effects fluid-soundfont-gm
# Cleanup
apt-get autoremove
apt-get clean
dpkg -l | grep "rc "
rm /boot/*liquorix*
## ---- PAUSE HERE ----- ##
# Before installing ubiquity in the live session, you'll need to run this outside:
Expand All @@ -171,22 +163,19 @@ $ sudo chroot /home/falktx/livecd/custom dpkg-query -W --showformat='\${Package}

echo "## ----- END PAUSE ----- ##
# Now use locate
apt-get clean
# /usr/bin/updatedb.mlocate
# Now install the liveDVD specific packages
apt-get install ubiquity-frontend-kde casper lupin-casper discover jfsutils xfsprogs
# Just in case you want to revert the live-dvd install action
apt-get purge \
apt-clone archdetect-deb btrfs-tools casper cifs-utils discover \
discover-data dmraid dpkg-repack ecryptfs-utils jfsutils keyutils kpartx \
kpartx-boot libdebian-installer4 libdiscover2 libdmraid1.0.0.rc16 \
libecryptfs0 libnss3-1d localechooser-data lupin-casper python3-icu \
python3-pam rdate sbsigntool ubiquity ubiquity-casper ubiquity-frontend-kde \
ubiquity-ubuntu-artwork user-setup xfsprogs
apt-clone archdetect-deb btrfs-progs btrfs-tools casper cifs-utils \
dmraid dpkg-repack jfsutils kpartx kpartx-boot libdebian-installer4 \
libdmraid1.0.0.rc16 libiw30 localechooser-data lupin-casper \
python-crypto python-ldb python-samba python-tdb python3-icu \
python3-pam python3-pyqt5.qtwebkit rdate \
samba-common samba-common-bin sbsigntool \
ubiquity ubiquity-casper ubiquity-frontend-kde ubiquity-ubuntu-artwork \
user-setup xfsprogs
"
sudo chroot /home/falktx/livecd/custom
echo "done"
Expand All @@ -201,7 +190,12 @@ rm -f /var/kxstudio/*
apt-get clean
rm -rf /tmp/*
rm -f /etc/hosts /etc/resolv.conf
ln -s /run/resolvconf/resolv.conf /etc/resolv.conf
# ln -s /run/resolvconf/resolv.conf /etc/resolv.conf
echo '[keyfile]
unmanaged-devices=none
' > /etc/NetworkManager/conf.d/10-globally-managed-devices.conf
chmod 644 /root/.{b,p}*
find /var/log -type f | while read file; do cat /dev/null | tee $file; done
umount /dev/pts
Expand Down Expand Up @@ -258,52 +252,52 @@ sudo mkdir -p /home/falktx/livecd/cd/casper/
cd /home/falktx/livecd/
sudo rm -f cd/casper/vmlinuz cd/casper/vmlinuz.efi cd/casper/initrd.lz cd/casper/initrd_tmp.gz
sudo cp custom/boot/vmlinuz-* cd/casper/vmlinuz
sudo cp custom/boot/initrd.img-* cd/casper/initrd_tmp.gz

cd /home/falktx/livecd/cd/casper
sudo rm -rf ext
sudo mkdir ext
cd ext
sudo su root -c 'gzip -cd ../initrd_tmp.gz | cpio -i'

# fix links
LINKS=`find . -type l`
for i in ${LINKS}; do
FILE=`readlink ${i}`
CUSTOM=0
if [ "${FILE}" == "/proc/mounts" ]; then
continue
elif [ "${FILE}" == "busybox" ]; then
FILE="/bin/busybox"
CUSTOM=1
elif [ "${FILE}" == "lvm" ]; then
FILE="/sbin/lvm"
CUSTOM=1
elif [ "${FILE}" == "/usr/share/plymouth/themes/kxstudio-logo/kxstudio-logo.plymouth" ]; then
FILE="/lib/plymouth/themes/kxstudio-logo/kxstudio-logo.plymouth"
CUSTOM=2
elif [ "${FILE}" == "/usr/share/plymouth/themes/kxstudio-text/kxstudio-text.plymouth" ]; then
FILE="/lib/plymouth/themes/kxstudio-text/kxstudio-text.plymouth"
CUSTOM=2
fi
sudo rm "${i}"
if [ "${CUSTOM}" == "1" ]; then
sudo cp -v ".${FILE}" "${i}"
elif [ "${CUSTOM}" == "2" ]; then
sudo cp -v "../../../custom/${FILE}" "${i}"
else
DIRNAME=`dirname ${i}`
if [ "${DIRNAME}" == "./sbin" ]; then
sudo cp -v "../../../custom/${FILE}" "${i}"
else
sudo cp -v "../../../custom/${DIRNAME}/${FILE}" "${i}" || echo "${DIRNAME} || ${FILE} || ${i}"
fi
fi
done

sudo su root -c 'find . | cpio --dereference -o -H newc | lzma -7 > ../initrd.lz'
cd ..
sudo rm -rf ext initrd_tmp.gz
sudo cp custom/boot/initrd.img-* cd/casper/initrd.lz

# cd /home/falktx/livecd/cd/casper
# sudo rm -rf ext
# sudo mkdir ext
# cd ext
# sudo su root -c 'cat ../initrd_tmp.gz | cpio -i'
#
# # fix links
# LINKS=`find . -type l`
# for i in ${LINKS}; do
# FILE=`readlink ${i}`
# CUSTOM=0
# if [ "${FILE}" == "/proc/mounts" ]; then
# continue
# elif [ "${FILE}" == "busybox" ]; then
# FILE="/bin/busybox"
# CUSTOM=1
# elif [ "${FILE}" == "lvm" ]; then
# FILE="/sbin/lvm"
# CUSTOM=1
# elif [ "${FILE}" == "/usr/share/plymouth/themes/kxstudio-logo/kxstudio-logo.plymouth" ]; then
# FILE="/lib/plymouth/themes/kxstudio-logo/kxstudio-logo.plymouth"
# CUSTOM=2
# elif [ "${FILE}" == "/usr/share/plymouth/themes/kxstudio-text/kxstudio-text.plymouth" ]; then
# FILE="/lib/plymouth/themes/kxstudio-text/kxstudio-text.plymouth"
# CUSTOM=2
# fi
# sudo rm "${i}"
# if [ "${CUSTOM}" == "1" ]; then
# sudo cp -v ".${FILE}" "${i}"
# elif [ "${CUSTOM}" == "2" ]; then
# sudo cp -v "../../../custom/${FILE}" "${i}"
# else
# DIRNAME=`dirname ${i}`
# if [ "${DIRNAME}" == "./sbin" ]; then
# sudo cp -v "../../../custom/${FILE}" "${i}"
# else
# sudo cp -v "../../../custom/${DIRNAME}/${FILE}" "${i}" || echo "${DIRNAME} || ${FILE} || ${i}"
# fi
# fi
# done
#
# sudo su root -c 'find . | cpio --dereference -o -H newc | lzma -7 > ../initrd.lz'
# cd ..
# sudo rm -rf ext initrd_tmp.gz

echo "done"
exit
Expand Down Expand Up @@ -372,7 +366,7 @@ exit
*)
echo "usage: $0 <cmd>
1 - squash <version> <arch> [version=trusty] [arch=i386/amd64]
1 - squash <version> <arch> [version=bionic [arch=i386/amd64]
2 - custom
3 - custom_end
4 - mksquash
Expand Down

0 comments on commit 444ccd0

Please sign in to comment.