RHEL7 Beta installation fails with abrt message "anaconda-19.31.36-1: ValueError: cannot initialize a disk that has partitions"

Solution Unverified - Updated -

Environment

  • Red Hat Enterprise Linux 7.0 HTB

Issue

  • Installing Red Hat Enterprise Linux 7 HTB using kickstart file on a machine with two internal disks sda and sdb.
  • The installation fails with an abrt error message as follows.
cmdline:        /usr/bin/python  /sbin/anaconda
cmdline_file:   initrd=initrd.img inst.stage2=hd:LABEL=RHC___ askmethod reboot=pci biosdevname=0 inst.ks=hd:LABEL=RHC___:/test.ks.cfg inst.repo=hd:LABEL=NEW:/rhel7.0/isos BOOT_IMAGE=vmlinuz 
executable:     /sbin/anaconda
hashmarkername: anaconda
kernel:         3.10.0-54.0.1.el7.x86_64
last_occurrence: 1390585088
pkg_arch:       x86_64
pkg_epoch:      0
pkg_name:       anaconda
pkg_release:    1
pkg_version:    19.31.36
product:        Red Hat Enterprise Linux
release:        Red Hat Enterprise Linux Server release 7.0 Beta (Maipo)
time:           Fri 24 Jan 2014 05:38:08 PM UTC
version:        7.0

anaconda-tb:    Text file, 279608 bytes
ifcfg.log:      Text file, 6886 bytes
ks.cfg:         Text file, 6918 bytes
program.log:    Text file, 26885 bytes
storage.log:    Text file, 109141 bytes
syslog:         Text file, 94268 bytes

anaconda.log:
:17:27:31,488 INFO anaconda: /sbin/anaconda 19.31.36-1
:17:27:32,466 INFO anaconda: 4063232 kB (3968 MB) are available
:17:27:32,466 INFO anaconda: check_memory(): total:3968, needed:512, graphical:512
:17:27:32,566 INFO anaconda: anaconda called with cmdline = ['/sbin/anaconda']
:17:27:32,567 INFO anaconda: Default encoding = utf-8 
:17:27:32,626 INFO anaconda: Running kickstart %%pre script(s)
:17:27:32,626 INFO anaconda.stdout: Running pre-installation scripts
:17:27:32,925 INFO anaconda: All kickstart %%pre script(s) have been run
:17:27:34,645 WARN anaconda.stdout: Not asking for VNC because of an automated install
:17:27:34,645 WARN anaconda.stdout: Not asking for VNC because text mode was explicitly asked for in kickstart
:17:27:34,653 INFO anaconda: Display mode = t
:17:27:34,655 INFO anaconda: 4063232 kB (3968 MB) are available
:17:27:34,655 INFO anaconda: check_memory(): total:3968, needed:512, graphical:512
:17:27:34,698 INFO anaconda: using only installclass Red Hat Enterprise Linux
:17:27:36,529 INFO anaconda: bootloader GRUB2 on X86 platform
:17:27:36,530 INFO anaconda: bootloader GRUB2 on X86 platform
:17:27:36,560 DEBUG anaconda: network: devices found ['enp3s2', 'enp1s0']
:17:27:36,583 ERR anaconda: Kickstart: The provided network interface  does not exist
:17:27:36,724 DEBUG anaconda: network: dumping ifcfg file for default autoconnection on enp3s2
:17:27:36,763 DEBUG anaconda: network: setting autoconnect of enp3s2 to False
:17:27:36,883 DEBUG anaconda: network: dumping ifcfg file for default autoconnection on enp1s0
:17:27:36,926 DEBUG anaconda: network: setting autoconnect of enp1s0 to False
:17:27:36,927 DEBUG anaconda: network: missing ifcfgs created for devices ['enp3s2', 'enp1s0']
:17:27:36,962 INFO anaconda: unspecified network --device in kickstart, using enp3s2 (first active device)
:17:27:37,001 DEBUG anaconda: network: setting real kickstart ONBOOT value for devices ['enp3s2']
:17:27:37,014 INFO anaconda: Running Thread: AnaStorageThread (139820642522880)
:17:27:37,019 INFO anaconda: Running Thread: AnaTimeInitThread (139820634130176)
:17:27:37,020 INFO anaconda: Running Thread: AnaWaitForConnectingNMThread (139820625737472)
:17:27:37,021 INFO anaconda: Running Thread: AnaPayloadThread (139820617344768)
:17:27:37,052 INFO anaconda: got 0 NTP servers from DHCP
:17:27:37,052 INFO anaconda: Thread Done: AnaWaitForConnectingNMThread (139820625737472)
:17:27:37,055 INFO anaconda: Running Thread: AnaGeolocationRefreshThread (139820625737472)
:17:27:37,055 INFO anaconda: Starting geolocation lookup
:17:27:37,056 INFO anaconda: Geolocation provider: Fedora GeoIP
:17:27:37,501 INFO anaconda: Running Thread: AnaSourceWatcher (139820606830336)
:17:27:37,505 INFO anaconda: Running Thread: AnaStorageWatcher (139820598437632)
:17:27:37,508 INFO anaconda: Running Thread: AnaSoftwareWatcher (139820590044928)
:17:27:37,612 INFO anaconda: Geolocation lookup finished in 0.6 seconds
:17:27:37,612 INFO anaconda: territory: US
:time zone: America/New_York (from GeoIP)
:17:27:37,613 INFO anaconda: Thread Done: AnaGeolocationRefreshThread (139820625737472)
:17:27:42,624 INFO anaconda: Thread Done: AnaStorageThread (139820642522880)
:17:27:42,648 INFO anaconda: Thread Done: AnaStorageWatcher (139820598437632)
:17:27:43,031 INFO anaconda: Thread Done: AnaTimeInitThread (139820634130176)
:17:27:43,252 INFO anaconda: Thread Done: AnaPayloadThread (139820617344768)
:17:27:43,266 INFO anaconda: Thread Done: AnaSoftwareWatcher (139820590044928)
:17:27:43,267 INFO anaconda: Thread Done: AnaSourceWatcher (139820606830336)
:17:27:44,362 DEBUG anaconda: running handleException
:17:27:47,191 DEBUG anaconda: Gtk cannot be initialized
:17:27:47,191 DEBUG anaconda: In the main thread, running exception handler
:17:27:47,822 INFO anaconda: Running kickstart %%traceback script(s)
:17:27:47,822 INFO anaconda: All kickstart %%traceback script(s) have been run
:17:27:47,824 INFO anaconda: Running Thread: AnaInputThread0 (139820606830336)
:17:38:06,633 INFO anaconda: Thread Done: AnaInputThread0 (139820606830336)

backtrace:
:Traceback (most recent call last):
:  File "/sbin/anaconda", line 1084, in <module>
:    anaconda._intf.setup(ksdata)
:  File "/usr/lib64/python2.7/site-packages/pyanaconda/ui/tui/__init__.py", line 169, in setup
:    obj.setup(self.ENVIRONMENT)
:  File "/usr/lib64/python2.7/site-packages/pyanaconda/ui/tui/hubs/summary.py", line 49, in setup
:    spoke.execute()
:  File "/usr/lib64/python2.7/site-packages/pyanaconda/ui/tui/spokes/storage.py", line 255, in execute
:    doKickstartStorage(self.storage, self.data, self.instclass)
:  File "/usr/lib64/python2.7/site-packages/pyanaconda/kickstart.py", line 1726, in doKickstartStorage
:    ksdata.clearpart.execute(storage, ksdata, instClass)
:  File "/usr/lib64/python2.7/site-packages/pyanaconda/kickstart.py", line 519, in execute
:    storage.clearPartitions()
:  File "/usr/lib/python2.7/site-packages/blivet/__init__.py", line 797, in clearPartitions
:    self.initializeDisk(disk)
:  File "/usr/lib/python2.7/site-packages/blivet/__init__.py", line 822, in initializeDisk
:    raise ValueError("cannot initialize a disk that has partitions")
:ValueError: cannot initialize a disk that has partitions

Resolution

  • The abrt message appears because the disks sda and sdb might not be initialized properly.
  • Modify the kickstart file clearpart statement to initialize both the disks or simply use the following %pre script to wipe out first 10 MB of both the disks.
%pre
#/!/bin/bash
dd if=/dev/zero of=/dev/sda bs=1M count=10 > /tmp/wipeout.sh
dd if=/dev/zero of=/dev/sdb bs=1M count=10 >> /tmp/wipeout.sh
sh /tmp/wipeout.sh
%end

Root Cause

  • The disks sda and sdb were not initialized and clearpart statement didn't had --initlabel option in kickstart file.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.