Shabazian, Chip wrote:
Not sure, but I do --all before --initlabel. Shouldn't make a
difference, but I've seen stranger things.
The other thing you could probably do is wipe the the partition table in
%pre:
set $(list-harddrives)
cat << EOF >> /tmp/fdisk.input
w
EOF
for i in $d1,$d2,$d3,...(better ways to do this, but this is worth
starting with); do fdisk $i < /tmp/fdisk.input; done
-----Original Message-----
From: kickstart-list-bounces@xxxxxxxxxx
[mailto:kickstart-list-bounces@xxxxxxxxxx] On Behalf Of Eugeny Zadevalov
Sent: Wednesday, February 13, 2008 2:10 PM
To: kickstart-list@xxxxxxxxxx
Subject: problems with unpartitioned harddrives and automatic
partitioning
Hello All,
I've been trying to setup automatic partitioning with Kickstart.
Everything is okay until I try to run my Kickstart setup on machine with
unpartitioned drives (like if partition table is broken or filled with
zeros).
I'm experiencing same issue with both Centos4.6 and Centos5.1.
My goal is to get raid1 setup automatically through kickstart. Below is
cut from ks.cfg:
===
zerombr
clearpart --initlabel --all
part raid.01 --size=2048 --onbiosdisk=80 --asprimary part raid.02
--size=8192 --onbiosdisk=80 --asprimary --grow part raid.03 --size=2048
--onbiosdisk=81 --asprimary part raid.04 --size=8192 --onbiosdisk=81
--asprimary --grow
raid / --level=RAID1 --device=md0 --fstype=ext3 raid.02 raid.04
raid swap --level=RAID1 --device=md1 --fstype=swap raid.01 raid.03 ===
If I remove this part and run kickstarting machine over Kickstart with
manual partitioning I get warning about drives needs to be initialized.
That's normal I guess. But with my automatic partitioning I've
"clearpart --initlabel --all" and that supposed to be initializing
any/all unpartitioned drives but that's not happening. Kickstart just
hangs giving bunch of errors.
If I just go ahead and do something like:
fdisk /dev/hda
w
ENTER
fdisk /dev/hdc
w
ENTER
And then try again that automatic partitioning scheme it works like
expected.
I've searched over the mailling list archive but wasn't able to find
anything.
For me it looks like a bug with "--initlabel" option.
Any suggestions?
Thanks!
_______________________________________________
Kickstart-list mailing list
Kickstart-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/kickstart-list
_______________________________________________
Kickstart-list mailing list
Kickstart-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/kickstart-list
Cant tell you how many times I hit this problem :) I solved it with a %pre section that initializes the drives. As my needs where very simple, the script is very simple. But you can add to it as your situation requires.
<snip>
%pre
parted -s /dev/sdX mklabel msdos
%end
</snip>
--
Joel Andres Granados
Red Hat / Brno, Czech Republic
_______________________________________________
Kickstart-list mailing list
Kickstart-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/kickstart-list