ubuntu falha na inicialização, Falha ao iniciar Defina o nome do host para o valor armazenado na partição gravável

0

link

De acordo com o bug acima, não consigo fazer login em um sistema inicializado em funcionamento.

Os erros importantes são

systemd[1]: snappy-set-hostname.service: Start request repeated too quickly.
systemd[1]: Failed to start Set the hostname to the value stored on the writable partition.

Se encontrar os seguintes erros nos registros

journalctl
....  
Mar 30 09:05:00 aaron-ubunix systemd[1]: Started Set the hostname to the value stored on the writable partition.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Started Set the hostname to the value stored on the writable partition.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Started Set the hostname to the value stored on the writable partition.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Reached target Sound Card.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Reached target Bluetooth.
Mar 30 09:05:00 aaron-ubunix systemd[1]: snappy-set-hostname.service: Start request repeated too quickly.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Failed to start Set the hostname to the value stored on the writable partition.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Dependency failed for System Initialization.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Dependency failed for ACPID Listen Socket.
Mar 30 09:05:00 aaron-ubunix systemd[1]: acpid.socket: Job acpid.socket/start failed with result 'dependency'.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Dependency failed for getty on tty2-tty6 if dbus and logind are not available.
Mar 30 09:05:00 aaron-ubunix systemd[1]: getty-static.service: Job getty-static.service/start failed with result 'dependency'.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Dependency failed for Basic System.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Dependency failed for Multi-User System.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Dependency failed for Graphical Interface.
Mar 30 09:05:00 aaron-ubunix systemd[1]: graphical.target: Job graphical.target/start failed with result 'dependency'.
Mar 30 09:05:00 aaron-ubunix systemd[1]: multi-user.target: Job multi-user.target/start failed with result 'dependency'.
Mar 30 09:05:00 aaron-ubunix systemd[1]: basic.target: Job basic.target/start failed with result 'dependency'.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Dependency failed for Getty on tty1.
Mar 30 09:05:00 aaron-ubunix systemd[1]: [email protected]: Job [email protected]/start failed with result 'dependency'.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Dependency failed for Snappy daemon.
Mar 30 09:05:00 aaron-ubunix systemd[1]: snapd.service: Job snapd.service/start failed with result 'dependency'.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Dependency failed for pcapdump.service.
Mar 30 09:05:00 aaron-ubunix systemd[1]: pcapdump.service: Job pcapdump.service/start failed with result 'dependency'.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Dependency failed for Suspend Active Libvirt Guests.
Mar 30 09:05:00 aaron-ubunix systemd[1]: libvirt-guests.service: Job libvirt-guests.service/start failed with result 'dependency'.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Dependency failed for Avahi mDNS/DNS-SD Stack Activation Socket.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Dependency failed for Avahi mDNS/DNS-SD Stack.
Mar 30 09:05:00 aaron-ubunix systemd[1]: avahi-daemon.service: Job avahi-daemon.service/start failed with result 'dependency'.
Mar 30 09:05:00 aaron-ubunix systemd[1]: avahi-daemon.socket: Job avahi-daemon.socket/start failed with result 'dependency'.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Dependency failed for Virtualization daemon.
Mar 30 09:05:00 aaron-ubunix systemd[1]: libvirtd.service: Job libvirtd.service/start failed with result 'dependency'.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Dependency failed for Regular background program processing daemon.
Mar 30 09:05:00 aaron-ubunix systemd[1]: cron.service: Job cron.service/start failed with result 'dependency'.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Dependency failed for OpenBSD Secure Shell server.
Mar 30 09:05:00 aaron-ubunix systemd[1]: ssh.service: Job ssh.service/start failed with result 'dependency'.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Dependency failed for oFono Mobile telephony stack.
Mar 30 09:05:00 aaron-ubunix systemd[1]: ofono.service: Job ofono.service/start failed with result 'dependency'.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Dependency failed for LSB: automatic crash report generation.
Mar 30 09:05:00 aaron-ubunix systemd[1]: apport.service: Job apport.service/start failed with result 'dependency'.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Dependency failed for CUPS Scheduler.
Mar 30 09:05:00 aaron-ubunix systemd[1]: cups.path: Job cups.path/start failed with result 'dependency'.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Dependency failed for LSB: exim Mail Transport Agent.
Mar 30 09:05:00 aaron-ubunix systemd[1]: exim4.service: Job exim4.service/start failed with result 'dependency'.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Dependency failed for D-Bus System Message Bus.
Mar 30 09:05:00 aaron-ubunix systemd[1]: dbus.service: Job dbus.service/start failed with result 'dependency'.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Dependency failed for Run anacron jobs.
Mar 30 09:05:00 aaron-ubunix systemd[1]: anacron.service: Job anacron.service/start failed with result 'dependency'.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Dependency failed for OpenVPN service.
Mar 30 09:05:00 aaron-ubunix systemd[1]: openvpn.service: Job openvpn.service/start failed with result 'dependency'.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Dependency failed for Socket activation for snappy daemon.
Mar 30 09:05:00 aaron-ubunix systemd[1]: snapd.socket: Job snapd.socket/start failed with result 'dependency'.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Dependency failed for Virtual machine log manager socket.
Mar 30 09:05:00 aaron-ubunix systemd[1]: virtlogd.socket: Job virtlogd.socket/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for Set the CPU Frequency Scaling governor.
Mar 30 09:06:23 aaron-ubunix systemd[1]: ondemand.service: Job ondemand.service/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for crash report submission daemon.
Mar 30 09:06:23 aaron-ubunix systemd[1]: whoopsie.service: Job whoopsie.service/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for Regular background program processing daemon.
Mar 30 09:06:23 aaron-ubunix systemd[1]: cron.service: Job cron.service/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for OpenBSD Secure Shell server.
Mar 30 09:06:23 aaron-ubunix systemd[1]: ssh.service: Job ssh.service/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: sysinit.target: Job sysinit.target/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: snappy-set-hostname.service: Unit entered failed state.
Mar 30 09:06:23 aaron-ubunix systemd[1]: snappy-set-hostname.service: Failed with result 'start-limit-hit'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: snappy-set-hostname.service: Start request repeated too quickly.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Failed to start Set the hostname to the value stored on the writable partition.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for System Initialization.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for Basic System.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for Multi-User System.
Mar 30 09:06:23 aaron-ubunix systemd[1]: multi-user.target: Job multi-user.target/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: basic.target: Job basic.target/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for ISC DHCP IPv6 server.
Mar 30 09:06:23 aaron-ubunix systemd[1]: isc-dhcp-server6.service: Job isc-dhcp-server6.service/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for ACPID Listen Socket.
Mar 30 09:06:23 aaron-ubunix systemd[1]: acpid.socket: Job acpid.socket/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for Virtual machine log manager socket.
Mar 30 09:06:23 aaron-ubunix systemd[1]: virtlogd.socket: Job virtlogd.socket/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for Hold until boot process finishes up.
Mar 30 09:06:23 aaron-ubunix systemd[1]: plymouth-quit-wait.service: Job plymouth-quit-wait.service/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for ISC DHCP IPv4 server.
Mar 30 09:06:23 aaron-ubunix systemd[1]: isc-dhcp-server.service: Job isc-dhcp-server.service/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for LSB: Start/stop sysstat's sadc.
Mar 30 09:06:23 aaron-ubunix systemd[1]: sysstat.service: Job sysstat.service/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for Auto import assertions from block devices.
Mar 30 09:06:23 aaron-ubunix systemd[1]: snapd.autoimport.service: Job snapd.autoimport.service/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for Samba SMB Daemon.
Mar 30 09:06:23 aaron-ubunix systemd[1]: smbd.service: Job smbd.service/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for LSB: disk temperature monitoring daemon.
Mar 30 09:06:23 aaron-ubunix systemd[1]: hddtemp.service: Job hddtemp.service/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for CUPS Scheduler.
Mar 30 09:06:23 aaron-ubunix systemd[1]: cups.socket: Job cups.socket/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for Daily Cleanup of Temporary Directories.
Mar 30 09:06:23 aaron-ubunix systemd[1]: systemd-tmpfiles-clean.timer: Job systemd-tmpfiles-clean.timer/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for PokerTH multiplayer server.
Mar 30 09:06:23 aaron-ubunix systemd[1]: pokerth-server.service: Job pokerth-server.service/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for Snappy daemon.
Mar 30 09:06:23 aaron-ubunix systemd[1]: snapd.service: Job snapd.service/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for Workaround apparmor cacheing.
Mar 30 09:06:23 aaron-ubunix systemd[1]: snappy-workaround-apparmor.service: Job snappy-workaround-apparmor.service/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for LSB: Record successful boot for GRUB.
Mar 30 09:06:23 aaron-ubunix systemd[1]: grub-common.service: Job grub-common.service/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for Socket activation for snappy daemon.
Mar 30 09:06:23 aaron-ubunix systemd[1]: snapd.socket: Job snapd.socket/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for Restore /etc/resolv.conf if the system crashed before the ppp link was shut down.
Mar 30 09:06:23 aaron-ubunix systemd[1]: pppd-dns.service: Job pppd-dns.service/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for D-Bus System Message Bus Socket.
Mar 30 09:06:23 aaron-ubunix systemd[1]: dbus.socket: Job dbus.socket/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: sysinit.target: Job sysinit.target/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: snappy-set-hostname.service: Failed with result 'start-limit-hit'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Failed to start Set the hostname to the value stored on the writable partition.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for System Initialization.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for System Logging Service.
Mar 30 09:06:23 aaron-ubunix systemd[1]: rsyslog.service: Job rsyslog.service/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: sysinit.target: Job sysinit.target/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: snappy-set-hostname.service: Failed with result 'start-limit-hit'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: snappy-set-hostname.service: Start request repeated too quickly.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Failed to start Set the hostname to the value stored on the writable partition.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for System Initialization.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for System Logging Service.
Mar 30 09:06:23 aaron-ubunix systemd[1]: rsyslog.service: Job rsyslog.service/start failed with result 'dependency'.
....
    
por nelaaro 30.03.2017 / 11:03

1 resposta

0

Eu consertei isso adicionando as seguintes linhas ao arquivo abaixo.

Restart=on-failure
RestartSec=00ms  

O arquivo final ficará assim.

sudo systemctl edit snappy-set-hostname.service
[Unit]
Description=Set the hostname to the value stored on the writable partition
After=etc-writable.mount
Requires=local-fs.target
DefaultDependencies=no
After=local-fs.service
RequiresMountsFor=/ /etc
StartLimitBurst=100


[Service]
Type=simple
ExecStart=
ExecStart=/bin/hostname -F /etc/hostname 
Restart=on-failure
RestartSec=500ms

Como estou criando uma substituição para o arquivo padrão do sistema encontrado aqui /lib/systemd/system/snappy-set-hostname.service . Ele cria um novo arquivo aqui /etc/systemd/system/snappy-set-hostname.service.d/override.conf.

É por isso que acabei colocando o seguinte em

ExecStart=
ExecStart=/bin/hostname -F /etc/hostname 

Caso contrário, ele tentará incluir o ExecStart do /lib/systemd , bem como do /etc/systemd , o que pode causar problemas. Como ele tenta executá-lo duas vezes.

Se você está vendo o seguinte

Mar 31 08:38:06 some-machine systemd[1]: [/etc/systemd/system/snappy-set-hostname.service.d/override.conf:1] Assignment outside of section. Ignoring.

É porque você precisa usar nomes de seção [Unit] e [Service] etc conforme necessário em sua substituição.

    
por nelaaro 30.03.2017 / 11:03