Permalink
Browse files

A patch for ubiquity to remove zram if encryption is selected

  • Loading branch information...
1 parent ab9aa7b commit b01e6540b249c7178f5b57d624d2869d49ecd541 @hugegreenbug hugegreenbug committed Jan 1, 2015
Showing with 23 additions and 3 deletions.
  1. +13 −0 crypto-base.sh.patch
  2. +3 −3 distroshare-ubuntu-imager.config
  3. +7 −0 distroshare-ubuntu-imager.sh
View
@@ -0,0 +1,13 @@
+--- crypto-base.orig.sh 2014-12-31 20:18:23.215164157 -0500
++++ crypto-base.sh 2014-12-31 20:23:11.395158996 -0500
+@@ -160,6 +160,10 @@
+ /dev/mapper/*)
+ dm_is_safe ${swap%% *} || return 1
+ ;;
++ /dev/zram*)
++ apt-get remove zram-config
++ swapoff $(echo $swap | cut -f 1 -d " ")
++ ;;
+ *)
+ # Presume not safe
+ return 1
@@ -23,15 +23,15 @@ DM=""
KERNEL_VERSION=$(uname -r)
#The kernel boot parameters of the live cd.
-KERNEL_PARAMS=""
+KERNEL_PARAMS="tpm_tis.interrupts=0"
#The kernel boot parameters that ubiquity(the installer) will
#set in /etc/default/grub for the installation. Often, this
#will be the same as KERNEL_PARAMS
-UBIQUITY_KERNEL_PARAMS=""
+UBIQUITY_KERNEL_PARAMS="tpm_tis.interrupts=0"
#Extra packages to install in the image. Packages must be separated by a space.
-EXTRA_PKGS="ubiquity-slideshow-ubuntu"
+EXTRA_PKGS=""
#Release notes url that shows up after the Ubiquity installer is started
RELEASE_NOTES_URL="https://www.distroshare.com/"
@@ -111,6 +111,13 @@ patch < plugininstall.patch
cp plugininstall.py /usr/share/ubiquity/plugininstall.py
rm -f plugininstall.py
+echo "Patching Ubiquity crypto-base.sh to disable zram"
+echo " when a user chooses to encrypt the drive/home"
+cp /lib/partman/lib/crypto-base.sh .
+patch < crypto-base.sh.patch
+cp crypto-base.sh /lib/partman/lib/
+rm -f crypto-base.sh
+
#Copy the filesystem
echo "Copying the current system to the new directories"
rsync -a --one-file-system --exclude=/proc/* --exclude=/dev/* \

0 comments on commit b01e654

Please sign in to comment.