how can i pass dynamic block device/partition info from %pre to part --onpart=?
Pablo Iranzo Gómez
Pablo.Iranzo at redhat.com
Fri Sep 7 07:52:38 UTC 2012
Hi
It's still easier.... put the partitioning portion on another file and %include it:
echo "part /boot --onpart=$WHATEVER" >> /tmp/partitioning
%include /tmp/partitioning
Regards
Pablo
----- Mensaje original -----
> De: "Mark Christian" <MCHRISTI at altera.com>
> Para: "kickstart-list at redhat.com" <kickstart-list at redhat.com>
> Enviados: Viernes, 7 de Septiembre 2012 9:45:07
> Asunto: how can i pass dynamic block device/partition info from %pre to part --onpart=?
>
> I'm using rhel5.6 anaconda, and attempting to align some systems with
> SSD disks with parted, prior to kickstarting them. My kickstart
> contains the following:
>
> %include /tmp/pre_install_parted
>
> %pre
> # use fdisk -l to determine if the block device is /dev/sda or
> /dev/hda etc...
> echo "parted -s $(fdisk -l | awk '/Disk/ {print $2}'|cut -d: -f1) --
> mklabel msdos mkpart primary 2048s 514047s mkpart primary 514048s
> -10M set 1 boot on" > /tmp/pre_install_parted
>
> The above is nice because whether I'm kickstarting on /dev/hda,
> /dev/sda, etc, parted finds the block device and partitions the
> drive starting at the 2048 sector.
>
> Now I'd like to somehow pass the block device info from %pre to the
> partitioning portion of kickstart:
>
> part /boot --onpart=$(the output of the above fdisk command)1
> part pv.0 --onpart=$(the output of the above fdisk command)2
>
> Is it possible to do this? Can I somehow read the contents of a file
> I create in %pre and use it as the argument to --onpart=?
>
> Thank you.
>
> Mark
>
> Confidentiality Notice.
> This message may contain information that is confidential or
> otherwise protected from disclosure. If you are not the intended
> recipient, you are hereby notified that any use, disclosure,
> dissemination, distribution, or copying of this message, or any
> attachments, is strictly prohibited. If you have received this
> message in error, please advise the sender by reply e-mail, and
> delete the message and any attachments. Thank you.
>
>
> _______________________________________________
> Kickstart-list mailing list
> Kickstart-list at redhat.com
> https://www.redhat.com/mailman/listinfo/kickstart-list
>
--
Pablo Iranzo Gómez (Pablo.Iranzo at redhat.com)
Senior Global Profesional Services Consultant (RHCA, RHCSS, RHCDS, RHCVA, RHCE, RHCSA, RHCSP) #110-215-852
Phone: +34 645 01 01 49 (CET/CEST)
GnuPG KeyID: 0x5BD8E1E4
More information about the Kickstart-list
mailing list