bug-parted
[Top][All Lists]
Advanced

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

bug#16633: Automate parted command


From: Sagar Shedge
Subject: bug#16633: Automate parted command
Date: Mon, 3 Feb 2014 14:05:49 +0530


Respected Sir/Mam,

I want to make paritition creation using automate script. This script should avoid interaction and respond all question for parted command. Previous there will be msdos type partition table.

My command are as follows :-
1. parted /dev/sdb mklabel gpt
2. parted /dev/sdb mkpart logical 7168s 5638312959s
3. parted /dev/sda name 1 TEMP-1

I can put all these command directly in shell script.

But for 1st command parted /dev/sdb mklabel gpt , it will ask me 
Warning: The existing disk label on /dev/sdb will be destroyed and all data on this disk will be lost. Do you want
to continue?
Yes/No?
if I say yes then
New disk label type?  [msdos]?

But all these become interactive. Also if I use -s then it will 
Instead of that is there any way to pass these answer to command through file.
I don't want to use any third party tool like expect

I was trying to pass all command through file to parted but it wont work.
> cat parted.txt
/dev/sdb
mklabel
gpt
yes
gpt

> parted < parted.txt

So please suggest me way to automate these answer as early as possible.
Thanks in advance.
--
Sagar Dilip Shedge,
Pune.
 
With Regards.
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]