<In Story>

Linux Fdisk Auto Partition Script // [Linux] [Script] [Programming] [Command] [Disk Partition] 본문

Programming/Script

Linux Fdisk Auto Partition Script // [Linux] [Script] [Programming] [Command] [Disk Partition]

<In Story, Hi story, History> 2015. 5. 5. 16:21

http://www.linuxquestions.org/questions/linux-software-2/fdisk-auto-partition-script-463262/


Fdisk Auto Partition Script


Currently I'm building my own distro installation GUI much like anaconda. I'm using fdisk as the partitioning tool, and creating an auto partition script. The script itself works when I run through the console, but it keeps asking for confirmation about overwritting the data Yes/No.


Does anyone know how I can bypass this so it runs with no user intervention, I have been searching the net but cannot find any info about bypassing it. I'm using Realbasic to build the installler, this is the script that I have so far:


###################

#!/bin/bash

fdisk /dev/hda <<'EOF'

n

p

1


+10000M

n

p

2


+1000M

t

2

82

t

1

83

w

EOF

mkswap -L swap /dev/hda2

swapon /dev/hda2

mkfs.reiserfs /dev/hda1

mount -t reiserfs /dev/hda1 /mnt

exit 0

###################