[Grml] A thought about modules
Juergen Fiedler
juergen.fiedler at gmail.com
Tue Nov 28 16:35:47 CET 2006
Maybe it is already there and I just managed to miss it this far; if so, I
apologize.
Here is my thought, anyway: Wouldn't it be neat to have modules containing
data and/or executables that can be added to or removed from the system at
runtime?
I tried the following from the 0.8 live CD with a HD mounted on /mnt/hda1:
-------
root at grml:/root# mkdir -p /mnt/hda1/tmp/grml
root at grml:/root# unionctl /UNIONFS --add /mnt/hda1/tmp/grml
root at grml:/root# unionctl /UNIONFS --mode /ramdisk ro
root at grml:/root# aptitude install mtx
# [much output omitted]
root at grml:/root# unionctl /UNIONFS --mode /ramdisk rw
# [wait a few seconds for things to settle]
root at grml:/root# unionctl /UNIONFS --remove /mnt/hda1/tmp/grml
root at grml:/root# rm -rf /mnt/hda1/tmp/grml/var/
root at grml:/root# rm -rf /mnt/hda1/tmp/grml/root/
# [more cleanup, if necessary]
root at grml:/root# mksquashfs /mnt/hda1/tmp/grml /mnt/hda1/tmp/mtx.squashfs
-------
This creates a squashed filesystem image that can be added to /UNIONFS:
-------
root at grml:/root# mkdir -p /mnt/hda1/tmp/mnt/mtx
root at grml:/root# mount -o loop -t squashfs /mnt/hda1/tmp/mtx.squashfs
/mnt/hda1/tmp/mnt/mtx
root at grml:/root# unionctl /UNIONFS --add --after /ramdisk --mode ro
/mnt/hda1/tmp/mnt/mtx
-------
After that, mtx is available for use, just as if it was part of the real
live CD.
Would something like that be useful for grml? Useful enough to create an
official set of scripts to create, add and remove such modules?
Just wondering,
--j
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ml.grml.org/pipermail/grml/attachments/20061128/cc9c120e/attachment-0002.html>
More information about the Grml
mailing list