Bug 1476988 - uImage and uInitrd lose links at kernel update, cost space
uImage and uInitrd lose links at kernel update, cost space
Status: NEW
Product: Fedora
Classification: Fedora
Component: grubby (Show other bugs)
26
armv7hl Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Peter Jones
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-31 22:59 EDT by John Reiser
Modified: 2017-09-09 22:09 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description John Reiser 2017-07-31 22:59:18 EDT
Description of problem: When a new Linux kernel is installed, then the pathnames /boot/uInitrd and /boot/uImage become separate copies instead of being linked to specific versions of uInitrd-* and uImage-*.  This wastes space and time.


Version-Release number of selected component (if applicable):
grubby-8.40-4.fc26.armv7hl  (/usr/sbin/new-kernel-pkg)


How reproducible: every time


Steps to Reproduce:
1. "dnf update" which installs a new Linux kernel
2. cd /boot; ls -li uInitrd* uImage*
3. cmp uInitrd* <latest uInitrd-version>; cmp uImge <latest uImage-version>

Actual results:
 541 -rw-r--r--. 1 root root  6271096 Jul 23 16:33 uImage
1595 -rw-r--r--. 1 root root  6267528 Jul 18 20:21 uImage-4.11.10-300.fc26.armv7hl
 540 -rw-r--r--. 1 root root  6271096 Jul 23 16:33 uImage-4.11.11-300.fc26.armv7hl
1070 -rw-r--r--. 1 root root  6267824 Jul 12 15:27 uImage-4.11.9-300.fc26.armv7hl
 542 -rw-r--r--. 1 root root 17370691 Jul 23 16:33 uInitrd
1596 -rw-r--r--. 1 root root 17369397 Jul 18 20:21 uInitrd-4.11.10-300.fc26.armv7hl
 543 -rw-r--r--. 1 root root 17370691 Jul 23 16:33 uInitrd-4.11.11-300.fc26.armv7hl
1071 -rw-r--r--. 1 root root 17404913 Jul 12 15:27 uInitrd-4.11.9-300.fc26.armv7hl


[root@f26xfcepi boot]# cmp uImage uImage-4.11.11-300.fc26.armv7hl
[root@f26xfcepi boot]# echo $?
0  ## files compare equal
[root@f26xfcepi boot]# cmp uInitrd uInitrd-4.11.11-300.fc26.armv7hl
[root@f26xfcepi boot]# echo $?
0  ## files compare equal

Expected results:
uImage and uInitrd are links (either hardlink or symlink) to the actual specific version.

In this case for hardlink:
=====
# ls -li uImage uImage-4.11.11-300.fc26.armv7hl
540 -rw-r--r--. 2 root root 6271096 Jul 23 16:33 uImage
540 -rw-r--r--. 2 root root 6271096 Jul 23 16:33 uImage-4.11.11-300.fc26.armv7hl
# ls -li uInitrd uInitrd-4.11.11-300.fc26.armv7hl
542 -rw-r--r--. 2 root root 17370691 Jul 23 16:33 uInitrd
542 -rw-r--r--. 2 root root 17370691 Jul 23 16:33 uInitrd-4.11.11-300.fc26.armv7hl
=====
Notice the link count ' 2 ' and the same inode number listed twice (540 and 542).

In this case for symlink:
=====
# ls -l uImage uImage-4.11.11-300.fc26.armv7hl
lrwxrwxrwx. 1 root root      31 Jul 23 16:33 uImage -> uImage-4.11.11-300.fc26.armv7hl
-rw-r--r--. 1 root root 6271096 Jul 23 16:33 uImage-4.11.11-300.fc26.armv7hl
# ls -li uInitrd uInitrd-4.11.11-300.fc26.armv7hl
lrwxrwxrwx. 1 root root       32 Jul 23 16:33 uInitrd -> uInitrd-4.11.11-300.fc26.armv7hl
-rw-r--r--. 1 root root 17370691 Jul 23 16:33 uInitrd4.11.11-300.fc26.armv7hl
=====

Additional info:

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