Change isolinux.cfg

482 views
Skip to first unread message

Alexander Perepelica

unread,
May 11, 2012, 5:31:37 AM5/11/12
to kiwi-...@googlegroups.com
Hello!
I try change isolinux.cfg
1. create folder /boot/loader/x86_64/
2. copy isolinux.cfg
3. change isolinux.cfg
4. tar'ing
but after building image isolinux.cfg is not changed
How can I change this file?

Marcus Schäfer

unread,
May 11, 2012, 6:00:45 AM5/11/12
to kiwi-...@googlegroups.com
Hi,
The editbootconfig feature allows you to change it
I wrote how to make use of it in this thread

https://groups.google.com/group/kiwi-images/browse_thread/thread/a73d466e94223b1c/d5c326c30ec4ffd2#d5c326c30ec4ffd2

Regards,
Marcus
--
Public Key available
gpg --keyserver gpg-keyserver.de --recv-keys 0xCCE3C6A2
-------------------------------------------------------
Marcus Schäfer (Res. & Dev.) SUSE LINUX Products GmbH
Tel: 0911-740 53 0 Maxfeldstrasse 5
FAX: 0911-740 53 479 D-90409 Nürnberg
GF: Jeff Hawn,Jennifer Guild, Felix Imendörffer
HRB: 21284 (AG Nürnberg) Germany
http://www.suse.de
-------------------------------------------------------

avp

unread,
May 11, 2012, 6:34:42 AM5/11/12
to kiwi-...@googlegroups.com
So I add
<type .. editbootconfig="/home/user/KIWI/source/script.sh"  />
And what  I can do in this script ?
where can I change isolinux.cfg which would copy to iso image?
Can you provide some example?

Marcus Schäfer

unread,
May 11, 2012, 6:42:18 AM5/11/12
to kiwi-...@googlegroups.com
Hi,
kiwi creates isolinux.cfg as part of it's bootloader setup.
That's why you can't simply overlay it with some other file.
The script hook you can set here will stop after kiwi has
created its own version of isolinux.cfg. Within the script
you can change/replace/break whatever you like ;)

I suggest you to start with a script like this:

/bin/bash

so the build will stop and provide you with a shell. Now
check the contents of isolinux.cfg from the relative
path 'boot/...' and see what needs to be done that it looks
like what you want to achieve

Be aware that the script call is not chrooted so you are on
your build machine and can see / and everything else

PS:
this script hook is the last ressort for those who want to
do the 'nasty' things. If it's just about setting the timeout
or the displaymessage it can be done with settings inside
the XML description

avp

unread,
May 11, 2012, 10:04:21 AM5/11/12
to kiwi-...@googlegroups.com
Ok, when I use script with /bin/sh then I can change this file. But when I use script with such code

sed -e 's/timeout  200/timeout  0/' ./boot/x86_64/loader/isolinux.cfg > ./boot/x86_64/loader/isolinux.cfg

I get file isolinux.cfg with zero size. What I do wrong?

Robert Schweikert

unread,
May 11, 2012, 10:18:29 AM5/11/12
to kiwi-...@googlegroups.com
Well, reading and redirecting to the same file in the shell doesn't
work, as you are experiencing.

Use sed -i and drop the redirect.

BUT BUT BUT, if you just want to change the timeout whay are you not
using the attribute KIWI provides in the XML. If that doesn't work it's
a bug and we need to fix it in KIWI.

"boottimeout" attribute of the <type> element should do the trick.

Looking at the schema doc is really helpful to learn all the nice
features we already have in kiwi:

/usr/share/doc/packages/kiwi/schema/kiwi.html

File is provided with the kiwi-doc package. We are working on getting
this online as well.

HTH,
Robert


--
Robert Schweikert MAY THE SOURCE BE WITH YOU
SUSE-IBM Software Integration Center LINUX
Tech Lead
rjsc...@suse.com
rsch...@ca.ibm.com
781-464-8147

Marcus Schäfer

unread,
May 11, 2012, 10:18:30 AM5/11/12
to kiwi-...@googlegroups.com
Hi,
changing the boot timeout is easy:

<type ... boottimeout="0"/>

other than that it's a bad idea to modify and write to the same file
sed can do in-place replacement if you use the option -i (man sed)

Roman Neuhauser

unread,
May 11, 2012, 10:46:20 AM5/11/12
to kiwi-...@googlegroups.com
# perepel...@gmail.com / 2012-05-11 07:04:21 -0700:
you truncate isolinux.cfg before sed can read it. redirections happen
*before* the command is run, so

cmd > file

is basically the same as

truncate file
cmd > file

--
roman

avp

unread,
May 11, 2012, 11:05:56 AM5/11/12
to kiwi-...@googlegroups.com
ok, thank you!
With -i option I got what I need. I change not only timeout but also prompt and other options.

Reply all
Reply to author
Forward
0 new messages