Bug 160660

Summary: Installer, text mode: ImportError: No module named email.Utils
Product: [Fedora] Fedora Reporter: Igor Bukanov <igor>
Component: anacondaAssignee: Anaconda Maintenance Team <anaconda-maint-list>
Status: CLOSED RAWHIDE QA Contact: Mike McLean <mikem>
Severity: high Docs Contact:
Priority: medium    
Version: 4CC: ermeyers, kevin, ltcgcw, oliva, ryan, xtremeq_g
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-10-11 18:14:27 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 Igor Bukanov 2005-06-16 14:04:25 UTC
+++ This bug was initially created as a clone of Bug #157709 +++

New information: I repeated the steps described bellow with the official FC4 DVD
image and got the same result.

From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.7) Gecko/20050416
Fedora/1.0.3-1.3.1 Firefox/1.0.3

Description of problem:
I tried to install FC4 test4 on Sony Vaio PCG-Z505R notebook with 128 MB and
text mode installer always crashes with python stack trace starting at:

ImportError: No module named email.Utils
File /usr/lib/python2.4/urllib2.py line 1131 in open_local_file



Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
To install I used DVD image stored on /dev/hda2 (I do not have CDROM!). To boot
I copied vmlinuz and initrd.img from /images/pxeboot from FC4-test3-i386-DVD.iso
to a directory on the harddrive and then added them to grub menu. 

During text mode installation I asked the installer to reinstall to /dev/hda1
which I normally use for scratch data and choosed reformat the partion as
/dev/ext3. I askd to install grub to /dev/hda1 as well. Then I tried various
options but it alway terminated with the above stack trace.

Actual Results:  After the installer tried to build a package list it terminated
with Python stack trace.

Expected Results:  The installer should proceed to the package selection.

Additional info:

Comment 1 Kevin Kofler 2005-06-17 13:54:31 UTC
Same here: I tried to upgrade FC3 to FC4 using a HD install started from GRUB, 
using the CD ISOs. I get:
...
File "/usr/lib/python2.4/urllib2.py", line 1131, in open_local_file
    import email.Utils
ImportError: No module named email.Utils

Anything I can do about that, other than waiting for FC5 or trying my luck with 
apt or yum?

Comment 2 Kevin Kofler 2005-06-17 17:51:24 UTC
Here's a workaround that appears to work for me (but I didn't get beyond the 
disk space check; I need to clean up before retrying the upgrade). WARNING: 
This will work for UPGRADES (from sufficiently recent RHL/Fedora releases) ONLY!

mkdir /mnt/sysimage/tmp/fc4installpython2.4
cp -r /usr/lib/python2.4/* /mnt/sysimage/tmp/fc4installpython2.4
nano /mnt/sysimage/tmp/fc4installpython2.4/urllib2.py
* remove "import email.Utils"
* change "modified = email.Utils.formatdate(stats.st_mtime, usegmt=True)" 
to "modified = '2000-01-01'" (in order to get rid of the use of email.Utils, 
which is not available in Anaconda)
/mnt/sysimage/bin/mount --
bind /mnt/sysimage/tmp/fc4installpython2.4 /usr/lib/python2.4/

This wierd copying and rebinding hack is needed because the file system is 
mounted read-only from the ISO. Also make sure you use /mnt/sysimage/bin/mount, 
because the Busybox builtin mount doesn't understand the --bind option.

Someone at RH will have to rebuild a working ISO for a real fix.

Comment 3 Kevin Kofler 2005-06-17 17:57:37 UTC
I should add that all these commands need to be entered on the console you get 
by pressing Alt+F2, when Anaconda is on the window asking you how to proceed 
with the GRUB configuration. (The window before is too early, because you 
need /mnt/sysimage, the one afterwards is too late, because it is already the 
backtrace.)

Comment 4 Kevin Kofler 2005-06-19 01:52:50 UTC
I can confirm that my workaround allowed me to upgrade FC3 to FC4, but I needed 
to run the installer 3 times to get the upgrade to complete (it spontaneously 
rebooted during the installation the first 2 times). But that is probably a 
separate issue, so I opened another bug report. See bug 160944 for details.

Comment 5 Igor Bukanov 2005-06-19 20:31:24 UTC
I upgraded my installation using network install from public ftp server. It
worked in the text mode without any problems. So the bug shows itself only when
using iso images stored on the harddrive. If I would know that I would not even
bother to get the DVD image via torrent.

Comment 6 Jeremy Katz 2005-06-21 22:04:02 UTC
*** Bug 161178 has been marked as a duplicate of this bug. ***

Comment 7 Roger Olsson 2005-06-22 15:49:35 UTC
I can confirm that Kevin Kofler's workaround works also for reinstalls with
slight modifications. I got the Python trace screen after the Root Password
screen. I istalled from hard drive without any other boot media, using kernel
and initrd from the isolinux on FC4-i386-DVD.iso.

Since I didn't get sysimage, I used "/tmp/fc4installpython2.4" folder instead. I
also had to use vi instead of nano. To make the --bind trick I mounted my
previous FC2 partition and used FC2's mount. Anaconda didn't crash any more but
I got an (unrelated) reboot at the first boot.

Too bad FC4 is so buggy. It seems like every time I make a fresh install it gets
harder because of new bugs.

Comment 8 Chris Lumens 2005-10-11 18:14:27 UTC
Fixed in CVS.

Comment 9 Jeremy Katz 2005-10-15 15:10:03 UTC
*** Bug 170683 has been marked as a duplicate of this bug. ***

Comment 10 Paul Nasrat 2005-10-19 20:44:28 UTC
*** Bug 170576 has been marked as a duplicate of this bug. ***

Comment 11 Jeremy Katz 2005-12-01 03:38:20 UTC
*** Bug 174448 has been marked as a duplicate of this bug. ***

Comment 12 Prarit Bhargava 2006-02-10 13:37:09 UTC
*** Bug 180760 has been marked as a duplicate of this bug. ***