Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 98897 - genkernel all with BOOTLOADER="grub" set addes incorrect file name to $GRUB_CONF
Summary: genkernel all with BOOTLOADER="grub" set addes incorrect file name to $GRUB_CONF
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-13 10:04 UTC by Aaron Gipson
Modified: 2005-07-13 17:16 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aaron Gipson 2005-07-13 10:04:21 UTC
When the ${GRUB_CONF} file exists, the kernel file name doesn't get added to the
${GRUB_CONF} file correctly.

Reproducible: Always
Steps to Reproduce:
1.  Set BOOTLOADER="grub" in /etc/genkernel.conf
2.  genkernel all
3.  look at the files in /boot/
4.  Compare it to the file names listed in the new entry of the /boot/grub/grub.conf

Actual Results:  
title=Gentoo Linux (2.6.12-gentoo-r4)
        root (hd0,0)
        kernel /kernel-2.6.12-gentoo-r4 ...
        initrd /initramfs-genkernel-x86-2.6.12-gentoo-r4


Expected Results:  
title=Gentoo Linux (2.6.12-gentoo-r4)
        root (hd0,0)
        kernel /kernel-genkernel-x86-2.6.12-gentoo-r4 ...
        initrd /initramfs-genkernel-x86-2.6.12-gentoo-r4


This is the copied section from gen_bootloader.sh with the issue:

                # grub.conf already exists; so...
                # ... Clone the first boot definition and change the version.
                cp $GRUB_CONF $GRUB_CONF.bak
                awk 'BEGIN { RS="" ; FS="\n" ; OFS="\n" ; ORS="\n\n" }
                        NR == 2 {
                                ORIG=$0;
                                sub(/\(.+\)/,"(" KV ")",$1);
                                sub(/kernel-[[:alnum:][:punct:]]+/, "kernel-"
KV, $3);
                                sub(/initrd-[[:alnum:][:punct:]]+/, "initrd-"
KV, $4);
                                print RS $0;
                                print RS ORIG;}
                        NR != 2 { print RS $0; }' KV=$KV $GRUB_CONF.bak > $GRUB_CONF
Comment 1 Eric Edgar (RETIRED) gentoo-dev 2005-07-13 10:15:49 UTC
We are aware of this bug and a patch is in the works, being tested at the 
moment.

Comment 2 Jon 2005-07-13 11:08:32 UTC
Well, for me, it just copied a previous entry in the grub.conf. I always have 
two different kernels. I had one entry in there for a stable kernel, and then I 
made a new kernel using genkernel and the entry for the other kernel was just 
copied exactly. The previous kernel was a nitro kernel and I was compiling a 
cko kernel. They are nothing alike in name. 
Comment 3 Tim Yamin (RETIRED) gentoo-dev 2005-07-13 17:16:31 UTC
Fixed in 3.2.3, please test and reopen if issues persist, thanks!