RE: Partition siizes in percent (without using LVM)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Why can't you just calculate the percentage  on the %pre section?

%pre
Write a small bash script to get the size of disk sdb, calculate the size of each partition you want and write to file
Output will be $calc_size_p1, $calc_size_p2

echo "part /boot --fstype ext4 --size 1024 --asprimary --ondisk=sdb" > /tmp/partitioning.cfg
echo "part / --fstype ext4 --size ${calc_size_p1} --ondisk=sdb" >> /tmp/partitioning.cfg
echo "part / --fstype ext4--size ${calc_size_p2} --ondisk=sdb" >> /tmp/partitioning.cfg
echo "part swap --size 2000 --ondisk=sdb" >> /tmp/partitioning.cfg

%end


Now use %include outside of %pre section to include the partition scheme you created:

%include /tmp/partitioning.cfg


Thanks,
Noam


-----Original Message-----
From: kickstart-list-bounces@xxxxxxxxxx [mailto:kickstart-list-bounces@xxxxxxxxxx] On Behalf Of Felix von Leitner
Sent: Monday, August 1, 2016 3:09 PM
To: kickstart-list@xxxxxxxxxx
Subject: Partition siizes in percent (without using LVM)

Hi!

I need to make a kickstart configuration for Redhat 6.8. It is to form the basis for installing a commercial product on it later, and that product has some peculiar constraints on what they support and what not.
That is the reason why this is Redhat 6.8 in the first place.

The system installation is supposed to go on sda, and this works fine, but there is an sdb, too, and it is comparatively huge (> 20 TB). The constraints of the product say that there should be two partitions on sdb, one about 10% of it and one the rest of the space.

The only way I could make this work is with LVM. It now turns out the product utterly fails if installed on LVM.

Please note that I'm not blaming anyone for anything here. I just want to get this done.

How do you make a partition 10% of the total size without using LVM in kickstarter? I found no way, surely I must be missing something obvious.

Would it help if I made a custom DVD with a newer Anaconda binary, say from Fedora?

Thanks,

Felix

_______________________________________________
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



[Index of Archives]     [Red Hat General]     [CentOS Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux