-
Junior Member
registered user
Scripting Dynamic Partitions?
Is there anyway to dynamically fdisk a harddrive based on percentage?
example:
1% for /boot
10% for /
80% for /usr
9% for /var
i'm pretty decent at scripting and i got the scsi or ide part working and i know you can use fdisk to assign the number of blocks, but is there a way to see what the total blocks are? Or is there a easier program i can use?
Thanks in advance!
-
Junior Member
registered user
answered my own question...
using parted for those curious
then did some bash scripting like
size=`parted --script $partition print |grep megabytes |cut -d'-' -f 2|cut -d' ' -f 1|cut -d'.' -f 1
echo $((size/0.10)) #to echo 10% of file size
-
Scripts for dynamic partitioning
Hi lorddecker,
I know that you posted this some time ago, but Iīm searching for this same solution. Iīve seen that youīve accomplished this, and Iīm wondering you you could post your complete scripts you are using... It would save me some time, and hpefully some otherīs too...
Thatīs it!
Thanks a lot,
Mark
-
Junior Member
registered user
i used parted first, but it super buggy. Like you can go "fill of the drive in" you have to pick points. So what i did is used a expect script.
You can do it manually, or just do it automatically with autoexpect.
Figure out what size partitions you need, then generate a expect script that runs against fdisk.
Similar Threads
-
By jim1944 in forum Hardware & Booting
Replies: 1
Last Post: 01-25-2007, 04:34 AM
-
By Zaid in forum Hardware & Booting
Replies: 8
Last Post: 03-08-2006, 12:16 PM
-
By triple_play45 in forum Hardware & Booting
Replies: 0
Last Post: 02-24-2006, 03:34 AM
-
By lsr in forum Hdd Install / Debian / Apt
Replies: 0
Last Post: 01-21-2005, 01:04 PM
-
By halo in forum Hdd Install / Debian / Apt
Replies: 2
Last Post: 07-28-2004, 03:22 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules

OPNsense pfSense 8-Core Atom C3758 2.2GHz 8GB DDR4 64GB SSD 8x NIC QAT AES VPN
$145.00

OPNsense Firewall 8-Core Atom C3758 4GB DDR4 RAM 64GB SSD 8x 1Gbe QAT AES-NI VPN
$95.00

OPNsense Firewall 16-Core Atom C3958 16GB DDR4 RAM 64GB SSD 8x 1Gbe QAT AES-NI
$195.00

SonicWall TZ280 Firewall 03-SSC-6933 Advanced Edition 3YR NEW SEALED
$999.99

HP 2x 10GB OPNsense Quad Core i5-8500 8GB RAM 3Port Gigabit Firewall AES-NI SSD
$199.95

Fortinet FortiGate 60F FG-60F UTM UTP License Until 2027 Network Security FW VPN
$199.99

Palo Alto PA-220 Next-Gen Firewall 520-000309-00J
$40.00

OPNsense pfSense 16-Core Atom C3958 16GB ECC RAM 512GB SSD 8-Port QAT AES-NI VPN
$258.00

Zero Trace Pen: All-in-one Tor Network Anonymous Drive + Cryptocurrency Wallet
$147.00

Barracuda NextGen CloudGen Cloud Based Firewall F280 BNGF280a w/ 8.3.1 Firmware
$89.99