part function

Pablo Iranzo Gómez piranzo at redhat.com
Tue Oct 14 15:52:48 UTC 2008


Hi Glenn


----- "Glenn Bailey" <gbailey at terremark.com> escribió:

> What's the default behvaiour for the 'part' function when --ondisk is
> left out? I'm wanting to do something similar to this in my
> kickstarts,
> but make it available on other devices that don't have the cciss
> device:


If you left it empty, anaconda will put the partitions wherever it finds a right place, what I do is to use a small script to force them on first hard drive detected on the system with:

%include /tmp/part-include



and then a %pre script like:
%pre
set $(list-harddrives)
let numd=$#/2 # Number harddrives
d1=$1 # first device
S1=$2 # first device size (and so on)
echo "part /boot --fstype ext3 --size=100 --onpart=$PARTBOOT" >> /tmp/part-include
echo "part pv.100000 --size=1 --grow --onpart=$PARTVOL" >>  /tmp/part-include
echo "volgroup vg0 --pesize=32768 pv.100000" >> /tmp/part-include

and the rest of rour logvols.

Regards
Pablo



> 
> clearpart --all
> part /boot --fstype ext3 --size=250 --asprimary --ondisk=cciss/c0d0
> part pv.100000 --noformat --size=1 --grow --ondisk=cciss/c0d0
> volgroup vg0 --pesize=32768 pv.100000
> logvol swap --fstype swap --name=lv_swap --vgname=vg0 --size=4096
> logvol /var/log --fstype ext3 --name=lv_log --vgname=vg0 --size=4096
> logvol / --fstype ext3 --name=lv_root --vgname=vg0 --size=2048 --grow
> 
> If I just take out the --ondisk will it default to the first disk? Or
> will I need to execute a script in the %pre section?
> 
> glenn - terremark worldwide
> 
> _______________________________________________
> 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)
RHCE/RHCSP/RHCSS Global Profesional Services Consultant Spain
Phone: +34 645 01 01 49 (CET/CEST)
GnuPG KeyID: 0xFAD3CF0D

--
Inscrita en el Reg. Mercantil de Madrid – C.I.F. B-82 65 79 41
Directores: Michael Cunningham, Charlie Peters y David Owens
Dirección Registrada: Red Hat S.L., C/ Velazquez 63, Madrid 28001, España
Dirección contacto: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, Planta 3ºD, 28016 Madrid, Spain





More information about the Kickstart-list mailing list