Bug 439710

Summary: must use UUID to specify swap device to resume
Product: [Fedora] Fedora Reporter: John Reiser <jreiser>
Component: mkinitrdAssignee: Peter Jones <pjones>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 9CC: dcantrell, wtogami
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-05-05 21:52:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description John Reiser 2008-03-30 21:29:07 UTC
Description of problem: The name of the first swap device at mkinitrd time is
listed in the constructed /init using a lettered spindle partition name, for
example "resume /sys/block/sda//sda5".  However, there is no guarantee that
later the partition name designates the same device at subsequent boots, so the
'resume' command might specify the wrong partition (a different spindle).  For
an example, see https://bugzilla.redhat.com/show_bug.cgi?id=439695#c3 where the
partition name changed from sda5 to sdb5 with no changes in hardware, just a
change in {kernel, mkinitrd}.

Version-Release number of selected component (if applicable):
mkinitrd-6.0.40-1.fc9.x86_64


How reproducible: always


Steps to Reproduce:
1. install new kernel, or run mkinitrd directly
2. inspect initial ram fs using "zcat /boot/initrd-....img | cpio -id" then
"grep resume ./init"
3.
  
Actual results:
resume /sys/block/sdb//sdb5

Expected results:
resume /sys/block-by-uuid/323775cc-302e-487d-823d-ad874f246696

Additional info:

Comment 1 Jeremy Katz 2008-04-24 02:37:37 UTC
I believe we should be doing the right thing here now, aren't we?

Comment 2 John Reiser 2008-04-24 23:08:18 UTC
No, the Fedora 9 Preview DVD for i386 still uses a spindled drive letter.
-----
$ zcat /boot/initrd-2.6.25-0.234.rc9.git1.fc9.i686.img | cpio -id
$ grep resume ./init
resume /dev/sdc5     ### bad
$ rpm -q kernel mkinitrd
kernel-2.6.25-0.234.rc9.git1.fc9.i686
mkinitrd-6.0.47-1.fc9.i386
$ 
-----


Comment 3 John Reiser 2008-04-25 03:41:26 UTC
I still see the problem in today's rawhide.  After running "yum update kernel
mkinitrd" on the system installed from F9 Preview for i386, 
initrd-2.6.25-1.fc9.i686.img shows "resume /dev/sdd5" instead of
"resume UUID=..." [or something; I don't know what the syntax should be.]

kernel-2.6.25-1.fc9.i686
mkinitrd-6.0.49-1.fc9.i386


Comment 4 Bug Zapper 2008-05-14 08:27:11 UTC
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 5 Jeremy Katz 2009-05-05 21:52:41 UTC
This looks good leading up to Fedora 11 (it's based on what is in /etc/fstab) and I'm pretty sure was good in F10

Comment 6 John Reiser 2009-05-06 20:24:43 UTC
Fedora 10 kernel-PAE-2.6.27.21-170.2.56.fc10.i686 and mkinitrd-6.0.71-4.fc10.i386 use, for instance: 
   resume UUID=8d42befb-a4b8-4393-ac4f-4b2282402b45