projects
/
grml2usb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c70267a
)
Support expanding bootoptions variables
author
Ulrich Dangel
<uli@spamt.net>
Tue, 27 Apr 2010 18:35:17 +0000
(20:35 +0200)
committer
Ulrich Dangel
<uli@spamt.net>
Tue, 27 Apr 2010 18:38:36 +0000
(20:38 +0200)
grml2usb
patch
|
blob
|
history
grml2usb.8.txt
patch
|
blob
|
history
diff --git
a/grml2usb
b/grml2usb
index
ccdb4db
..
a13e6ea
100755
(executable)
--- a/
grml2usb
+++ b/
grml2usb
@@
-1538,6
+1538,20
@@
def handle_grub2_config(grml_flavour, grub_target, bootopt):
modify_grub_config(grub2_cfg)
modify_grub_config(grub2_cfg)
+def get_bootoptions(grml_flavour):
+ """Returns bootoptions for specific flavour
+
+ @grml_flavour: name of the grml_flavour
+ """
+ # do NOT write "None" in kernel cmdline
+ if options.bootoptions is None:
+ bootopt = ""
+ else:
+ bootopt = options.bootoptions
+ bootopt = bootopt.replace("%flavour", grml_flavour)
+ return bootopt
+
+
def handle_grub_config(grml_flavour, device, target):
"""Main handler for generating grub (v1 and v2) configuration
def handle_grub_config(grml_flavour, device, target):
"""Main handler for generating grub (v1 and v2) configuration
@@
-1557,11
+1571,8
@@
def handle_grub_config(grml_flavour, device, target):
else:
raise CriticalException("error validating partition schema (raw device?)")
else:
raise CriticalException("error validating partition schema (raw device?)")
- # do NOT write "None" in kernel cmdline
- if options.bootoptions is None:
- bootopt = ""
- else:
- bootopt = options.bootoptions
+
+ bootopt = get_bootoptions(grml_flavour)
# write menu.lst
handle_grub1_config(grml_flavour, install_grub1_partition, grub_target, bootopt)
# write menu.lst
handle_grub1_config(grml_flavour, install_grub1_partition, grub_target, bootopt)
@@
-1624,11
+1635,7
@@
def adjust_syslinux_bootoptions(src, flavour):
bootid_re = re.compile("bootid=[\w_-]+")
live_media_path_re = re.compile("live-media-path=[\w_/-]+")
bootid_re = re.compile("bootid=[\w_-]+")
live_media_path_re = re.compile("live-media-path=[\w_/-]+")
- # do NOT write "None" in kernel cmdline
- if options.bootoptions is None:
- bootopt = ""
- else:
- bootopt = options.bootoptions
+ bootopt = get_bootoptions(flavour)
regexe = []
option_re = None
regexe = []
option_re = None
diff --git
a/grml2usb.8.txt
b/grml2usb.8.txt
index
933c84e
..
d09ebcf
100644
(file)
--- a/
grml2usb.8.txt
+++ b/
grml2usb.8.txt
@@
-51,7
+51,8
@@
The following options are supported:
*\--bootoptions=...*::
*\--bootoptions=...*::
-Use specified bootoptions as default.
+Use specified bootoptions as default. To use flavour name as a argument for a
+boot parameter use %flavour which will be expanded to the flavour name.
*\--bootloader-only*::
*\--bootloader-only*::
@@
-650,6
+651,12
@@
default bootoptions.
Install specified ISO on device /dev/sdX1 remove vga=791 and quiet from existing bootoptions.
Install specified ISO on device /dev/sdX1 remove vga=791 and quiet from existing bootoptions.
+ # grml2usb --bootoptions="persistent-path=%flavour_name" grml64_2010.04.iso grml_2010.04.iso /dev/sdX1
+
+Install specified Isos on device /dev/sdx and add parameter persisten-path
+to every menu entry. %flavour_name will be expanded to the flavour of the specific
+iso, e.g. grml64 and grml.
+
[[ressources]]
Online Ressources
-----------------
[[ressources]]
Online Ressources
-----------------