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
19 views

Output fdisk bash command to multiline variable

I can't seem to figure out how I can put a fdisk command from a bash script in a multiline variable. Here is my code hdds="$(sudo fdisk -l | grep "Disk /dev/sd" | awk '{print$2}' | sed 's/://g')" ...
0
votes
0answers
27 views

Extended partition size using fdisk

I want to create on my disk this table partition using the command fdisk. SWAP 10MB FAT32 25MB FAT32 15MB Linux 20MB FAT32 20MB I'm facing a problem: I know I can have only 4 primary ...
-1
votes
2answers
28 views

Unable to find a mapping between Ec2 volume and filesystem name from df

I am running out of space on a particular filesystem. I know this with the following command df -H $ sudo df -H Filesystem Size Used Avail Use% Mounted on udev 4.1G ...
0
votes
3answers
27 views

USB-attached HDD visible in dmesg, but can't be opened with fdisk

I've attached a SATA to my computer via a "plugable" (that's the company name) disk docking station. The docking station is fine, since I've attached another HDD and was able to see its partitions' ...
6
votes
3answers
337 views

How can a disk without a partition be “partitioned” without losing data?

I have a 1TB portable hard drive that I use for backups. The entire drive (/dev/sdb) has been formatted as an ext4 filesystem. I have been reading about the benefits of btrfs for backups (checksums, ...
0
votes
1answer
18 views

Partition not showing up after Luks decryption

Everytime i decrypt my luks drive the partition is not showing up: cryptsetup -v luksOpen /dev/md0 md0_crypt lsblk sdb 8:16 0 3,7T 0 disk └─sdb1 ...
-1
votes
1answer
13 views

creating space for data with fdisk

I am running a debian server on Windows in Hyper-V, I have expanded the Hyper-V partition to 2T, now I would like to expand the Debian partition to use that new space. The new space will be for videos,...
0
votes
0answers
22 views

Partition Start and End Calculation

I was using the parted command and i was trying to create a new partition using the mkpart option. While i was doing this it asked for the partition start and end. Now i believe i know what the ...
0
votes
2answers
50 views

linux partition/disk numbers (sda1,sda2,sda5)

at the moment i understand that linux has a partition numbering system which is: partitions 1-4 are primary partitions 5 and above and logical but what about extended partitions? my curret ...
1
vote
1answer
34 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
470 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
117 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?
0
votes
1answer
53 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
201 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
35 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
692 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
56 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
177 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
35 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
545 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
217 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
26 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
36 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
34 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
43 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
228 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
315 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
51 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
54 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
666 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
138 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
53 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
126 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
72 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
226 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
49 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
429 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
238 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
44 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
182 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
193 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
41 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
24 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
4k 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
538 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
144 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
531 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
314 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
302 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/...