Partition Percentage wise in ks.cfg
Step 1:
Put the following lines in ks.cfg file in the %pre section
%pre
#!/bin/bash
# Check the disk size value and store in diskval
diskval=`fdisk -l | grep Disk | awk -F ” ” ‘{print $3}’| awk -F “.” ‘{print $1}’`
# for root as 20%
let “Partroot=($diskval*20/100)”
# for home as 20 %
let “Parthome=($diskval*20/100)”
# for usr as 50 %
let “Partusr=($diskval*50/100)”
# Swap space
let “Partswap=(`cat /proc/meminfo | grep ‘MemTotal:’ | awk -F ‘ ‘ ‘{print $2}’`*2/1024)”
echo “clearpart –all” >> /tmp/part-include
echo “part / –fstype ext3 –size $Partroot –ondisk sda” >> /tmp/part-include
echo “part swap –size=$Partswap –ondisk sda” >> /tmp/part-include
echo “part /home –fstype ext3 –size $Parthome –ondisk sda” >> /tmp/part-include
echo “part /usr –fstype ext3 –size $Partusr –grow –ondisk sda” >> /tmp/part-include
Step 2:
Just above the %packages section add the following line
clearpart –all
# Now in your ks file put the following line for partition
%include /tmp/part-include
%packages
Sorry, the comment form is closed at this time.
-
Recent
- Set Time Zone + Fedora 18
- Fedora 17 + Tata Photon (Huawei)
- Fedora 17: Install OpenSSH Server
- Change the default keyring password
- Error: Could not stat() command file ‘/usr/local/nagios/var/rw/nagios.cmd’!
- Gnone 3.X adding personal launcher
- Gnome 3.x Change Panel
- KDE remove autostart programs
- GPS on Linux
- Debian Squeeze change root password
- Download YouTube Videos on Linux
- Pidgin + The certificate for omega.contacts.msn.com could not be validated
-
Links
-
Archives
- April 2013 (1)
- September 2012 (2)
- August 2012 (2)
- July 2012 (2)
- November 2011 (1)
- July 2011 (1)
- April 2011 (1)
- January 2011 (1)
- November 2010 (1)
- September 2010 (2)
- July 2010 (3)
- March 2010 (1)
-
Categories
-
RSS
Entries RSS
Comments RSS