mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-10-25 21:39:48 +00:00
linux: use panic=-1 to reboot immediately on panic
This changes the default Linux kernel command line from panic=1 (reboot one second after panic) to panic=-1 (reboot immediately on panic). The kernel should not normally panic; this is just to improve quality of life for developer workflows, such as running bash as init and exiting the shell to shut down the VM. BUG=None TEST=crosvm run -r vm_rootfs.img -p init=/bin/bash vm_kernel; exit shell Change-Id: I7c9084ccf1786cd4455fd748512078e02fdb17fa Signed-off-by: Daniel Verkamp <dverkamp@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1500872 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: David Tolnay <dtolnay@chromium.org> Reviewed-by: Zach Reizner <zachr@chromium.org> Reviewed-by: Dylan Reid <dgreid@chromium.org>
This commit is contained in:
parent
4547e30366
commit
b852264e21
2 changed files with 2 additions and 2 deletions
|
@ -343,7 +343,7 @@ impl AArch64 {
|
|||
/// This returns a base part of the kernel command for this architecture
|
||||
fn get_base_linux_cmdline() -> kernel_cmdline::Cmdline {
|
||||
let mut cmdline = kernel_cmdline::Cmdline::new(sys_util::pagesize());
|
||||
cmdline.insert_str("console=ttyS0 panic=1").unwrap();
|
||||
cmdline.insert_str("console=ttyS0 panic=-1").unwrap();
|
||||
cmdline
|
||||
}
|
||||
|
||||
|
|
|
@ -510,7 +510,7 @@ impl X8664arch {
|
|||
fn get_base_linux_cmdline() -> kernel_cmdline::Cmdline {
|
||||
let mut cmdline = kernel_cmdline::Cmdline::new(CMDLINE_MAX_SIZE as usize);
|
||||
cmdline
|
||||
.insert_str("console=ttyS0 noacpi reboot=k panic=1")
|
||||
.insert_str("console=ttyS0 noacpi reboot=k panic=-1")
|
||||
.unwrap();
|
||||
cmdline
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue