I found this :    but I would like the other way around.   The reason is that I spend quite a time learning the basic init process and I am pretty much accustomed to the "service" commands. I really dont care about 10 - 20 millisecond or even 1 -2 seconds of late boot up. I just need some clarity in the init process and want to stick to the old system..  Is it possible to do this at the boot time using grub maybe, which blacklists systemd and just runs the 14.04 init routines ( I guess it was a mix of upstart and sysvinit )?  I found something, but dont know how to proceed further:  In the /etc/grub.d/10_linux, I find an entry with  SUPPORTED_INITS="sysvinit:/lib/sysvinit/init systemd:/lib/systemd/systemd upstart:/sbin/upstart"$
124298
Is it possible to revert an ubuntu 14.10 install to a upstart or a SysV init system.  The "loggin" and other issues with systemd has caused me issus with being unable to read the dmesg as normal and determine if my stability issues are from systemD or something else.
118418
I did apt-get upgrade it never finishes at this point:  Searching for GRUB installation directory ... found: /boot/grub Searching for default file ... found: /boot/grub/default Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst Searching for splash image ... none found, skipping ... Found kernel: /boot/vmlinuz-3.2.0-24-virtual Updating /boot/grub/menu.lst ... done  You already have a NoLOADER configuration in /etc/grub.conf Running boot loader as requested Running /usr/sbin/grub  ...    The system does not freeze (Ctrl-Z works, I get my console back) just that that /usr/sbin/grub seems to never complete.  What should I do?
58160
So I have looked at a lot of suggestions from this website already and tried quite a few of them, but they all differ and I get a feeling these are very specific problems for which I lack the expertise to find which exact case applies to me.  Here is my result for systemd-analyze blame  1min 59.160s plymouth-quit-wait.service      33.950s apt-daily.service       7.276s NetworkManager-wait-online.service       2.292s apt-daily-upgrade.service        754ms fwupd.service        397ms dev-sda6.device        375ms systemd-logind.service        362ms plymouth-start.service        230ms NetworkManager.service        209ms udisks2.service        169ms networkd-dispatcher.service        160ms systemd-timesyncd.service        147ms systemd-resolved.service        135ms ModemManager.service        123ms apparmor.service        104ms accounts-daemon.service        100ms keyboard-setup.service         99ms systemd-journal-flush.service         91ms systemd-udevd.service         75ms upower.service         71ms systemd-udev-trigger.service         69ms plymouth-read-write.service         62ms systemd-rfkill.service   And this is what I get from systemd-analyze critical-chain:  graphical.target @2min 330ms └─multi-user.target @2min 330ms   └─kerneloops.service @8.446s +7ms     └─network-online.target @8.441s       └─NetworkManager-wait-online.service @1.164s +7.276s         └─NetworkManager.service @932ms +230ms           └─dbus.service @877ms             └─basic.target @872ms               └─sockets.target @872ms                 └─uuidd.socket @872ms                   └─sysinit.target @868ms                     └─systemd-timesyncd.service @707ms +160ms                       └─systemd-tmpfiles-setup.service @672ms +31ms                         └─local-fs.target @671ms                           └─run-user-122.mount @1.340s                             └─swap.target @623ms                               └─dev-disk-by\x2duuid-19af8e87\x2d864e\x2d4148\x2d                                 └─dev-disk-by\x2duuid-19af8e87\x2d864e\x2d4148\x   These were a few things I noticed  were added to most of these questions, so I thought they might help as well.   I run ubuntu 18.04 LTS in a dual boot configuration using GRUB. My grub version is 2.02-2ubuntu8.9.
6351
I need to run a bash script at boot-time as superuser in Xubuntu. I don't know where to start. I have to do something described in a Arch Linux guide. That guide says exactly:     Add following at the end of the file : /etc/rc.sysinit   # Do my action /etc/rc.d/do_my_action  /bin/dmesg &gt;| /var/log/dmesg.log   But I do not have /etc/rc.sysinit and /etc/rc.d/ in Xubuntu. I'm sure there are equivalent ones, right?
62806
I am currently trying to understand the difference between init.d and cron @reboot for running a script at startup/booting of the system.   The use of @reboot (this method was mentioned in  by hs.chandra) is some what simpler, by simply going into crontab -e and creating a @reboot /some_directory/to_your/script/your_script.txt and then your_script.txt shall be executed every time the system is rebooted. An in depth explanation of @reboot is   Alternatively by embedding /etc/init.d/your_script.txt into the second line of your script ie:  #!/bin/bash # /etc/init.d/your_script.txt  You can run chmod +x /etc/init.d/your_script.txt and that should also result for your_script.txt to run every time the system is booted.  Q1: What are the key differences between the two? Q2: Which is more robust? Q3: Is there a better one out of the two? Q4: Is this the correct way of embedding a script to run during booting?  I will be incorporating a bash .sh file to run during startup.
113632
I wanted a daemon to start on boot so I added a line to /etc/rc.local that ended in "&amp;"  I did that so it would run in the background.  The daemon is loaded and working fine but when the daemon is running you can press keys that do other important things.  When I am finally logged in I wanted to resume process or send it a terminal (tty2) so I can do a couple of things.  I'm new to linux and not sure how to do this.  I do a ps -aux |grep uox to work out which PID it is. But not sure how to resume.
77842
As of Ubuntu 12.04, what is the proper/clean way to make the system execute a script upon boot? (not upon user login) e.g. running a daemon.
21015
I'd like to startup an Apache Spark cluster after boot using the following command:  sudo ./path/to/spark/sbin/start-all.sh   Then run this command when the system prepares to reboot/shutdown:  sudo ./path/to/spark/sbin/stop-all.sh   How can I get started? Is there a basic template I can build on?  I've tried to use an extremely simple (file: /lib/systemd/system/spark.service):  [Unit] Description=Spark service  [Service] ExecStart=sudo ./path/to/spark/sbin/start-all.sh   Which doesn't work.
60718
I'm used to create upstart services with a file in /etc/init/&lt;service&gt;.conf and it works perfectly fine, the only thing I'd like to is to have tab completion the same way that every service in /etc/init.d/ have right now.  When writing sudo service xx the name of the service should apear.   Is there a way to add upstart services to that autocompletion list?
38397
systemd gives us the systemctl commands suite which is mostly used to enable services to start at boot time. We can also start, stop, reload, restart and check status of services with the help of systemctl.  We can do, for example, sudo systemctl enable service_name, and service_name will automatically start at boot time. We can also disable services not to start at boot time.  Is the only difference between the service and systemctl commands that systemctl can be used to enable the start of services at run time? Can we use systemctl on any service? What other significant differences are there?
29680
how to auto start or enable service on next boot up or start up? in ubuntu 16.04 lts how to start or enable service on the next boot up or start up? in ubuntu 16.04 lts  without doing it manually enable or start services again everytime i start up or boot up the ubuntu 16.04 lts  thank you
101433
I'm very new to Ubuntu.  My PC has had very slow boot and shut down times (for 2 days), I reduced the shut down time with this tutorial () but PC still has some latency problem.  Using systemd-analyze blame from the terminal shows:   17.990s NetworkManager-wait-online.service  7.379s dev-sda1.device  5.271s dev-loop0.device  5.268s dev-loop1.device  5.264s dev-loop2.device  4.067s snapd.service  2.015s postfix@-.service  1.909s plymouth-quit-wait.service  1.467s udisks2.service  1.291s fwupd.service  1.248s networking.service   536ms accounts-daemon.service   447ms tlp.service   433ms ModemManager.service   407ms NetworkManager.service   357ms lm-sensors.service   349ms keyboard-setup.service   339ms preload.service   339ms apparmor.service   333ms grub-common.service   333ms mono-xsp4.service   312ms systemd-logind.service   304ms apport.service   I think there is a problem but I don't know how to fix it.
69256
I don't want to do the right thing by creating a new systemd script, I just want my old init script to work again now that I've upgraded my system to an OS that's using systemd.   I've briefly researched how to convert init scripts and how to write systemd scripts, but I'm sure learning it properly and doing it right would take me several hours.   The current situation is:  systemctl start solr Failed to start solr.service: Unit solr.service failed to load: No such file or directory.   And:  sudo service solr start Failed to start solr.service: Unit solr.service failed to load: No such file or directory.   Right now, I just want to get back to work. What's the path of least resistance to getting this working again?   Updates  I didn't want to figure this all out &ndash; I really didn't &ndash; but I have to and I've unearthed my first clue:  sudo systemctl enable solr Synchronizing state for solr.service with sysvinit using update-rc.d... Executing /usr/sbin/update-rc.d solr defaults insserv: warning: script 'K01solr' missing LSB tags and overrides insserv: warning: script 'solr' missing LSB tags and overrides Executing /usr/sbin/update-rc.d solr enable update-rc.d: error: solr Default-Start contains no runlevels, aborting.   The  says that:     LSB header dependency information matters. The SysV implementations on many distributions did not use the dependency information encoded in LSB init script headers, or used them only in very limited ways. Due to that they are often incorrect or incomplete. systemd however fully interprets these headers and follows them closely at runtime   I think that means my script won't work until that's fixed.  The script in question:  #!/bin/sh  # Prerequisites: # 1. Solr needs to be installed at /usr/local/solr/example # 2. daemon needs to be installed # 3. Script needs to be executed by root # 4. $INSTALL_ROOT must be set  # This script will launch Solr in a mode that will automatically respawn if it # crashes. Output will be sent to /var/log/solr/solr.log. A pid file will be # created in the standard location.  start () {     echo -n "Starting solr..."      # Reset ulimit or else get issues with too many open files (https://issues.apache.org/jira/browse/SOLR-4)     ulimit -n 10000      # start daemon     daemon --chdir='/usr/local/solr/example' --command "java -jar -server start.jar -DINSTALL_ROOT=$INSTALL_ROOT" --respawn --output=/var/log/solr/solr.log --name=solr --verbose      RETVAL=$?     if [ $RETVAL = 0 ]     then         echo "done."     else         echo "failed. See error code for more information."     fi     return $RETVAL }  stop () {     # stop daemon     echo -n "Stopping solr..."      daemon --stop --name=solr  --verbose     RETVAL=$?      if [ $RETVAL = 0 ]     then         echo "done."     else         echo "failed. See error code for more information."     fi     return $RETVAL }   restart () {     daemon --restart --name=solr  --verbose }   status () {     # report on the status of the daemon     daemon --running --verbose --name=solr     return $? }   case "$1" in     start)         start     ;;     status)         status     ;;     stop)         stop     ;;     restart)         stop         sleep 15         start     ;;     *)         echo $"Usage: solr {start|status|stop|restart}"         exit 3     ;; esac  exit $RETVAL
70487
For some reason I need to disable a system service on boot. In my case this is the Avahi Daemon. I just don't want it to start on boot.  In previous Ubuntu releases (e.g. 12.04) I could do  sudo update-rc.d avahi-daemon disable   However on 14.04 it shows  update-rc.d: warning:  start runlevel arguments (none) do not match avahi-daemon Default-Start values (2 3 4 5) update-rc.d: warning:  stop runlevel arguments (none) do not match avahi-daemon Default-Stop values (0 1 6)  System start/stop links for /etc/init.d/avahi-daemon do not exist.   And Avahi is started on boot. How can I disable this? I'm looking for a command line way of doing this.  And please care to explain what happened here? Some change in a recent Ubuntu release broke the use of update-rc.d? I suspect I'm missing something here.
39240
On Ubuntu 12.04, I can find Upstart log messages in /var/log/syslog.  Commands:  # initctl log-priority info # initctl emit hello   Log:  Apr  1 01:56:56 precise64 kernel: [ 8365.820425] init: Connection from private client Apr  1 01:56:56 precise64 kernel: [ 8365.821130] init: Handling hello event   On Ubuntu 13.10, the messages do not appear in syslog or anywhere else under the /var/log directory, although commands like logger hello work as expected. Should I be looking for them somewhere else? Is there a configuration setting I need to change somewhere?  There’s a  from somebody who seems to be having the same problem on Ubuntu 13.04, and more  and  that may also be describing the same problem. Unfortunately, these questions offer no leads for the problem.
81493
Installing a new system using a GPT partitioned disk dedicated to a single partition, ext4 formatted, extlinux (version 4.05) as bootloader, Ubuntu Core version 13.10 amd64 as rootfs, and Ubuntu linux-image-3.11.0-18-generic as kernel, and extlinux-update to generate bootloader configuration.  The result after reboot (still inside a KVM based virtual machine) is an (initramfs) prompt and these messages:  mount: can't read '/etc/fstab': No such file or directory mount: mounting /dev on /root/dev failed: No such file or directory mount: mounting /sys on /root/sys failed: No such file or directory mount: mounting /proc on /root/proc failed: No such file or directory The filesystem doesn't have requested /sbin/init. No init found. Try passing init= bootarg.   BusyBox is v1.20.2.  Regression:   the file system has been checked with fsck.ext4   Check for root existence  (initramfs) ls -l /dev/[hs]da* ls: /dev/[hs]da*: No such file or directory   Root boot argument  (initramfs) cat /proc/cmdline initrd=/boot/initrd.img-3.11.0-18-generic ro quiet BOOT_IMAGE=/boot/vmlinuz-3.11.0-18-generic   Check loaded modules  (initramfs) cat /proc/modules e1000 145368 0 - Live 0xffffffffa0000000   /boot folder content  $ sudo ls -l boot -rw------- 1 root root 3296162 Feb 18 22:37 System.map-3.11.0-18-generic -rw-r--r-- 1 root root 1007681 Feb 18 22:37 abi-3.11.0-18-generic -rw-r--r-- 1 root root  163258 Feb 18 22:37 config-3.11.0-18-generic drwxr-xr-x 2 root root    4096 Mar 17 20:13 extlinux -rw-r--r-- 1 root root 4995000 Mar 16 23:35 initrd.img-3.11.0-18-generic -rw------- 1 root root 5634192 Feb 18 22:37 vmlinuz-3.11.0-18-generic   How to make this system boot to the expected default bash prompt?
95536
On my machine booting takes more than a minute which is annoying when I see that Windows 7 boots in 20 seconds.  Here is what I get when the machine is booting.    How can I see what happens when booting up?