bugGNU 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

Submitted by:  Maxim Kammerer <mkdesu>
Submitted on:  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: 
Release:  other Reproducibility:  None
Planned Release:  None

Tue 03 Jul 2012 09:43:41 AM UTC, original submission:

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.

Maxim Kammerer <mkdesu>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by phcoder (Updated the item)
  • -email is unavailable- added by mkdesu (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-07-15 phcoder StatusNone => Fixed
        Open/ClosedOpen => Closed

    Back to the top


    Powered by Savane 3.3