Questions tagged [parted]

38 questions
13
votes
2 answers

How to force partition to value out of range

I have an ubuntu desktop system (VM guest), whose partitions were created by the install media. I wanted to expand the disk, so I shutdown the guest, and increased the disk size of the guest in the host. Now I need to expand the partitions in the…
8
votes
1 answer

Why does GNU parted write data to the first 440 bytes of the MBR?

My understanding is that an MBR is 512 bytes. The first 440 bytes (give or take a few bytes, depending on the implementation) contain the boot loader/bootstrap code area. The remaining bytes contain information about the partition table. If I zero…
4
votes
1 answer

How to learn what `gparted`, `partitionmanager`... libcalls or `fdisk`, `parted`... commands are wrapping?

Querying partitionmananger --help does not document any verbose mode. Even gparted --help is not implemented. I wish I could use any --verbose mode without more esoteric thingy like using ltrace, because unless checking their sources one can not…
174140
  • 134
4
votes
2 answers

How do I shrink the partition of an img file made from dd?

I've copied the USB drive to an .img file using dd: dd if=/dev/sdc of=myimage.img I want to reduce the size of the partition in the image. I've tried several methods and always end up with a loopback-mounted image whose partition is still the full…
MrMas
  • 212
3
votes
2 answers

Bash scripting parted for GPT

Using Bash & Python scripts in Ubuntu 12.04, we are delivering a disk image to customers as a file (generated by dd). Once dd’d to the new disk, we resize the partition to fit the disk. Now that we are using GPT disks, I need to provide a new…
2
votes
0 answers

Can not mount copy of image file (ddrescue): "can't have a partition outside the disk"

I'm struggling for days now moving my old Windows XP installation to a new hard disk, because the old disk is failing. Long story short: I successfully created an image of the entire (failing) disk and was able to mount it in Linux. I now want to…
2
votes
0 answers

Resize LUKS Partition

I have a 68 GB logical LUKS partition at the very end of a drive, and to the left of that I have 60 GB of free unallocated space. Both of these partitions together make up an extended partition. I spent a lot of time freeing this unallocated space,…
Braden
  • 21
2
votes
2 answers

Can't create a partition table on micro SD card

I'm trying to reformat a micro SD card that was previously in a raspberry pi (and had stopped working). However, when I plug it into my main computer (arch) and try to partition it, I can't because gparted says it has no partition table. When I try…
ZuluDeltaNiner
  • 453
  • 1
  • 5
  • 8
2
votes
1 answer

Ext4 fs corrupted after shrunken by parted

I was trying to make room for an Arch Linux installation and I ran parted and shrunk my main Ubuntu partition. I made a new one in the new space but after I rebooted it put me in a grub prompt. I found out how to manually boot but it dropped me to…
2
votes
2 answers

What flash drive geometry depends on? Can I change it on my preference?

I have an USB flash drive. Here is its initial info generated by fdisk (Linux): # fdisk -l /dev/sdc Disk /dev/sdc: 8053 MB, 8053063680 bytes 16 heads, 60 sectors/track, 16384 cylinders, total 15728640 sectors Units = sectors of 1 * 512 = 512…
Carter
  • 215
1
vote
1 answer

Expanding disk partition on root drive with LVM

It's been a long time since I've done this and I've probably done it in the most complex way. I upgraded my OS drive to a larger drive (old one 60GB, new one 250GB) running Ubuntu 14.04 and used ddrescue to create an image of the old disk and then…
diecast
  • 21
1
vote
2 answers

Remove GPT filesystem on USB

I have an old 8GB USB stick with a GPT filesystem hanging around. I'd like to move it to a more familiar fs, as NTFS or FAT32, but the usual mkfs doesn't seem to work since there is no /dev/sdb1 (as there are no partitions). I've found on Google…
cronos2
  • 113
1
vote
1 answer

How to modify the starting boundary of an ext4 partition?

There are 4 partitions on the disk. parted /dev/sda --script -- print ... 1 1049KB 50.0GB ... ext4 2 50GB 82GB ... linux-swap 3 82GB 100GB ... ext4 4 100GB 1000GB ... ext4 My goal is to modify the starting position of 4, then expand 3, at…
1
vote
3 answers

How to partition a Free Space using parted

During the installation of my ubuntu server, I had to leave a big space of my hard drive for specific service. Well, I forgot to to partition it up and leave it mounted during installation. Right Now, I realized I won't be able to use it without…
mehdix_
  • 301
  • 1
  • 3
  • 9
1
vote
0 answers

USB stick damaged during a blackout

I was copying some files to a USB stick, the process would have taken 1 hour or so but a few minutes later after the process started I had a blackout, and when the power got restored I could not mount the main partition of the USB stick The…
1
2 3