Bug 822760 - shutdown hangs on "sh not found" after preupgrade from Fedora 16 to F17-RC3
shutdown hangs on "sh not found" after preupgrade from Fedora 16 to F17-RC3
Product: Fedora
Classification: Fedora
Component: preupgrade (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Richard Hughes
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2012-05-18 00:41 EDT by Dov Grobgeld
Modified: 2013-07-31 20:40 EDT (History)
16 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-07-31 20:40:28 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Crash screenshot (411.30 KB, image/jpeg)
2012-05-29 14:43 EDT, Eduardo Habkost
no flags Details
initramfs file that fails to shutdown (16.41 MB, application/octet-stream)
2012-05-29 17:44 EDT, Eduardo Habkost
no flags Details

  None (edit)
Description Dov Grobgeld 2012-05-18 00:41:38 EDT
Description of problem:

shutdown does not shutdown the system but hangs on a message similar to:

sh not found
kernel panic

and the computer enters an infinite loop that blinks the numlock and capslock LEDs on the keyboard.

Version-Release number of selected component (if applicable):

Fedora 17 preupgrade to Fedora17-RC3.

How reproducible:


Steps to Reproduce:
1. Shotdown in any fasion: by gui, by "shutdown now", etc.
Actual results:

System does kernel panic and remains turned on.

Expected results:

Shut the power off.

Additional info:
Comment 1 Michal Schmidt 2012-05-18 05:27:34 EDT
There is probably something wrong with your initramfs. Perhaps it was not regenerated properly during the preupgrade. Try recreating your initramfs with "dracut -f".
Reassigning tentatively to preupgrade.
Comment 2 Dov Grobgeld 2012-05-18 06:05:56 EDT
I tried "dracut -f", but it didn't help.

Here is a transcript of the messages that occur before the kernel panic. Note that the contents is hand copied and is only approximate.

Succesfully changed into root pivot.
/shutdown: 8: /lib/dracut/hooks/shutdown/30md-shutdown.sh: dmsetup: not found
/shutdown: 9: /lib/dracut/hooks/shutdown/30md-shutdown.sh: mdadm: not found
/shutdown: 8: /lib/dracut/hooks/shutdown/30md-shutdown.sh: dmsetup: not found
/shutdown: 9: /lib/dracut/hooks/shutdown/30md-shutdown.sh: mdadm: not found
/shutdown: 13: /lib/dracut/hooks/shutdown/30md-shutdown.sh: cat: not found
/shutdown: 89: /shutdown: poweroff: not found

dracut Warning: Signal caught!
/usr/udev/console_init: 14: /lib/udev/console_init: kbd_mode: not found
/usr/udev/console_init: 22: /lib/udev/console_init: stty: not found
/usr/udev/console_init: 49: /lib/udev/console_init: setfont: not found
/usr/udev/console_init: 39: /lib/udev/console_init: loadkeys: not found
dropping to debug shell.

/shutdown: 33: /shutdown: sh: not found
[28228.459553] Kernel panic - not syncing: attempted to kill init!
[28228.459596] Pid: 1, comm: Sshutdown Tainted: G       C 0 3.3.5-2.fc16.i686 #1
[28228.459639] Call trace:
[28228.459688]  [<c0927017] ? printk+...
[28228.459743]  [<c0927017] panic+...
[28228.459882]  [<c0927017] do_exit+...
[28228.459882]  [<c0927017] do_group_exit+...
[28228.459882]  [<c0927017] sys_exit_group+...
[28228.459882]  [<c0927017] syscall_call+...
[28228.459882] panel occured, switching back to text console
Comment 3 Dov Grobgeld 2012-05-19 15:38:31 EDT
Sorry. The "dracut -f" command did solve the problem. I only tested by doing shutdown immediately after I ran the above command. This obviously did not make any difference since the old RAM disk contents stayed the same. On subsequent reboots, shutdown works as it should.

Comment 4 Eduardo Habkost 2012-05-29 14:43:03 EDT
Created attachment 587483 [details]
Crash screenshot

I got the same problem here, after a Fedora 16 -> Fedora 17 upgrade (using preupgrade). Screenshot attached.
Comment 5 Tomas Olivares 2012-05-29 15:57:19 EDT
I can confirm the error after doing the "preupgrade" method however, and as stated before, the "dracut -f" command will fix this. Note it will not work the first shutdown as the initramfs is loaded after the system is booted.
Comment 6 Eduardo Habkost 2012-05-29 17:44:54 EDT
Created attachment 587539 [details]
initramfs file that fails to shutdown

"dracut -f" followed by a reboot solved the problem to me, too. I am attaching a copy of the initramfs file that doesn't work.

The contents of the old initramfs look so different from the new one, that I don't know how to start comparing them.
Comment 7 Dave McNeill 2012-05-30 05:13:29 EDT
FWIW, I had exactly the same issues running preupgrade from 16 to 17 on both my work PC and my home laptop. 'dracut -f' fixed fine.
Comment 8 Thomas Lake 2012-05-31 07:25:28 EDT
I've just seen the same issue on a machine upgraded from 16 to 17 using the installer. Fixed with dracut -f
Comment 9 Mike Salway 2012-06-03 07:17:26 EDT
I had the same issue after a preupgrade from 16 -> 17.

I noticed that while an fc17 kernel had been installed by the upgrade process grub was still using a fc16 kernel and was thereby using the old fc16 initramfs. Which is probably where this issue stems from.

Reconfiguring /etc/grub2.cfg to boot from the fc17 kernel and use the fc17 initramfs resolves the issue.

Installed kernels on my system are as follows (boot kernel after upgrade marked with *):

kernel-3.3.7-1.fc16.x86_64 (*)
Comment 10 Jonathan Watt 2012-06-05 04:37:14 EDT
I also had this issue after after a preupgrade from 16 -> 17.

I tried 'sudo dracut -f' and that fixed the panic, but it did not fix the fact that grub was still using kernel-3.3.7-1.fc16.x86_64 (and not even listing kernel-3.3.7-1.fc17.x86_64).

Being a new Linux user, and being unfamiliar with grub, I searched around for how to update my /etc/grub2.cfg safely. Most instructions online say to use update-grup but this page says it's not necessary since you can update the file manually:


Well that's great if you know what you're doing, but it seems like update-grub would be really handy for those of us that don't.

Anyway, I tried running:

  sudo grub2-mkconfig -o /boot/grub2/grub.cfg

instead. That kinda changed the grub screen, but under the "Advanced options for Fedora Linux" I found that it did have kernel-3.3.7-1.fc17.x86_64 now. Unfortunately when selecting that I now get the following:

  error: file not found.
  error: file not found.
  error: file not found.
  Loading Linux 3.3.7-1.fc17.x86_64 ...
  Loading initial ramdisk ...

  Press any key to continue...

On pressing any key Fedora does seem to load okay, and uname tells me that it is using the fc17 kernel now, but these "file not found" error messages persist. If anyone has any idea about them (or how to regenerate my grub config correctly), please let me know.
Comment 11 Jonathan Watt 2012-06-05 05:15:50 EDT
Seems like the 'file not found' thing is bug 810348, as running the following fixed those errors for me:

  sudo grub2-install /dev/sda

Maybe the underlying cause of all these problems is bug 827987?
Comment 12 Dave McNeill 2012-06-06 05:25:03 EDT
FWIW, I was able to get grub to use the f17 kernel by removing it and then re-adding it:

# yum remove kernel-3.3.7-1.fc17.x86_64
# yum update
Comment 13 Saby 2012-08-07 15:40:49 EDT
I also had this promblem of shutdown after pre upgrade from f16-->f17 but 
'dracut -f' did solve the promblem though the grub is still using the kernel of f16 to boot.

Can anyone help me in changing the grub from f16 kernel to f17 kernel?
Comment 14 Fedora End Of Life 2013-07-03 18:39:19 EDT
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '17'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 17's end of life.

Bug Reporter:  Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 17 is end of life. If you 
would still like  to see this bug fixed and are able to reproduce it 
against a later version  of Fedora, you are encouraged  change the 
'version' to a later Fedora version prior to Fedora 17's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 15 Fedora End Of Life 2013-07-31 20:40:35 EDT
Fedora 17 changed to end-of-life (EOL) status on 2013-07-30. Fedora 17 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.