As it is now, the save-exception-to-disk code does:
if given device is a floppy:
format
mount as vfat, else punt
copy exception
The attached patch changes the logic to:
get given device filesystem type
try to mount as that
if it fails and fstype is (vfat|none)
format as vfat
try to mount as vfat
else
punt
copy exception
# Save the traceback to a removable storage device, such as a floppy disk
-# or a usb/firewire drive. In the event of a floppy disk, it is assumed to
-# be unformatted and safe for us to destroy. For all other devices, it is
-# assumed that they are already formatted and we will only attempt to write
-# the traceback file to the device. Returns success or not.
+# or a usb/firewire drive. If there's no filesystem on the disk/partition,
+# write a vfat one.
+# Returns success or not.
def copyExceptionToDisk(anaconda, device):
# in test mode have save to disk option just copy to new name
if not flags.setupFilesystems:
@@ -277,8 +277,14 @@ def copyExceptionToDisk(anaconda, device):
os.close(fd)
- # Only format floppy devices, not usb storage devices.
- if device in isys.floppyDriveDict().keys() and rhpl.getArch() != "ia64":
+ fstype = partedUtils.sniffFilesystemType(device)
+ if fstype == None:
+ fstype = 'vfat'
+ try:
+ isys.mount(device, "/tmp/crash", fstype)
+ except SystemError:
+ if fstype != 'vfat':
+ return False
cmd = "/usr/sbin/mkdosfs"
# copy trace dump we wrote to local storage to disk
try:
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
12-07-2007, 06:21 PM
Jeremy Katz
tweak save-exception-to-disk algorithm
On Fri, 2007-12-07 at 13:46 -0500, Bill Nottingham wrote:
> The attached patch changes the logic to:
>
> get given device filesystem type
> try to mount as that
> if it fails and fstype is (vfat|none)
> format as vfat
> try to mount as vfat
> else
> punt
> copy exception
>
> Comments?
Looks good to me
Jeremy
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list