Questions tagged [fdisk]
fdisk (for "fixed disk") is a command-line utility that provides disk partitioning functions.
482
questions
0
votes
1
answer
21
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
46
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
98
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
42
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
34
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
32
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
100
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
130
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
49
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
489
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
106
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
66
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 ...
1
vote
1
answer
142
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
...
0
votes
1
answer
530
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
515
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
0
answers
156
views
No bootable devices found for Fedora
As a word of caution: I am inexperienced and moved some partitions around when attempting to dual boot windows from Fedora, I didn't take note of what I was doing and so only have my current ...
0
votes
1
answer
120
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 ...
0
votes
0
answers
96
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
41
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
47
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
226
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 ...
0
votes
1
answer
364
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
0
answers
241
views
Can you safely delete MMC Boot Partitions?
From what I understand MMC Boot Partitions are present on the hard drive and can be deleted as normal partitions. Is this correct? If so, how do I do it?
Here is the list of drives shown by fdisk -l:
/...
0
votes
1
answer
26
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
85
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 ...
1
vote
0
answers
113
views
Problems after creating mdadm RAID-1: disk identifier 0x00000000 and same serial number on both disks
I need your help with a problem that I’ve been trying to solve for days now.
I recently purchased a Western Digital (WD) My Book Duo, and after setting it to make it work as two independent disks I ...
5
votes
1
answer
520
views
fdisk reports partitions are misaligned even when they don't appear to be
I have a new 4 TB Western Digital SN850X NVMe SSD drive that I am trying to partition as a boot drive for Ubuntu 20.04. No matter what I do, fdisk reports that the partitions are misaligned, even ...
0
votes
0
answers
577
views
SD card shows up in dmesg, lsusb, and lswh, but not in lsblk or fdisk
Recently, my Android device has been unable to detect my SD card so I connected it to my PC (running Kubuntu) to figure out what's wrong. These are the results:
dmesg correctly detects the card reader ...
0
votes
1
answer
1k
views
keep getting bad usage while trying to perform a partitioning and Formatting a Disk Drive in Linux
Disklabel type: gpt
Disk identifier: 6C5A63BF-EF32-9244-8273-250775DB79D6
Device Start End Sectors Size Type
/dev/sdb1 8704000 18874476 10170477 4.9G Linux filesystem
/dev/sdb2 20480 ...
0
votes
2
answers
326
views
How do I find out what is the hard disk for OS in Linux
in our bash scripts , we have many places in the code that need to capture only the disk that related to OS ( operation linux/RHEL system )
we are using Linux versions as 7.2/7.5/7.6/7.9 , and on most ...
0
votes
1
answer
405
views
Looking for a way to correct Hard Drive geometry. # of cylinders is not correct
I have 2 hard drives that have become corrupted as in the # of cylinders is no longer correct. Not sure how this is happening, but have same hard drive model that I have verified the correct # of ...
1
vote
1
answer
656
views
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 ...
1
vote
1
answer
71
views
Trouble understanding file partitions
I am trying to run fdisk on /dev/sda and create a new partition on /dev/sda3. I am not understanding what to do if no free sectors are available. I looked online and found different solutions and I am ...
0
votes
1
answer
146
views
How to boot from new partition after do dd
I have 10 partition. My root (/) partition located on /dev/sda9 and my home (/home) partition located on /dev/sda2.
I want to move my root partition (/dev/sda9) to /dev/sda5. So I copy my root ...
0
votes
1
answer
127
views
Reclaim space on volume for bootable partition
I have a volume on Centos 8 that has 10G to spare:
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
nvme1n1 259:0 0 80G 0 disk
└─nvme1n1p1 259:1 0 80G 0 part /db
nvme0n1 259:2 ...
0
votes
1
answer
793
views
Debian - Create new partition with fdisk and set size ( Last sector )
please could someone help me with my problem of create new disk partition in Debian ?
I'am using Proxmox where I have created a few virtual machines.
On one of virtual machines where have installed ...
0
votes
1
answer
565
views
How do I utilize entire OpenWRT SD Card for the installation?
I am trying to increase the size of my openwrt installation to take advantage of the entire SD card for more packages, but I am unsure where to start. I have tried following some other online guides ...
1
vote
1
answer
290
views
Help with (corrupted?) flash drive
When I plugged in my “old” flash drive to my Windows desktop, it seemed that Windows 10 was unable to read the data on that USB stick. I checked W10's disk management and the drive's filesystem is “...
5
votes
3
answers
3k
views
Cannot format a MicroSD card
I have a SanDisk Ultra Plus 64gb MicroSd XC Card that I used to run ubuntu server on a raspbery PI.
Now I have to format this card but I can not succes. I've tried many things including:
Formating ...
0
votes
1
answer
379
views
Moving space from swap to /
I have a 4GB sd card but what i'd like to be able to do is have more free space on the / partition I don't actually need a swap partition either so how would i resize/move partitions for example using ...
2
votes
1
answer
1k
views
fdisk or sfdisk + how to show the disks size in GIB and not in GB
we can print all disks by the following ( on our RHEL machine )
fdisk -lu | grep "Disk /dev"
Disk /dev/sda: 247.0 GB, 246960619520 bytes, 482344960 sectors
Disk /dev/sdb: 4294 MB, 4294967296 ...
2
votes
0
answers
184
views
How to find deleted partition
I have some partition table with three partitions. I deleted the third partition with fdisk and next I created new partition on the same place with the same "first and last sectors". How can ...
1
vote
1
answer
615
views
Backup created with rsync takes up more space on external drive than on source
I am using rsync to make a backup of Ubuntu running on a Raspberry Pi. I exclude all the usual directories whose contents are only created after boot up anyway.
The rsync writes to a backup image that ...
1
vote
3
answers
1k
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 ...
7
votes
2
answers
2k
views
How do I tell which partition I booted from?
Is there a way to know which partition you actually booted from?
fdisk -l reveals a "Boot" column that I definitely don't have on my NVME. Is this just legacy information?
Device Boot ...
2
votes
1
answer
951
views
USB Drive sometimes changes the Drive name
I have two USB Drives, I created partitions, and formatted it to ext4.
Running fdisk -l shows that I have /dev/sda1 and /dev/sdb1
Device Boot Start End Sectors Size Id Type
/dev/sda1
/dev/...
1
vote
0
answers
30
views
Size discrepancy between df -h output and lsblk output [duplicate]
When I run df -h and lsblk, on my Ubuntu 20.04.3 LTS Oracle Cloud instance, there is a discrepancy between sizes of my /dev/sda1 mount. I am not sure if this has to do with GiB vs GB or something else....
0
votes
1
answer
1k
views
Fdisk Ubuntu - How to create logical drives inside an extended partition
I have 3 partitions as you can see below, 2 Linux type partitions and 1 Extended partition.
I need to create 3 logical drives (sized 200M, 300M, 400M) inside of partition /dev/sdb3.
When I try to ...
0
votes
1
answer
160
views
ubuntu 20 volume group disk space extend problem
I cannot expand the disk of a server with an ubuntu 20 operating system on xen virtualization.
I have already updated the 250gb disk space to 265gb, but whatever I do on the command screen, the free ...
0
votes
0
answers
305
views
Mounting a bad raw disk image without fixing it?
Is it possible to mount a bad disk image without fixing it? Here's the story why.
I was playing around with dd, and I accidentally wrote back a 20GB virtual disk image onto the disk itself. The old ...