scripts/casper-bottom/41apt_cdrom is missing some sanity checking, can cause hang on boot

Bug #909919 reported by cleary
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
casper (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Distribution Release: 12.04 Precise
Casper: 1.296

in scripts/casper-bottom/41apt_cdrom, if an apt repository is not configured in the root of the LiveCD, the script hangs the boot process waiting for input with the message:
"Please provide a name for this Disc, such as 'Debian 5.0.3 Disk 1"

Some sort of checking is needed here to see if the conditions required for the apt-cdrom repository are fulfilled, and to fail silently if they are not - I've attached a possible patch:
 * if /README.diskdefines does not exist in the root of the CDROM, exit with no error

 having said that I'm not certain of the role of the README.diskdefines file, so it may not be the best choice for checking.

Tags: patch
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "41apt_cdrom_sanitycheck.patch" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

Changed in casper (Ubuntu):
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
cleary (bernard-gray) wrote :

Revisiting this, it turns out it hangs due to the .disk/info file missing, not README.diskdefines as I previously thought:

A more suitable patch might be:

--- scripts/casper-bottom/41apt_cdrom.orig 2011-12-30 09:38:20.033197874 +1100
+++ scripts/casper-bottom/41apt_cdrom 2011-12-30 09:43:53.733197834 +1100
@@ -18,6 +18,10 @@ esac

 . /scripts/casper-functions

+if [ ! -s /.disk/info]; then
+ exit 0
+fi
+
 mount -n -o bind /sys /root/sys
 mount -n -o bind /proc /root/proc
 mount -n -o bind /dev /root/dev

Revision history for this message
cleary (bernard-gray) wrote :
Changed in casper (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package casper - 1.327

---------------
casper (1.327) quantal; urgency=low

  [ Tim Lunn ]
  * add gnome-shell favorites tweak to 25adduser
  * Add 16gdmnopasswd script, removes gdm password dialog for live user.

  [ Stéphane Graber ]
  * Fix casper when running on some RAID systems. (LP: #1047316, LP: #965735)
  * Apply patch by Tyler Gates to try and better handle dm devices, should help
    with the above change too. (LP: #865529)
  * Use /sys/class/net/ instead of hardcoded eth* devices.
    (LP: #905828, LP: #962546)
  * Allow overriding username/userfullname/hostname on the boot command line
    as is mentioned in the manpage but was never implemented.
    Note that when using persistence, those used for the first boot will be
    remembered through /etc/casper.conf (LP: #907482)
  * Reset oem-config/enable to false every boot. (LP: #838680)
  * Add Breaks/Replaces to ubiquity-casper to properly upgrade when both
    casper and ubiquity-casper are installed. (LP: #1046300)
  * Apply patch by cleary to avoid hang in 41apt_cdrom when .disk/info doesn't
    exist. (LP: #909919)
  * Eject by block device instead of mountpoint, this should avoid ejecting
    the cdrom on USB installations. (LP: #869238)
  * Add 'check' target to debian/rules based on ubiquity's (LP: #570243)
 -- Stephane Graber <email address hidden> Wed, 03 Oct 2012 17:46:39 -0400

Changed in casper (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.