2022 Developer Survey is open! Take survey.

Questions tagged [parted]

A disk partitioning and partition resizing program.

Filter by
Sorted by
Tagged with
1 vote
3 answers
43 views

Can't write SD card partition table

I can't write the partition table on an SD card. IOCTL error. I can't delete it, either, neither in Linux using parted, cfdisk, or fdisk, nor in Windows, which just says format didn't work. The ...
user avatar
0 votes
0 answers
23 views

How to perform the steps from this guide using Ubuntu

I don't have access to a win pc, and I'd like to ask if anyone could translate this guide to parted / gparted / fdisk in Ubuntu. I realise I may damage the card, hence I'd like to ask for help. The ...
user avatar
0 votes
1 answer
49 views

Partitions for loop device not found from script, visible elsewhere

I'm currently trying to partition and then format a disk image using parted, by first mounting a blank disk image onto a loop, creating the appropriate partitions, and then formatting these partitions ...
user avatar
0 votes
2 answers
97 views

How to replicate bios_grub partition?

I have a 60GB AWS volume which I want to shrink to 30GB. The plan is to manually recreate the same partition table (with the only difference being the main partition size), and then use partclone to ...
user avatar
1 vote
1 answer
29 views

Is there a way to protect a disk from being formatted by parted?

It happens that here in my company we have our mail servers and everytime we need to upgrade disk space, we add a new disk in our VM and add it to the LVM, format it with parted and add the partition ...
user avatar
3 votes
2 answers
77 views

extend logical volume using parted via script

I would to extend my logical volume via script. Before i had vm with 10 GB hdd, i incerease hdd 5 GB more, then its toatal 15 GB. What manually i run command to extend hard disk as follows: sudo ...
user avatar
  • 31
0 votes
2 answers
85 views

how to backup an SD card (containig OS) that is *not* properly seen by other computers, except it works fine to boot the OS(!)

I have this RaspberryPi booting from a 32 Gb sdcard. I took it off the RPi to make a back up but the card shows as a 32 Mb single partition everywhere I plug it. On my other Raspberry it is listed as ...
user avatar
  • 237
0 votes
2 answers
369 views

parted: create swap partition on gpt disk (one liner) not working

I am trying to create a swap partition in my script using parted based on the Arch Linux guidance. https://wiki.archlinux.org/title/Parted#Partition_schemes Somehow it is always sort of skipping the ...
user avatar
1 vote
1 answer
42 views

Move and shrink a partition at the same time

It is possible to shrink a partition with, for example, parted. It is also possible to move (copy) a partition from one hard drive to another, by creating a partition of the same size on the target ...
user avatar
  • 26
-1 votes
1 answer
22 views

Disk partitioning and resizing

I installed Kali along side windows 10 but I just realized that I allocated too much space for Kali while I am running out of space in windows is there any way I can reallocate some of Kali space for ...
user avatar
2 votes
1 answer
85 views

How can I fix LVM PV size after a botched encrypted partition shrinking

I apparently messed up today. I have to resize an encrypted root partition to make room for a windows dual boot. I followed instructions from the arch wiki since it seemed to match my needs even ...
user avatar
  • 397
0 votes
1 answer
39 views

Why does drive image show different start partition free size?

I made an image of /dev/sdc. The free space before the first partition isn't reporting the same byte sizes, but why? The start position is reported as 1024B on the drive and 16384B on the image? # ...
user avatar
  • 1,736
-1 votes
1 answer
124 views

rhel + how to increase sdb1 after increasing sdb disk

on our rhel 7.2 VM server we increased the sdb disk ( not LVM ) from 200 to 220G , as the following ( sdb is with xfs fs ) sdb 8:16 0 200G 0 disk └─sdb1 8:17 0 200G ...
user avatar
  • 10.9k
1 vote
1 answer
1k views

how do I shrink a partition, right after shrinking its filesystem with resize2fs?

This is what've done to shrink /home partition filesystem: e2fsck /dev/sda1 resize2fs /dev/sda1 150G As of now, if I run df it is going to show me that the partition has shrunk from 210G to 150G (...
user avatar
0 votes
1 answer
249 views

Can you delete a partition and the filesystem on it with parted?

I created a partition with parted and then removed it using parted /dev/<partition> rm partition number. After that I executed partprobe,udevadm settle and systmelctl daemon-reload. Then I used ...
user avatar
  • 125
0 votes
2 answers
292 views

External drive partition mounting but not found in parted

Here is my situation : I have an external hard drive of 320Gb. The drive is plugged using a disk docking, and mounts automatically when started. I can explore the directory tree, read and write in the ...
user avatar
  • 101
1 vote
0 answers
467 views

setting partition type in non-interactive parted command

I have a new disk in Linux (Centos): # fdisk -l /dev/sdb Disk /dev/sdb: 536 MB, 536870912 bytes, 1048576 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 ...
user avatar
  • 2,537
3 votes
1 answer
43 views

GPT disk looks different in external docking bay and internal swap bay

I have a hard disk that I use for backups via a USB 2.0 docking station. The disk has a GPT and one single ext4 partition. Everything is fine via the docking station, but if I attach the disk to an ...
user avatar
  • 133
0 votes
0 answers
47 views

broken pendrive. gui software is crashing. any ideas for commands ? it only seems for not lagging

yes. problem is : when i connect his pendrive PC automatically slow down after trying to change something in gparted, program immediately lags and i need to force close systems I'm using - ubuntu ...
user avatar
1 vote
0 answers
496 views

How to run parted mklabel in a script without user prompt?

I am trying to write a bashscript that will re-partition a drive using the parted utility. Since it is running in a script, I would like parted to not prompt the user for input (or alternatively, have ...
user avatar
  • 11
1 vote
0 answers
58 views

dd cloning process keeps the partition table but not the logical volumes and their names, why?

So I Am trying to clone a drive using dd via the following command #dd if=/dev/sda of=/dev/sdb bs=64k status=progress the command does what it is supposed to for the most part but the usb which was ...
user avatar
  • 63
0 votes
1 answer
488 views

Linux partition end is greater than the physical disk and partition size

I have two partitions on my hard drive. /dev/sdb1 for my entire system and /dev/sdb2 as a swap drive. I had a couple of system crashes and thought that I might need to increase the size of my swap ...
user avatar
  • 3
-1 votes
1 answer
110 views

Volume show different sizes in CentOS 7

I hope you and your dears are very well. I'm facing a issue which I cannot understand the root cause. I have a VM with CentOS 7 64 bits. This VM has the following partitions: Filesystem Size ...
user avatar
1 vote
1 answer
104 views

Inconsistent filesystem type reported after disabling journalling

In trying to understand why kworker flush uses 99% I/O and hangs file write on machine, I've disabled journalling on the ext4 data partitions using: tune2fs -O ^has_journal /dev/sdg1 After a reboot, ...
user avatar
  • 377
1 vote
0 answers
728 views

How to shrink an encrypted BTRFS partition?

I have an external USB HDD (WD Elements). The entire drive is currently one large partition. Call it /dev/sda1. This partition was encrypted like this: cryptsetup -v --type luks --cipher aes-xts-...
user avatar
  • 15.4k
1 vote
0 answers
48 views

What is the correct start offset for logical partitions? [duplicate]

Recently I've start to implement some script to run using Linux "parted" to change the partition structure on our SoC system. When doing that I've encounter with some problems, The ...
user avatar
  • 13
1 vote
0 answers
36 views

Parted: Partition 1 (/dev/sdb1) not accessible after partition resize using parted

I used parted tool to shrink the main volume so that I can create a new partition on the HDD (capacity 2TB). I read articles and tried multiple options, like, GParted. But that didn't help. I was a ...
user avatar
  • 111
0 votes
0 answers
47 views

Trying to create partition on hard drive

I am trying to create a partition on a physical hard drive. Here is the output I gent when I use print (parted) print Error: /dev/sdd: ...
user avatar
  • 123
0 votes
1 answer
155 views

arch create EFI partition -- invalid token EFI System Partition

I'm following instructions given here for creation of EFI partition: https://wiki.archlinux.org/index.php/Parted But my installation is not behaving according to the description (parted) print Model:...
user avatar
1 vote
1 answer
88 views

Are parted's end positions inclusive or exclusive

When creating partitions with parted, and when printing them back out, I was curious if the value for 'end' is inclusive or exclusive? Asked another way, is the second named in 'end' the last sector ...
user avatar
  • 905
2 votes
2 answers
601 views

Parted says not aligned, but should be correct

Model: ATA Samsung SSD 850 (scsi) Sector size (logical/physical): 512B/512B Partition Table: gpt Disk Flags: Number Start End Size File system Name Flags 1 ...
user avatar
  • 123
0 votes
1 answer
268 views

Do I need to use partpobe and mkfs or can parted format the partition as ext4 automatically?

I am trying to create a single partition using parted command in Linux with ext4 file system using below command non interactively parted /dev/sdc --script -- mkpart primary ext4 0% 100% Could ...
user avatar
1 vote
0 answers
40 views

Move Ubuntu install to new drive from safe mode

Currently my linux system will not boot because the partition it is on has no space left at all. I get an error when I was able to log in that said: " Warning unable to write to /tmp ". Now, ...
user avatar
1 vote
1 answer
1k views

How to shrink a file image, produced with dd?

I tried the process from this post resize partition on an image file. I didn't succeed in understanding why it goes wrong in my case. I produced a 8GB image using dd. The image contains two partitions....
user avatar
  • 173
2 votes
1 answer
248 views

fdisk dowsn't recognize SanDisk USB 3 Ultra Flair

I went through what I found about this subject in the most of the threads, unfortunately without success. I have the following situation. fdisk or parted doesn't recognize this sanDisk USB flash: ...
user avatar
  • 325
0 votes
1 answer
4k views

How to recover filesystem and physical size mismatch

I was trying to shrink my home partition. I followed this ArchWiki article for that. According to this I first resized my filesystem using resize2fs and then resized my physical device using parted. ...
user avatar
-1 votes
2 answers
115 views

lvm sizes don't add upto the partition size

If you see these are my two partitions 1 and 2 Now if we look at the partition level sda2 is total of 149.5G ie root, swap, home of 50, 3.8, 25.7G each but that still not adds upto total size of the ...
user avatar
0 votes
1 answer
428 views

Problem with resizing partition in ubuntu

I have enlarged my partition with GNU Parted but when checking with df -h and (parted) print I see that the sizes are different. How can I make df -h reflect the actual size of the partition? Thank ...
user avatar
0 votes
0 answers
172 views

Resize ext4 partition while minimizing potential mistakes via command line?

There are plenty of guides to resize a partition or even this question - How to to resize an ext4 partition from the command line?, however I'd like to know how to do safely this using a command line ...
user avatar
0 votes
1 answer
226 views

Extend first partition to available space after third partition

I have 3 partitions (linux, extended, swap) I need to extend my live partition (linux) to the space available after these partition. More info: #fdisk /dev/vda Welcome to fdisk (util-linux 2.29.2). ...
user avatar
0 votes
0 answers
37 views

add additional msdos based partition using maximal amount of space

Stumbled about a problem with gpt: [root@someserver ~]# parted /dev/sdb GNU Parted 2.1 Using /dev/sdb Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) print Model: VMware ...
user avatar
0 votes
1 answer
81 views

How can I resize root partition without using VFS or RAID

I had one SSD disk(500GB) in my desktop. I used dual booting system(Arch Linux, Windows) and Windows used 100GB of the disk. Today I added new SSD disk to my desktop so I moved windows to new disk. ...
user avatar
  • 1
1 vote
1 answer
648 views

Why am I getting different outputs from parted and fdisk?

note: I am a Linux beginner, and trying to learn from the following book: How Linux Works Running parted -l I get: Model: KBG30ZMV256G TOSHIBA (nvme) Disk /dev/nvme0n1: 256GB Sector size (logical/...
user avatar
  • 113
0 votes
1 answer
274 views

Cannot create partition on hard drive

I'm on PopOS 19.10, and I try to create a partition on my new SSD (Crucial MX500, 1TB). Note that it worked on Windows, I could create a NTFS partition, so from this base I admit my SSD is healthy (...
user avatar
3 votes
1 answer
4k views

How to change the device label of a USB stick? [duplicate]

I have done some research on this and found this question many times. However, all the answers I have found only address how to change a partition label. I am talking about what is reported by lsblk -...
user avatar
  • 345
0 votes
0 answers
2k views

LINUX "No valid partition table was found on this device." + "Error: Can't have a partition outside the disk!" + fdisk reads "7.3T" Size; How to fix?

Distro: Netrunner Blackbird (Debian) I/O: Sata to USB cable KDE Parition Editor: "No valid partition table was found on this device." me@computer:~$ sudo parted -l Model: ATA LITEONIT LCT-128 (scsi) ...
user avatar
0 votes
2 answers
3k views

How to increase the size of extended partition with free unallocated disk space to the right of it using fdisk/parted utilities?

# parted /dev/vda print free Model: Virtio Block Device (virtblk) Disk /dev/vda: 137GB Sector size (logical/physical): 512B/512B Partition Table: msdos Number Start End Size Type File ...
user avatar
  • 123
4 votes
1 answer
1k views

Arch ISO not recognizing SSD, does see HDD

I'm installing Arch Linux and when I was about to partition my drives, I noticed something odd. In my laptop, I have two disks: a 1TB HDD and a 512 GB SSD. I would prefer to use the SSD as my boot ...
user avatar
2 votes
2 answers
2k views

What fs-type should I use in parted when creating an exFAT partition?

When I try to create a partition with parted and a filesystem type of 'exFAT', I encounter the following error: parted: invalid token: exFAT What fs-type should I use when creating a partition ...
user avatar
  • 223
8 votes
2 answers
6k views

Why does parted need a filesystem type when creating a partition, and how does its action differ from a utility like mkfs.ext4?

I am partitioning a disk with the intent to have an ext4 filesystem on the partition. I am following a tutorial, which indicates that there are two separate steps where the ext4 filesystem needs to ...
user avatar
  • 223

1
2 3 4 5