[Fedora-livecd-list] a boot option to remove the persistent layer and create a new one
مؤيد السعدي
muayyad.alsadi at ojuba.org
Fri Mar 13 19:43:36 UTC 2009
hi,
if one used more than the size of the persistent layer,
system becomes corrupted and unusable
one then can remove the layer to restore it to "factory defaults"
but telling people to create a new layer is a but difficult for end users
I suggest adding things to /etc/rc.d/init.d/livesys generated by %post
by replacing
# if we have a persistent /home, then we want to go ahead and mount it
if ! strstr "\`cat /proc/cmdline\`" nopersistenthome && [ -n "\$homedev" ]
; then
action "Mounting persistent /home" mountPersistentHome
fi
with
if ! strstr "\`cat /proc/cmdline\`" nopersistenthome && [ -n "\$homedev" ]
; then
if ! strstr "\`cat /proc/cmdline\`" resetpersistenthome
action "Mounting persistent /home" resetPersistentHome
telinit 6
else
action "Mounting persistent /home" mountPersistentHome
fi
fi
and we also need a small fix in /usr/libexec/mkliveinitrd
just below
for o in `cat /proc/cmdline` ; do
...
resetPersistentHome and resetOverlay should simply check the size of the
img file we want to rest
then remove it then create a new one with the same size
if we want one more step
we may allow user to pass resetoverlay=200 to optionally specify the new
size
BTW: do we really need to sleep 5
if [ -z "$setup" ]; then
if [ -n "$devspec" -a -n "$pathspec" ]; then
echo "Unable to find persistent overlay; using temporary"
sleep 5
fi
More information about the Fedora-livecd-list
mailing list