Questions tagged [fdisk]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
38 views

Kensington SD I/O Read Error, not recognised on Ubuntu 19.04?

I have two Kensington SD cards that will not be recognised on my ubuntu 19.04 OS. They are definitely working though, when I plug them into my windows 10 computer they register. I also have an old ...
0
votes
1answer
24 views

Forgot to assign boot tag when doing fdisk

Yesterday I supposed to do resize Azure Linux VM by following article https://blogs.msdn.microsoft.com/cloud_solution_architect/2016/05/24/step-by-step-how-to-resize-a-linux-vm-os-disk-in-azure-arm/ ...
2
votes
1answer
53 views

I'm having hard times mounting a PlayStation 4 hard drive, need some help!

When I run the command sudo fdisk -l I get the following message about the hard drive I want to mount to my system: Disk /dev/sdc: 465,8 GiB, 500107862016 bytes, 976773168 sectors Units: sectors ...
1
vote
1answer
35 views

Fdisk Error Message

So basically i was messing around in Linux and i wiped the fileystem from a partition with wipefs and then decided to delete this partition (/dev/sda2) so i went on parted and deleted it. After this ...
9
votes
1answer
506 views

Why is the total number of hard disk sectors shown in fdisk not the same as theoretical calculation?

When we use fdisk to check a hard disk, it would show something like: Disk /dev/sda/: 21.5 GB, 21474836480 bytes 255 heads, 63 sectors/track, 2610 cylinders, total 41943040 sectors But when we ...
0
votes
0answers
23 views

USB stick with hidden capacity?

While using dd on my USB drive, the USB drive accidentally got unplugged. The max capacity is 8GB, and 5GB had been written to it. Now, when I try to reformat the USB drive or even remove all ...
2
votes
0answers
61 views

Two Partitions had same starting and ending sectors? How is it possible?

When I was practicing with fdisk, unfortunately, two partitions added with same start and end sectors. When I mount them individually I can see the same data on both partitions. Is it a flaw in fdisk? ...
0
votes
1answer
168 views

Partition #3 contains a ext4 signature

When i use fdisk to create a new partition i get an error which says Partition #3 contains a ext4 signature Do you want to remove the signature? [Y]es/[N]o: This error is not a problem but i am ...
0
votes
0answers
26 views

Why does fdisk sometimes ask what kind of partition to make and sometimes not?

Today I was trying to write a script for partitioning disks using fdisk (since that seemed like the simplest option). When going through fdisk the first time and pressing n for new partition, the ...
1
vote
1answer
32 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
36 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
vote
2answers
35 views

Mapping between EC2 volume and your mounted filesystem

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
59 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' ...
7
votes
3answers
380 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
22 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
14 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
31 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
88 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
37 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
813 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
579 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
78 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
259 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
39 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
2k 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
68 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
345 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
41 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
1k 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
315 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
27 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
42 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
54 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
45 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
341 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
428 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
62 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
58 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
995 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
150 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
58 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
171 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
4k 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
74 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
251 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
53 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
559 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
292 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
50 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
274 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. ...