LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-12-2006, 06:08 AM   #1
fotoguy
Senior Member
 
Registered: Mar 2003
Location: Brisbane Queensland Australia
Distribution: Custom Debian Live ISO's
Posts: 1,291

Rep: Reputation: 62
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
###################
 
Old 07-12-2006, 06:53 AM   #2
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
Consider reading man sfdisk.
 
Old 07-12-2006, 10:25 PM   #3
fotoguy
Senior Member
 
Registered: Mar 2003
Location: Brisbane Queensland Australia
Distribution: Custom Debian Live ISO's
Posts: 1,291

Original Poster
Rep: Reputation: 62
Thanks for that, sfdisk seems to work without asking for confirmation, just what I'm after.

Greatly appreciated
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
fdisk -l output with partition label appended - Bash script available Emmanuel_uk Programming 7 06-10-2006 05:08 AM
How to auto fdisk? wucan Linux - Newbie 3 06-05-2006 02:15 AM
How do I partition on fdisk? Sa3atsky Slackware 4 09-10-2004 06:47 PM
fdisk partition blackzone Linux - Newbie 6 08-22-2004 07:47 AM
auto-completion - how does it work & can my script args auto-complete? BrianK Programming 1 06-11-2004 04:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration