live-media=<device> is no more supported in casper
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
casper (Ubuntu) |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: casper
From Changelog:
casper (1.77+debian-1) unstable; urgency=low
+
+ ......
+ * Added boot parameter "live-media=
+ a specified device.
From man casper (casper_
{live-media|
If you specify one of this two equivalent forms, casper will first try to find this device for the "/casper" directory where the read-only root filesystem should reside. If it did not find something usable, the normal scan for block devices is performed.
But from some time ago, this feature has disappeared.
In /usr/share/
parse_cmdline ()
{
PRESEEDS=
# looking for casper specifics options as kernel parameters
for x in $(cat /proc/cmdline); do
case $x in
these two lines are no more here
But it seems that support for this feature still exists partially:
find_livefs() {
timeout="${1}"
# first look at the one specified in the command line
if [ ! -z "${LIVEMEDIA}" ]; then
if check_dev "null" "${LIVEMEDIA}" "skip_uuid_check"; then
return 0
fi
fi
# don't start autodetection before timeout has expired
if [ -n "${LIVEMEDIA_
Actually, more often, this interesting feature never worked well because the misplaced timeout make the only one try to use ${LIVEMEDIA} too early, before USB are ready, so few people noticed its disappearance.
I suggest restoring parse_cmdline () and moving check_dev "null" "${LIVEMEDIA}" after time-out
Ph.L.
I have a couple of remarks to formulate about this bug.
1. I have been unable to find where variable LIVEMEDIA_TIMEOUT is set. If is is never set, it is useless. There are thus two solutions : either remove it, or add boot parameter ( for example "live-media- timeout= xx" ) to set it.
2. A user who specifies "live_media" boot parameter ( generally ) does not want to boot on another device. The use of this parameter did not work well because the script fell back in normal scan when the attempt with LIVEMEDIA failed. The race condition is generally not in favour of USB devices faced to other ones, due to latency.
I prefer not to waste time in case of boot failure if there is a mistake in live-media parameter rather than a successful boot on a wrong device. So, I propose to make scan of LIVEMEDIA and normal scan mutually exclusive. In "find_livefs" the code could be something like this ( letting drop LIVEMEDIA_TIMEOUT ) :
if [ ! -z "${LIVEMEDIA}" ]; then
# scan with LIVEMEDIA
else
# normal scan
fi