/initrd.img symlink created with absolute target pathname

Bug #1020004 reported by Juha Aatrokoski
32
This bug affects 6 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

The /initrd.img symlink is created with absolute target path in Precise. This makes accessing the latest initrd difficult if the rootfs in question is not *our* rootfs (e.g. nfsroot server). In Lucid the target path was relative, and so is the kernel path in Precise:

/initrd.img -> /boot/initrd.img-3.2.0-26-generic-pae
/vmlinuz -> boot/vmlinuz-3.2.0-26-generic-pae

Tags: precise
Revision history for this message
Brad Figg (brad-figg) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 1020004

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Juha Aatrokoski (jha-kurp) wrote :

apport-collect not run: does not use $http_proxy

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Changed in linux (Ubuntu):
importance: Undecided → Medium
tags: added: precise
Revision history for this message
Bobby de Vos (devos-bobby) wrote :

It seems to me that the difference between the absolute symlink to the initrd.img-$version file and the relative symlink to the vmlinuz-$version file is created when the kernel post install script runs (currently linux-image-3.2.0-27-generic-pae.postinst on my system). This script, written in perl, has a subroutine called test_relative. At the end of this subroutine a return code is determined. For the initrd.img, the return code is 0, for vmlinuz the return code is 1. The code that calls test_relative() uses this return code to create an absolute or relative symlink.

As far as I can tell, the reason the return code for initrd.img is 0 is because the target of the symlink (/boot/initrd.img-$version) does not exist when the post install script is run. The target for the vmlinuz (/boot/vmlinuz-$version) does exist. The code at the end of test_relative() looks for the existence of the target in determining the return code.

The file /boot/initrd.img-$version is created after test_relative() is called. When the post install script starts running, one of the first messages is

update-initramfs: deferring update (hook will be called later)

which explains (to me at least) why the initrd.img target does not exist at first.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.