Container instead of VM: Why do all the sudo? [was Re: Software updater no longer functional]

Ralf Mardorf silver.bullet at zoho.com
Sat Jan 28 16:52:16 UTC 2017


On Sun, 29 Jan 2017 03:18:22 +1100, Karl Auer wrote:
>On Sat, 2017-01-28 at 16:49 +0100, Ralf Mardorf wrote:
>> sudo mount -wL moonstudio /mnt/moonstudio/  
>
>What are you mounting. I.e., what has the label "moonstudio" and where
>did it come from?

It's an Ubuntu install, other than a chroot, the systemd-nspawn boot
option (-b) should handle everything, even if the Ubuntu install is
spread among different partitions.

[rocketmouse at archlinux ~]$ blkid -L moonstudio
/dev/sdb11
[rocketmouse at archlinux ~]$ sudo mkdir /mnt/moonstudio
[rocketmouse at archlinux ~]$ sudo mount /dev/sdb11 /mnt/moonstudio/
[rocketmouse at archlinux ~]$ ls /mnt/moonstudio/
bin  boot  dev  etc  home  lib  lib64  media  mnt  opt  proc  root  run  sbin  snap  srv  sys  tmp  usr  var
[rocketmouse at archlinux ~]$ grep PRETTY /mnt/moonstudio/etc/os-release 
PRETTY_NAME="Ubuntu 16.04.1 LTS"
[rocketmouse at archlinux ~]$ sudo systemd-nspawn -qD /mnt/moonstudio/ lsb_release -d
Description:	Ubuntu 16.04.1 LTS
[rocketmouse at archlinux ~]$ sudo systemd-nspawn -qD /mnt/moonstudio/
[root at moonstudio ~]# lsb_release -d
Description:	Ubuntu 16.04.1 LTS
[root at moonstudio ~]# logout
[rocketmouse at archlinux ~]$ lsb_release -d
bash: lsb_release: command not found
[rocketmouse at archlinux ~]$ grep PRETTY /etc/os-release 
PRETTY_NAME="Arch Linux"
[rocketmouse at archlinux ~]$ sudo systemd-nspawn -bqD /mnt/moonstudio/ 
systemd 229 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ -LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN)
Detected virtualization systemd-nspawn.
Detected architecture x86-64.

Welcome to Ubuntu 16.04.1 LTS!

Set hostname to <moonstudio>.
Failed to install release agent, ignoring: No such file or directory
[  OK  ] Listening on Journal Socket.
[  OK  ] Listening on Syslog Socket.
[  OK  ] Listening on Journal Socket (/dev/log).
[  OK  ] Created slice System Slice.
         Starting Journal Service...
[  OK  ] Reached target Swap.
         Mounting Huge Pages File System...
[  OK  ] Reached target Remote File Systems (Pre).
[  OK  ] Reached target Remote File Systems.
[  OK  ] Reached target Encrypted Volumes.
         Mounting POSIX Message Queue File System...
[  OK  ] Created slice User and Session Slice.
[  OK  ] Reached target Slices.
[  OK  ] Started Forward Password Requests to Wall Directory Watch.
[  OK  ] Reached target User and Group Name Lookups.
[  OK  ] Listening on /dev/initctl Compatibility Named Pipe.
         Starting Uncomplicated firewall...
         Starting Remount Root and Kernel File Systems...
[  OK  ] Started Uncomplicated firewall.
[  OK  ] Mounted POSIX Message Queue File System.
[  OK  ] Mounted Huge Pages File System.
systemd-remount-fs.service: Main process exited, code=exited, status=1/FAILURE
[FAILED] Failed to start Remount Root and Kernel File Systems.
See 'systemctl status systemd-remount-fs.service' for details.
systemd-remount-fs.service: Unit entered failed state.
systemd-remount-fs.service: Failed with result 'exit-code'.
[  OK  ] Started Dispatch Password Requests to Console Directory Watch.
         Starting Load/Save Random Seed...
[  OK  ] Reached target Local File Systems (Pre).
[  OK  ] Reached target Local File Systems.
         Starting Clean up any mess left by 0dns-up...
[  OK  ] Created slice system-getty.slice.
         Starting LSB: AppArmor initialization...
         Starting Tell Plymouth To Write Out Runtime Data...
[  OK  ] Started Load/Save Random Seed.
[  OK  ] Started Tell Plymouth To Write Out Runtime Data.
[  OK  ] Started Clean up any mess left by 0dns-up.
         Starting Nameserver information manager...
[  OK  ] Started Nameserver information manager.
[  OK  ] Started LSB: AppArmor initialization.
         Starting Raise network interfaces...
[  OK  ] Started Journal Service.
         Starting Flush Journal to Persistent Storage...
[FAILED] Failed to start Raise network interfaces.
See 'systemctl status networking.service' for details.
[  OK  ] Reached target Network.
[  OK  ] Reached target Network is Online.
[  OK  ] Started Flush Journal to Persistent Storage.
         Starting Create Volatile Files and Directories...
[  OK  ] Started Create Volatile Files and Directories.
         Starting Update UTMP about System Boot/Shutdown...
[  OK  ] Reached target System Time Synchronized.
[  OK  ] Started Update UTMP about System Boot/Shutdown.
[  OK  ] Reached target System Initialization.
[  OK  ] Started Timer to automatically refresh installed snaps.
[  OK  ] Started ACPI Events Check.
[  OK  ] Listening on D-Bus System Message Bus Socket.
[  OK  ] Listening on ACPID Listen Socket.
[  OK  ] Listening on UUID daemon activation socket.
[  OK  ] Reached target Paths.
[  OK  ] Started Daily apt activities.
         Starting Socket activation for snappy daemon.
[  OK  ] Started Daily Cleanup of Temporary Directories.
[  OK  ] Reached target Timers.
[  OK  ] Listening on Socket activation for snappy daemon.
[  OK  ] Reached target Sockets.
[  OK  ] Reached target Basic System.
         Starting LSB: Realtime IRQ thread tunning....
         Starting Restore /etc/resolv.conf if the system crashed before the ppp link was shut down...
         Starting Login Service...
         Starting LSB: Set the CPU Frequency Scaling governor to "ondemand"...
         Starting Permit User Sessions...
[  OK  ] Started Snappy daemon.
[  OK  ] Started D-Bus System Message Bus.
         Starting LSB: Record successful boot for GRUB...
         Starting Accounts Service...
         Starting LSB: daemon to balance interrupts for SMP systems...
         Starting System Logging Service...
         Starting /etc/rc.local Compatibility...
[  OK  ] Started Deferred execution scheduler.
         Starting Auto import assertions from block devices...
         Starting Alice DHCP...
         Starting LSB: Postfix Mail Transport Agent...
[  OK  ] Started Restore /etc/resolv.conf if the system crashed before the ppp link was shut down.
[  OK  ] Started Permit User Sessions.
[  OK  ] Started LSB: Postfix Mail Transport Agent.
[  OK  ] Started Login Service.
[  OK  ] Reached target Mail Transport Agent.
         Starting Light Display Manager...
[  OK  ] Started LSB: Realtime IRQ thread tunning..
[  OK  ] Started /etc/rc.local Compatibility.
         Starting Hold until boot process finishes up...
[  OK  ] Started Hold until boot process finishes up.
         Starting Set console scheme...
[  OK  ] Started Console Getty.
[  OK  ] Reached target Login Prompts.
[FAILED] Failed to start Set console scheme.
See 'systemctl status setvtrgb.service' for details.
[  OK  ] Started LSB: Set the CPU Frequency Scaling governor to "ondemand".
[  OK  ] Started LSB: daemon to balance interrupts for SMP systems.
[  OK  ] Started LSB: Record successful boot for GRUB.
[  OK  ] Started System Logging Service.
[  OK  ] Started Light Display Manager.
[  OK  ] Started Auto import assertions from block devices.
         Starting Authenticate and Authorize Users to Run Privileged Tasks...
[  OK  ] Started Authenticate and Authorize Users to Run Privileged Tasks.
[  OK  ] Started Accounts Service.
[  OK  ] Stopped Light Display Manager.
         Starting Light Display Manager...
[  OK  ] Started Light Display Manager.
[  OK  ] Stopped Light Display Manager.
         Starting Light Display Manager...
[  OK  ] Started Light Display Manager.
[  OK  ] Stopped Light Display Manager.
         Starting Light Display Manager...
[  OK  ] Started Light Display Manager.

Ubuntu 16.04.1 LTS moonstudio console

moonstudio login: weremouse
Password: 
Last login: Sat Jan 28 16:44:43 CET 2017 on console
Welcome to Ubuntu 16.04.1 LTS (GNU/Linux 4.9.6-1-ARCH x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

  System information as of Sat Jan 28 17:50:06 CET 2017

  System load:  0.18               Processes:             18
  Usage of /:   77.3% of 25.08GB   Users logged in:       0
  Memory usage: 33%                IP address for enp3s0: 192.168.1.159
  Swap usage:   0%

  Graph this data and manage this system at:
    https://landscape.canonical.com/
[weremouse at moonstudio ~]$ shutdown -h now
[weremouse at moonstudio ~]$          Stopping Session c1 of user
  weremouse. Stopping User Manager for UID 1000...
[  OK  ] Stopped target Graphical Interface.
[  OK  ] Stopped target Multi-User System.
         Stopping D-Bus System Message Bus...
         Stopping Snappy daemon...
[  OK  ] Stopped target Login Prompts.
         Stopping LSB: Record successful boot for GRUB...
         Stopping LSB: daemon to balance interrupts for SMP systems...
         Stopping Authenticate and Authorize Users to Run Privileged
  Tasks... Stopping Accounts Service...
[  OK  ] Stopped target Mail Transport Agent.
         Stopping LSB: Realtime IRQ thread tunning....
         Stopping LSB: Postfix Mail Transport Agent...
[  OK  ] Removed slice system-getty.slice.
         Stopping Console Getty...
         Stopping System Logging Service...
[  OK  ] Stopped target Timers.
[  OK  ] Stopped Daily apt activities.
[  OK  ] Stopped Timer to automatically refresh installed snaps.
[  OK  ] Stopped Daily Cleanup of Temporary Directories.
         Stopping Alice DHCP...
         Stopping LSB: Set the CPU Frequency Scaling governor to
  "ondemand"... Stopping Deferred execution scheduler...
[  OK  ] Stopped Snappy daemon.
[  OK  ] Stopped Accounts Service.
[  OK  ] Stopped System Logging Service.
[  OK  ] Stopped Deferred execution scheduler.
[  OK  ] Stopped Console Getty.
[  OK  ] Stopped Authenticate and Authorize Users to Run Privileged
  Tasks. [  OK  ] Stopped User Manager for UID 1000.
[  OK  ] Stopped Session c1 of user weremouse.
[  OK  ] Stopped D-Bus System Message Bus.
[  OK  ] Stopped LSB: Realtime IRQ thread tunning..
[  OK  ] Stopped LSB: Postfix Mail Transport Agent.
[  OK  ] Stopped Alice DHCP.
[  OK  ] Stopped LSB: Record successful boot for GRUB.
[  OK  ] Stopped LSB: daemon to balance interrupts for SMP systems.
[  OK  ] Stopped LSB: Set the CPU Frequency Scaling governor to
  "ondemand". [  OK  ] Stopped target System Time Synchronized.
[  OK  ] Removed slice User Slice of weremouse.
         Stopping Login Service...
         Stopping Permit User Sessions...
[  OK  ] Stopped /etc/rc.local Compatibility.
[  OK  ] Stopped target Network is Online.
[  OK  ] Stopped target Network.
[  OK  ] Stopped Login Service.
[  OK  ] Stopped Permit User Sessions.
[  OK  ] Stopped target Remote File Systems.
[  OK  ] Stopped target Remote File Systems (Pre).
[  OK  ] Stopped target Basic System.
[  OK  ] Stopped target Slices.
[  OK  ] Removed slice User and Session Slice.
         Unmounting /tmp...
[  OK  ] Stopped target Paths.
[  OK  ] Stopped Dispatch Password Requests to Console Directory Watch.
[  OK  ] Stopped ACPI Events Check.
[  OK  ] Stopped Forward Password Requests to Wall Directory Watch.
[  OK  ] Stopped target Sockets.
[  OK  ] Closed Socket activation for snappy daemon.
[  OK  ] Closed Syslog Socket.
[  OK  ] Closed UUID daemon activation socket.
[  OK  ] Closed D-Bus System Message Bus Socket.
[  OK  ] Closed ACPID Listen Socket.
[  OK  ] Stopped target System Initialization.
[  OK  ] Stopped target Swap.
         Stopping Update UTMP about System Boot/Shutdown...
         Stopping Load/Save Random Seed...
[  OK  ] Stopped target Encrypted Volumes.
[  OK  ] Stopped target User and Group Name Lookups.
[  OK  ] Stopped Load/Save Random Seed.
[  OK  ] Stopped Update UTMP about System Boot/Shutdown.
[  OK  ] Stopped Create Volatile Files and Directories.
[  OK  ] Stopped target Local File Systems.
         Starting Unattended Upgrades Shutdown...
         Unmounting /run/user/1000...
         Unmounting /proc/sysrq-trigger...
         Unmounting /run/systemd/nspawn/incoming...
         Unmounting /proc/sys/kernel/random/boot_id...
[  OK  ] Unmounted /tmp.
[  OK  ] Unmounted /proc/sysrq-trigger.
[  OK  ] Unmounted /run/user/1000.
[  OK  ] Unmounted /run/systemd/nspawn/incoming.
[  OK  ] Reached target Unmount All Filesystems.
[  OK  ] Stopped target Local File Systems (Pre).
[  OK  ] Unmounted /proc/sys/kernel/random/boot_id.
[  OK  ] Started Unattended Upgrades Shutdown.
[  OK  ] Reached target Shutdown.
Sending SIGTERM to remaining processes...
Sending SIGKILL to remaining processes...
Powering off.
[rocketmouse at archlinux ~]$ 





More information about the ubuntu-users mailing list