====== Rebuild Ubuntu LiveCD with online search results disabled by default ====== * What? * Rebuilding official Ubuntu LiveCD and build-in the following packages: * {{:en:kb:libunity9-disable-online-search_20140103-18_all.deb|libunity9-disable-online-search}} (Links: [[https://launchpad.net/~giner/+archive/privacy-friendly-fixes|PPA]], [[https://github.com/giner/helplinux/tree/master/packages/libunity9-disable-online-search|package sources on GitHub]]) * Why? * Ubuntu sends your search requests through the internet without your direct approval since Ubuntu 12.10, so Ubuntu is not privacy friendly anymore. We are fixing it by changing default behaviour:\\ {{:en:kb:include_online_search_results_off.png?600}} * Links: * [[https://www.eff.org/deeplinks/2012/10/privacy-ubuntu-1210-amazon-ads-and-data-leaks|Privacy in Ubuntu 12.10: Amazon Ads and Data Leaks]] * [[http://www.fsf.org/blogs/rms/ubuntu-spyware-what-to-do|Ubuntu Spyware: What to do?]] * [[https://bugs.launchpad.net/ubuntu/+source/unity-lens-shopping/+bug/1055952|Direct data leaking to Amazon]] * [[https://bugs.launchpad.net/ubuntu/+source/unity-lens-shopping/+bug/1073114|Shopping Lens Does Not Respect User Privacy]] * Applies: * Ubuntu Desktop 12.10 and later * Requirements: * Running Ubuntu (LiveCD is okay) * 5Gb of free space for temporary files ===== make-ubuntu-privacy-friendly.sh ===== #!/bin/bash -e [[ $# -ge 1 ]] || { echo "Usage: $0 filename.iso \"package1.deb [ package2.deb ]\" [ temp_dir_path ]"; exit 0; } # packages that have to be installed PACKAGES="$2" # ISO file path ISOFILE=$1 # Ubuntu LiveCD version # set temporary directory [[ -n $3 ]] && TMPDIR=$3 || TMPDIR=/tmp # create temporary directories EXT4IMG=$(mktemp -p $TMPDIR) # Image file EXT4MNT=$(mktemp -d) # Mounting point for building ISOMNT=$(mktemp -d) # Mounting point for ISO image # set ISO paths ISOFILE=$(readlink -e "$ISOFILE") ISOFILENEW="${ISOFILE%.iso}-privacy-friendly.iso" ISOVOLUMEID="$(isoinfo -d -i $ISOFILE | grep -i '^volume id:' | sed -r 's/^volume id:\s+//i') pf" # clean up on stop trap "exit 1" INT trap "echo 'Clean up ...'; umount $ISOMNT || true; umount $EXT4MNT || true; rmdir $ISOMNT; rm $EXT4IMG; rmdir $EXT4MNT; exit 0" EXIT # install required tools apt-get install squashfs-tools rsync genisoimage xorriso # create ext4 image file and mount truncate -s 5G $EXT4IMG mkfs.ext4 -F $EXT4IMG mount $EXT4IMG $EXT4MNT -o loop # create temporary directories inside ext4 image ISODATADIR=$EXT4MNT/isodata; mkdir $ISODATADIR SQUASHFSDIR=$EXT4MNT/squashfs # mount livecd mount -o loop,ro "$ISOFILE" $ISOMNT # extract squashfs rsync --exclude=/casper/filesystem.squashfs -a $ISOMNT/ $ISODATADIR unsquashfs -d $SQUASHFSDIR $ISOMNT/casper/filesystem.squashfs # install packages PKGDIR=$SQUASHFSDIR/tmp/packages mkdir $PKGDIR cp $PACKAGES $PKGDIR echo 'dpkg -i /tmp/packages/*.deb' | chroot $SQUASHFSDIR rm -r $PKGDIR # add packages to manifest for pkg in $PACKAGES; do dpkg -I $pkg | awk '/Package:/ {package=$2} /Version:/ {version=$2} END {print package"\t"version}' >> \ $ISODATADIR/casper/filesystem.manifest done # update filesystem.size du -sx --block-size=1 $SQUASHFSDIR | cut -f1 > $ISODATADIR/casper/filesystem.size # compress filesystem mksquashfs $SQUASHFSDIR $ISODATADIR/casper/filesystem.squashfs # remove old md5sum.txt and calculate new md5 sums pushd $ISODATADIR find -type f | grep -vE '(\./isolinux/|\./md5sum.txt)' | xargs -l md5sum | tee md5sum.txt popd # build iso xorrisofs -D -r -V "$ISOVOLUMEID" -J -l -b \ isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot \ -boot-load-size 4 -boot-info-table -o \ "$ISOFILENEW" $ISODATADIR # postprocess image for hybrid mode isohybrid $ISOFILENEW ===== Download Ubuntu privacy friendly ISO (ready to use) ===== * ubuntu-13.10-desktop-amd64-privacy-friendly.iso * MD5SUM: b410b4b46fdebf7e6f6b4d68ecd7b58d * Torrent: http://thepiratebay.org/torrent/9447675 * Direct link1: http://yadi.sk/d/1OjjiYsVFcZsq * Direct link2: https://drive.google.com/file/d/0B7ue80L1_MCWeUV3QjgxSVRKVEk * ubuntu-14.04-desktop-amd64-privacy-friendly.iso * MD5SUM: c60a99a854451af55cdd7854b184c565 * Torrent: http://thepiratebay.se/torrent/9997564 * Direct link1: http://yadi.sk/d/k6DzPIPuMo2Np * Direct link2: https://drive.google.com/file/d/0B7ue80L1_MCWR2ppWXRHQUt4eW8 {{tag>ubuntu privacy amazon}}