Questions tagged [parted]

GNU Parted manipulates partition tables. This is useful for creating space for new operating systems, reorganizing disk usage, copying data on hard disks and disk imaging. The package contains a library, libparted, as well as well as a command-line frontend, parted, which can also be used in scripts.

GNU Parted manipulates partition tables. This is useful for creating space for new operating systems, reorganizing disk usage, copying data on hard disks and disk imaging. The package contains a library, libparted, as well as well as a command-line frontend, parted, which can also be used in scripts.

18 questions
6
votes
3 answers

How to script automatic task with parted (update gpt table)

I would like to script the extension of a existing partition on my Debian 9.9. I can do it simply with the interactive mode of parted but i would like to automatize it. In the example below I just need to manually write 'Fix' but i want to script…
sizeur
  • 113
  • 1
  • 10
4
votes
2 answers

how do I get over parted confirmation request in a script

I wonder if anybody has done this sort of stuff: I need to use parted in a script doing a bit of a dodgy operation. I am trying to modify an extended partition that contains the partition I have been booted on so I am getting a confirmation request…
Thomas
  • 311
  • 2
  • 17
2
votes
0 answers

What is in the "bootstrap code area" in a modern MBR?

I'm reading the wikipedia article on Master Boot Record and specifically curious about what (if anything) needs to be in the "bootstrap code area" for the MBR to be readable in modern systems. I used parted to create an MBR on an SD card then used…
thom_nic
  • 7,809
  • 6
  • 42
  • 43
2
votes
3 answers

ansible parted automate partition creation and get number and start dynamically

I need to automate the partition creation in several hundred server where a file system needs to be added. the idea is have ansible get the number of the next partition and the start based on the output of parted info. --- - hosts: all become:…
danidar
  • 179
  • 2
  • 10
1
vote
0 answers

How do I pass inputs to parted command to resize partition

I am trying to execute exec.Command like cmd := exec.Command("parted", "-s", "/dev/vdb", "resizepart", "2", "20GB") to extend partition of vdv. vdv has only 2 partitions and I want second partition to be executed. I am not able to do so. Have…
user7290726
  • 31
  • 1
  • 4
1
vote
0 answers

RHEL8 Parted command mkpart error invalid number

Trying to create a swap partion using the following query parted -s /dev/nvme0n2 mkpart extended linux-swap 1000MB 2000MB [root@rhel8vmware ~]# parted -s /dev/nvme0n2 print free Model: NVMe Device (nvme) Disk /dev/nvme0n2: 5369MB Sector size…
Anand
  • 21
  • 4
1
vote
1 answer

Resizing an EXT4 Partition

I have an Ubuntu 18.04 server in a VM. The VM administrator has allocated more disk space. How do I resize a partition to use that space? My setup is as follows: Device Start End Sectors Size Type /dev/sda1 2048 1050623…
Sean
  • 35
  • 1
  • 7
1
vote
2 answers

ansible: Error creating 16 partitions using parted module

I'm trying to create 16 partitions from a 4TB block device with ansible. I'm using the parted module: https://docs.ansible.com/ansible/latest/modules/parted_module.html#examples I verified the device is connected and the kernel sees it, according…
Gerb
  • 883
  • 12
  • 31
1
vote
2 answers

Qt link to libparted error

currently I want to make a Qt application that able to read the HDD partition (maybe in the future able to make patitions on HDD). And I found that libparted can be used for this (my application will be only for Linux). Already install libparted on…
Apin
  • 2,558
  • 2
  • 21
  • 36
0
votes
0 answers

Create a fake external sdcard storage space on android phone with no sd card slots

I was wondering if it would be possible to mount an extra custom partition as an external sdcard on an android phone. I already know how to create extra partition on my phone's storage using parted (cuz i installed windows on my phone) I think that…
0
votes
0 answers

Why does libparted detect partitions with negative labels?

Maybe I'm not using the right keywords for my Google searches. In that case, please point me in the right direction. I'm using libparted to detect connected mass-storage media and partitions on my device. One thing I've noticed, is that devices…
SimonC
  • 1,547
  • 1
  • 19
  • 43
0
votes
1 answer

python3/bash + how to automate creation of disk partitions in Linux

here is example from our rhel server machine lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sdb 8:16 0 20G 0 disk /data/sdb sdc 8:32 0 20G 0 disk /data/sdc sdd 8:48 0 …
Judy
  • 1,595
  • 6
  • 19
  • 41
0
votes
0 answers

Bash script behave differently when executed from php

I have a simple script used to recreate and format partitions in a disk that runs fine from the command line, but fails complaining about device being busy at the first command that changes the partition table when called from php. I've done a lot…
George
  • 1
0
votes
1 answer

Cannot understand error from ansible parted module

I am trying to create a partition on a device, check what was created and use that information for further steps, like setting a filesystem on the partition. But I am getting the error below and I don't understand what I am missing. Here are the…
AhmFM
  • 1,552
  • 3
  • 23
  • 53
0
votes
1 answer

Azure managed data disk can't be partitioned with ansible parted

I get the below error while trying to partition a managed azure disk that has been attached to a VM TASK [role_azure_disk : Partition Azure Disk]…
deewon
  • 1
  • 2
1
2