Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

4 votes
1 answers
3920 views
Unknown runlevel on Ubuntu 14.04, services not starting on boot
I rent a VPS from a VPS company and run an Ubuntu 14.04 web server there. Recently it had to be suspended by my provider for a while. After the suspension period (1-2 days), the VPS boots, but cannot acquire any runlevels. root@vps:/# runlevel unknown This, in turn, means no Upstart services are sta...
I rent a VPS from a VPS company and run an Ubuntu 14.04 web server there. Recently it had to be suspended by my provider for a while. After the suspension period (1-2 days), the VPS boots, but cannot acquire any runlevels. root@vps:/# runlevel unknown This, in turn, means no Upstart services are starting on boot, as the "useful stuff" requires runlevel . I can start individual services manually with initctl, unless they have dependencies which the boot did not start automatically. I cannot find anything useful/understandable from logs. Please do ask if you want specific log entries and I can try to find them. The server is (was) running PHP7, Nginx, MySQL, Redis, Minecraft Server, Mumble Server. The server was operating fine (and survived multiple reboots) before the suspension period. Here is my initctl list after a fresh reboot: http://pastebin.com/fcfcnxBU . Please do ask for specific details as I'm not entirely sure where to look for them (e.g. log files, debug artifacts, files and directories, etc.). **EDIT**: some progress via tinkering: It seems the filesystem and/or network stack is not started correctly when booting. When I do the following: $ ifup --all $ initctl emit static-network-up $ initctl emit filesystem ... Ctrl-C to exit loop $ initctl emit local-filesystems Then I get $ runlevel >N 2 And my server services (at least most of them) are running normally. I'll check if there is a single command of these that makes the boot init sequence continue normally. EDIT2: - ifup --all brings up a venet0:0 which is tied to the VPS' public static IP. - emit static-network-up does nothing. - emit filesystem + Ctrl-C starts - rsyslog - ssh - minecraft-server - cron - xinetd - console - tty2 - upstart-file-bridge - mysql and stops - plymouth - plymouth-upstart-bridge - emit local-filesystems starts - avahi-daemon - systemd-logind - mountall.sh - dbus - networking and something called network-interface-security (network-interface/lo) start/running disappears.
ojrask (141 rep)
Jul 18, 2016, 09:45 PM • Last activity: Jun 26, 2025, 05:04 AM
0 votes
0 answers
259 views
Xorg: "Cannot run in framebuffer mode" infinite loop on boot and how to access a text interface before startx? [AntiX/Debian]
Upon rebooting my laptop today it appears to boot normally and then xorg is started. This immediately locks it into a loop where this message is displayed indefinitely. [![Cannot run in framebuffer mode. Please specify busIDs for all framebuffer devices][1]][1] - I would add the log file but stack e...
Upon rebooting my laptop today it appears to boot normally and then xorg is started. This immediately locks it into a loop where this message is displayed indefinitely. Cannot run in framebuffer mode. Please specify busIDs for all framebuffer devices - I would add the log file but stack exchange keeps reporting me as spam :( All the solutions I've come across so far consist of some combination of apt update(sometimes with backports), reinstall nvidia drivers, dist-upgrade to reset version headers, or run configure xorg. Unfortunately these all require a terminal if I understand correctly, and I've no idea how to get one. My grub menu has no recovery option, and I'm using a non-systemd Debian; but from my research, I've tried booting after hitting 'e' in grub, and then with the following parameters appended to the 'linux' line: 1, 3, recovery -- which all do nothing. single -- which gives me this error:
Cannot open access to console, the root account is locked.

See sulogin(8) man page for more details.

Press Enter to continue.
No I haven't messed with fstab, nor any system critical files, as far as I know. If there's an option to fix the xorg error without accessing a text interface, please let me know. Although I would also like to know how I'm even supposed to get a text interface, because that seems like a useful skill. Any help would be deeply appreciated, since I'm at a loss for what to try next. Thank you, Note: The distro I'm using is AntiX23 runit 64bit
Eagle P (1 rep)
Sep 3, 2024, 11:38 PM
1 votes
1 answers
1549 views
Running script at shutdown and reboot to prevent chromium session loss
I'm running Ubuntu 18.04.1 and I'm trying to create a script that shuts down Chromium properly before shutting down the system so that it doesn't give me "restore session" popup after booting. I figured I'll use killall to this and came up with `/home/shutdownscript.sh`: #!/bin/bash killall -HUP "ch...
I'm running Ubuntu 18.04.1 and I'm trying to create a script that shuts down Chromium properly before shutting down the system so that it doesn't give me "restore session" popup after booting. I figured I'll use killall to this and came up with /home/shutdownscript.sh: #!/bin/bash killall -HUP "chromium-browser --enable-pinch" that seems to do the trick. However, now I have a problem with actually running this script at shutdown or reboot. First thing I tried was putting it in /etc/init.d as shutdownscript with chmod +x and then symlinking it to rc0.d and rc6.d as K99shutdownscript and later K01ashutdownscript. However, that didn't work for me. I thought maybe I should just create a new systemd service, so I created shutdownscript.service in /etc/systemd/system with contents like this: [Unit] Description=Saves Chromium session [Service] Type=oneshot RemainAfterExit=true ExecStart=/bin/true ExecStop=/home/istir/shutdownscript.sh [Install] WantedBy=multi-user.target Then I ran systemctl start shutdownscript.service and systemctl enable shutdownscript.service but it still didn't work as intended. The solution is probably very simple but I returned to Linux after around 6 years of using Windows and macOS so I don't really remember what did I do earlier to make shutdown scripts. Thanks for any help!
istir (11 rep)
Aug 7, 2018, 07:10 PM • Last activity: Feb 22, 2023, 11:08 PM
1 votes
1 answers
220 views
Temporary failure in name resolution in Python script running during boot or on shutdown
I wrote a Python script which sends any message via Telegram: #!/opt/anaconda3/bin/python import asyncio import telegram import os import sys async def main(): bot = telegram.Bot(os.environ["TELEGRAM_TOKEN"]) async with bot: #print(await bot.get_me()) #print((await bot.get_updates())[0]) await bot.s...
I wrote a Python script which sends any message via Telegram: #!/opt/anaconda3/bin/python import asyncio import telegram import os import sys async def main(): bot = telegram.Bot(os.environ["TELEGRAM_TOKEN"]) async with bot: #print(await bot.get_me()) #print((await bot.get_updates())) await bot.send_message(text=' '.join(sys.argv[1:]), chat_id=MYCHATID) if __name__ == '__main__': asyncio.run(main()) TELEGRAM_TOKEN is set in /etc/environment, MYCHATID is hardcoded. Created two scripts to run it # cat /etc/init.d/sendbot_boot.sh #!/bin/bash /opt/anaconda3/bin/python /usr/local/bin/sendbot "Booting..." # cat /etc/init.d/sendbot_shutdown.sh #!/bin/bash /opt/anaconda3/bin/python /usr/local/bin/sendbot "Shutting down..." Added one of them to cron # cat /var/spool/cron/crontabs/root @reboot /etc/init.d/sendbot_boot.sh And another one to rc6. # ls -l /etc/rc6.d/K99sendbot_shutdown lrwxrwxrwx 1 root root 29 фев 10 02:08 /etc/rc6.d/K99sendbot_shutdown -> ../init.d/sendbot_shutdown.sh All scripts are executable and work well when I run them from terminal. But neither of them work on actual reboot. What I did wrong? # lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 18.04.6 LTS Release: 18.04 Codename: bionic *** I have grabbed error output and got: Traceback (most recent call last): File "/opt/anaconda3/lib/python3.8/site-packages/httpcore/_exceptions.py", line 10, in map_exceptions yield File "/opt/anaconda3/lib/python3.8/site-packages/httpcore/backends/asyncio.py", line 111, in connect_tcp stream: anyio.abc.ByteStream = await anyio.connect_tcp( File "/opt/anaconda3/lib/python3.8/site-packages/anyio/_core/_sockets.py", line 189, in connect_tcp gai_res = await getaddrinfo( File "/opt/anaconda3/lib/python3.8/site-packages/anyio/_core/_sockets.py", line 496, in getaddrinfo gai_res = await get_asynclib().getaddrinfo( File "/opt/anaconda3/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 1754, in getaddrinfo result = await get_running_loop().getaddrinfo( File "/opt/anaconda3/lib/python3.8/asyncio/base_events.py", line 825, in getaddrinfo return await self.run_in_executor( File "/opt/anaconda3/lib/python3.8/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/opt/anaconda3/lib/python3.8/socket.py", line 918, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno -3] Temporary failure in name resolution
Dims (3425 rep)
Feb 9, 2023, 11:33 PM • Last activity: Feb 10, 2023, 09:49 PM
0 votes
0 answers
296 views
systemd service
I'm wondering how services launched by means of ***systemd*** working. When system was running by means of System V init, there was scripts under *runlevels* (**/etc/rc"level".d/**) which described exactly what should be performed. Under systemd, there's not too much information. For example, there'...
I'm wondering how services launched by means of ***systemd*** working.
When system was running by means of System V init, there was scripts under *runlevels* (**/etc/rc"level".d/**) which described exactly what should be performed.
Under systemd, there's not too much information.
For example, there's a script under /etc/rc5.d which used for launching cups server and there's some more than 90 lines.
From the other hand, if we look in cups.service (under /lib/systemd/system) there're only these lines : ** [Unit] Description=CUPS Scheduler Documentation=man:cupsd(8) After=network.target nss-user-lookup.target nslcd.service Requires=cups.socket [Service] ExecStart=/usr/sbin/cupsd -l Type=notify Restart=on-failure [Install] Also=cups.socket cups.path WantedBy=printer.target multi-user.target ** It's very different from previous approach, thus I don't understand how it runs
siru (1 rep)
Oct 13, 2022, 02:25 PM
1 votes
2 answers
334 views
Delete jobs from at queue on startup
I'm on Ubuntu 18.04.6 LTS and I have a cronjob that schedules automatic shutdown commands to a specific `at` queue every minute: ``` $ crontab -e */1 * * * * [ -z "$(w -h)" ] && echo "/sbin/shutdown -h now" | at -q w "now + 1 hour" ``` I now have the problem, that when a machine is stopped by hand b...
I'm on Ubuntu 18.04.6 LTS and I have a cronjob that schedules automatic shutdown commands to a specific at queue every minute:
$ crontab -e
*/1 * * * * [ -z "$(w -h)" ] && echo "/sbin/shutdown -h now" | at -q w "now + 1 hour"
I now have the problem, that when a machine is stopped by hand between now and +1 hour (meaning there is a job scheduled for execution), and the machine is rebooted the next day, it immediately shuts down again. It seems that overdue at jobs are executed when the system starts again. Of course this is very annoying, so I thought, I should delete those jobs when the machine starts again. I created a script that removes all jobs from the queue in /usr/sbin/remove_shutdown_jobs:
#!/bin/bash
jobs=$(atq -q w | cut -f1); if [ -n "$jobs" ]; then atrm $jobs; fi;
And I made it exectuable:
$ ls -lah /usr/sbin/remove_shutdown_jobs
-rwxr-xr-x 1 root root 81 Aug 22 12:06 /usr/sbin/remove_shutdown_jobs
I then tried to link it to the rc5.d directory and gave it the name S00 so that it is executed **BEFORE** atd is started (my guess is, that I have to remove the jobs before the at daemon is started, otherwise it could pick up those old jobs and execute them):
$ ln -s /usr/sbin/remove_shutdown_jobs /etc/rc5.d/S00remove_shutdown_jobs
$ ln -lah
lrwxrwxrwx   1 root root   30 Aug 31 13:49 S00remove_shutdown_jobs -> /usr/sbin/remove_shutdown_jobs
...
lrwxrwxrwx   1 root root   13 Jun 16 17:21 S01atd -> ../init.d/atd
...
But it seems, that the script is never executed. I tried it with a simple echo script that appends some text to file, and this is also not executed. I thought rc5.d is the right directory, because of
$ runlevel
N 5
I also tried to link it into rc4.d, rc3.d and rc2.d with no luck. I didn't link it to rc1.d because this is only for some kind of rescue system and there where only K01 files in there (kill?), right? Any idea what I'm missing, or what I've done wrong?
23tux (175 rep)
Sep 1, 2022, 12:31 PM • Last activity: Sep 12, 2022, 05:26 PM
3 votes
1 answers
10999 views
Windows Subsystem for Linux is unable to determine current runlevel
# Issue Many apt-get installs are failing b/c the system can't determine current runlevel # Background specs: $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.1 LTS Release: 16.04 Codename: xenial $ uname -a Linux systemName 4.4.0-43-Microsoft #1-Micros...
# Issue Many apt-get installs are failing b/c the system can't determine current runlevel # Background specs: $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.1 LTS Release: 16.04 Codename: xenial $ uname -a Linux systemName 4.4.0-43-Microsoft #1-Microsoft Wed Dec 31 14:42:53 PST 2014 x86_64 x86_64 x86_64 GNU/Linux # Explaniation I am trying to install virtualbox on WSL and I got the following error: $ VBoxManage --version WARNING: The character device /dev/vboxdrv does not exist. Please install the virtualbox-dkms package and the appropriate headers, most likely linux-headers-Microsoft. I solved this by following these steps . To dpkg-reconfigure virtualbox-dkms. But then I got the following: dpkg: warning: version '*-*' has bad syntax: version number does not start with digit It is likely that 4.4.0-43-Microsoft belongs to a chroot's host Module build for the currently running kernel was skipped since the kernel source for this kernel does not seem to be installed. invoke-rc.d: could not determine current runlevel How can get the invoke-rc.d to return the correct runlevel?
Gabriel Fair (371 rep)
Apr 13, 2017, 04:00 PM • Last activity: Jan 30, 2022, 11:00 PM
0 votes
2 answers
1991 views
Reboot does not send "stop" to init.d scripts
I have a script that I want to execute before a machine is either shut down or rebooted but it's only triggered with the `start` parameter, never with the `stop` parameter and it's driving me crazy. Following symlinks exist on my system: ``` /etc/rc0.d/K01init.sh /etc/rc1.d/K01init.sh /etc/rc2.d/S99...
I have a script that I want to execute before a machine is either shut down or rebooted but it's only triggered with the start parameter, never with the stop parameter and it's driving me crazy. Following symlinks exist on my system:
/etc/rc0.d/K01init.sh
/etc/rc1.d/K01init.sh
/etc/rc2.d/S99init.sh
/etc/rc3.d/S99init.sh
/etc/rc4.d/S99init.sh
/etc/rc5.d/S99init.sh
/etc/rc6.d/K01init.sh
that all point to the same script **/etc/init.d/init.sh**. Based on another thread I also tried without the .sh suffix, which did not change anything. **/etc/init.d/init.sh**
#!/bin/sh
### BEGIN INIT INFO
# Provides:          init.sh
# Required-Start:    $all
# Required-Stop:
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: xxx
# Description:       xxx
### END INIT INFO

if [ "$1" = "start" ]; then
  echo "log message"
  //do stuff
fi

echo "$1"

if [ "$1" = "stop" ]; then
  echo "log message"
  //do stuff
fi

exit 0
The script runs fine during startup, but complains that the cleanup that should have happened in the stop block was not performed. When I echo the $1 to the logs, it only and always shows start, which means the OS apparently never sends the stop command to my script. Running the script from the command line (sudo /etc/init.d/init.sh stop) works like a charm with both start and stop parameters, so I'm confused as to why it does not work when I stop my machine. Where am I going wrong here? I'm running Ubuntu 18.04 and my current runlevel is 5 (but that should not be relevant, as it should be about 0 & 6 here). Interesting enough, I tried to check for the actual runlevel at execution time by adding echo "$(who -r)" to the script, which does not output anything to the logs! If relevant: I'm talking about reboots both via sudo reboot / sudo systemctl reboot *and* via Azure GUI (it's a virtual machine), not sure if Azures reboot mechanism differs, but neither way works.
kopaka (101 rep)
Dec 22, 2021, 09:45 AM • Last activity: Dec 23, 2021, 10:05 AM
0 votes
1 answers
91 views
Are RC folders obsolete on Ubuntu?
I am learning Linux, using Ubuntu. I wanted to remove network management from one of the run levels. I had done this correctly before, but now, no matter how hard I try, I can not remove a script from the desired run levels. [![enter image description here][1]][1] [1]: https://i.sstatic.net/O3bAU.pn...
I am learning Linux, using Ubuntu. I wanted to remove network management from one of the run levels. I had done this correctly before, but now, no matter how hard I try, I can not remove a script from the desired run levels. enter image description here the rc3 folder is empty so how can I work on run level 3?!
Mani Kamran (3 rep)
Aug 16, 2021, 08:19 AM • Last activity: Sep 29, 2021, 03:40 PM
0 votes
0 answers
604 views
How do I recover from Debian 10 crash after running apt --fix-broken install?
Debian 10 crashed after running apt --fix-broken install. This is the second time this has happened. The only extras that I have installed is the proprietary Nvidia driver V=460. I have also installed the Mate terminal and a Yaru theme. When I try to boot Debian, I get the message: `Enter runlevel`....
Debian 10 crashed after running apt --fix-broken install. This is the second time this has happened. The only extras that I have installed is the proprietary Nvidia driver V=460. I have also installed the Mate terminal and a Yaru theme. When I try to boot Debian, I get the message: Enter runlevel. Here is a picture of the screen: enter image description here The first time this happened I did a reinstall, but if there is some method of recovery I would prefer that.
Mike C. (111 rep)
May 26, 2021, 12:21 PM
0 votes
0 answers
119 views
Runlevel of choice. GRUB, ubuntu
I'm quite new to linux, and have a few questions regarding my assignment. 1. I must give a choice to the user in GRUB, to use either 3rd or 4th runlevel. May i ask for any materials and/or tips on that? 2. I have to make a certain service start automatically only at the 4th runlevel. In notes from m...
I'm quite new to linux, and have a few questions regarding my assignment. 1. I must give a choice to the user in GRUB, to use either 3rd or 4th runlevel. May i ask for any materials and/or tips on that? 2. I have to make a certain service start automatically only at the 4th runlevel. In notes from my lecturer he mentioned putting rc scripts in /etc/rc.d directory, but i don't have one, with such name. Instead i have files like: rc0.d, rc1.d ... rc6.d. Are those the directories i should be putting my scripts in, and are these numbers in their names, corresponding to the runlevels? And also, i have an SSH, on my ubuntu on my VirtualBox. I want to be able to connect there through my host machine with windows, and i can do that easily, as long as PasswordAuthentication is on, cause when i turn it off and rely solely on public key, i get access denied. So the problem here is me not knowing how to apply the publickey to my host machine (ssh-copy-id doesn't work, tried also just echoing the publickey to authorized_keys in the proper localization, but it didn't work either) Any links with the information that i need, is also appreciated.
czarniecki (13 rep)
Apr 22, 2021, 10:07 PM
26 votes
3 answers
49853 views
How to create a systemd target?
After searching plenty through plenty a post, Youtube video, and "documentation" on the matter of systemd, I'm still at a loss. The link (https://wiki.archlinux.org/index.php/systemd#Create_custom_target) seemed promising, but was a bit vague (to me). Question ------- How would one go about creating...
After searching plenty through plenty a post, Youtube video, and "documentation" on the matter of systemd, I'm still at a loss. The link (https://wiki.archlinux.org/index.php/systemd#Create_custom_target) seemed promising, but was a bit vague (to me). Question ------- How would one go about creating a custom systemd target (IE: foo.target ) so that one may boot with select .service units? Example ------- 1. System boots default.target (symlink of "foo.target") 2. "foo.target" only starts a barebones X server and GUI program, say "gvim". Reason ------ I'm simply looking to create a custom target for quickly launching one X program. I'd be nice to exclude all the services I don't need. Thanks in advance!
Pilbox (363 rep)
Aug 8, 2016, 01:48 AM • Last activity: Mar 24, 2021, 11:05 AM
4 votes
2 answers
9174 views
When should a systemd unit file use sysinit.target vs multi-user.target?
When should a systemd unit file use `WantedBy=sysinit.target` vs `WantedBy=multi-user.target`? Does `WantedBy=sysinit.target` have something to do with grub boot menu boot into recovery mode? Units listed under `WantedBy=sysinit.target` are started in recovery mode but those listed under `WantedBy=m...
When should a systemd unit file use WantedBy=sysinit.target vs WantedBy=multi-user.target? Does WantedBy=sysinit.target have something to do with grub boot menu boot into recovery mode? Units listed under WantedBy=sysinit.target are started in recovery mode but those listed under WantedBy=multi-user.target are not? Or is recovery mode unrelated?
adrelanos (1956 rep)
Dec 12, 2019, 07:50 PM • Last activity: Sep 16, 2020, 07:05 AM
1 votes
2 answers
20239 views
Debian does not start with a graphical interface
I'm using Debian Buster and it starts in text mode so that for me to run the graphical interface I always have to run `# startx` on the command line. How do I start it directly in graphical mode? I saw in other questions that you have to edit the `/etc/inittab` file and change the run level to start...
I'm using Debian Buster and it starts in text mode so that for me to run the graphical interface I always have to run # startx on the command line. How do I start it directly in graphical mode? I saw in other questions that you have to edit the /etc/inittab file and change the run level to start in graphical mode, but apparently there is no such file or at least I didn't find it. Can you help me?
Patterson (765 rep)
Jul 10, 2020, 07:44 PM • Last activity: Jul 11, 2020, 05:44 AM
1 votes
2 answers
3866 views
Multi-user text mode runlevel in Ubuntu
I use Ubuntu as a server, and I want to change its runlevel to be full multi-user text mode (like init 3 in RedHat). Using `runlevel` command, I see that am running `N 2` which is Graphical multi-user with networking based on [this ][1] wiki entry. So I'm wondering, is *1- Single-user mode* in Ubunt...
I use Ubuntu as a server, and I want to change its runlevel to be full multi-user text mode (like init 3 in RedHat). Using runlevel command, I see that am running N 2 which is Graphical multi-user with networking based on this wiki entry. So I'm wondering, is *1- Single-user mode* in Ubuntu the equivalent for *3- Full multi-user text mode* in RedHat?
Shadin (113 rep)
Apr 28, 2014, 03:02 PM • Last activity: Apr 29, 2020, 02:23 AM
1 votes
1 answers
489 views
Convert SysV init run level S to Systemd *.target (Debian)
I am converting a SysV init style file to Systemd Unit file and it's init section block looks like this: ### BEGIN INIT INFO # Provides: ifcheck # Required-Start: $local_fs # Required-Stop: # Should-Start: # Should-Stop: # Default-Start: S # Default-Stop: # Short-Description: Network interfaces chec...
I am converting a SysV init style file to Systemd Unit file and it's init section block looks like this: ### BEGIN INIT INFO # Provides: ifcheck # Required-Start: $local_fs # Required-Stop: # Should-Start: # Should-Stop: # Default-Start: S # Default-Stop: # Short-Description: Network interfaces check & replace # Description: Checks if the interfaces were corrupted or if the special section is missing. If so, a default version will be copied over. ### END INIT INFO I know that run levels 0-6 correspond to various systemd targets: ╔══════════════════════╦═══════════════════╗ ║ Run Level (SysVinit) ║ Systemd Target ║ ╠══════════════════════╬═══════════════════╣ │ Run level 0 │ poweroff.target │ ├──────────────────────┼───────────────────┤ │ Run level 1 │ rescue.target │ ├──────────────────────┼───────────────────┤ │ Run level 2 │ multi-user.target │ ├──────────────────────┼───────────────────┤ │ Run level 3 │ multi-user.target │ ├──────────────────────┼───────────────────┤ │ Run level 4 │ multi-user.target │ ├──────────────────────┼───────────────────┤ │ Run level 5 │ graphical.target │ ├──────────────────────┼───────────────────┤ │ Run level 6 │ reboot.target │ ├──────────────────────┼───────────────────┤ │ Emergency │ emergency.target │ └──────────────────────┴───────────────────┘ (According to https://www.tecmint.com/change-runlevels-targets-in-systemd/ ) But I have never seen S as a run level before. I've seen some definitions that says it is for single-user while there are others that define it as a synonym for other run levels and still others don't have a conclusive defintion . I know the version I am working with is most likely the **Linux Standard Base specification** because immediately after the init info block is the sourcing of the **lsb init functions** (Sourced via . /lib/lsb/init-functions). Also the system is running Debian 8 Jessie. **What target should I put in the equivalent systemd unit file for run level S?**
Wimateeka (1085 rep)
Mar 31, 2020, 12:29 PM • Last activity: Mar 31, 2020, 07:27 PM
0 votes
1 answers
1976 views
telinit 1 and run a command there
I need to do some maintenance on a bunch of Debian (Wheezy) systems, and it has to happen at run level 1. But not all machines have a keyboard and a screen; some are even located somewhere else. So I can't just go there and type in the root password to trigger the job. So my question is how can I te...
I need to do some maintenance on a bunch of Debian (Wheezy) systems, and it has to happen at run level 1. But not all machines have a keyboard and a screen; some are even located somewhere else. So I can't just go there and type in the root password to trigger the job. So my question is how can I tell Debian to run a command right before the "Type root password or ^D" prompt? I've tried to make a init script that only runs on run level 1, but still it was triggered before all processes where killed. Is there a way to do this?
Florian F (1379 rep)
Jul 15, 2014, 02:53 PM • Last activity: Feb 20, 2020, 03:01 PM
16 votes
2 answers
71177 views
Create and control start up scripts in BusyBox
I have compiled a custom linux kernel in BusyBox. BusyBox `init` does not support runlevels. When the kernel boots up in BusyBox, it first executes `init` which looks for the specified runlevel in `/etc/inittab`. BusyBox `init` works just fine without `/etc/inittab`. When no `inittab` is found it ha...
I have compiled a custom linux kernel in BusyBox. BusyBox init does not support runlevels. When the kernel boots up in BusyBox, it first executes init which looks for the specified runlevel in /etc/inittab. BusyBox init works just fine without /etc/inittab. When no inittab is found it has the following behavior: ::sysinit:/etc/init.d/rcS This part is very clear to me, but I would like to know how to manage daemons that start up networking, create serial ports, or start java processes. I have looked in the scripts that reside in /etc/init.d/ but I don't understand how to manage them. I am looking for a good tutorial or solution to control these services myself without an automated tool like buildroot. I want to understand how these scripts work and how to create devices in /dev/ (right now I only have console and ttyAM0).
Shantanu Banerjee (469 rep)
Dec 20, 2012, 03:54 PM • Last activity: Jan 3, 2020, 02:05 PM
0 votes
1 answers
1659 views
runlevel + what is runlevel 5 3 in redhat linux
we know that `runlevl` of multi user mode is N 5 but on our redhat 7.2 we get the following runlevel 5 3 what is the meaning of this run-level ? how to change this machine to multi user mode ( full permissions ) and when we do who -r we get run-level 3 last=5 Note - we perform `reboot/init 6` , but...
we know that runlevl of multi user mode is N 5 but on our redhat 7.2 we get the following runlevel 5 3 what is the meaning of this run-level ? how to change this machine to multi user mode ( full permissions ) and when we do who -r we get run-level 3 last=5 Note - we perform reboot/init 6 , but still we are in run-level 3
yael (13936 rep)
Jan 1, 2020, 09:49 AM • Last activity: Jan 2, 2020, 05:20 PM
0 votes
0 answers
268 views
What was runlevel 4 used for with SysV init?
I'm reading about SysV init and I see there are levels 0-6. [![enter image description here][1]][1] I understand that level 4 could be defined by the OS operator for special purposes, but I'm having trouble thinking of any examples. Has anyone seen runlevel 4 used in the wild? What was it used for?...
I'm reading about SysV init and I see there are levels 0-6. enter image description here I understand that level 4 could be defined by the OS operator for special purposes, but I'm having trouble thinking of any examples. Has anyone seen runlevel 4 used in the wild? What was it used for? I assume a trigger for changing the runlevel to 4 also had to be created, since the system would never automatically go into level 4?
Philip Kirkbride (10746 rep)
Jan 2, 2020, 04:36 PM
Showing page 1 of 20 total questions