How does one reboot from an ash shell? [closed]
Asked Answered
P

5

22

How does one reboot from an ash shell?

I have an Ubuntu system that is currently bricked for some reason (not pertinent for this question), which means I boot into a BusyBox ash shell. But the exit command does squat, and reset is irrelevant. There must be a better way to reboot than the power button, right?

Propman answered 7/5, 2012 at 13:18 Comment(0)
N
39

I was looking for the same, and my BusyBox installation doesn't have shutdown, restart or reboot commands.

I used poweroff -f because poweroff with no parameters doesn't do anything.

If the previous command doesn't work, try to do a ls -la /bin or a ls -la /sbin to see which commands are available on your BusyBox installation.

As user6214440 stated, if your installation doesn't has a good path environment you should need to execute the command with full path like /sbin/reboot or /sbin/poweroff

Nivernais answered 10/10, 2014 at 10:34 Comment(2)
Related: For a restart instead of power off, use the reboot command.Cop
reboot alone did nothing here. Needed do go with the absolute path /bin/reboot. Same goes for poweroff.Deodorant
P
6

tested on BusyBox v1.18.4 (2011-03-18 03:57:01 EDT) multi-call binary

Some BusyBox versions also restart with a forced reboot command:

reboot -f

reboot --help

for more information.

Psychopath answered 26/6, 2019 at 16:33 Comment(0)
C
3

Do you not have the reboot or shutdown commands? reboot without arguments should reboot your box, or 'shutdown -r now' should also do it.

Carolyn answered 13/5, 2012 at 2:54 Comment(2)
He's probably running a super pared down system, and for whatever reason /sbin is not in his path. Try "/sbin/shutdown -r now".Tranquilizer
Thanks for the tips: if I'm ever in the same bind, I'll try these.Propman
A
3

On my Alpine box running an ash shell, the command for shutting down completely is poweroff. I noticed it does the same thing as the more familiar shutdown -h now I usually deal with on my CentOS box.

Advocacy answered 10/7, 2015 at 19:3 Comment(0)
C
0

I have a similar "Busy Box" problem but it usually only happens when rebooting after a windows session (which I need for my DAW) I know it's 99% going to busy box so instead of a normal boot I boot to a live USB such as MXlinux 19.x and from there run Gparted it's in the menu under Administration (you need to authorise it with a password and for the live USB I think it's either "root" or "demo".

After it does its thing I look for the partition with Linux on it and invariably it has a triangle with an exclamation mark in it, that the one to check, Right Click it, choose "check" then Click the Tick mark at the top of the window/screen, answer yes to apply and wait for it to check the file system of your partition.

When finished either open a terminal and type reboot or do it however you normally reboot. That's how I fix the problem every time.

Candlestick answered 19/8, 2020 at 1:2 Comment(1)
Except that you need to reboot in order to launch the live USB Linux operating system. Faced with the ash command line, you can't get there.Propman

© 2022 - 2024 — McMap. All rights reserved.