Questions tagged [shutdown]

a command to turn off or reboot the system

3
votes
1answer
165 views

Does `sudo halt' give bash a chance to write its history?

I did some remote work on a machine that I have infrequent access to and, at the end of my session, I issued sudo halt to terminate the connection and shut down the machine. Unfortunately, now I don't ...
4
votes
1answer
7k views

Why do I get the error “failed unmounting /var” during shutdown?

I have a fresh install of Debian 9.0.0. It has a separate 1 GB partition for /var formatted at ext4. When I shutdown from the terminal, using shutdown -h now, there is a bright-red error message ...
0
votes
2answers
700 views

Shutdown script not working as written

I'm new to Linux. I wrote a very simple script to shutdown my computer, written as so: !#/bin/bash echo "Hello World" sudo shutdown When I execute this code, it starts a shutdown schedule, usually a ...
1
vote
0answers
205 views

Why do I get these FS shutdown errors with a loopback installation of Ubuntu on NTFS?

Edit: The "duplicate" does not answer this question. First, I can't even mount --move /host /elsewhere because I get an error saying that moving mounts under a shared point is not supported. Secondly,...
-4
votes
1answer
386 views

VMWare error with Kali Linux

I have installed Kali Linux 2017.1 x64 in VMware Workstation Pro 12.5.6 along with the VMware tools (Is that the culprit?). My host is Windows 10 Creators Update 1703 build 15063.322 I have been ...
1
vote
3answers
426 views

Running a script with systemd on shutdown or reboot

I've made a script which just empties a folder from its contents and then shutdown the pc. I was wondering if there is a simpler way of doing that automatically when I shutdown or reboot the pc ...
1
vote
0answers
239 views

What is exactly the procedure that makes reboot possible in Linux?

I've been wondering how a linux pc (e.g. Debian) is restarted. To an "outsider" a pc seems to be completely shut down just before it is started again; is it so? I had a look at the source code of ...
0
votes
1answer
374 views

Cannot boot or shut down on Fedora 25 with last kernels is it a nouveau issue

I own a Dell XPS 9650 that has a GTX 1050 graphic cards. I run Fedora 25 and the last 2 kernels are just unusable... 4.10.12-200.fc25.x86_64 -> I cannot boot (loading stops after the luks password) 4....
7
votes
1answer
1k views

REISUB Safe Shutdown

Is there a modified Alt + Sysrq + R + E + I + S + U + B which only shuts down the computer (without rebooting)? There are days when the system is frozen and I'm too tired to debug the problem and ...
0
votes
1answer
614 views

Shutdown PC timer with warning

I use Fedora 25 with Xfce. So I want to shutdown my PC using a timer. I use: shutdown -P 30 But the PC will power off even if I am still working. How can I send a warning that the PC will be ...
2
votes
1answer
168 views

Unix server constantly rebooting

I have a Unix server that has started rebooting every few minutes. I tried to trace the source of the problem by logging the process tree at the time reboot is called, as described by this question's ...
2
votes
0answers
593 views

How to restart a systemd-nspawn container after the guest issues a reboot command?

I have systemd-nspawn containers which are enabled and start upon the boot of the host server. The problem I have is that they do not understand the reboot command issued on the guest: the container ...
0
votes
2answers
2k views

Deepin Linux stuck on shutdown

Sometime my laptop successfully shutdown but sometimes no, it stuck on Deepin Linux Logo. After edit quiet splash to acpi=force in /etc/default/grub I can figure out my problem is stuck exactly at ...
1
vote
0answers
39 views

How to let program to be killed after root filesystem cleanly unmounted?

I'm using qemu-nbd and ntfs-3g (please don't ask why) on Debian stretch to mount my root filesystem. But on shutdown, these programs get killed first, which causes my root filesystem not unmounted ...
0
votes
4answers
3k views

Shutting down a linux system

I am quite new to Linux and started using KDE Linux as my main os. I was wondering why does my Linux system start up with running programs and processes from the last session when I start it up again? ...
0
votes
1answer
337 views

Configuring a LTSP kiosk mode to shutdown when a web browser closes

What i want is a client that logs in with a web browser full screen and when the user closes it the system shuts down or logs off the user. So I've been trying to mount a PXEBOOT system for a while ...
1
vote
1answer
686 views

systemd shutdown: 90 second delay, journalctl shows timeouts stopping /dev and session-5.scope

My Kubuntu 16.04 shutdown is unusually slow, and journalctl -b-1 shows a 90-second delay around some timeout errors. How can I find the reason for these shutdown issues and (hopefully) fix the problem?...
0
votes
1answer
3k views

Stop systemd service after another at shutdown and reboot

I want to run a script at shutdown and reboot after rsyslog has stopped. What do I have to write in my systemd service file /lib/systemd/system/test.service. So far I have [Unit] Description=test ...
5
votes
2answers
9k views

How to execute scripts in /usr/lib/systemd/system-shutdown/ at reboot or shutdown?

According to this answer and this bug report one can simply drop your script in /usr/lib/systemd/system-shutdown/ or for Debian in /lib/systemd/system-shutdown/ to have it executed at reboot or ...
3
votes
3answers
10k views

How to run a script at shutdown on Debian 9 or Raspbian 8 (Jessie)

I would like to execute this shell script at reboot and shut down: #!/bin/sh touch /test Its permissions are -rwxr-xr-x 1 root root 22 Feb 24 09:34 /etc/init.d/te1 And it has this links /etc/rc0....
0
votes
1answer
320 views

Why can't I find the -f option for shutdown command in man?

I read on some linux blogs that to reboot without going through fsck you can use the following command: shutdown -rf now I read that the -f flag means "reboot fast". However, I cannot find any ...
4
votes
0answers
220 views

ZFS (on Linux) swap error upon shutdown

I have installed Debian stretch on ZFS (including the root filesystem) and have made a volume on the root pool which I am using as swap. Everything is working fine, except that I am seeing the ...
1
vote
0answers
75 views

Origin of shutdown vs reboot [duplicate]

I got used to using the shutdown command like: shutdown -t now So when I started wanting to use reboot in the same way I was confused at first because to reboot now you need to use: reboot -n I ...
4
votes
0answers
175 views

kill -STOP shuts down [closed]

On a 12-core Linux machine, as a user (without root privilege) I start a job on a single process. When I hit Ctrl-Z the process is suspended and kill -CONT resumes it. This works fine. But when the ...
1
vote
1answer
994 views

Initiate bash script on shutdown, but not on reboot

I'm setting up my Linux box (that is connected to a UPS) to gracefully shutdown my pfsense router prior to shutting down. I'm running Ubuntu 16.04, and using systemd to accomplish this. I have the ...
1
vote
1answer
625 views

Shutdown seems to freeze my cpu on dell latitude e7470 under arch linux

I bought a Dell Latitude e7470 recently. I immediately removed the preinstalled Windows 10, and installed Arch Linux. It works fine, except for one thing: On shutdown or reboot, at the point where ...
12
votes
3answers
2k views

How to halt a script at a specific time until it is started again by cron?

I have a Raspberry Pi running OSMC (Debian based). I have set a cron job to start a script, sync.sh, at midnight. 0 0 * * * /usr/local/bin sync.sh I need to stop the script at 7am. Currently I am ...
0
votes
1answer
77 views

How to run interactive script on shutdown

I'd like to check for git repositories with uncommited changes on shutdown and if there are such repositories - print them and give user ability to decide what to do - resume shutdown or abort it. I'...
0
votes
1answer
62 views

Periodic shutdown with popup-message and skip/delay-button

I want a computer (Debian, XFCE) to shutdown every day at a specific time as well as a pop-up window in advance telling about the immanent shutdown with, say OK, Skip and Delay 60 min buttons. I ...
0
votes
2answers
174 views

Debian linux systemd shutdown, have shorewall service wait for fail2ban service

Running Debian unstable with shorewall for the firewall and fail2ban. Was getting "shorewall not running errors" upon boot up in the fail2ban log, but that was fixed with After=network.target in /...
2
votes
0answers
183 views

Can I disable shutdown if pacman is running?

During my last arch linux update using pacman -Syu I shut down my laptop, as I had forgotten that the update was running in the background and installing the packages. Afterwards I could not start ...
-2
votes
2answers
749 views

shutdown ubuntu at specific time

I am using ubuntu server 14.04, Now downloading in process and i am leaving office. I want to shut it down after 2 hours. please help me, how to do it. This didn't work for me. sudo shutdown -P 60
10
votes
8answers
25k views

Linux mint 18 hangs at shutdown

I am being troubled by the infamous shutdown hang/freeze error. Whenever I shutdown mint, only the first dot on the splash screen turns green and then it kind of freezes. I also had this prob on ...
0
votes
1answer
36 views

Troubleshoot SysV slow shutdown

The shutdown completes eventually but takes 7-8 min to finish. The OS is sles11. So I wonder is there anyway that I can add debug script to print any running processes and ask sysV init to execute it ...
3
votes
2answers
3k views

How to use uswsusp for standby/hibernation with systemd? (Debian)

I use Debian Jessie and want to use uswsusp for stanby/Hibernation. Installing and configuring is no problem and it also works when you execute s2disk manually. However with systemd the system seem to ...
2
votes
1answer
317 views

Disable reboot/shutdown/suspend/etc from GUI

I do heavy computations. I have set up a remote access to my PC. The real problem is that my family members use this PC as well, and they tend to forget that they shouldn't shut it down. I've tried ...
1
vote
0answers
28 views

Adding custom Sys V init scripts

If I were to add custom scripts in /etc/init.d/ to link them from the link farms, what happens when the distribution is updated. Is it guaranted to preserve the scripts in /etc/init.d and not to ...
2
votes
1answer
633 views

If command reach timeout execute other command

I'm trying to set up a script for my school's computer that switches them off automatically at the end of the day (since most teachers forgot them on). I thought to send a zenify warning box to ...
2
votes
1answer
140 views

Is there a way to perfrom a shutdown and after X seconds start the system again?

I would like to shutdown my system and boot it again after X seconds. Is there any command or service I can use to perform such task? The purpose: I perform the shutdown when I have the suspect ...
2
votes
1answer
459 views

Halting via systemd service

Short version: How can I get a systemd controlled service to trigger an immediate shutdown? I have a daemon empowered to do arbitrary things in response to certain events via a (fork/exec'd) shell ...
0
votes
2answers
254 views

Shutdown when not in use during a certain time

I have a "media center" PC that sometimes I forget to shut down at night. If I remember, I'll usually remote into my "media center" PC and shut it down, but most nights I forget to do it and the PC ...
22
votes
3answers
53k views

What exactly is “a stop job”, as in “A stop job is running…”?

After a shutdown command is issued, sometimes one gets a status message like this: A stop job is running for Session 1 of user xy and then the system hangs for awhile, or forever depending on ??? ...
3
votes
1answer
2k views

“A stop job is running for LVM PV…” at shutdown

Every time I power off my Dell XPS 13 9350 (running on Fedora 24), the shutdown hangs at 8 stop jobs. Seven of them are "A stop job is running for LVM PV..." and one of them is "A stop job is running ...
1
vote
0answers
54 views

Open Solaris won't boot after bad shutdown

Open Solaris does not boot after powering off w/o shutting down. My manual says that bad shut downs can corrupt files and prevent booting. When I try to boot from the GRUB the loading icon on Gnome ...
1
vote
0answers
102 views

How to force script execution before shutdown or reboot is executed? [duplicate]

I have this service enabled by systemctl: [Unit] Description=The Oracle Database Service After=syslog.target network.target Wants=network.target [Service] LimitMEMLOCK=...
2
votes
0answers
175 views

How to force script execution before shutdown or reboot is executed? RHEL 7

I have this service enabled by systemctl: [Unit] Description=The Oracle Database Service After=syslog.target network.target Wants=network.target [Service] LimitMEMLOCK=infinity LimitNOFILE=65535 ...
1
vote
0answers
235 views

Processes blocking on shutdown

I'm working on a system running Debian Wheezy with an application that as part of it's normal behavior spawns a few child processes. Under most circumstances when the parent application is killed it ...
4
votes
3answers
375 views

What would happen if I schedule a shutdown in the middle of an update?

I did an update of CentOS 6 last night which was rather large. By the time I decided to leave it to finish, the process was only a few packages away from completing the download. So, I scheduled a ...
1
vote
2answers
962 views

Is the root filesystem unmounted during a Linux shutdown?

If the root filesystem is unmounted, then how can init be accessed to run the last few steps that occur afterwards?
1
vote
2answers
710 views

How to set up an emergency power-off keyboard shortcut on Linux?

Some times when my laptop wakes up from standby or hibernation the screen backlight won't turn on and I can barely see anything in a dark room and just can't see anything when I'm outdoors. The only ...