Bug 637258

Summary: livecd-iso-to-disk doesn't fail when device node is missing
Product: [Fedora] Fedora Reporter: Brian Lane <bcl>
Component: livecd-toolsAssignee: Brian Lane <bcl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 13CC: adam.stokes, bruno, dhuff, Jasper.Hartline, katzj, wtogami
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: livecd-tools-15.5-1.fc15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-02-16 00:39:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch to fix issue none

Description Brian Lane 2010-09-24 17:51:36 UTC
Description of problem:
livecd-iso-to-disk doesn't fail when the device node is missing. I accidentally ejected the device (a 4G USB flash drive) instead of unmounting it and this happened:

[bcl@lister ~]$ sudo livecd-iso-to-disk --format --reset-mbr /extra/iso/Fedora-14-Beta-x86_64-netinst.iso /dev/sdd1
Verifying image...
/extra/iso/Fedora-14-Beta-x86_64-netinst.iso:   3191cf7698dda8f520aa4dd150721d19
Fragment sums: 8cd83c388bb32ffc6c2a6ab67f2d9eaf1ad24493cb22f45849c7473f2dfd
Fragment count: 20
Checking: 100.0%

The media check is complete, the result is: PASS.

It is OK to use this media.
device node not found
basename: missing operand
Try `basename --help' for more information.
WARNING: THIS WILL DESTROY ANY DATA ON /dev//!!!
Press Enter to continue or ctrl-c to abort

Warning: Unable to open /dev read-write (Is a directory).  /dev has been opened read-only.
Warning: Unable to open /dev read-write (Is a directory).  /dev has been opened read-only.
Error: Is a directory during read on /dev
Error: Is a directory during read on /dev
Error: Can't write to /dev, because it is opened read-only.
/sbin/parted: invalid option -- '1'
/sbin/parted: invalid option -- '7'
/sbin/parted: invalid option -- '4'
/sbin/parted: invalid option -- '0'
/sbin/parted: invalid option -- '8'
Usage: /sbin/parted [-hlmsv] [-a<align>] [DEVICE [COMMAND [PARAMETERS]]...]
Waiting for devices to settle...
mkdosfs 3.0.9 (31 Jan 2010)
/dev//1: No such file or directory
USB filesystem must be vfat or ext[23]
Cleaning up to exit...




No damage was done, but seeing it try to operate on /dev and /dev// is disturbing.

Comment 1 Brian Lane 2010-09-24 17:53:55 UTC
Created attachment 449478 [details]
patch to fix issue

Comment 2 Fedora Admin XMLRPC Client 2010-10-21 17:57:45 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 3 Fedora Update System 2011-02-19 00:52:36 UTC
livecd-tools-15.5-1.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/livecd-tools-15.5-1.fc15

Comment 4 Fedora Update System 2011-02-19 02:18:14 UTC
livecd-tools-14.2-1.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/livecd-tools-14.2-1.fc14

Comment 5 Fedora Update System 2011-02-24 20:55:00 UTC
livecd-tools-14.2-1.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 6 Fedora Update System 2011-03-12 04:38:52 UTC
livecd-tools-15.5-1.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.