3

Lethe was once a very useful utility that enabled users to freeze the entire Ubuntu partition. There were instructions posted for installing Lethe on Ubuntu 14.04 which continued to work until the 16.10 release.

Can anyone provide an update to the instructions for installing Lethe (last posted here) that will work on Ubuntu 18.04 and derivatives.

Apparently, there have been changes beginning with the 17.04 release that has made the hack used for Ubuntu 14.04 ineffective.

Thanks

2 Answers 2

1

You found very interesting peace of software.
Having equivalent of Faronics Deep Freeze on Ubuntu will be great.

Let's start with downloading of the software:

wget https://kent.dl.sourceforge.net/project/lethe/lethe/0.3x/lethe_0.34_all.deb
sudo apt-get install ./lethe_0.34_all.deb

But it will not install with error:

Generating grub configuration file ...
/etc/grub.d/09_lethe: 22: .: Can't open /usr/lib/grub/update-grub_lib
dpkg: error processing package lethe (--configure):
 installed lethe package post-installation script subprocess returned error exit status 2
Errors were encountered while processing:
 lethe
E: Sub-process /usr/bin/dpkg returned an error code (1)

We need to recreate this file from previous Ubuntu version, or maybe Debian Wheezy (see this link from packages.debian.org):

cat <<\EOF | sudo tee /usr/lib/grub/update-grub_lib
# stub for new grub-mkconfig_lib
# Copyright (C) 2007,2008  Free Software Foundation, Inc.
#
# GRUB is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GRUB is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GRUB.  If not, see <http://www.gnu.org/licenses/>.

prefix="/usr"
exec_prefix="${prefix}"
datarootdir="${prefix}/share"

. "${datarootdir}/grub/grub-mkconfig_lib"

grub_warn "update-grub_lib is deprecated, use grub-mkconfig_lib instead"
EOF

and make it executable

sudo chmod +x /usr/lib/grub/update-grub_lib

then install package again:

sudo apt-get install ./lethe_0.34_all.deb

then you should disable AppArmor to get NetworkManager and other stuff working on freezed system:

sudo sed -i "s/aufs=tmpfs$/aufs=tmpfs apparmor=0/" /etc/lethe/09_lethe /etc/grub.d/09_lethe
sudo update-initramfs -u -k all
sudo update-grub

Reboot and enjoy:

GRUB, freezed with Lethe

$ cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-4.15.0-33-generic root=UUID=2772ff62-4902-4409-a588-cffebbf33209 ro quiet splash aufs=tmpfs apparmor=0

I have tested this method on Ubuntu 16.04 LTS and 18.04 LTS: after installation of Lethe I booted new system, created new file, then rebooted and can't find the file in place. So it really works!

2
  • Thank you for your instructions. I followed them and installed Lethe successfully. There were two error messages during boot: /scripts/local-bottom/lethe: line 77: source: not found cat: can't open '/aufs/ro/etc/rc.local': No such file or directory The second error message is removed by follow these instructions. I don't know how to remove the first error as the "source" appears to be present. Perhaps I'm misinterpreting something.
    – no.ne
    Oct 13, 2018 at 18:49
  • I have simply ignored both warnings, the Lethe seems to do all needed job. So you can accept the answer.
    – N0rbert
    Oct 13, 2018 at 18:51
0

I've spent a while to try and wrap this software to something...user-friendly. I finally came up with something like this - https://github.com/TheArqsz/deep-freezer. It uses Lethe 0.34 package and fixes some obvious errors. It changes grub entries that Lethe provides to something nicer. User has access to basic, non-persistent workspace and its persistent version so changes can be made.

Example grub entries

I tested this script under Ubuntu 20.04 and 18.04.

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .