Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was trying to do a kickstart installation for CentOS 6.4 but it always show me a warning of re-initializing the HDD as it say may contain invalid partition table or a virtual disk. I have added below is the snapshot of the kickstart file I am trying to use

# System bootloader configuration
bootloader --append="crashkernel=auto rhgb quiet" --location=mbr --driveorder="sda"
# Clear the Master Boot Record
# Partition clearing information
clearpart --all --initlabel --drives=sda
part /boot --fstype ext4 --size=300
part / --fstype="ext4" --grow --size=1 --asprimary

Even I have created partitions to try as workaround but no resort. Any thoughts how to make this warning go away. I am trying to do this through Packer-tools for ESXI host (which has 5.5 version) running. Below is the JSON template I am using

# cat base-packer.json
  "builders": [
      "vm_name": "Centos6.5",
      "type": "vmware-iso",
      "iso_url": "",
      "iso_checksum": "0d9dc37b5dd4befa1c440d2174e88a87",
      "iso_checksum_type": "md5",
      "disk_size": "20480",
      "disk_type_id": "thin",
      "http_directory": "~/packertemplatebuilding",
      "remote_host": "",
      "remote_datastore": "52dfe32b-a996d262-9b46-2c4138a85a23/Centos6.5",
      "remote_username": "root",
      "remote_password": "rootpass",
      "remote_type": "esx5",
      "ssh_username": "vagrant",
      "ssh_password": "vagrant",
      "ssh_port": 22,
      "ssh_wait_timeout": "250s",
      "shutdown_command": "echo 'vagrant'|sudo -S shutdown -P now",
      "headless": "false",
      "boot_command": [
        "<tab> text ks=<enter><wait>"
      "boot_wait": "20s",
      "vmx_data": {
        "ethernet0.virtualDev": "vmxnet3",
        "ethernet0.networkName": "VM Network",
        "ethernet0.addressType": "generated",
        "ethernet0.present": "TRUE",
        "ethernet1.virtualDev": "vmxnet3",
        "ethernet1.networkName": "VM Network 2",
        "ethernet1.addressType": "generated",
        "ethernet1.present": "TRUE",
        "ide0:0.fileName": "disk.vmdk",
        "ide0:0.present": "TRUE",
        "ide0:0.redo": "",
        "scsi0:0.present": "FALSE",
        "memsize": "2048",
        "numvcpus": "2",
        "cpuid.coresPerSocket": "1"
"provisioners": [
      "type": "shell",
      "script": ""

Below is the snapshot of the error I am getting. enter image description here

PS The image I am using is a custom spin from CentOS 6.4. But I don't think that kickstart config should have an impact on the same.

share|improve this question
Can you show the error message? – ewwhite Jun 13 '14 at 11:31
Its a re-initialize dialog box come when the machine boots up. Saying that its either a virtual disk. So would you like to continue as it will loose any existing data. – Abhinav Jun 13 '14 at 11:34
So you installer is running in Graphical mode as well? Can you add text to your kickstart? Also, please correct the clearpart --all line. – ewwhite Jun 13 '14 at 12:44
What is the custom spin? Also, you seem to be interchanging CentOS 6.4 and 6.5. – ewwhite Jun 13 '14 at 13:04
@ewwhte, Sorry for creating confusion. The example above have CentOS6.5 iso as due to some reason I can't specify the actual name of ISO. But as I said the ISO is spin using CentOS 6.4 base and it should not impact the kickstart installation. – Abhinav Jun 13 '14 at 13:25

If you're receiving an error message similar to the following in your EL6 kickstart, you'll need to add zerombr to the kickstart command set.

You should also have this instead:

clearpart --all --initlabel

enter image description here

From the documentation:

zerombr: If zerombr is specified any invalid partition tables found on disks are initialized. This destroys all of the contents of disks with invalid partition tables. This command is required when performing an unattended installation on a system with previously initialized disks.


I just tried this on a fresh CentOS EL6.5 virtual machine running on a vSphere 5.5 platform... The following worked three times in succession without issue, including a reinstallation on the same disks:

clearpart --all --initlabel
part /boot --fstype ext4 --size=300
part /usr --fstype ext4 --size=10240 --asprimary
part / --fstype ext4 --size=20480 --asprimary
part /var --fstype ext4 --size=6144
part swap --size=8192
part /tmp --fstype ext4 --size=2048
share|improve this answer
Yeah, Similar error and if you see my kickstart snapshot I already have added zerombr but still same error. Even I have tried to do define a custom partition table but still same errors. – Abhinav Jun 13 '14 at 11:41
Are you rebuilding an existing server, or is this a pristine new virtual disk? – ewwhite Jun 13 '14 at 11:42
@Abhinav You may also want to modify your clearpart to: clearpart --all --initlabel – ewwhite Jun 13 '14 at 11:45
Its a new server disk mean I am creating the stuff from scratch. I will add the configs for the reference. – Abhinav Jun 13 '14 at 11:46
See my edit above. – ewwhite Jun 13 '14 at 12:03

I found a potential problem:

      "iso_url": "",

The CentOS "minimal" disk is customized and may do unexpected things, as it was intended and customized only to install a single set of packages. It should not be used with a kickstart installation; use the netinstall or DVD images instead.

share|improve this answer
Oh, I use the minimal ISO all the time for kickstart installs. It's never been an issue. I repeated the test below with the minimal ISO instead of the net install ISO with no change in outcome. – ewwhite Jun 13 '14 at 12:51
You're a braver man than I am, then. Knowing how they built the minimal image, I wouldn't use it for anything but pets. – Michael Hampton Jun 13 '14 at 12:54
This is an example as I can't put the actual image name in the config. We have our own custom spin for the application which is based on CentOS 6.4. So the actual errors is being reported through those disk installation. One more thing with CentOS-6.5-x86_64-minimal.iso I am not facing any issue and the VM get created without any error. – Abhinav Jun 13 '14 at 13:23

But as I said the ISO is spin using CentOS 6.4 base and it should not impact the kickstart installation.

You need to verify this. Try with a standard ISO.

If it still gives the error, you told it to only clear sda:

# Partition clearing information
clearpart --all --initlabel --drives=sda

Change to:

clearpart --all --initlabel

and try again.

share|improve this answer
Already did that but still same error. – Abhinav Jun 13 '14 at 13:31
Did what? Both things? Or are you picking the one you already did and ignoring the other? – MikeyB Jun 13 '14 at 13:39
I have tried once clearpart --all --initlabel and when the problem still persist then I tried clearpart --all --initlabel --drives=sda. In both cases zerombr was put in the file. Also the kickstart file I am using is the one which anaconda installer create after manual install. – Abhinav Jun 13 '14 at 14:08
So the answer is no, you haven't tried both suggestions. OK. – MikeyB Jun 13 '14 at 17:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.