bugGNU GRUB - Bugs: bug #36772, grub-2.00: grub-mkstandalone:...

 
 

You are not allowed to post comments on this tracker with your current authentification 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: InstallationSeverity: Major
Priority: 5 - NormalItem Group: Feature Request
Status: FixedPrivacy: Public
Assigned to: NoneOriginator Name: 
Open/Closed: ClosedRelease: 
Release: otherReproducibility: 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
  • -unavailable- added by phcoder (Updated the item)
  • -unavailable- added by mkdesu (Submitted the item)
  •  

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

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 15 Jul 2013 10:35:36 AM UTCphcoderStatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup