Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [fdisk]

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

1
vote
1answer
32 views

How to enlarge this partition?

Inside vmware ESXI I have a CentOS virtual machine, and I resized the virtual disk from around 30 GB to 120 GB using vmware "edit" vm menu. Then I booted using a gparted bootable ISO and resized the ...
6
votes
1answer
182 views

How to calculate partition Start End Sector?

I am wondering what Start and End value to choose when partitioning my ext. SSD using fdisk. fdisk suggests 2048-250069679, default 2048 but 250069679 cannot be divided by 512 nor by 2048. Wouldn't ...
0
votes
1answer
31 views

How to change partition type id without formatting?

How to change my partition type id from 83 to 8e without formatting and losing data?
-1
votes
0answers
25 views

I have two unpartitionned disks, how do I make the system bootable?

I have nothing left on my partitions : Disk /dev/nvme0n1: 119.2 GiB, 128035676160 bytes, 250069680 sectors Disk model: SAMSUNG MZVLW128HEGR-000L2 Units: sectors of 1 * 512 = 512 bytes ...
0
votes
1answer
28 views

connected old scsi disk via IDE->USB adapter, recognized in syslog but not fdisk?

I have an old hard disk I'm trying to check for data and format before recycling/donating. I'm using an IDE to USB adapter to connect the disk to my linux laptop. In my syslog I see the following ...
0
votes
1answer
78 views

fdisk shows “No free sectors available” while there is enough space

I have a 3.5T ssd, and I have made a 1.5T partition in it before. Then I want to add another partition. But it always shows there is no free sectors left which I think is pretty weird. # fdisk /dev/...
0
votes
0answers
34 views

Disk space disappeared [duplicate]

cd / && du -sh . told me that the filesystem used 2.1G spaces of disk: root@ubuntu:/# cd / && du -sh . du: cannot access './proc/3874/task/3874/fd/3': No such file or directory du: ...
-1
votes
1answer
88 views

Resize partition with fdisk without data loss

I need to increase the partition using the empty space located before the partition starts without data loss. As far as I know to resize the partition and to leave data intact one should start the new ...
1
vote
1answer
44 views

How to change zram sector size?

I have cloned a disk into a sparse file that is about 80G but indeed requires only about 12G, even not compressed it fits on my memory, but in order to save some resources I want to use zram: sudo ...
0
votes
3answers
109 views

How to check if partition is Extended/Primary in Linux

Below is the info I get using (g)parted or fdisk command. Device Boot Start End Sectors Size Id Type /dev/sda1 * 2048 196265983 196263936 93.6G 83 Linux /dev/sda2 ...
0
votes
0answers
27 views

After installing Windows 10 LTSC on a separate intenal HD, the Linux portion of my “fdisk -l” output has a column it didn't have prior

I have two harddrives in this computer—one is a regular SSD, the other is an M2 SSD. I installed Arch on the regular one and, after a little over a week of having it, installed Windows 10 LTSC on the ...
1
vote
1answer
196 views

Change disk type from Microsoft Basic to Linux filesystem

I'm not clear where this is coming from and although it seems cosmetic I would like to change my disk type from Microsoft Basic to Linux filesystem WARNING: fdisk GPT support is currently new, ...
0
votes
0answers
66 views

Flash drive detected by lsusb but not by fdisk

I try to format SanDisk Ultra microSDHC UHS-I Card with adapter but it does not appear on fdisk -l. However, it does appear on lsusb as Bus 001 Device 006: ID 1908:0222 GEMBIRD
1
vote
1answer
21 views

device from free diskspace does not match-up to size from list block size

The device /dev/sda2 original space at 32GB, then I try to expand to 512GB as it is shown in lsblk but not in disk free listing still show 32GB. I've rebooted the redhat 7.6 vm. $ df -h ...
0
votes
0answers
30 views

Why can't I see NTFS partitions on a specific drive?

I have a dual boot win10/Fedora29, with 3 internal drives: win10 system (NTFS) fedora system (ext4) data drive (NTFS) I can't see the partitions on the data drive and I can't mount it. I can ...
1
vote
1answer
31 views

Whole disk is a partition: can't shrink, can't create new one

When I set up arch linux, I created a partition with fdisk, and ran mkfs.ext4 on /dev/sda. Now, I want to partition /dev/sda to have 2 partitions, instead of just one. The problem is, that when I try ...
1
vote
1answer
40 views

What is the deal with this usb drive with a second block device?

I have a giveaway usb stick and when I plug it into my computer and run lsblk it shows two block devices, i.e. sdb and sdc. sdb of them contains almost all the free space ( ~15G) and the sdc one is ...
1
vote
1answer
119 views

Corrupted SD card is readonly and not mounting

I'm having issues trying to recover a corrupted micro-SD card (not the data, just the card). I think it was formated to be part of the internal storage of an Android phone when that was an option. # ...
0
votes
2answers
179 views

How to resize linux partition with RAID1?

I have a Proxmox disk with 130Gb LVM image. I moved it to 235Gb disk. And resized in the Proxmox. Done. But in my Linux distro, the partition still 130Gb (disk become 235Gb). The partitions: /dev/...
0
votes
0answers
27 views

fdisk problem - can not recreate partition table - decrease crypt

I am trying to shrink my crypted lvm system, shrinking lv and pv size was no problem, i followed this awesome post here: https://ubuntuforums.org/showthread.php?t=726724 But in the end the partition ...
0
votes
0answers
44 views

Can I restore my RHEL 7 server after messing up partitions in fdisk?

I was attempting to change my partitions in Linux (RHEL 7) and I deleted a partition using fdisk. Then, I attempted to reboot the system. Now, when I connect to my Linux box, I'm in a Dracut shell and ...
3
votes
1answer
48 views

Clone Debian installation

I want to clone an existing Debian installation and restore on a new machine with a hard drive of different size. The partioning is very easy - /dev/sda1 for EFI, /dev/sda2 for Linux and /dev/sda3 ...
0
votes
1answer
395 views

smartctl megaraid,N ( how to find the right value for N ? )

we run the smartctl on sdb disk smartctl -a /dev/sdb smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.10.0-327.el7.x86_64] (local build) Copyright (C) 2002-13, Bruce Allen, Christian Franke, www....
0
votes
0answers
104 views

External HDD failure due to bad blocks

My external HDD failed, I searched on the internet and found that it may have been caused by bad blocks. I therefore ran sudo badblocks -vs -b 4096 -c 64 /dev/sdb1 > ~/Downloads/badsectors.txt in ...
1
vote
2answers
50 views

How to read the output from an interactive program without it scrolling off the screen?

I am running fdisk on a device and I'm trying to list the supported partition types. The problem is that it immediately scrolls off the screen and I can't see it. I was using the latest Fedora on ...
-1
votes
1answer
83 views

Partitioning with MS-DOS type

I need to partition an external HD, with FAT32. Once upon a time, fdisk listed its possible partition types in a different, clearer way. The nearest entries now seem to be 10 Microsoft reserved ...
12
votes
2answers
3k views

Will dd if=/dev/zero of=/dev/sda wipe out a pre-existing partition table?

Will # dd if=/dev/zero of=/dev/sda wipe out a pre-existing partition table? Or is it the other way around, i.e, does # fdisk /dev/sda g (for GPT) wipe out the zeros written by /dev/zero?
-1
votes
2answers
70 views

Linux + how to capture the OS disk device [closed]

we want to capture the disk device that belong to the OS ( Linux ) since each linux machine have list of disks that are not the OS , we want to capture the disk that belong to the OS so by fdisk ...
1
vote
1answer
164 views

fdisk warning: (Extended) Partition does not start on physical sector boundary

is there a problem if an Extended Partition does not start on physical sector boundary? Partition 4 does not start on physical sector boundary. ... /dev/sda4 639635454 1953521663 ...
-2
votes
2answers
47 views

how to find the size of the disk that OS is installed on

how to verify the disk size ( the disk that OS is installed on ) we have redhat 7.2 I will give example # disk_os_size=` lsblk | grep sda ` sda 8:0 0 150G 0 disk ├─sda1 ...
0
votes
1answer
333 views

Can't create partition table using fdisk

I'm having real trouble formatting a new hard drive, whenever I try to create a partition table using fdisk it does not seem to be written to the disk. For example see below for an extract of my ...
0
votes
2answers
194 views

automatize partition creation with fdisk

I am using these commands on command line: sudo fdisk /dev/mmcblk1 p d w sudo fdisk /dev/mmcblk1 n (using all defaults) w Please is there any option how to automatize this task? Or how to use one ...
0
votes
1answer
42 views

I have a dedicated with 2 SSDs, how to I group them to behave as 1?

I have a dedicated server which I will use to build virtual machines on top of using KVM (thank you, Virtualizor), the problem is, I do not physical access to the machine as it is rented from a big ...
0
votes
1answer
117 views

Add PARTUUID to DOS MBR

I have an MBR style formatted SD card where I need a PARTUUID in order to mount a partition there as the rootfs (via linux kernel parameter root=PARTUUID=...). Using an fs UUID does not work. ...
0
votes
1answer
165 views

/etc/fstab for my usb drive won't boot

I've used sudo blkid to mount my drive with fstab like this on /etc/fstab: UUID=1169dd89-29fe-436c-9aef-fa78ea7ee138 /media/hd ext4 defaults,auto,umask=000,users,rw 0 0 I also tried PARTUUID=...
1
vote
1answer
36 views

Check for disks added to the system

So I am working a script that basically check if a disk has been added to the system, and if so, then do something with it (like format it or whatever). So, the main question is...how do I list disks ...
1
vote
0answers
23 views

parted create corrupt superblock, but gdisk doesn't [closed]

on two different machines, thinkpad x200 with legacy bios, and hp with EFI support, using parted for partitioning HDD from live boot (ubuntu, and arch), most of time, parted fails, and i don't seem to ...
0
votes
2answers
2k views

No free sectors available - Cannot add new partition

I am trying to add additional 40 GB to the 60 GB disk and make it 100GB. Disk is added from backend and in fdisk it shows 100GB. However, when trying to create new partition I get error "No free ...
4
votes
2answers
416 views

Is it safe to force fdisk to use sector 63 boundary?

For some reason, the first partition of my VPS (running Debian 8) is aligned to sector 63 (instead of 2048) Model: VMware Virtual disk (scsi) Disk /dev/sda: 314572800s Sector size (logical/physical): ...
0
votes
0answers
108 views

Need to extend logical partition (Non -LVM)

I've got a physical server (RHEL 6.7) using standard partitioning with 10 partitions on block device /dev/sda. /dev/sda6 /home needs more space. Filesystem Size Used Avail Use% Mounted on /dev/...
1
vote
1answer
421 views

Adding brick volume to gluster fails

I created a 2TB volume to increase space on home directory. I created the partition: $ parted /dev/xvdb mklabel gpt $ parted -s /dev/xvdb mkpart primary ext4 1 100% Formatted the partition: $ mkfs....
0
votes
0answers
246 views

Centos 7 Move Free Space From Home Partition to Root Partition [duplicate]

I am trying to restore about 75GB worth of MySQL to a new server. I ran out of room about halfway through because it is storing the contents inside of my primary system partition. This is fine I just ...
-1
votes
3answers
261 views

How to use free space for partition

[root@shine home]# fdisk -l /dev/sda Disk /dev/sda: 4000.8 GB, 4000787030016 bytes 255 heads, 63 sectors/track, 486401 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/...
2
votes
1answer
3k views

resize2fs fail to resize partition to full capacity?

Added a new disk (/dev/vdb) of 2TB with existing data from the previous 1TB disk. I used fdisk /dev/vdb to extend its only partition /dev/vdb1 to full capacity of 2TB from previous 1TB. And then I ...
1
vote
0answers
343 views

Problem mounting and reading hard disk

I am trying to read the content of a 1Tb external disk. The device was part of an external nas (dlink 320) using raid 1. when I plug the hard disk using the usb port no partition is mounted. The ...
0
votes
1answer
212 views

Stuck trying to extend volume in Linux VM

I have a Debian Linux VM running (headless) on an Ubuntu box. I increased the size of the virtual disk with vboxmanage to 30G from its original 20G. I have tried many things, but I am still stuck ...
3
votes
1answer
107 views

How do all the partition types differ from each other?

While making partitions in a Unix environment, we often define partition type. When we make partitions using fdisk command, and when we use L to get the hex codes of available partition types, we get ...
-1
votes
4answers
87 views

Get the size of my disks on several system [duplicate]

Edit: I have several machine and I need to get the total storage size of the main disk. The problem I have is that on some machine my disk have the name /dev/sda or /dev/md126p3. How could I reliably ...
-3
votes
1answer
61 views

Linux machine disk space

I have already googled and found the following post Linux disk space In there, i use the following df -hT /home | awk 'FNR == 2 {print $3 "B"}' to get the full size of my linux machine disk. ...
0
votes
1answer
51 views

Run command with specific arguments without password as root for all users [duplicate]

I want to be able to run fdisk -l as any user, without getting the whole fdisk: cannot open /dev/sda: Permission denied message. I don't see how fdisk -l can be used for malicious purposes. I have a ...