Page 1 of 1

[SOLVED] kernel-desktop-latest-3.19.0-2.mga5 no img

PostPosted: Feb 23rd, '15, 20:42
by bertaerts
I just installed the updates to Mageia 5 beta 3.

PC does not boot anymore, at least not with the new kernel.
Fortunately, the old kernel still works fine :-)

This is how /boot looks like:

Code: Select all
[bert@Dell7720Mageia5 boot]$ ls -al
total 25553
drwxr-xr-x  6 root root    4096 Feb 23 19:35 ./
drwxr-xr-x 19 root root    4096 Feb 16 21:30 ../
-rw-r--r--  1 root root  171234 Feb  9 07:48 config-3.19.0-desktop-1.mga5
-rw-r--r--  1 root root  171234 Feb 23 00:20 config-3.19.0-desktop-2.mga5
drwxr-xr-x  2 root root    4096 Feb 21 13:54 dracut/
drwxrwxrwx  3 root root     512 Jan  1  1970 EFI/
-rwxr-xr-x  1 root root  552960 Feb 14 16:58 gfxmenu*
drwxr-xr-x  2 root root    4096 Feb 11 21:42 grub/
drwxr-xr-x  6 root root    4096 Feb 23 19:31 grub2/
-rw-------  1 root root 9313895 Feb 14 17:29 initrd-3.19.0-desktop-1.mga5.img
lrwxrwxrwx  1 root root      32 Feb 23 19:34 initrd-desktop.img -> initrd-3.19.0-desktop-1.mga5.img
lrwxrwxrwx  1 root root      32 Feb 11 21:46 initrd.img -> initrd-3.19.0-desktop-1.mga5.img
-rw-r--r--  1 root root  308314 Sep 23 21:08 mageia.bmp
-rw-r--r--  1 root root  245356 Feb  9 07:48 symvers-3.19.0-desktop-1.mga5.xz
-rw-r--r--  1 root root  245356 Feb 23 00:20 symvers-3.19.0-desktop-2.mga5.xz
-rw-r--r--  1 root root 3222798 Feb  9 07:48 System.map-3.19.0-desktop-1.mga5
-rw-r--r--  1 root root 3222798 Feb 23 00:20 System.map-3.19.0-desktop-2.mga5
lrwxrwxrwx  1 root root      29 Feb 11 21:46 vmlinuz -> vmlinuz-3.19.0-desktop-1.mga5
-rw-r--r--  1 root root 4341120 Feb  9 07:48 vmlinuz-3.19.0-desktop-1.mga5
-rw-r--r--  1 root root 4341568 Feb 23 00:20 vmlinuz-3.19.0-desktop-2.mga5
lrwxrwxrwx  1 root root      29 Feb 23 19:35 vmlinuz-desktop -> vmlinuz-3.19.0-desktop-1.mga5


The .img file is missing for the new kernel 3.19.0-2.
Can I repair this myself?

Re: kernel-desktop-latest-3.19.0-2.mga5 no img

PostPosted: Feb 23rd, '15, 21:12
by martinw
Try this (as root):
Code: Select all
/bin/dracut -f /boot/initrd-3.19.0-desktop-2.mga5.img 3.19.0-desktop-2.mga5

Re: kernel-desktop-latest-3.19.0-2.mga5 no img

PostPosted: Feb 23rd, '15, 21:28
by bertaerts
Thanks. One step further, I now have .img:

Code: Select all
[root@Dell7720Mageia5 boot]# ls -al
total 34637
drwxr-xr-x  6 root root    4096 Feb 23 20:14 ./
drwxr-xr-x 19 root root    4096 Feb 16 21:30 ../
-rw-r--r--  1 root root  171234 Feb  9 07:48 config-3.19.0-desktop-1.mga5
-rw-r--r--  1 root root  171234 Feb 23 00:20 config-3.19.0-desktop-2.mga5
drwxr-xr-x  2 root root    4096 Feb 21 13:54 dracut/
drwxrwxrwx  3 root root     512 Jan  1  1970 EFI/
-rwxr-xr-x  1 root root  552960 Feb 14 16:58 gfxmenu*
drwxr-xr-x  2 root root    4096 Feb 11 21:42 grub/
drwxr-xr-x  6 root root    4096 Feb 23 20:26 grub2/
-rw-------  1 root root 9313895 Feb 14 17:29 initrd-3.19.0-desktop-1.mga5.img
-rw-------  1 root root 9298589 Feb 23 20:14 initrd-3.19.0-desktop-2.mga5.img
lrwxrwxrwx  1 root root      32 Feb 23 19:34 initrd-desktop.img -> initrd-3.19.0-desktop-1.mga5.img
lrwxrwxrwx  1 root root      32 Feb 11 21:46 initrd.img -> initrd-3.19.0-desktop-1.mga5.img
-rw-r--r--  1 root root  308314 Sep 23 21:08 mageia.bmp
-rw-r--r--  1 root root  245356 Feb  9 07:48 symvers-3.19.0-desktop-1.mga5.xz
-rw-r--r--  1 root root  245356 Feb 23 00:20 symvers-3.19.0-desktop-2.mga5.xz
-rw-r--r--  1 root root 3222798 Feb  9 07:48 System.map-3.19.0-desktop-1.mga5
-rw-r--r--  1 root root 3222798 Feb 23 00:20 System.map-3.19.0-desktop-2.mga5
lrwxrwxrwx  1 root root      29 Feb 11 21:46 vmlinuz -> vmlinuz-3.19.0-desktop-1.mga5
-rw-r--r--  1 root root 4341120 Feb  9 07:48 vmlinuz-3.19.0-desktop-1.mga5
-rw-r--r--  1 root root 4341568 Feb 23 00:20 vmlinuz-3.19.0-desktop-2.mga5
lrwxrwxrwx  1 root root      29 Feb 23 19:35 vmlinuz-desktop -> vmlinuz-3.19.0-desktop-1.mga5


But still in advanced options, selecting the new kernel does not boot, and I am not fast enough to see an error message.

Re: kernel-desktop-latest-3.19.0-2.mga5 no img

PostPosted: Feb 23rd, '15, 21:41
by doktor5000
What do you see if it boots?

Re: kernel-desktop-latest-3.19.0-2.mga5 no img

PostPosted: Feb 23rd, '15, 21:44
by bertaerts
Normally there is a message about ram disk in a smaller black window than the screensize.
With the new kernel, this window comes, but I don't see ramdisk or anything else appearing.
Then the screen becomes black and the disk activity is very slowly on: 0.5 sec on, 1 sec off and so on.
Not the normal disk activity.
Should I wait longer than a few minutes?

I use uefi grub2...

Re: kernel-desktop-latest-3.19.0-2.mga5 no img

PostPosted: Feb 23rd, '15, 22:24
by doktor5000
bertaerts wrote:Should I wait longer than a few minutes?

Why not let it sit there for say 10 or 15 minutes - grab yourself a book or a beer in the meantime, whatever you prefer ...

Re: kernel-desktop-latest-3.19.0-2.mga5 no img

PostPosted: Feb 23rd, '15, 23:25
by bertaerts
Waited 15 minutes.
Only hard poweroff by pressing 5 seconds on the power button got the PC out of this state...

Re: kernel-desktop-latest-3.19.0-2.mga5 no img

PostPosted: Feb 23rd, '15, 23:35
by doktor5000
From one of the older kernels, you could still do
Code: Select all
urpmi --replacepkgs --replacefiles kernel-desktop-latest-3.19.0-2.mga5

to reinstall. Or
Code: Select all
urpme kernel-desktop-latest-3.19.0-2.mga5; urpmi kernel-desktop-latest-3.19.0-2.mga5

Re: kernel-desktop-latest-3.19.0-2.mga5 no img

PostPosted: Feb 24th, '15, 08:07
by bertaerts
I think the issue is in /boot/grub2/grub.cfg

Code: Select all
        menuentry 'Mageia, with Linux 3.19.0-desktop-2.mga5' --class mageia --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.19.0-desktop-2.mga5-advanced-af743c5f-93f8-4b43-89f8-b7725fc63605' {
                set gfxpayload=text
                insmod gzio
                insmod part_gpt
                insmod ext2
                set root='hd3,gpt2'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root --hint-bios=hd3,gpt2 --hint-efi=hd3,gpt2 --hint-baremetal=ahci3,gpt2  af743c5f-93f8-4b43-89f8-b7725fc63605
                else
                  search --no-floppy --fs-uuid --set=root af743c5f-93f8-4b43-89f8-b7725fc63605
                fi
                echo    'Loading Linux 3.19.0-desktop-2.mga5 ...'
                linux   /boot/vmlinuz-3.19.0-desktop-2.mga5 root=/dev/sdd2 ro   nokmsboot splash quiet resume=UUID=0970e4c4-20a0-4852-bb6b-1e24413a0015 net.ifnames=0
        }
        menuentry 'Mageia, with Linux 3.19.0-desktop-1.mga5' --class mageia --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.19.0-desktop-1.mga5-advanced-af743c5f-93f8-4b43-89f8-b7725fc63605' {
                set gfxpayload=text
                insmod gzio
                insmod part_gpt
                insmod ext2
                set root='hd3,gpt2'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root --hint-bios=hd3,gpt2 --hint-efi=hd3,gpt2 --hint-baremetal=ahci3,gpt2  af743c5f-93f8-4b43-89f8-b7725fc63605
                else
                  search --no-floppy --fs-uuid --set=root af743c5f-93f8-4b43-89f8-b7725fc63605
                fi
                echo    'Loading Linux 3.19.0-desktop-1.mga5 ...'
                linux   /boot/vmlinuz-3.19.0-desktop-1.mga5 root=UUID=af743c5f-93f8-4b43-89f8-b7725fc63605 ro   nokmsboot splash quiet resume=UUID=0970e4c4-20a0-4852-bb6b-1e24413a0015 net.ifnames=0
                echo    'Loading initial ramdisk ...'
                initrd  /boot/initrd-3.19.0-desktop-1.mga5.img
        }


In the working kernel there is root=UUID=af743c5f-93f8-4b43-89f8-b7725fc63605.
In the non-working kernel there is root=/dev/sdd2
This file is auto-generated.
How do I generate it correctly?

I have had ALWAYS issues with kernel updates on Mageia 4 also when the OS is installed on an external USB disk.
With Mageia 4 I could solve it myself in grub configuration.
So here again Mageia 5 beta 3 is installed on an external USB disk...

Re: kernel-desktop-latest-3.19.0-2.mga5 no img

PostPosted: Feb 24th, '15, 10:42
by bertaerts
When comparing both grub2 menu entries, a more important difference can be discovered.

Code: Select all
                    echo    'Loading initial ramdisk ...'
                    initrd  /boot/initrd-3.19.0-desktop-1.mga5.img


These 2 lines are missing in the menu entry for 3.19.0-desktop-2 !!!!

Can I edit this file /boot/grub2/grub.cfg?
Will it remain valid until the next kernel update?
When I run grub2-mkconfig, I get exactly the same file containing the error.
What is the input of grub2-mkconfig?

Re: kernel-desktop-latest-3.19.0-2.mga5 no img

PostPosted: Feb 24th, '15, 12:08
by niumao
you can edit the menuentry in your grub.cfg as such
Code: Select all
menuentry 'Mageia, with Linux 3.19.0-desktop-2.mga5' --class mageia --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.19.0-desktop-2.mga5-advanced-af743c5f-93f8-4b43-89f8-b7725fc63605' {
                set gfxpayload=text
                insmod gzio
                insmod part_gpt
                insmod ext2
                set root='hd3,gpt2'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root --hint-bios=hd3,gpt2 --hint-efi=hd3,gpt2 --hint-baremetal=ahci3,gpt2  af743c5f-93f8-4b43-89f8-b7725fc63605
                else
                  search --no-floppy --fs-uuid --set=root af743c5f-93f8-4b43-89f8-b7725fc63605
                fi
                echo    'Loading Linux 3.19.0-desktop-2.mga5 ...'
                linux   /boot/vmlinuz-3.19.0-desktop-2.mga5 root==UUID=af743c5f-93f8-4b43-89f8-b7725fc63605 rw
                echo    'Loading initial ramdisk ...'
                initrd  /boot/initrd-3.19.0-desktop-2.mga5.img
 }

Re: kernel-desktop-latest-3.19.0-2.mga5 no img

PostPosted: Feb 24th, '15, 12:09
by gohlip
Obviously, your initrd line is missing.

Can you get this back by
Code: Select all
# dracut -f
# grub2-mkconfig -o /boot/grub2/grub.cfg


2 points
o your grub menu shows
Code: Select all
linux   /boot/vmlinuz-3.19.0-desktop-1.mga5 .......
initrd  /boot/initrd-3.19.0-desktop-1.mga5.img
instead of
Code: Select all
linux   /boot/vmlinuz-desktop ..........
initrd   /boot/initrd-desktop.img

o You have "net.ifnames=0" in your linux line.
Do you still need this with newer systemd?
Did you manually modify your grub.cfg?

Re: kernel-desktop-latest-3.19.0-2.mga5 no img

PostPosted: Feb 24th, '15, 21:58
by bertaerts
What I did now:
Code: Select all
dracut -f --fstab /boot/initrd-3.19.0-desktop-2.mga5.img 3.19.0-desktop-2.mga5
grub2-mkconfig -o /boot/grub2/grub.cfg


Now my grub.cfg looks fine for all three kernels:
Code: Select all
Generating grub configuration file ...
Found theme: /boot/grub2/themes/maggy/theme.txt
Found linux image: /boot/vmlinuz-desktop
Found initrd image: /boot/initrd-desktop.img
Found linux image: /boot/vmlinuz-3.19.0-desktop-2.mga5
Found initrd image: /boot/initrd-3.19.0-desktop-2.mga5.img
Found linux image: /boot/vmlinuz-3.19.0-desktop-1.mga5
Found initrd image: /boot/initrd-3.19.0-desktop-1.mga5.img
Found Mageia 4 (4) on /dev/sda1
done


And I am now running 3.19.0-desktop-2.mga5 :-)

gohlip, to answer your two points:
1. there are 3 menuentries, also the one you mention, which are symbolic links to the latest kernel, I only showed the "numbered" ones.
2. commercial apps like Matlab from the Mathworks and Mathematica from Wolfram, still require eth0 for their license.
What I did was:
Code: Select all
su
emacs /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT= add "net.ifnames=0" to end of string
save and close emacs
update-grub2

Re: kernel-desktop-latest-3.19.0-2.mga5 no img

PostPosted: Feb 25th, '15, 04:53
by gohlip
Good all is well.
Thanks for the explanations for the points.
Cheers. Take care.

Re: kernel-desktop-latest-3.19.0-2.mga5 no img

PostPosted: Feb 25th, '15, 08:15
by doktor5000
Please mark the thread accordingly by editing the topic of the first post and prefix it by [SOLVED], thanks