Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

Questions tagged [fdisk]

fdisk (for "fixed disk") is a command-line utility that provides disk partitioning functions.

Filter by
Sorted by
Tagged with
1 vote
3 answers
49 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
5 votes
2 answers
658 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 ...
user avatar
  • 53
1 vote
1 answer
29 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/...
user avatar
  • 113
0 votes
0 answers
24 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
0 answers
40 views

disk not recogized after bad mount (fstab)

Problem: Disk (partition) is not recognized in system. Neither on a Debian nor a Windows. What i had: I have the orange pi with debian distribution. I successfully added windows partition in it. It is ...
user avatar
1 vote
0 answers
29 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....
user avatar
  • 11
0 votes
1 answer
54 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 ...
user avatar
0 votes
1 answer
19 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 ...
user avatar
  • 31
0 votes
0 answers
71 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 ...
user avatar
  • 133
0 votes
0 answers
49 views

How can someone use a user-specified variable with a path?

I am trying to write a BASH script that can erase a disk. I am trying to use fdisk or perhaps shred in order to be able to erase a disk. I have it set up so that a user can specify the path to the ...
user avatar
  • 101
0 votes
3 answers
222 views

fdisk output: "new DOS disklabel"

I have a question about what is happening here. Does "a new DOS disklabel" here mean a DOS partition table has been created? In other words, that a DOS partition table has been created by ...
user avatar
1 vote
2 answers
56 views

df shows drive as 77gb but fdisks shows the partition as 160gb [duplicate]

I recently upgraded my VPS's HDD space from 80 > 160gb, but it is not showing the changes other than when viewing it in fdisks. root@localhost:~# df -h Filesystem Size Used Avail Use% ...
user avatar
1 vote
1 answer
25 views

Why fdisk show truncated partition types?

I tried fdisk command on latest Debian 11 and Slackware-current, on both I use the l command to show the partitions types, it show the types in 4 columns, only one problem: the 4th column has ...
user avatar
  • 11k
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
1 vote
4 answers
3k views

pvcreate: Can't use /dev/sda: device is partitioned

I'm currently installing arch linux and when I try to create a physical volume it gives me this error. Can not use /dev/sda: device is partitioned What is this error and how can I get rid of it? PS: ...
user avatar
  • 11
0 votes
0 answers
65 views

Unable to mount ext4 partition - bad geometry

I've got a HDD disk that was sitting on a shelf for a long time (since 2015?). I've now put it into an external USB drive caddy and trying to mount it but it fails, the geometry seems to be off by 1 ...
user avatar
  • 1,940
1 vote
1 answer
601 views

How to create a GRUB BIOS boot partition using sectors 34 to 2047?

How can I create a partition for the GRUB legacy boot of GPT disks using free sectors between the GPT (33) and the first aligned partition (2048)? If I already have partitioned all other sectors, ...
user avatar
  • 135
0 votes
1 answer
96 views

How to increase root partition

I want to increase the disk space for my hyper-v guest (debian 11). I'm trying to follow those tutorials here and here. My starting point is the debian partition table: Disk /dev/sda: 50 GiB, ...
user avatar
0 votes
1 answer
25 views

Discrepancy of disk size in fdisk command output

I have created CentOS 7 VM in oracle VM box with the disk size of 10 GB. When I run fdisk -l /dev/sda command, it reports that the disk size is 10.7 GB. Can someone explain why fdisk shows higher disk ...
user avatar
0 votes
1 answer
96 views

How to undo fdisk new partition on ext4 file system?

I have a LVM called /dev/data/files on a VM of mine. I allocated 50 GB on it and wanted to extend this LVM... So, instead of using lvextend command which i forgot to use i did the following: fdisk /...
user avatar
2 votes
2 answers
213 views

Partitions /dev/loopXX

While I was checking my disk space today with df -h I noticed all these /dev/loopXX partitions which I don't know what they really are. What are them? Should I keep it? Thank you.
user avatar
  • 23
0 votes
0 answers
114 views

Fdisk showing wrong SD card size

So I've been formatting and reformatting a couple SD cards as I'm running some tests and I need to reformat pretty often however every time I plug a different card in fdisk reports the old cards ...
user avatar
  • 1
0 votes
0 answers
41 views

Resizing disk partitions - Debian 10

I would like to resize my partitions in order to have the following configuration: 30 Go for the user repertory 45 Go for /var/lib/ repertory 45 Go for /opt/ repertory However I don't understand how ...
user avatar
2 votes
1 answer
488 views

Partition does not start on physical sector boundary. Partition table entries are not in disk order

I am a new Manjaro user, my 1TB hard disk is showing two overlapped partitions, its shows two more partitions at the end that I don't recognize. I can't delete it using KDE partition manager. How do I ...
user avatar
  • 21
-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
169 views

reduce lvm space and create new partition

My objective is to free some space from the lvm and create new partition. Below is the devices and lvm ontop of it. # lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT vda 252:0 ...
user avatar
  • 1,771
0 votes
0 answers
34 views

Wanted to expand main partition but accidentally deleted swap and expanded using that space too

This is a centos 7 vm running on hyperv. Two weeks ago I wanted to increase the root partition space. what I had is: dev/sda1 - boot dev/sda2 - swap dev/sda3 - root By mistake i used fdisk to delete ...
user avatar
0 votes
1 answer
183 views

QEMU Harddisk no devices, no file system but files still accessible

I'm running a Proxmox as my Hypervisor, where I set up my 6 TB disk as a ZFS pool. Then I created a virtual disk and attach it to VM running Ubuntu Server 20.04 where it shows up as a QEMU Harddisk. I ...
user avatar
  • 1
0 votes
0 answers
20 views

Mounting another partition doesn't show up

I'm trying to mount another partition on Oracle Linux, when I try to mount, the partition doesn't show in the mount point other than some generic EFI & xfs folders. fdisk -l shows something like ...
user avatar
  • 111
0 votes
1 answer
20 views

Working with existing LVM Partitions

Im using Ubuntu 20.02 LTS on a virtual machine. Recently the virtual disk was extended. My disk setup looks like: lshw -class disk -short H/W path Device Class Description ====...
user avatar
0 votes
1 answer
225 views

What does fdisk's Start and End values mean when looking at a compact flash

I'm analyzing a compact flash using fdisk and by comparing it to the contents of the partition table on the CF's master boot record. I don't understand what the "Start" and "End" ...
user avatar
  • 119
0 votes
0 answers
87 views

There is no *BSD partition on /dev/sdb. The device (null) does not contain BSD disklabel

I want to add files to my Debian setup USB flash drive and am trying to follow the steps from this answer: https://unix.stackexchange.com/a/559371 However, after successfully writing the image with dd ...
user avatar
1 vote
1 answer
322 views

external hard drive not showing with fdisk & lsblk

this is output of dmesg [ 17.064706] usb 2-2: new SuperSpeed USB device number 3 using xhci_hcd [ 22.496752] usb 2-2: device descriptor read/8, error -110 [ 22.600534] usb 2-2: new SuperSpeed ...
user avatar
  • 11
0 votes
0 answers
34 views

Mount a detected but not listed in disks list SD card

My problem is a bit complicated to describe knowing that I'm not really a passionate about partitioning, but here's what I'm trying to do, What I tried and what doesn't work : Goal My goal is to ...
user avatar
  • 21
0 votes
2 answers
147 views

how to compare the lsblk disk size values to disk size values from df -h

I want to compare the size of the disk between the size from df -h to lsblk Because we performed resize2fs , and after resize2fs I want to check the size from df -h against the size from lablk So we ...
user avatar
  • 11k
0 votes
1 answer
738 views

Exit fdisk list known partition types

when setting up my linux installation I used the following command to create new partitions: fdisk /dev/sda After creating my partitions I was curious about the other optionsthe command has: From ...
user avatar
0 votes
1 answer
67 views

How to (safely) free up space in front of ext2/3/4 partition using fdisk / resize2fs

I was wondering how you could safely free up space in front of a partition using command line tools such as fdisk or resize2fs. I know it's possible to do this with gparted, but that is not available ...
user avatar
  • 147
0 votes
1 answer
952 views

fdisk: Default partion type "Linux filesystem"

I am using CentOS 8 and added two nvme storage disks, which I want to configure in RAID1 mirror. Following is lsblk output: [root@localhost ~]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT ...
user avatar
  • 1,641
1 vote
1 answer
272 views

Why doesn't fdisk -l not show all connected drives?

I've found countless threads started by others where they can't boot from a device because they are using the wrong SATA configuration. Let me assure you this is not my issue. I work in an IT dept for ...
user avatar
1 vote
2 answers
148 views

Extend partition size on the left

I have Linux Debian on the partition sda4 of my 1TB hard disk: NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 931.5G 0 disk ├─sda1 8:1 0 260M 0 part /boot/efi ├─sda2 8:2 ...
user avatar
0 votes
0 answers
147 views

How do I combine two "devices" so that I can expand a partition that I want to span both on Ubuntu 20 LTS without a GUI / GParted. (SSH only.)

I have been looking all over to figure out how to expand a partition on one "device" to use space on another "device". I am putting quotes around device because that is what it ...
user avatar
-1 votes
1 answer
127 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
  • 11k
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
251 views

What is my hard drive physical sector size? fdisk, smartctl etc.. give different answers

The harddrive is connected with an external enclosure via USB3.0. $ sudo smartctl -a /dev/sdb === START OF INFORMATION SECTION === Model Family: Seagate Barracuda 3.5 Device Model: ...
user avatar
  • 267
1 vote
2 answers
88 views

System fails to boof after extending my root partition in kali linux

I deleted and created a new partition with fdisk in my Linux in order for me to resize it and reboot my system for it to inform the kernel of the changes in the partition table but the system does not ...
user avatar
  • 9
1 vote
0 answers
440 views

Hard disk has no size and is unrecognizable by fdisk

I am using Arch Linux (x86_64), and my 120GB external hard drive isn't working. If I use c/fdisk, c/gdisk or g/parted, they don't see /dev/sdb (my hard drive). Other tools like mkfs work, but spit an ...
user avatar
  • 95
0 votes
1 answer
309 views

CentOS 7 Disk space missing

I have recently installed CentOS on my laptop which has two disks, SSD(32GB) + HDD(1TB). During installation I had set /boot(2GB) and /boot/efi(500MB) on SSD while rest all partitions on HDD. I want ...
user avatar
  • 101
4 votes
2 answers
773 views

Using dd to create an image up to an specific sector

I have a 32GB SD Card that contains an Armbian installation for some pi gadget. I want to clone the content into a 16GB card. Using GParted, I shrank the partitions to be less than 16GB and here is ...
user avatar
  • 527
0 votes
2 answers
770 views

Delete and merge all windows partition from arch linux installation

Newbie here. I tried to install arch linux to my laptop which has 2 partitions and windows 10 installation. I could not delete and merge partitions with fdisk, so googled and ran the following command....
user avatar
0 votes
2 answers
136 views

How to change usb drive's "Disk model", as shown in fdisk -l?

Info I have two USB flash drives. Both are "SanDisk Cruzer Blade"s. One is 8GB, the other is 64GB. fdisk -l (8GB): Disk /dev/sdd: 7.45 GiB, 8004304896 bytes, 15633408 sectors Disk model: ...
user avatar
  • 167

1
2 3 4 5
9