Questions tagged [fdisk]
fdisk (for "fixed disk") is a command-line utility that provides disk partitioning functions.
506 questions
12
votes
1
answer
879
views
Why does mkfs.ntfs count one Byte less?
Apparently, ntfs.mkfs counts one byte less when checking if the block device is large enough; or I have made some kind of mistake.
After creating a partition of 2048 512-byte sectors (exactly 1MiB ...
3
votes
2
answers
198
views
What should I backup before using parted or fdisk to resize a partition?
Let's say I have disk sda with format MBR and I have N partitions and I want to resize partition K (allocate more space on partition K)
I will use a USB device and use a Linux installation medium so ...
6
votes
1
answer
309
views
How to create partitions on a volume with the root filesystem mounted on the enitre disk
I have a server with the root filesystem / mounted on /dev/sda, i.e., the entire disk, which has no partitions. This situation makes me uncomfortable, and I would like to partition the disk and put ...
4
votes
3
answers
621
views
Can’t see partition device after creating GPT partition on 6TB disk
I have a 6TB disk in Debian Linux 12, let's say the disk is /dev/sdd. It's just for data; no parts of the OS are on it.
Now I’m trying to use it as a normal disk with the full space in a single ...
3
votes
1
answer
212
views
How to extend a logical volume mounted on /home directory?
I was given a CentOS 9 Linux distribution server inside a virtual machine to whom I can connect using ssh protocol (from command line). I am running svn checkout command in order to clone a remote ...
2
votes
0
answers
85
views
Partitioning or duplicating corrupted SSD
My SSD died and all its data seems to be inaccessible and my Windows computer won't boot anymore.
After going to a local computer store I was told that they could fix it by wiping all the data. I can ...
0
votes
0
answers
46
views
Need help for a manual calculation of MBR after /bin/dd of Virtualbox flat hard disk image to actual HDD on 32-bit P4 laptop (2003)
I have an old laptop which I am trying to install OpenStep 4.2 with Patch 3 pack (Which supports over 8GB and has a VESA driver) on to a 2003 laptop which is a 32-bit pentium 4 with 512MB RAM and a ...
0
votes
1
answer
222
views
Extending Logical Volume Size Beyond 2TB in CentOS 7
I need to extend the size of the logical volumes in a CentOS 7 system and noticed that the current partition table cannot handle the updated disk size, which is around 5TB:
Disk /dev/sda: 5497.6 GB, ...
11
votes
2
answers
3k
views
Why does fdisk create a 512B partition when I enter +256K?
I am trying to create a partition of 256KB on my flash device. I begin by entering the default values for the partition number (1) and first sector (2048). However, when I enter "+256K" for ...
0
votes
1
answer
328
views
Resize partition that is mounted on root or "/"
Not too sure whether this has been done before.
I am trying to resize a partition /dev/sda3 on a single disk /dev/sda.
When I tried to use "resize2fs /dev/sda3 10G" directly, the console ...
0
votes
1
answer
163
views
Problems partitioning HDD for windows 11 dualboot
I'm trying to set up a dualboot of windows 11 (currently installed) and archlinux. I've done this before on a machine running windows 10 and I had no problems, however with this machine I run into ...
0
votes
1
answer
346
views
fdisk: /dev/sd1c is not a character device
I hope this message finds you well. I am writing to you because I am attempting to format and partition a drive in OpenBSD but have been met with the following message:
virtual-server# fdisk /dev/sd1c ...
0
votes
1
answer
57
views
Why does FDisk's Editor Close when Running the Command 'a'?
I hope this message finds you well.
I am writing because I ran the following in my OpenBSD device
and am uncertain why it stops running:
virtual-server# fdisk -e sd1
Enter 'help' for information
sd1:...
0
votes
1
answer
66
views
how to provide the device name that related to LVM2_member
LVM2_member could be different according to device partition number
example
lsblk -f | grep LVM2_member | awk '{print $1}'
└─sda3
or on other redhat machine
lsblk -f | grep LVM2_member | ...
0
votes
1
answer
462
views
Resize Disk Image with Protective MBR and GPT table
I've got a disk image that I need shortened slightly (long story - but it deals with variances in flash drive sizes). The partitions are already short enough, but the drive size is not.
Basically, I ...
2
votes
1
answer
130
views
fstab, mountpoint - what did I miss?
I can't figure out what I'm missing or done wrong.
lsblk dose not show the mount points(?)
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 1.8T 0 disk
└─sda1 8:1 ...
0
votes
0
answers
111
views
RHEL 7.2 + is it possible to resize partition sda2 when parted not support resizepart
we have old RHEL machines with version 7.2 ( RHEL 7.2 )
this machines has old parted version that not support resizepart
so for example we can't use this syntax in order to resize sda partiton
parted /...
0
votes
1
answer
491
views
Subpartition inside partiton not showed in lsblk or /dev/
I installed archlinux inside my /dev/sdb4 and used the guided partition scheme. After install i can't mount /dev/sdb4 (ext4). The error was VFS: Can't find ext4 filesystem.
lsblk shows me:
sdb 8:...
0
votes
0
answers
94
views
I have multiple Home folders over several hard drives. I need to understand what I did wrong?
I am running ParrotOS on an old MacPro. I have 3 SSD's and 1 HDD. I was trying to move my Home folder to the HDD. Doesn't that seem like the right thing to do?
When I run fdisk -l I only see three of ...
0
votes
0
answers
339
views
unable to access usb in debian 12 through Home folder
when I plug the usb in and try this code :
sudo fdisk -l
I see my USB device in results but can't open it through HomeFolder,
I see nothing.
How to fix it in Debian 12 ? (thanks for help)
6
votes
2
answers
813
views
How can I list partitions in storage order?
After telling general information (capacity, sector size and the like) fdisk shows 8 columns: sdXY, Boot, begin, end, # of sectors, size, flags, type.
The partitions get sorted by Y in their sdXY ...
1
vote
2
answers
249
views
fdisk -l on an usb drive gives a very weird response
Today I nuked an old usb3 flash 8GB drive on a linux machine with:
dd if=/dev/random of=/dev/sdb
then I put it into a windows pc, it asked me to format it, I did an extended format with default ...
0
votes
0
answers
371
views
Mounting an old JBOD array with two disks DOS formatted
I have a couple of 500GB disks with data inside that I would like to get back. The two disks were mounted inside a Lacie disk, part of a JBOD array and formatted FAT32.
I don't have the external disk ...
0
votes
1
answer
344
views
Scripting fdisk with filesystem signature issues
I'm trying to automatize fdisk with my Bash scripts. In my script, I have the following code block:
echo "Creating root filesystem partition..."
(
echo n
echo 3
echo
echo
...
1
vote
1
answer
147
views
fdisk partition type shown as empy when type is an UUID
I have two systems with same versions (Debian 11.7, util-linux 2.36.1-8+deb11u1).
Why one system shows partition types as UUIDS and the second doesn't and also doesn't recognize that types showing &...
0
votes
1
answer
873
views
Linux Issue : Mount point automatically changes from primary to secondary or secondary to primary on reboot in linux, debian 11/12
I am using debian linux , and in this operating system , I am using 2 disk
1 -> Primary disk (/dev/sda1)
2 -> Secondary disk (/dev/sdb1)
First disk is mounted on "/" and the 2nd disk ...
0
votes
1
answer
2k
views
How to format RAID hard drive
I need to format(empty hdd) a RAID 0 HDD which is as follow:
sdb 8:16 0 3.7T 0 disk
└─md126 9:126 0 3.7T 0 raid0
└─md126p3 259:2 0 3.7T 0 part
├─rootvg01-swap 253:0 0 4G 0 lvm
├─rootvg01-...
0
votes
1
answer
89
views
Unable to mount Full "md3" System Partition on CentOS Server, preventing Boot
I'm facing an issue with my server running CentOS. The system partition "md3" (raid1) is full due to a backup script error that failed to delete old data. As a result, my CentOS system has ...
0
votes
2
answers
1k
views
fdisk shows partitions type Linux and dos on the same partitions
I have created a partition on my disk like this:
root@vps-90446fc7:~# fdisk /dev/sdb
Welcome to fdisk (util-linux 2.37.2).
Changes will remain in memory only, until you decide to write them.
Be ...
2
votes
2
answers
1k
views
Are UUIDs and PTUUIDs important for MBR disks? If so, how do I create them on my own?
I'm studying partitioning under Linux, starting with sfdisk. If I copy a partition table from one drive to another, it'll copy the device UUID and the PTUUIDs for each partition, but if I'm creating a ...
0
votes
1
answer
164
views
Cancelled ext4 shrink and now I can't seem to format the drive? parted, fdisk etc won't run with the drive
I was shrinking an ext4 partition, however it was taking too long so I thought I'd just start from scratch (making a new partition and wiping the data). However after I cancelled the resize (which was ...
0
votes
0
answers
133
views
Problems after migrating drives to HBA-connected disk shelf
I had 4 drives (2x3TB, 1x4TB, 1x18TB) in USB SATA docks connected to my proliant server. I finally got my HBA to recognize my IBM disk array, and managed to get the drives recognized in Ubuntu server ...
0
votes
1
answer
86
views
Regain full disk space after copying a small image file to a large USB device
I'm copying an image file (size: 2GB) to an USB disk on /dev/sda (size: 2TB) using dd:
sudo dd if=2023-05-03-raspios-bullseye-arm64-lite.img of=/dev/sda bs=4M status=progress conv=fdatasync
After dd, ...
-1
votes
1
answer
367
views
USB disk partitions disappeared, cannot mount
The USB partitions were deleted, only sdb remained. sdb1 does not exist. How do I partition the USB again? Now it shows up in the lsblk output, but I can't mount it.
[xx@x ~]$ lsblk
NAME MAJ:MIN RM ...
1
vote
1
answer
1k
views
resize partition overlapping parted
parted -s -a opt /dev/sda "print free"
Modèle: VMware Virtual disk (scsi)
Disque /dev/sda : 268GB
Taille des secteurs (logiques/physiques): 512B/512B
Table de partitions : gpt
Disk Flags:
...
0
votes
0
answers
232
views
No free sectors available shown by fdisk in centos 7 minimal
This is the output of fdisk /dev/sdb
[root@localhost ~]# fdisk /dev/sdb
Welcome to fdisk (util-linux 2.23.2).
Changes will remain in memory only, until you decide to write them.
Be careful before ...
4
votes
2
answers
1k
views
Recovering accidentally deleted partition on a solid-state drive using "fdisk"
As far as I know, a solid-state drive (SSD) stores data in different locations that the operating system cannot control. If I accidentally delete a partition, and then enter the exact start and end ...
0
votes
0
answers
609
views
New USB stick freezes processes that come in contact with it (dd, fdisk, gparted, etc)
I bought a new USB stick to upgrade my os (debian) on my laptop. I used gnome-multi-writer to write the .iso file into the device. The writing process never showed a message of success or error so I ...
2
votes
0
answers
328
views
Recover data from deleted (still intact) raid 5
So through a shell script gone sideways I accidentally deleted my mdadm raid5 (3 HDDs) and the partitions from the disks (so disks still connected according to lsblk as {sdb|sdc|sdd}).
I have not ...
2
votes
1
answer
883
views
Why does free space differ when shown by fdisk and df?
Basically title. I'm running MX Linux from a 32GB live USB. When I run fdisk -l, I see the following:
[...]
Disk /dev/sda: 29.88 GiB, 32080200192 bytes, 62656641 sectors
Disk model: Flash Drive
...
1
vote
1
answer
3k
views
fdisk command is not listing the required commands like 'a'
I am new to the Linux environment and using the Pop!_OS Distro.
I was using fdisk to create partitions on an SD card,
sudo fdisk /dev/sda
But when I pressed 'a' to set the bootable flag on the 1st ...
0
votes
1
answer
1k
views
Move disk space from /dev/sda3 to /dev/sda4
This is my current setup:
Disk /dev/sda: 546.8 GiB, 587127480320 bytes, 1146733360 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/...
0
votes
1
answer
1k
views
Increasing Volume Group Size without new Disk
On my server (RHEL8) running on vCenter, I have a Volume Group that consists of 1 Disk.
I want to increase the Volume Group size without adding a secondary virtual Disk in vCenter.
Old Disk size: 50 ...
1
vote
0
answers
241
views
Disk Usage Analyzer Shows 100% After Expanding VMWare Hard Disk
I expanded my Hard Disk on my VMWare for this machine to 80GB, installed GParted and expanded the partition.
But Disk Analyzer is still showing 100% usage.
When I run fdisk -l the output is:
Disk /...
0
votes
2
answers
82
views
Re-allocate space on Centos7 RAID-1 volume from one mount to another
We have a set of Centos7 machines that were configured with 100GB /tmp and 400GB /scratch partitions. The tools we're using are consuming more /tmp space than anticipated so we need to re-allocate ...
0
votes
1
answer
156
views
fdisk vs. vgdisplay - increase size of VG
After getting error messages that I was running out of disk space, I looked at the disks and found that the output from fdisk (127.101 GiB) did not coincide with the output from vgdisplay (57.43 GiB).
...
0
votes
1
answer
1k
views
How to mount a sparsed disk image
I have an image of the mSATA SSD disk of a PC. The disk contains the operating system and has a capacity of 512GB.
I do not have that free storage, so I have cloned the disk into an image with dd ...
1
vote
1
answer
4k
views
Increase size of a volume group
I have a 16GB msata but my rootfs is only 4GB. I need to increase the size of a volume group /dev/mapper/vg-var/ for my embedded system to full capacity.
$ lsblk
NAME MAJ:MIN RM SIZE RO ...
0
votes
1
answer
43
views
revert logical partitions to original disk
I have a disk that somehow split into what appear to be logical partitions, but I am unsure. How to revert to the original disk?
Here is the list of drives shown by fdisk -l:
/dev/mmcblk0
/dev/...
1
vote
1
answer
533
views
Use free space to make a new filesystem
How would I go about using 50G of the free space from vg_root to make a new filesystem and then use that for /home
nifle@rhel8box3 ~
$ sudo lsblk
[sudo] password for nifle:
NAME MAJ:MIN ...