Description of problem: Setup #1: SWAP Standard Partition /boot Standard Partition / btrfs Setup #2 SWAP Standard Partition /boot btrfs subvol / btrfs subvol When one performs a 'yum update', Setup #1 works normally. New kernels entries are added to the grub2 menu. But no new entries are added to grub2 on Setup #2. Unless some manual action is taken, the original release kernel will be always booted. Version-Release number of selected component (if applicable): F18 (RC4, anaconda 18.37.11) How reproducible: always, with / and /boot as btrfs subvolumes Steps to Reproduce: 0. Install Fedora 18 (used RC4 image) 1. Select MININAL in SOFTWARE SELECTION 2. Install with /,/boot as btrfs subvolumes and swap as a standard partition 3. boot and do a 'yum update' then reboot 4. No new grub2 menu entries will be there, the original kernel will be booted and not the updated one. Actual results: new kernels are not used Expected results: use new kernels by default Additional info:
Created attachment 678868 [details] grub.cfg from setup #1 (ok, 3.7.2 is there)
Created attachment 678869 [details] grub.cfg from setup #2 (BAD, 3.7.2 is NOT there)
I tested with F18 Release, installed with 'Setup #2' configuration. The issue is still there. After a 'yum update', the original release kernel is still booted. Should i reassign it to grub2 or other component?
Created attachment 681946 [details] output of yum update with debug (compressed due to size) >> I installed another system, with both / and /boot as btrfs subvolumes >> Maybe it is this? >> grubby fatal error: unable to find a suitable template D: adding 1 entries to Sigmd5 index. D: adding "147f2b4c22809751beb6cab4015095740adf1876" to Sha1header index. D: %post(kernel-3.7.2-201.fc18.x86_64): scriptlet start D: %post(kernel-3.7.2-201.fc18.x86_64): execv(/bin/sh) pid 8391 ++ uname -i ++ uname -i + '[' x86_64 == x86_64 -o x86_64 == i386 ']' + '[' -f /etc/sysconfig/kernel ']' + /bin/sed -r -i -e 's/^DEFAULTKERNEL=kernel-smp$/DEFAULTKERNEL=kernel/' /etc/sysconfig/kernel + /sbin/new-kernel-pkg --package kernel --install 3.7.2-201.fc18.x86_64 grubby fatal error: unable to find a suitable template D: %post(kernel-3.7.2-201.fc18.x86_64): waitpid(8391) rc 8391 status 0 D: ========== +++ pulseaudio-2.1-5.fc18 x86_64-linux 0x2
System (F18) using GRUB2 (BIOS/MSDOS_DISKLABEL) with / and /boot as BTRFS Subvolumes: First install 'strace': # yum install strace -y Check grub2 config file: # ls -l /etc/grub2.cfg lrwxrwxrwx. 1 root root 22 Jan 18 10:38 /etc/grub2.cfg -> ../boot/grub2/grub.cfg # ls -l /boot/grub2/grub.cfg -rw-------. 1 root root 4803 Jan 18 10:40 /boot/grub2/grub.cfg SYSTEM FSTAB: UUID=5641e581-0e13-4d3e-85ee-5604b6e8fcc7 / btrfs subvol=root 1 1 UUID=5641e581-0e13-4d3e-85ee-5604b6e8fcc7 /boot btrfs subvol=boot 1 2 UUID=5121725e-ec58-44c2-a99b-4b3f9d3ef17e swap swap defaults 0 0 SYSTEM BLKID: /dev/sr0: UUID="2013-01-09-19-59-42-00" LABEL="Fedora 18 x86_64" TYPE="iso9660" PTTYPE="dos" /dev/vda1: UUID="5121725e-ec58-44c2-a99b-4b3f9d3ef17e" TYPE="swap" /dev/vda2: LABEL="fedora" UUID="5641e581-0e13-4d3e-85ee-5604b6e8fcc7" UUID_SUB="e9c6e3ce-5db2-44cf-8a8b-84c8815ffc47" TYPE="btrfs" BTRFS OUTPUT: # btrfs subvolume list -a / -u ID 256 gen 31 top level 5 uuid bf1fa736-8cef-c945-bd2e-71a8134b4ec2 path <FS_TREE>/root ID 258 gen 18 top level 5 uuid 56b76238-ba28-4445-ba2a-2d52efb4a2fc path <FS_TREE>/boot KERNEL COMMAND LINE: # cat /proc/cmdline BOOT_IMAGE=/boot/vmlinuz-3.6.10-4.fc18.x86_64 root=UUID=5641e581-0e13-4d3e-85ee-5604b6e8fcc7 ro rootflags=subvol=root rd.md=0 rd.lvm=0 rd.dm=0 vconsole.keymap=es rd.luks=0 rhgb quiet Ok, this is after install. EXAMPLE ENTRY of 'grub.cfg' menuentry 'Fedora' --class fedora --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-5641e581-0e13-4d3e-85ee-5604b6e8fcc7' { load_video set gfxpayload=keep insmod gzio insmod part_msdos insmod btrfs set root='hd0,msdos2' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint='hd0,msdos2' 5641e581-0e13-4d3e-85ee-5604b6e8fcc7 else search --no-floppy --fs-uuid --set=root 5641e581-0e13-4d3e-85ee-5604b6e8fcc7 fi echo 'Loading Linux 3.6.10-4.fc18.x86_64 ...' linux /boot/vmlinuz-3.6.10-4.fc18.x86_64 root=UUID=5641e581-0e13-4d3e-85ee-5604b6e8fcc7 ro rootflags=subvol=root rd.md=0 rd.lvm=0 rd.dm=0 vconsole.keymap=es rd.luks=0 rhgb quiet echo 'Loading initial ramdisk ...' initrd /boot/initramfs-3.6.10-4.fc18.x86_64.img } UPDATE THE KERNEL (With YUM Debugging options): # yum update kernel -y --rpmverbosity=debug --debuglevel=10 [OUTPUT TRUNCATED] + /bin/sed -r -i -e 's/^DEFAULTKERNEL=kernel-smp$/DEFAULTKERNEL=kernel/' /etc/sysconfig/kernel + /sbin/new-kernel-pkg --package kernel --install 3.7.2-201.fc18.x86_64 grubby fatal error: unable to find a suitable template D: %post(kernel-3.7.2-201.fc18.x86_64): waitpid(823) rc 823 status 0 D: running post-transaction scripts [OUTPUT TRUNCATED] So, this "grubby fatal error: unable to find a suitable template" is the "issue". MAKE '/sbin/new-kernel' verbose: # vi /sbin/new-kernel-pkg And add 'set -x' Retry the command now with debug output: # /sbin/new-kernel-pkg --package kernel --install 3.7.2-201.fc18.x86_64 [OUTPUT TRUNCATED] ++ sed 's/ release.*$//' + title='Fedora (3.7.2-201.fc18.x86_64)' + /sbin/grubby --grub2 -c /boot/grub2/grub.cfg --add-kernel=/boot/vmlinuz-3.7.2-201.fc18.x86_64 --copy-default --make-default --title 'Fedora (3.7.2-201.fc18.x86_64)' '--args=root=UUID=5641e581-0e13-4d3e-85ee-5604b6e8fcc7 ' '--remove-kernel=TITLE=Fedora (3.7.2-201.fc18.x86_64)' grubby fatal error: unable to find a suitable template [OUTPUT TRUNCATED] PERFORM A STRACE OF THE FAILING GRUBBY COMMAND: # strace /sbin/grubby --grub2 -c /boot/grub2/grub.cfg --add-kernel=/boot/vmlinuz-3.7.2-201.fc18.x86_64 --copy-default --make-default --title 'Fedora (3.7.2-201.fc18.x86_64)' '--args=root=UUID=5641e581-0e13-4d3e-85ee-5604b6e8fcc7 ' '--remove-kernel=TITLE=Fedora (3.7.2-201.fc18.x86_64)' [OUTPUT TRUNCATED] open("/boot/grub2/grub.cfg", O_RDONLY) = 3 read(3, "#\n# DO NOT EDIT THIS FILE\n#\n# It"..., 1024) = 1024 read(3, "mod btrfs\nset root='hd0,msdos2'\n"..., 1024) = 1024 read(3, " png\nset theme=($root)/boot/grub"..., 1024) = 1024 read(3, "'gnulinux-advanced-5641e581-0e13"..., 1024) = 1024 read(3, "ND /etc/grub.d/20_linux_xen ###\n"..., 1024) = 705 read(3, "", 1024) = 0 close(3) = 0 access("/boot/boot/vmlinuz-3.6.10-4.fc18.x86_64", R_OK) = -1 ENOENT (No such file or directory) access("/boot/boot/vmlinuz-3.6.10-4.fc18.x86_64", R_OK) = -1 ENOENT (No such file or directory) write(2, "grubby fatal error: unable to fi"..., 55grubby fatal error: unable to find a suitable template ) = 55 [OUTPUT TRUNCATED] >> access("/boot/boot/vmlinuz-3.6.10-4.fc18.x86_64", R_OK) = -1 ENOENT (No such file or directory) >> access("/boot/boot/vmlinuz-3.6.10-4.fc18.x86_64", R_OK) = -1 ENOENT (No such file or directory) # df -h Filesystem Size Used Avail Use% Mounted on rootfs 6.9G 918M 5.3G 15% / devtmpfs 489M 0 489M 0% /dev tmpfs 498M 0 498M 0% /dev/shm tmpfs 498M 1.1M 497M 1% /run tmpfs 498M 0 498M 0% /sys/fs/cgroup /dev/vda2 6.9G 918M 5.3G 15% / tmpfs 498M 0 498M 0% /tmp /dev/vda2 6.9G 918M 5.3G 15% /boot >> This seems a DUP of Bug 864198 (grubby fatal error updating grub.cfg when /boot is btrfs)
*** This bug has been marked as a duplicate of bug 864198 ***