Bug 32736 - fails if the loaded kernel is not installed
Summary: fails if the loaded kernel is not installed
Status: CLOSED NOTABUG
Alias: None
Product: Sisyphus
Classification: Development
Component: make-initrd (show other bugs)
Version: unstable
Hardware: all Linux
: P3 major
Assignee: Alexey Gladkov
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-09 20:27 MSK by Ivan Zakharyaschev
Modified: 2016-11-09 20:47 MSK (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Zakharyaschev 2016-11-09 20:27:45 MSK
make-initrd-0.8.11-alt2

I have apt-get-removed the currently loaded kernel (and all other kernels at all), but then installed another one.

make-initrd doesn't generate any initrds in such situation; fails with an error:

[root@prodesk0 ~]# /usr/sbin/make-initrd; echo $?
Config file: /etc/initrd.mk
Generating module dependencies on host ...
depmod: FATAL: could not load /boot/System.map-4.4.28-std-def-alt1: No such file or directory
make: *** [depmod-host] Error 1
make: *** [all] Error 1
2
[root@prodesk0 ~]# l /boot/
total 14141
drwx------  5 root root    1024 xim  9 20:19 ./
drwxr-xr-x  6 root root    1024 xim  9 19:53 grub/
drwxr-xr-x 23 root root    4096 xim  3 17:37 ../
-rw-------  1 root root 7243618 xim  1 19:49 initrd-4.4.28-std-def-alt1.img
lrwxrwxrwx  1 root root      30 xim  1 19:49 initrd.img -> initrd-4.4.28-std-def-alt1.img
lrwxrwxrwx  1 root root      30 xim  1 19:49 initrd-std-def.img -> initrd-4.4.28-std-def-alt1.img
lrwxrwxrwx  1 root root      27 xim  1 19:49 vmlinuz -> vmlinuz-4.4.28-std-def-alt1
lrwxrwxrwx  1 root root      27 xim  1 19:49 vmlinuz-std-def -> vmlinuz-4.4.28-std-def-alt1
drwx------  2 root root   12288 xim  1 19:48 lost+found/
-rw-r--r--  1 root root 3717440 xim  1 18:38 vmlinuz-4.4.30-std-def-alt1
-rw-r--r--  1 root root 2926774 xim  1 18:38 System.map-4.4.30-std-def-alt1
-rw-r--r--  1 root root  177839 xim  1 18:36 config-4.4.30-std-def-alt1
drwxr-xr-x  3 root root    1024 dit 31 15:24 splash/
-rw-r--r--  1 root root  196668 cax 28  2014 elf-memtest-5.01
-rw-r--r--  1 root root  194992 cax 28  2014 memtest-5.01.bin
[root@prodesk0 ~]# rpm -q make-initrd
make-initrd            make-initrd-devmapper  make-initrd-luks       make-initrd-lvm        make-initrd-mdadm      make-initrd-plymouth   
[root@prodesk0 ~]# rpm -q make-initrd
make-initrd-0.8.11-alt2
[root@prodesk0 ~]#
Comment 1 Anton Farygin 2016-11-09 20:38:03 MSK
Ваня, make-initrd по умолчанию делает ядро для _текущего работающего ядра_, о чём прямо сказано в его help'е.

Если ты удалил все ядра и поставил ядро более новой версии, то make-initrd не обязано угатывать эту версию ядра и генерить тебе новый initrd. Задавай ядро через параметры и всё будет хорошо.

   -k, --kernel=VERSION   set kernel version (default: currently
                          running kernel);
Comment 2 Ivan Zakharyaschev 2016-11-09 20:47:51 MSK
Спасибо, rider!

Теперь понятно. Я тоже стал было подозревать это:

    This is not a bug if make-initrd called without any arguments is intended to
    generate only one initrd, for the currently loaded kernel.

    Perhaps I'm mistaken; I had the impression that initrds get re-generated.

    A way to overcome: make-initrd -k 4.4.30-std-def-alt1