H
H
HighMan2021-02-16 23:53:02
linux
HighMan, 2021-02-16 23:53:02

How to work with disk partitions from a bash script?

Hello comrades!
Actually, the essence of the issue is in the topic.
Now I'm trying to develop a script that "flashes" a new virtual machine in a "golden" way.
Difficulty in disk partitioning. fdisk does not allow you to do everything through the command line. parted allows, but it has its own nuances. Is there an analogue of fdisk, only working without interactivity?
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
X
xotkot, 2021-02-17
@HighMan

Is there an analogue of fdisk, only working without interactivity?

sfdisk
and in general see Partitioning_tools

Z
Zzzz9, 2021-02-17
@Zzzz9

parted

R
Ruslan Fedoseev, 2021-02-17
@martin74ua

anaconda and similar tools. Explore your favorite distribution, they definitely have installation automation tools

S
Saboteur, 2021-02-17
@saboteur_kiev

sfdisk, parted
and fdisk + expect

H
HighMan, 2021-02-17
@HighMan

Thank you all! sfdisk turned out to be the most suitable for my purposes.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question