[OE-core] 78ee4d8: classes/kernel: Use full path for symlink in update-alternatives. Breaks boot?

Andrea Adami andrea.adami at gmail.com
Sat Jul 5 19:00:08 UTC 2014


Hi,

the commit in subject is aiming to solve update issues but actually
breaks some bootmanagers/bootloaders which are detecting and mounting
a filesystem on /mnt.

I think that, as a general rule, any symlink where the source and target file
both reside in the same directory should be a relative symlink.

Before commit:

root at mizar:/var/tmp# ls -al boot-good/
total 2076
drwxr-xr-x 2 root root    4096 lug  5 12:20 .
drwxrwxrwt 4 root root    4096 lug  5 12:26 ..
-rw-r--r-- 1 root root     831 lug  5 01:24 boot.cfg
-rw-r--r-- 1 root root    1322 lug  5 01:24 icon.xpm
lrwxrwxrwx 1 root root      28 lug  5 12:26 zImage ->
zImage-3.14.5-yocto-standard
-rw-r--r-- 1 root root 2106848 lug  5 12:16 zImage-3.14.5-yocto-standard

Bootloader finds /mnt/boot/zImage -> zImage-3.14.5-yocto-standard
Uncompressing Linux... done, booting the kernel.


After commit:

root at mizar:/var/tmp# ls -al boot-bad/
total 2076
drwxr-xr-x 2 root root    4096 lug  5 01:38 .
drwxrwxrwt 4 root root    4096 lug  5 12:26 ..
-rw-r--r-- 1 root root     831 lug  5 01:24 boot.cfg
-rw-r--r-- 1 root root    1322 lug  5 01:24 icon.xpm
lrwxrwxrwx 1 root root      34 lug  5 12:26 zImage ->
/boot/zImage-3.14.5-yocto-standard
-rw-r--r-- 1 root root 2106832 lug  5 01:20 zImage-3.14.5-yocto-standard

Cannot open `/mnt/boot/zImage': No such file or directory
Nothing has been loaded!

Here the loader finds the symlink but it is wrong because we are in
/mnt and it points to /boot.


I could maybe workaround creating some iterative extra symlink but I
ask before: is that commit really ok?

Cheers

Andrea



More information about the Openembedded-core mailing list