LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Distributions (https://www.linuxquestions.org/questions/linux-distributions-5/)
-   -   Problems with kickstart --initlabel (https://www.linuxquestions.org/questions/linux-distributions-5/problems-with-kickstart-initlabel-4175420572/)

phatrik 08-06-2012 12:49 AM

Problems with kickstart --initlabel
 
I know the thread is really old but:

http://www.linuxquestions.org/questi...tended-484378/


I'm having the exact same problem. My specifics are:


- Tyring to install CentOS 6.3
- Doing a netinstall using a FTP site
- The installation is for a guest OS (KVM).

The install is being launched with:

virt-install -n server1.example.com -r 768 -l /media/netinstall -x "ks=ftp://192.168.100.2/pub/ks.cfg"


The install starts and gets to the point where I see "Error processing drive. This device may need to be re-initialized." The relevant part of my KS file:


clearpart --initlabel --all
# Disk partitioning information
part /boot --fstype="ext4" --size=500
part /home --fstype="ext4" --size=2048
part swap --fstype="swap" --size=2048
part / --fstype="ext4" --grow --size=1


When I switch to the 3rd terminal for information, here's what I see:

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


Based on "required diskalbel type for sda (1) is none" I decided to remove the --initlabel parm, however I still face the same problem (prompted to initialize the disk).



TIA


Erik

kbp 08-06-2012 06:43 AM

I've never had any issues but maybe it's sensitive to argument ordering - I've always put --initlabel last:

Code:

clearpart --drives=${disk} --all --initlabel

phatrik 08-06-2012 04:31 PM

Thank you for the suggestion, unfortunately it didn't help. I still get the same output on the 3rd console.

dyasny 08-07-2012 05:58 AM

clearpart --initlabel should work. If it doesn't this is a bug.

However, if you are installing on virtio disks, /dev/sdX notation is wrong, it should be /dev/vdX

wungad 08-07-2012 08:14 AM

Issue
The 'clearpart --initlabel' option in a kickstart no longer initializes drives in RHEL 6.3.

Environment
Red Hat Enterprise Linux 6.3
Anaconda (kickstart)

Resolution
Use the 'zerombr' option in the kickstart to initialize disks and create a new partition table.
Use the 'ignoredisk' option in the kickstart to limit which disks are initialized by the 'zerombr' option. The following example will limit initialization to the 'vda' disk only:
zerombr
ignoredisk --only-use=vda

kbp 08-08-2012 12:19 AM

So really we want both kickstart options set as they cover different cases, a previously used disk, a blank disk or a disk with an invalid partition table:

clearpart: Removes partitions from the system
--initlabel: .. if installing to a brand new hard drive
zerombr: any invalid partition tables found on disks are initialized

Ref: http://docs.redhat.com/docs/en-US/Re...2-options.html

phatrik 08-08-2012 12:51 AM

Thanks, that's exactly what I was looking for.


Quote:

Originally Posted by wungad (Post 4748080)
Issue
The 'clearpart --initlabel' option in a kickstart no longer initializes drives in RHEL 6.3.

Environment
Red Hat Enterprise Linux 6.3
Anaconda (kickstart)

Resolution
Use the 'zerombr' option in the kickstart to initialize disks and create a new partition table.
Use the 'ignoredisk' option in the kickstart to limit which disks are initialized by the 'zerombr' option. The following example will limit initialization to the 'vda' disk only:
zerombr
ignoredisk --only-use=vda


phatrik 08-08-2012 12:55 AM

It seems like clearpart no longer initializes disks as of RHEL 6.3 (although I'm assuming it still deletes partitions if they already exist):

https://access.redhat.com/knowledge/solutions/117513

I tried the zerombr solution on a system with a "brand new disk" (a KVM virtualized installation) and it worked.

Quote:

Originally Posted by kbp (Post 4748633)
So really we want both kickstart options set as they cover different cases, a previously used disk, a blank disk or a disk with an invalid partition table:

clearpart: Removes partitions from the system
--initlabel: .. if installing to a brand new hard drive
zerombr: any invalid partition tables found on disks are initialized

Ref: http://docs.redhat.com/docs/en-US/Re...2-options.html



All times are GMT -5. The time now is 11:33 PM.