SCIENTIFIC-LINUX-USERS Archives

December 2014

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"Stephen Berg (Contractor)" <[log in to unmask]>
Reply To:
Stephen Berg (Contractor)
Date:
Fri, 19 Dec 2014 09:30:00 -0600
Content-Type:
text/plain
Parts/Attachments:
text/plain (71 lines)
I've got a kickstart file that does pretty much the whole installation.  
But partitioning from a pre-install script is not working quite right.

I do a pxeboot on the system, it pulls in the kickstart file and 
starts.  In the %pre section I run some parted commands to repartition 
two hard drives and set them up to be RAID1 metadevices.  This works 
good, but anaconda never sees the new partition layout and the 
installation pauses waiting for input.

I've been getting around this issue by launching the pxeboot, waiting 
for it to get finished with the pre-install stuff, then rebooting and 
starting over.  Since the partition layout is the same on the second run 
anaconda is happy.

Here's the %pre section of my kickstart.  I thought using the partprobe 
at the end would get anaconda aware of the new layout but it doesn't 
seem that's working.  How can finish the pre-install section so anaconda 
will see this new partition layout and continue on with the install?

  %pre --interpreter /bin/bash --log=/root/preinstall.log

dd if=/dev/zero of=/dev/sda bs=1M count=500
dd if=/dev/zero of=/dev/sdb bs=1M count=500
echo "Probing sda"
partprobe -s /dev/sda
echo "Probing sdb"
partprobe -s /dev/sdb

partprobe

parted -s -- /dev/sda mklabel gpt
parted -s -a minimal -- /dev/sda unit MB mkpart primary 0 1
parted -s -a minimal -- /dev/sda unit MB mkpart primary 1 501
parted -s -a minimal -- /dev/sda unit MB mkpart primary 501 16886
parted -s -a minimal -- /dev/sda unit MB mkpart primary 16886 103686
parted -s -a minimal -- /dev/sda unit MB mkpart primary 103686 -0
parted -s -- /dev/sda set 1 bios_grub on
parted -s -- /dev/sda set 2 raid on
parted -s -- /dev/sda set 3 raid on
parted -s -- /dev/sda set 4 raid on
parted -s -- /dev/sda set 5 raid on



parted -s -- /dev/sdb mklabel gpt
parted -s -a minimal -- /dev/sdb unit MB mkpart primary 0 1
parted -s -a minimal -- /dev/sdb unit MB mkpart primary 1 501
parted -s -a minimal -- /dev/sdb unit MB mkpart primary 501 16886
parted -s -a minimal -- /dev/sdb unit MB mkpart primary 16886 103686
parted -s -a minimal -- /dev/sdb unit MB mkpart primary 103686 -0
parted -s -- /dev/sdb set 1 bios_grub on
parted -s -- /dev/sdb set 2 raid on
parted -s -- /dev/sdb set 3 raid on
parted -s -- /dev/sdb set 4 raid on
parted -s -- /dev/sdb set 5 raid on

echo "Probing sda"
partprobe -s /dev/sda
echo "Probing sdb"
partprobe -s /dev/sdb
partprobe

%end

-- 
Stephen Berg
Systems Administrator
NRL Code: 7320
Office: 228-688-5738
[log in to unmask]

ATOM RSS1 RSS2