summaryrefslogtreecommitdiffstats
path: root/snippets/partition_select
blob: a878767a93c79ab08118fd8c1dfcaa7c802b4f28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
%include /tmp/partinfo

%pre
# Determine how many drives we have
set \$(list-harddrives)
let numd=\$#/2
d1=\$1
d2=\$3

# Determine architecture-specific partitioning needs
EFI_PART=""
PPC_PREP_PART=""
BOOT_PART=""

case $(uname -m) in
    ia64)
        EFI_PART="part /boot/efi --fstype vfat --size 200 --recommended"
        ;;
    ppc*)
        PPC_PREP_PART="part None --fstype 'PPC PReP Boot' --size 8"
        BOOT_PART="part /boot --fstype ext3 --size 200 --recommended"
        ;;
    *)
        BOOT_PART="part /boot --fstype ext3 --size 200 --recommended"
        ;;
esac

cat << EOF > /tmp/partinfo
\$EFI_PART
\$PPC_PREP_PART
\$BOOT_PART
part / --fstype ext3 --size=1024 --grow --ondisk=\$d1 --asprimary
part swap --recommended --ondisk=\$d1 --asprimary
EOF