3

I'm trying to enable canonical-livepatch on ubuntu server 16.04

sudo snap install canonical-livepatch
canonical-livepatch 7.24 from 'canonical' installed
sudo canonical-livepatch enable my_TOKEN_here
cannot perform operation: mount --rbind /var/log /tmp/snap.rootfs_JVIDqo//var/log: Permission denied

and

canonical-livepatch status
canonical-livepatch: command not found
$ df -H
Filesystem      Size  Used Avail Use% Mounted on
udev             17G     0   17G   0% /dev
tmpfs           3.4G  9.6M  3.4G   1% /run
/dev/sda1       237G  4.2G  220G   2% /
tmpfs            17G     0   17G   0% /dev/shm
tmpfs           5.3M     0  5.3M   0% /run/lock
tmpfs            17G     0   17G   0% /sys/fs/cgroup
tmpfs            17G   37k   17G   1% /tmp
/dev/loop0       88M   88M     0 100% /snap/core/3748
/dev/sdb1        59G  163M   56G   1% /boot
/dev/md126p1    985G  508M  934G   1% /mnt/1TB
tmpfs           3.4G     0  3.4G   0% /run/user/1000
/dev/loop1      4.6M  4.6M     0 100% /snap/canonical-livepatch/26

I've checked this with no success.

I think it has something in common with mounting /tmp using this method to RAM and changed /var/log location with symlink to HDD like this

lrwxrwxrwx 1 root root 12 Dec  8 14:17 /var/log -> /mnt/1TB/log/
Dan
  • 13,119
Ivan Nikolaev
  • 155
  • 1
  • 10
  • Same here with Ubuntu 18.04.1 LTS (GNU/Linux 3.13.0-57-generic x86_64):
    $ sudo snap install canonical-livepatch
    error: cannot perform the following tasks:
    - Run configure hook of "canonical-livepatch" snap if present (run hook "configure": cannot perform operation: mount --bind /snap/core/current//etc/nsswitch.conf /tmp/snap.rootfs_7khxxI/etc/nsswitch.conf: Permission denied)
    
    – JavierCane Nov 19 '18 at 06:59

1 Answers1

0

Because mount --rbind doesn't work on links. Snap expects /var/log to be a directory.

Matthieu
  • 476