Hide Forgot
Description of problem: When I installed Centos7.2 using kickstart eveything went fine but output kickstart doesn't correspond to original kickstart that I used for installation nor state of installed system. In original kickstart I had those lines: clearpart --all --initlabel --drives=vda part /boot --size=800 --fstype="xfs" --ondisk=vda part / --onpart=/dev/vdb part /var/log --onpart=/dev/vdc However in output counterpart (/root/anaconda-ks.cfg) was only: # Partition clearing information clearpart --all --initlabel --drives=vda # Disk partitioning information part /boot --fstype="xfs" --ondisk=vda --size=800 However system and partitions were installed corretly: [root@jenkins-01 ~]# mount | grep /dev/vd /dev/vdb on / type xfs (rw,relatime,seclabel,attr2,inode64,noquota) /dev/vdc on /var/log type xfs (rw,relatime,seclabel,attr2,inode64,noquota) /dev/vda1 on /boot type xfs (rw,relatime,seclabel,attr2,inode64,noquota) Version-Releapuse number of selected component (if applicable): # cat /etc/redhat-release CentOS Linux release 7.2.1511 (Core) How reproducible: Every time. Steps to Reproduce: 1. Create 2+ (3 in my case) lun/lvm volumes/files/whatever you can use as block device 2. Add those block devices to virtual machine 3. Install Enterprise Linux 7 4. Compare Kickstarts (note for the one who will be reproducing this: step 2 and 3 I did using this command: virt-install --name=jenkins-01 --memory=1024 --vcpus=1 --location http://merlin.fit.vutbr.cz/mirrors/centos/7.2.1511/os/x86_64/ --disk /dev/mapper/vgsys-thm_jenkins01_boot --disk /dev/mapper/vgsys-thm_jenkins01_root --disk /dev/mapper/vgsys-thm_jenkins01_vlog --initrd-inject /root/kickstarts/jenkins-01.ks --extra-args "ks=file:/jenkins-01.ks" --mac 52:54:00:30:15:cb --vnc and I guess it's the easiest way) Actual results: /root/anaconda-ks.cfg disk partitioning part didn't match original kickstart nor reallity. Expected results: /root/anaconda-ks.cfg should similiar to original kickstart. Additional info: In next comments I'm attaching original and output kickstarts.
Created attachment 1141247 [details] Original Kickstart
Created attachment 1141248 [details] output kickstart
This is probably due to this: clearpart --all --initlabel --drives=vda What happens if you use: clearpart --all --initlabel --drives=vda,vdb,vdc In general you need to list all the disks you are using in --drives.
Hi Brian, I actually can't do that, /dev/vdb and /dev/vdc are pre-formated partition and I don't want anaconda to touch them. (I didn't test this recently but I did that when I was writing that kickstart) If I remember correctly, in that case anaconda would fail kickstart, which is not that suprising because clearpart is for clearing partitions on drive, however in this case vdb and vdc are partitions.
Ah, I see. Since you have this in your ks: part /var/log --onpart=/dev/vdc Anaconda is going to want to format that. If you just want it to mount it, add --noformat like this: part /var/log --onpart=/dev/vdc --noformat
Hi Brian, I have feeling that you didn't quite understand where the problem was. Though I can't blame you because I wasn't clear enought. The problem wasn't that anaconda didn't install system properly. System was installed in fact correctly. However those line: part / --onpart=/dev/vdb part /var/log --onpart=/dev/vdc Didn't appeared in /root/anaconda-ks.cfg but they were mounted on correct places and system was installed on them as I stated: [root@jenkins-01 ~]# mount | grep /dev/vd /dev/vdb on / type xfs (rw,relatime,seclabel,attr2,inode64,noquota) /dev/vdc on /var/log type xfs (rw,relatime,seclabel,attr2,inode64,noquota) /dev/vda1 on /boot type xfs (rw,relatime,seclabel,attr2,inode64,noquota) I still think this is a bug, However It's very very low priority bug (which should I stated at the first place, but still a bug)
Can you try adding --noformat and see if they show up as expected?
Hi Brian, Sorry that I didn't responded in long time, i didn't have access to that system on which I can reproduce that easilly. Actually I don't understand why should I put --noformat there, my bug report wasn't about problems with installing system. My system is installed correctly as I expected. Every partition is mounted where I wanted it. The problem is just that output kickstart (/root/anaconda-ks.cfg) isn't aware about those partition and if I used that kickstart for another installation new system would not be same as original one. However I did try to put --noformat at the end of `part /var/log --onpart=/dev/vdc` so it looked like this: clearpart --all --initlabel --drives=vda part /boot --size=800 --fstype="xfs" --ondisk=vda part / --onpart=/dev/vdb part /var/log --onpart=/dev/vdc --noformat system was installed as expected [root@jenkins-01 ~]# mount | grep vd /dev/vdb on / type xfs (rw,relatime,seclabel,attr2,inode64,noquota) /dev/vdc on /var/log type xfs (rw,relatime,seclabel,attr2,inode64,logbsize=64k,sunit=128,swidth=128,noquota) /dev/vda1 on /boot type xfs (rw,relatime,seclabel,attr2,inode64,noquota) Hoewer output kickstart looks still the same: # Partition clearing information clearpart --all --initlabel --drives=vda # Disk partitioning information part /boot --fstype="xfs" --ondisk=vda --size=800 %packages