Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
Halting the boot process early
Halting the boot process early
The Debian manual refers to stage 3 in the boot process, where a mini-Debian system is run from memory before drives are mounted. It is possible to halt the boot process at this stage and be given a command prompt?
-
- Global Moderator
- Posts: 3049
- Joined: 2017-09-17 07:12
- Has thanked: 5 times
- Been thanked: 132 times
Re: Halting the boot process early
If you mean the initramfs stage, add "break[=<phase>]" to the kernel command line.
See initramfs-tools manpage for possible optional phases. Note that USB keyboard is not operational in earliest stages.
See initramfs-tools manpage for possible optional phases. Note that USB keyboard is not operational in earliest stages.
Re: Halting the boot process early
Thank you. What I'd like to do is to get to a state where I could run 'fsck' on non-mounted root filesystems, but without having to use USB/live disk boot media.
-
- Global Moderator
- Posts: 3049
- Joined: 2017-09-17 07:12
- Has thanked: 5 times
- Been thanked: 132 times
Re: Halting the boot process early
You can do it from the initramfs shell, provided that the fsck.<type> program has been included in the initramfs. Only the fsck for the root filesystem is included by default, but you can add others with "copy_exec" commands in a hook script if needed. Cf. man initramfs-tools again for details.
-
- Posts: 37
- Joined: 2021-12-10 11:59
- Been thanked: 3 times
Re: Halting the boot process early
Startup scripts use /dev/console as their stdin/stdout during boot, and stty cannot be used to tune it. The issue is with the kernel module tty io.c, which sets this device to NOCTTY. For me, changing *noctty = 1 to 0 and restarting the kernel is sufficient.