Questions tagged [disk-partitioning]

related to disk partitions and their attributes, creation and maintenance.

disk partitioning covers questions relating to disk partitions and their attributes, creation and maintenance.

Wikipedia - Disk Partitioning

153 questions
5
votes
1 answer

Python: check if two Linux paths are on same physical disk

For now I use os.stat(path).st_dev to get the device id. But the id seems to be different for logical disks on same same physical drive. So it doesn't actually works for me. Is there a better or direct solution to it.
Barun Sharma
  • 1,452
  • 2
  • 15
  • 20
4
votes
1 answer

Android emulator version 16.0 persistant /system/ storage?

In the past, I was able to create an AVD with persistant /system/ storage by copying the system.img file from the base directory (ex: $ANDROID_HOME/platforms/android-10/images/system.img) into the AVD directory (ex: ~/.android/avd/wuntee.avd/) then…
wuntee
  • 12,170
  • 26
  • 77
  • 106
4
votes
2 answers

List All Partitions On Disk

I'm making a utility in C# for a filesystem that isn't supported by windows, which means that I can't just access the drive. I need a way to list all partitions on the hard disk and writing/formatting them.
CommunistPancake
  • 597
  • 2
  • 10
  • 22
4
votes
2 answers

How to use python to write to an ISO?

If I wanted to insert a bytes like object bazstr = b'bazzzzzz\n' Into an iso how would I go about doing that in python? f=open("/Users/root/Downloads/archlinux-2019.08.01-x86_64.iso",'w+') f.buffer.raw.read() This used up too much memory and…
Michael Hearn
  • 557
  • 6
  • 18
4
votes
1 answer

How to read the GUID Partition Table (GPT) and its entries?

To read the MBR partition table we use an offset of 0x1be, similarly what is the offset for reading the GP(artition)T(able) entries (ie, number of partitions and their sizes). I am writing a C program using "gdisk" to create the partitions, I need…
4
votes
2 answers

How to access hidden partitions/volumes

I have to write a code to access hidden disk partitions/volumes using c# or c++. But could not find any help reference on the matter. As a hidden volume, it does not contain a "Disk Letter", so you can´t just type "C:\" and access it. A example…
Alan Araya
  • 701
  • 1
  • 12
  • 27
4
votes
2 answers

Way to know if two partitions are in one physical hard disk without WMI?

I have those partitions (in Windows) for example: Hard Disk 1 - Partition C, Partition D Hard Disk 2 - Partition E Is there any way in a program language to know if for example partition C and partition D are in one physical hard disk without…
Alon Gubkin
  • 56,458
  • 54
  • 195
  • 288
4
votes
9 answers

How to get a bigger boot disk on Google Compute Engine

Default images have 10GB, but I need more (30GB approx). If I create a disk of 30GB using one of that default images, the usable space it's 10GB, not 30GB. I know I can install the distro using tools like debootstrap, but that seems unnecessarily…
user1193085
  • 207
  • 3
  • 4
  • 7
3
votes
1 answer

Geting list of all partitons and their names on startup volume

Using Cocoa, how can I get list of all partitions with their mounted paths and volume names on startup disk? Thanks.
uniquepito
  • 833
  • 2
  • 9
  • 17
3
votes
3 answers

How to copy a single file to a different partition in Linux, using C

rename (), link() don't work Thanks!
JJ Liu
  • 1,351
  • 8
  • 20
  • 36
3
votes
0 answers

How to prevent windows from accessing and detecting new volumes while writing a raw image file to PhysicalDrive?

After lots and lots of try and error I am now able to flash/write a raw image file (containing multiple partitions) to \\.\PhysicalDriveN (SD-Card in my case) by just using Windows Api calls (see below). But as soon as I have some explorer windows…
maf-soft
  • 2,335
  • 3
  • 26
  • 49
3
votes
2 answers

How to increase root disk partition using ContainerOs within Google Cloud?

After resizing the disk, root partition did not take more space that is available. When running fdisk -l on remote VM result is : The backup GPT table is not on the end of the device. This problem will be corrected by write. Disk /dev/sda: 64…
3
votes
2 answers

C# and diskpart: how to select by disk label and not by a number?

I have a C# application that install Windows image. I have to choose the disk where the system will copied (C: or D: or ...) on the user interface. For that, it's ok. Then i have to format the disk. I have to select with diskpart.exe the good…
simsim
  • 49
  • 1
  • 7
3
votes
1 answer

Programmatically Create Bootable NTFS/FAT Partition Windows XP to Windows 7

I am trying to create a bootable partition in Windows. I need to be able to do this from Windows XP through Windows 7. Ideally I would be able to do it both for FAT32 and NTFS depending on if the device is smaller than 32 GB (FAT32) or larger…
Ben
  • 127
  • 11
3
votes
1 answer

diskpart select by disk label

I need to select a disk in WinPE using DISKPART by label. I found this but I think it's outdated: @Echo %dbg%Off :: :: Find External drive and set it active :: Lists Disk Information using Diskpart :: SetLocal EnableDelayedExpansion :: Type the frst…
1
2
3
10 11