Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#39274 - [mkinitcpio] "job control is turned off" in interactive shell

Attached to Project: Arch Linux
Opened by Nikolay Amiantov (abbradar) - Monday, 10 March 2014, 15:04 GMT
Last edited by Dave Reisner (falconindy) - Saturday, 05 April 2014, 17:58 GMT
Task Type Bug Report
Category Arch Projects
Status Closed
Assigned To Thomas Bächler (brain0)
Dave Reisner (falconindy)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
While using interactive shell, there is a "job control is turned off" message and usual job control hotkeys (^C, ^Z and others) don't work. The solution is to give a control tty to the shell; proposed patch to init-functions is attached. This also requires enabling CONFIG_SETSID in mkinitcpio-busybox. This patch works both for called and exec'd shells (and even if shell is exec'd after it was called). This also simplifies interactive shell codepath with use of cttyhack (already included in mkinitcpio-busybox).

Additional info:
mkinitcpio-busybox 1.21.1-2
mkinitcpio 17-1

Steps to reproduce:
1. Either add "break" to kernel cmdline or break your boot process.
2. Try to use job control.
This task depends upon

Closed by  Dave Reisner (falconindy)
Saturday, 05 April 2014, 17:58 GMT
Reason for closing:  Won't implement
Additional comments about closing:  Seems extremely edge case and not something everyone needs. Can be provided cleanly with custom hooks.
Comment by Thomas Bächler (brain0) - Monday, 10 March 2014, 18:05 GMT
I am not sure if this is necessary. If you need full job control, it suffices to use 'openvt'. I remember that cttyhack didn't quite work when I tried it a few years ago, but that may have improved.

Dave, what do you think?
Comment by Nikolay Amiantov (abbradar) - Monday, 10 March 2014, 21:50 GMT
I've checked openvt's manual; it looks like it achieves something like cttyhack, and I don't see difference really (just haven't known about it and have used what had first seen readily avaliable). AFAIU, setsid is still needed, however.
Comment by Dave Reisner (falconindy) - Monday, 10 March 2014, 21:51 GMT
What are you doing regularly in the initramfs shell that requires job control?
Comment by Nikolay Amiantov (abbradar) - Monday, 10 March 2014, 21:57 GMT
I use it from time to time as a generic shell that is avaliable before root mounting; it is needed for me to safely check for presence of certain BIOS-related memory corruption bug (which can corrupt FS even if it's ro, see https://github.com/Bumblebee-Project/bbswitch/issues/78). I have also used (I think, "abused" is a better word for this, though) it as means for repartitioning hard drive on live remote server without KVM access ^_^. It is useful from time to time to generate an image for custom needs (with needed programs and stuff) and do something from it that needs (for some reason) to have no rootfs mounted.
Edit: Oh, and I also have used mkinitcpio as a generator for initramfs's for testing my own kernel modules in qemu (it is the fastest method for debugging to generate mkinitcpio image with my module in it and boot it from qemu).
Comment by Dave Reisner (falconindy) - Saturday, 05 April 2014, 17:57 GMT
I'm still not sure what part of this requires you to have a fully functioning tty for job control. Regardless, you can easily provide this for yourself in a custom hook by overriding the launch_interactive_shell function and addingthe necessary binaries. I don't think this is something we need/should provide for everyone.

Loading...