Score:0

How to turnoff or reboot at (initramfs) prompts/busybox?

pk flag

I get the (initramfs) prompts/busybox occasionally in Ubuntu 20.04.

BusyBox v1.18.5 (Ubuntu 1:1.18.5-1ubuntu4) built-in shell (ash) 
Enter 'help' for a list of built-in commands.

(initramfs)

A manual fsck solves the problem. But, I need to know which partition got corrupted. Sometimes when I get the BusyBox, neither the reboot command nor the exit command works (I suppose the exit command works, but we are still in the BusyBox because the file system errors persists). I need to turnoff or reboot to see which partition has the problem.

How to turnoff or reboot when you get BusyBox (and reboot and exit commands has no effect) ?

guiverc avatar
cn flag
Have you tried SysRq commands *direct to kernel* ? (ie. REISUO for off, REISUB for reboot) *Sorry I can't verify they'll work currently, but they'd be what I tried first*
Cyriac Antony avatar
pk flag
@guiverc I don't know these commands. Feel free to post an answer (e.g. generally what we should do in linux when we get busybox). I tried only commands listed by `help`.
guiverc avatar
cn flag
SysRq is a key on the keyboard (though many *modern* keyboards don't have it printed on the keys, as it was traditionally printed on the key front and not top - but those keyboards still work; some just require you to add a Fn but this is firmware/brand specific). It's not Ubuntu specific but kernel commands (anything using a linux kernel can use it - so android phones IF you have one with a real keyboard; it cannot be on-screen GUI keyboard). Grab a phone & search "magic sysrq" & the wikipedia article will be near/at top for any search engine & is good enough
Cyriac Antony avatar
pk flag
[Here](https://askubuntu.com/q/137655/833452) is a related question. It has detailed answers.
Score:1
sa flag

I know I'm almost two years late here, but considering this has no answers...

To turn off your system from the initramfs shell, run the poweroff command:
(initramfs) poweroff

To reboot, you can use the reboot command:
(initramfs) reboot -f

Note that you must pass the -f (force) switch to the reboot command, without it the system does not reboot.

Cyriac Antony avatar
pk flag
I no longer have this issue (moved to another version of os). But, I had tried only `reboot`. The command `reboot -f` may solve the issue. Users who have this problem currently are requested to share whether this solution works for you.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.