GNU GRUB - Bugs: bug #36772, grub-2.00: grub-mkstandalone:...
You are not allowed to post comments on this tracker with your current authentication level.
bug #36772: grub-2.00: grub-mkstandalone: please add the possibility to include only specified modules in memdisk
Submitter: | Maxim Kammerer <mkdesu> | ||
Submitted: | Tue 03 Jul 2012 09:43:41 AM UTC | ||
Category: | Installation | Severity: | Major |
Priority: | 5 - Normal | Item Group: | Feature Request |
Status: | Fixed | Privacy: | Public |
Assigned to: | None | Originator Name: | |
Open/Closed: | Closed | Release: | other |
Release: | Reproducibility: | None | |
Planned Release: | None |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
Carbon-Copy List
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 2 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2013-07-15 | phcoder | Status | None | Fixed | |
Open/Closed | Open | Closed |
Powered by Savane 3.13-758e.
Corresponding source code
Currently, grub-mkstandalone includes all modules in memdisk. It would be nice to be able to include only the specified modules, with automatic dependency resolution.
It is not hard to do even in a wrapper script, without access to dependency resolution routines. I do something like this before invoking grub-mkimage ($moddir is a temporary directory for building memdisk, $mods is the list of modules):
# Iteratively include all dependent modules
local oldmods= deps= modname=
while [ "${mods}" != "${oldmods}" ]; do
oldmods="${mods}"
for modname in ${mods}; do
deps=`sed -n "s/^${modname}://p" ${libdir}/${arch}/moddep.lst`
mods="${mods}${deps}"
done
mods=`echo ${mods} | tr ' ' '\n' | sort -u`
done
# Filter filesystems list, so that "search" doesn't try to load modules
# Filter commands from minicmd overrides
mkdir -p ${moddir}
cp -p ${libdir}/${arch}/*.lst ${moddir}
sed -ri "/^(`echo ${mods} | tr ' ' '|'`)\$/b; d" ${moddir}/fs.lst
sed -ri '/^\*(cat|help):/d' ${moddir}/command.lst
mods=`echo "${mods}" | sed "s:.*:${libdir}/${arch}/&.mod:"`
cp -p ${mods} ${moddir}
Filtering command.lst above is only necessary if "cat" or "help" are not separately included. Perhaps requiring such filtering can be classified as a bug instead.