I need the persistent live Ubuntu of preferably 16.04 because I need to rescue my whole encrypted HDD of 16.04 as discussed in the thread How do I add myself back in sudo group in Encrypted HDD of 16.04? I create here a new persistent Live Ubuntu 16.04 with some bugs described at the end with Videonauth.
sudo apt-get install gksu debootstrap
gksudo gparted
. Make USB withext4
leaving only 1GB as free memory, and set 1GB for Linux Swap; Manage flags > onlyboot
.Prepare the OS by and run in the USB stick
sudo mkdir /mnt/stick sudo mount /dev/sdb1 /mnt/stick/ sudo debootstrap --arch=amd64 xenial /mnt/stick http://de.archive.ubuntu.com/ubuntu/ sudo mount -o bind /dev /mnt/stick/dev sudo mount -o bind /dev/pts /mnt/stick/dev/pts sudo mount -t sysfs /sys /mnt/stick/sys sudo mount -t proc /proc /mnt/stick/proc sudo cp /proc/mounts /mnt/stick/etc/mtab sudo cp /etc/resolv.conf /mnt/stick/etc/resolv.conf sudo chroot /mnt/stick/
Prompt looks like
root@masi-CM6340:/#
. Set locales.%locale-gen en_US en_US.UTF-8 %dpkg-reconfigure locale dpkg-rekonfigure locales % two above commands cause a bug in gnome-terminal; choose here your locales and set environment en_US.UTF-8 dpkg-reconfigure keyboard-configuration localedef -i en_US -c -f UTF-8 en_US.UTF-8
apt-get install linux-image-generic
. You get/dev/sda [NotThisOne, your HDD], 2 /dev/sdb (31474 MB; ???) 2b - /dev/sdb1 (30398 MB; /)
. Choose/dev/sdb1
and/dev/sdb
. Choese here Linux kernel what you like. I keep Linux kernel 4.6 most stable which you can download as described at the end of the body.apt-get install vim wget
blkid
, copy to clipboard,vim /etc/fstab
. Removesda
lines so only twosdb
lines. Edit them to likeUUID="..." swap swap defaulst 0 0
andUUID="..." / ext4 defaults 0 1
.Paste the following to the file
/etc/apt/sources.list
#deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to # newer versions of the distribution. deb http://de.archive.ubuntu.com/ubuntu/ xenial main restricted # deb-src http://de.archive.ubuntu.com/ubuntu/ xenial main restricted ## Major bug fix updates produced after the final release of the ## distribution. deb http://de.archive.ubuntu.com/ubuntu/ xenial-updates main restricted # deb-src http://de.archive.ubuntu.com/ubuntu/ xenial-updates main restricted ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team, and may not be under a free licence. Please satisfy yourself as to ## your rights to use the software. Also, please note that software in ## universe WILL NOT receive any review or updates from the Ubuntu security ## team. deb http://de.archive.ubuntu.com/ubuntu/ xenial universe # deb-src http://de.archive.ubuntu.com/ubuntu/ xenial universe deb http://de.archive.ubuntu.com/ubuntu/ xenial-updates universe # deb-src http://de.archive.ubuntu.com/ubuntu/ xenial-updates universe ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team, and may not be under a free licence. Please satisfy yourself as to ## your rights to use the software. Also, please note that software in ## multiverse WILL NOT receive any review or updates from the Ubuntu ## security team. deb http://de.archive.ubuntu.com/ubuntu/ xenial multiverse # deb-src http://de.archive.ubuntu.com/ubuntu/ xenial multiverse deb http://de.archive.ubuntu.com/ubuntu/ xenial-updates multiverse # deb-src http://de.archive.ubuntu.com/ubuntu/ xenial-updates multiverse ## N.B. software from this repository may not have been tested as ## extensively as that contained in the main release, although it includes ## newer versions of some applications which may provide useful features. ## Also, please note that software in backports WILL NOT receive any review ## or updates from the Ubuntu security team. deb http://de.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse # deb-src http://de.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse ## Uncomment the following two lines to add software from Canonical's ## 'partner' repository. ## This software is not part of Ubuntu, but is offered by Canonical and the ## respective vendors as a service to Ubuntu users. deb http://archive.canonical.com/ubuntu xenial partner deb-src http://archive.canonical.com/ubuntu xenial partner deb http://security.ubuntu.com/ubuntu xenial-security main restricted # deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted deb http://security.ubuntu.com/ubuntu xenial-security universe # deb-src http://security.ubuntu.com/ubuntu xenial-security universe deb http://security.ubuntu.com/ubuntu xenial-security multiverse # deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse
Do
dpkg-divert --local --rename --add /sbin/initctl ln -s /bin/true /sbin/initctl apt-get update % Comment this out if ubuntu-desktop is wanted apt-get install ubuntu-desktop % Comment out if ubuntu-server is wanted % apt-get install ubuntu-server adduser --home /home/masi masi
Add
masi
to the existing groupsusermod -aG adm,cdrom,sudo,dip,plugdev,lpadmin,sambashare masi
where you can leave outsambashare
.Ignore drivers because USB stick not made for one PC.
For recovering the encrypted HDD, install the packages
apt-get ecryptfs-utils schroot testdisk
wheretestdisk
for preparing discs and the other two for recovering the whole disc encrypted Ubuntu 16.04.sudo echo 'GRUB_DISABLE_OS_PROBER="true"' >> /etc/default/grub
;update-grub
Finalize the install. Do
rm /sbin/initctl dpkg-divert --local --rename --remove /sbin/initctl
Test your Installation of Persistent Live Ubuntu 16.04 [alpha]
Start your new Persistent Ubuntu. In terminal, do
sudo true
. If you getUnable to resolve host * Connection refused
, do# https://askubuntu.com/q/59458/25388 sudo vim /etc/hostname masi sudo vim /etc/hosts 127.0.0.1 localhost.localdomain masi [...]
Possible complication: Ubuntu starts in $(inittramfs)$. Do ...
Result: USB starts up Ubuntu Desktop GUI and UI
- you can open LibreOffice, Firefox, ...
masi
is in sudo group; groups correct.- Locales set correctly when
chroot
to stick. - If you have a bug in gnome-terminal i.e. opening it in GUI, do
sudo dpkg-rekonfigure locales
again in TTY1. It resolves the case.
Bugs which are reported to Videonauth
Always update-and-upgrade system in doing the tests: sudo apt-get update && sudo apt-get upgrade
.
- Ubuntu's Internet Browser. Launching it crashes the system. Mouse only works but no signal can be send to the TTY.
- Firefox. Launching it gives a warning about [profile exists] so cannot open. Temporary fix
rm -r ~/.mozilla && rm -r ./.cache/mozilla
only for one session. The problem persists on every login. Better working fix:sudo mv -v /home/masi /home/masi_backup
,sudo mkdir -v /home/masi
,sudo chown masi:masi /home/masi
,sudo chmod 755 /home/masi
andsudo reboot
because some ownerships of home-folder causes the bug. Run the command of the source and you get the following differences /etc/hostname
fails to match/etc/hosts
after some time- Sometimes, starts up to
(inittramsfs)
Output of vimdiff <(find /home/masi -printf "%P %u:%g %m\n" | sort) <(find /home/masi_backup -printf "%P %u:%g %m\n" | sort)
%LHS-file
.bash_history masi:masi 600
.cache/compizconfig-1/animation.pb masi:masi 664
.cache/compizconfig-1/commands.pb masi:masi 664
.cache/compizconfig-1/compiztoolbox.pb masi:masi 664
% here many files not existing in the RHS
%RHS-file (fresh installation)
.bash_history root:root 600
.bash_logout masi:masi 664
.bashrc masi:masi 644
.cache root:root 700
where I do not understand which caused the bug.
Upgrade to Linux Kernel 4.6
Do as instructed here. There is an universal bug with resume/suspend in Linux kernel 4.4. Upgrading to 4.6 solves it and makes the system much better.
System: 14.04, 16.04
Linux kernel: 4.4 - 4.6