Unfortunately, if a "psavemark" boot param, or SAVEMARK file, is being used to specify a save partition, this is ignored.
"psavemark" does not work when "pmedia" and "pdev1" are both specified.
With the following patch to the 'init' script in 'initrd.gz' in place, specifying "pmedia", "pdev1" and "psavemark" will result in both the "pdev1" partition and the "psavemark" partition, being searched.
Edit: Prompted by the following discussion, I've finally settled on the following patch:
Code: Select all
--- init.orig 2016-01-14 23:08:12.755102000 +1000
+++ init 2016-02-04 14:25:29.926602336 +1000
@@ -340,7 +340,14 @@
;;
*)
#note: a mistake if have PDEV1 on usb booting, as it can change.
- [ "$PDEV1" ] && LESSPARTS0="`echo "$LESSPARTS0" | grep "${PDEV1}|"`" #kernel boot param.
+ if [ "$PDEV1" ];then #kernel boot param
+ if [ "$PSAVEMARK" ];then #kernel boot param
+ BOOTDRV="`echo -n "$PDEV1" | grep -o -f /tmp/ALLDRVS0`" #ex: sda1 becomes sda
+ LESSPARTS0="`echo "$LESSPARTS0" | grep -E "${PDEV1}|${BOOTDRV}${PSAVEMARK}"`"
+ else
+ LESSPARTS0="`echo "$LESSPARTS0" | grep "${PDEV1}|"`"
+ fi
+ fi
;;
esac
fi
Code: Select all
--- init.orig 2016-01-14 23:08:12.755102000 +1000
+++ init 2016-02-04 14:25:29.926602336 +1000
@@ -340,7 +340,18 @@
;;
*)
#note: a mistake if have PDEV1 on usb booting, as it can change.
- [ "$PDEV1" ] && LESSPARTS0="`echo "$LESSPARTS0" | grep "${PDEV1}|"`" #kernel boot param.
+ if [ "$PDEV1" ];then #kernel boot param
+ if [ "$PSAVEMARK" ];then #kernel boot param
+ BOOTDRV="`echo -n "$PDEV1" | grep -o -f /tmp/ALLDRVS0`" #ex: sda1 becomes sda
+ SAVEPART="${BOOTDRV}${PSAVEMARK}"
+ fi
+ #ensure SAVEPART is included
+ if [ "$SAVEPART" ];then
+ LESSPARTS0="`echo "$LESSPARTS0" | grep -E "${PDEV1}|${SAVEPART}"`"
+ else
+ LESSPARTS0="`echo "$LESSPARTS0" | grep "${PDEV1}|"`"
+ fi
+ fi
;;
esac
fi
gyro