Bug 495286
Summary: | Booting from a live CD-RW overwrites the medium | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Robert Nichols <rnichols42> |
Component: | DeviceKit-disks | Assignee: | David Zeuthen <davidz> |
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | urgent | Docs Contact: | |
Priority: | low | ||
Version: | rawhide | CC: | davidz, kay.sievers, lpoetter, mclasen |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i686 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2009-04-12 20:11:38 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: |
Description
Robert Nichols
2009-04-11 07:28:19 UTC
The KDE spin of the F-11 Snap1 Live CD, which does not use DeviceKit, does _not_ exhibit this behavior. That further suggests that the problem lies in DeviceKit. (In reply to comment #0) > A CD-RW disk containing an iso9660 file system gets automounted read/write in > rawhide. The iso9660 filesystem is, by design, a read-only filesystem, you can't mount it read/write, that's simply not how it works. Also, DeviceKit-disks doesn't really look at the hardware itself, it relies on the kernel and udev rules to do this. And all these operations are mostly done in read-only mode. So I can't really think of how DeviceKit-disks could be responsible for trashing the CD-RW medium. I'll try to burn the latest desktop live cd on a CD-RW to see if I can reproduce this... OK, so I managed to test this and, yeah, one of the udev helpers in the DeviceKit-disks package is indeed responsible for trashing the CD-RW medium. Scary! It's the helper for determining if a device is ATA SMART capable, apparently that craps out the drive. Funny enough this only happens on CD-RW live media, it *does not* happen when booting from a hard drive. All it does is this http://cgit.freedesktop.org/DeviceKit/DeviceKit-disks/tree/src/devkit-disks-probe-ata-smart.c and apparently that is enough to cause the trashing. The interesting thing is that this *does not* happen when running 'skdump /dev/sr0' from the command line, maybe it's a timing issue (another udev helper, cdrom_id, is sending commands to the drive just before checking for ATA SMART) or maybe skdump is smarter about not sending commands to the drive. Either way, I'm adding both Kay (udev maintainer) and Lennart (libatasmart maintainer) as this is a somewhat interesting bug when it comes to probing. FWIW, I'm not sure libatasmart is doing anything wrong, it's just sending well-known commands to the drive and I think it even checks with IDENTIFY to see if the drive accepts it. Discuss! Also, I actually tried to bit careful to only probe things that looks like ATA SMART but there was a bug ('==' vs '=') in the rules so we probed the CD-ROM drive for ATA SMART anyway. I've fixed it now and also added some extra guards (only probe devices driven by the sd driver, not e.g. sr). http://cgit.freedesktop.org/DeviceKit/DeviceKit-disks/commit/?id=62dbfeb01735570ca1b266313ff1c765904d9b3b With these changes we now longer trash the CD-RW medium. I'm going to upload new packages to Fedora right away. Thanks a lot for reporting this bug! Fixed in DeviceKit-disks-004-0.7.20090412git.fc11. http://koji.fedoraproject.org/koji/taskinfo?taskID=1292589 Also, libatasmart 0.9 verifies that the IDENTIFY block we read actually makes sense before we proceed with any further command. I hope that increases the chance that we fail earlier when used on devices that are not actually hard disks. |