Bug 457488 - Grubby on F9 in livecd environ truncates kernel/initrd paths
Summary: Grubby on F9 in livecd environ truncates kernel/initrd paths
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: mkinitrd
Version: 9
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeremy Katz
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-07-31 22:19 UTC by Michael DeHaan
Modified: 2009-05-05 19:11 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2009-05-05 19:11:41 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Michael DeHaan 2008-07-31 22:19:32 UTC
Description of problem:

I'm using the koan liveCD (from fresh checkout of koan's git, with options: 

koan --server=mdehaan --livecd --replace-self

which calls grubby as follows:

/sbin/grubby --add-kernel /boot/vmlinuz --initrd /boot/initrd.img --args
"ksdevice=eth0 lang= text ks=http://mdehaan/cblr/svc/op/ks/system/loaner
syslog=mdehaan:25150 kssendmac " --copy-default --make-default
--title=kick1217541082 --bad-image-okay ---boot-filesystem=/dev/sda1
--config-file=/tmp/boot/boot/grub/grub.conf

The purpose of this is to use the Live CD to simulate PXE in environs that
cannot support it, by looking up the mac and manipulating grub.  This worked
pretty well in F8 but now I am getting truncation in the grub.conf

# grub.conf
default=0
timeout=5
#splashimage=blah
hiddenmenu
title kick121blah
  root (hd0,0)
  kernel inuz ksdevice=eth0 lang= text ... blah
  initrd trd.img ... blah

So you will notice that the two filenames above that should be /boot/vmlinuz and
/boot/initrd.img are truncated.  This prevents the OS from installing on the
next boot as it can't find the files in question.

When run simply with just "--add-kernel" under a normal OS, I do not have a problem.

As shown in koan's checkout (koan/live) I am using the following repos to build
the live CD image:

repo --name=todos
--baseurl=http://download.fedora.redhat.com/pub/fedora/linux/releases/9/Everything/i386/os/
repo --name=updatez
--baseurl=http://download.fedora.redhat.com/pub/fedora/linux/updates/9/i386/
repo --name=newkoan --baseurl=file:///tmp/newkoan/


Version-Release number of selected component (if applicable):

grubby 6.0.52 (from -v under livecd environment)

  The following command run from the liveCD environment, does work:

grubby --add-kernel /boot/vmlinuz --initrd /boot/initrd.img --title dumb
--config-file=/tmp/boot/boot/grub/grub.conf

Upon further testing of various combinations, I narrowed down --bad-image-okay
as the option that is causing the truncation.  When using grubby to install into
an unconventional location you seem to need this option.

So, this defect is about finding out what is going on when --bad-image-okay is
truncating the paths.

Comment 1 Michael DeHaan 2008-07-31 22:25:08 UTC
I'll simplify this.  This can be reproduced on a normal F9 system.

[root@localhost cobbler]# /sbin/grubby --add-kernel /boot/vmlinuz --initrd
/boot/initrd.img --args "ksdevice=eth0 lang= text
ks=http://mdehaan/cblr/svc/op/ks/system/loaner syslog=mdehaan:25150 kssendmac "
--copy-default --make-default --title=kick1217541082 --bad-image-okay
--boot-filesystem=/dev/sda1 --config-file=/boot/grub/grub.conf 


This will write truncated file paths just like the above into the normal grub
file.   Should be very easy to repro that way.



Comment 2 Michael DeHaan 2009-01-12 16:30:39 UTC
Any update on this one?

Comment 3 Jeremy Katz 2009-05-04 14:52:54 UTC
grubby is part of mkinitrd, but will take a look at this.  I can reproduce it

Comment 4 Jeremy Katz 2009-05-05 19:11:41 UTC
Aha!  Figured it out

the problem is you should be passing --boot-filesystem=/boot (or /) depending on whether /boot is a separate filesystem or not.  Not the device name


Note You need to log in before you can comment on or make changes to this bug.