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

Here you can discuss every aspect of Debian. Note: not for support requests!
Post Reply
Message
Author
tcdaly
Posts: 2
Joined: 2013-08-20 20:44
Has thanked: 2 times

Halting the boot process early

#1 Post by tcdaly »

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?

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Halting the boot process early

#2 Post by p.H »

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.

tcdaly
Posts: 2
Joined: 2013-08-20 20:44
Has thanked: 2 times

Re: Halting the boot process early

#3 Post by tcdaly »

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.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Halting the boot process early

#4 Post by p.H »

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.

clementishutin
Posts: 37
Joined: 2021-12-10 11:59
Been thanked: 3 times

Re: Halting the boot process early

#5 Post by clementishutin »

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.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Halting the boot process early

#6 Post by p.H »

@clementishutin, what does this have to do with the topic ?

Post Reply