RHCSA labs / Kickstart question

phatrikphatrik MemberMember Posts: 71 ■■□□□□□□□□
My goal is to launch a virtualized unattended installation of CentOS 6.3 however the installation stops during disk partitioning with the following error message: "error processing drive:
pci-0000:00:01.1-scsi-0:0:0:0
12288MB
ATA QEMU HARDDISK

This device may need to be reinitialized.

[Warning, blah blah blah]...
"

Details are as follow:


- Attempting to deploy CentOS 6.3 x86_64
- Using KVM for the virtualization
- My kickstart file contains relevant "part" statements, as well as: clearpart --all --initlabel
- I also tried explicitly declaring the disk however it didn't help: clearpart --drives=sda --all --initlabel


The command I use to launch the install:

virt-install -n server1.example.com -r 768 -l /media/netinstall --disk path=/var/lib/libvirt/images/server1.example.com.img,size=12 -x "ks=ftp://192.168.100.2/pub/ks.cfg"


The following messages appear on 3rd terminal during the installation:

required disklabel type for sda (1) is None
default disklabel type for sda is msdos
selecting msdos disklabel for sda based on size


I posted this question in linux forum and a couple of days later no one has an answer for me. Since fellow RHCSA candidates hang out in here and Michael Jang's book seems to be popular choice, I'm hoping someone has had the same problem and found a solution :)


TIA
2018 goals: Security+, CCNA CyberOps (Cohort #6), eJPT, CCNA R&S 2019 goals: RHCE ????, OSCP || CISSP

Comments

  • clubberlaneclubberlane Junior Member Member Posts: 3 ■□□□□□□□□□
    Can you finish the installation manually? If so do an install then review /root/anaconda-ks.cfg
  • phatrikphatrik Member Member Posts: 71 ■■□□□□□□□□
    Thank you for the suggestion but it didn't help. The resulting anaconda-ks.cfg doesn't make much sense to me. All "part" statements are commented out and the so is the clearpart statement: #clearpart --none #part XXXX #part YYYY #part ZZZZ Commenting out the above statements mean they wouldn't be processed (I looked and found no "autopart" statements in the config) so I decided to give it a try and remove the #'s in front of the above statements. Still got the same result. I then tried using system-config-kickstart to create a fresh config but no cigar.
    2018 goals: Security+, CCNA CyberOps (Cohort #6), eJPT, CCNA R&S 2019 goals: RHCE ????, OSCP || CISSP
  • phatrikphatrik Member Member Posts: 71 ■■□□□□□□□□
    Here's the answer:


    As of RHEL 6.3, clearpart --initlabel no longer initializes disks. Instead, "zerombr" and "ignoredisk --only-use=XXX" must be used. I.e.:

    zerombr
    ignoredisk --only-use=sda


    would initialize disk sda.

    Ref: https://access.redhat.com/knowledge/solutions/117513
    2018 goals: Security+, CCNA CyberOps (Cohort #6), eJPT, CCNA R&S 2019 goals: RHCE ????, OSCP || CISSP
  • clubberlaneclubberlane Junior Member Member Posts: 3 ■□□□□□□□□□
    so stepping thru the install worked? If so the /root/anaconda-ks.cfg was supposed to be commented out at those locations. Uncomment them and add

    zerombr
    clearpart --all --initlabel

    check out 32.4. Kickstart Options
  • MitechniqMitechniq Senior Member Member Posts: 286 ■■■■□□□□□□
    The anaconda on RHEL6 is horrible, for some reason it flips the preperation of the disk at the end instead of the beginning, so if you simply just uncomment out the disk portion of the anaconda it will not work because it trys to partition your drive before it's been prepared properly. This is how mine is setup...
    bootloader --location=mbr --driveorder=sda --append=" rhgb creashkernel=auto quiet"
    zerombr yes
    clearpart --all --initlabel
    

    hopefully that gets you in the right direction, let me know if you need anything else
Sign In or Register to comment.