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
212 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
50 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
27 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
5k 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
711 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
178 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
636 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....
-1
votes
3answers
348 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
5k 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
391 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
309 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
144 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
102 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
64 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
62 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 ...
1
vote
2answers
3k views

Make parted start next partition after previous one - automatically?

I've inherited a shell script that pipes a list of 'random' characters to fdisk. What it is doing is partitioning a disk as follows: Set up the blank disk, partition table etc Create first partition ...
0
votes
1answer
88 views

Merge partitions resize2fs error

I was following this guide How do I combine two logical volumes that reside on a single physical volume in LVM? To merge /data into / So / would have 60G space in addition. Everything was done ...
0
votes
3answers
1k views

How do I move an ext4 filesystem from /dev/sdb to /dev/sdb1?

Somehow I have an ext4 filesystem in /dev/sdb. I expected it to be /dev/sdb1. I can mount it manually; I can access the data; I can reference it in /etc/fstab; etc, but I want it in a standard ...
1
vote
1answer
296 views

Disk space error when using DD to write to raw disk in external reader?

I keep getting disk space errors when using dd to write to raw disk on SD cards in an external, USB connected SD card reader. ➜ ~ gzip -cd < image.dd.gz | sudo dd of=/dev/rsda dd: writing to '/...
1
vote
1answer
118 views

executing parted triggers udev, fdisk does not

I'm in a server environment (RHEL 7.2 or thereabouts) and I noticed that my udev rules get invoked (creating my custom symlinks) when I run parted print, even if I'm just listing partitions. When I ...
-2
votes
2answers
469 views

Resizing root partition in azure CentOS VM

I have a 128 GB SSD Managed disk in Linux - CentOS 7.3. The root partition now shows 30 GB approx and is mounted under "/", ie root. lsblk shows the remaining - So we are good for now. My requirement ...
0
votes
1answer
253 views

sector size won't change with fdisk

am trying to change the sector size from 512 to 2048 of my swap partition. # fdisk -b 2048 /dev/mapper/fedora-swap and then I try to write to it gives me the following message. The partition ...
2
votes
3answers
521 views

Merging partitions in Debian

I have recently inherited someone else's problem with a linux server. This is one of those all in one debian based lamp setups. It recently ran out of storage and no one seems to know anything about ...
3
votes
2answers
4k views

Can i list unmounted drives without fdisk or lsblk?

I have an Inteno dg200 Router running some Iopsys linux version (kernel 3.14 or so, I believe) I've had some trouble getting a fileshare running using the USB ports and my external harddrive. The ...
0
votes
1answer
98 views

How to migrate partitions and file systems to another device

I have an existing system with partitions but want to move them to a new device. The new device may be smaller and be connected to the system differently then the existing device. How do I move the ...
4
votes
0answers
929 views

How to interpret fdisk output?

How does one interpret fdisk -l output. I've included a sample output based on an image with my "best guesses", and then show the output based on the device which was used to create the image. ...
-1
votes
1answer
63 views

Understanding exec

I need to understand the following script sequence. $command .= "n\n\n\n\nt\n7\nc\nw\n"; exec("echo -e \"{$command}\" | /sbin/fdisk {$kernelDevice}"); I can't figure out ...
1
vote
0answers
265 views

Want to allocate space to centos-root folder

Below is my df -h output [root@dpnjsv2-centos7-base logs]# df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/centos-root 12G 9.8G 1.6G 87% / devtmpfs 2....
0
votes
2answers
153 views

I know a partition exists (bootable) but I can't find it in fdisk

I have a 16GB flash drive, which I converted to a bootable Kali (with persistence) drive awhile back. As far as I know it's just a Kali live ISO as a ~2GB partition with the rest automatically ...
1
vote
1answer
115 views

is it possible to create partition table inside crypt mapper?

i.e. not fdisk /dev/sda; cryptsetup create xxx /dev/sda1 but vice versa cryptsetup create xxx /dev/sda ; fdisk /dev/mapper/xxx is it allowed?
0
votes
1answer
70 views

Accidentally deleted the only partition where LV for the root and swap

I accidentally deleted /dev/sda2. This is only partition which is member of my rhel VG. where I have created root and swap LV. I deleted this with fdisk, after deleting I run partprobe It gave some ...
1
vote
2answers
1k views

lvm and a partitioning question

So when I do (as a root) fdisk -l I see /dev/sda1 and /dev/sda2 Now I am practicing creating logical volumes, when I tried partitioning /dev/sda2 I got two new partition /dev/sda2p1 and /dev/...
2
votes
1answer
1k views

Extending VG > LVM

I want to run an idea by you... I have an Ubuntu 16.04.3 with an LVM on a second drive I would like to extend. I want to complete this only using this CLI, no GUI. I have put my steps below how I ...
0
votes
1answer
158 views

fdisk not seing resize2fs shrinking unmounted partition

I need to make another parition (/dev/vda2) on an existing disk (/dev/vda, 20G). umount /mnt/ resize2fs /dev/vda1 10G df -h ... /dev/vda1 9.8G 7.8G 1.5G 85% /mnt So it's ok on this side, ...
1
vote
2answers
282 views

how to display and add partition in the SUN solaris OS?

how to display and add partition in the SUN solaris OS? Linux version is uname -a SunOS SMS 5.10 Generic_141414-02 sun4v sparc SUNW,Netra-T2000 #fdisk -l fdisk: illegal option -- l Usage: fdisk [ ...
1
vote
0answers
5k views

Inaccessible drive with the message: unknown filesystem type '(null)'

Short story: A disk with partitions sdb1-sdb4 and filetype ext4 now shows up as sdb with no file type. While trying to mount sdb I get the messages: mount: /dev/sdb is write-protected, mounting read-...
0
votes
1answer
157 views

access DD image

I'm trying to analyze a given USB image (.DD) to find out the location of the MFT table. The problem is I'm having trouble to mount the DD image. When I run fdisk -l ntfs5.dd here's the output that ...
0
votes
1answer
791 views

sdc1 exists but does not show under /dev/

I am currently working on CentOS 6.9 (Kernel Version 2.6.32-696.3.2.el6.x86_64). I have added a supplemental disk to the Virtual Machine and I can see it listed under /dev as sdc (/dev/sdc). When I ...
1
vote
2answers
3k views

FDISK doesn't show any partitions for a disk, trying to resize an LVM disk, running CentOS

This particular system is acting peculiar and i've not seen this before. System is running CentOS and is a VM on VMWare. I increased the space on the drive from 100GB to 130GB. When I went in to the ...
4
votes
2answers
137 views

Restore a USB flash drive in a standard state for use in Linux, Windows, etc

Since this question, I'm using: dd if=/dev/zero of=/dev/sdb bs=1M # wipe the disk fdisk /dev/sdb <<< $'n\np\n\n\n\nt\nb\np\nw\n' # create a partition mkfs.fat /dev/sdb1 ...
0
votes
2answers
391 views

Wipe a USB flash drive and recreate a filesystem

I'm using this to wipe a USB flash drive and recreate a FAT filesystem: dd if=/dev/zero of=/dev/sdb bs=1M #I don't need more advanced wiping fdisk /dev/sdb (a few keystrokes to select partition ...
0
votes
1answer
1k views

Meaning of “e” and “ee” in “Id” column of `fdisk -l`?

I am trying to inspect an SD card which may or may not be failing, on Ubuntu 14.04. This is the output I get from fdisk -l: $ sudo fdisk -l /dev/sdc ... Disk identifier: 0x000a671b Device Boot ...
0
votes
1answer
481 views

Device /dev/sda4 not found error seen when creating physical volume

I m trying to expand my current disk but when I do pvcreate with the latest partition it says not found below are the command details. One thing I noticed is the Disk label type changes to GPT from ...
2
votes
1answer
11k views

fdisk: partition contains a ntfs signature. remove it?

I'm installing NixOs on a ThinkPad X220. Though I'm very comfortable in the shell, it's the first time I've set up my own system, and I'm running into some unknowns while trying to partition the hard ...
8
votes
2answers
7k views

Fixing bad blocks

After getting WARNING: Your hard drive is failing Device: /dev/sdb [SAT], 1 Offline uncorrectable sectors I run $ sudo smartctl -a /dev/sdb smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.10.0-514....
0
votes
1answer
147 views

fdisk with option '-l' - how does it get info about device?

I'm experimenting with a software defined device, trying to force it to work with block size = 512 bytes, but it looks like the Linux doesn't want that. I've forced the device to report minimal ...
1
vote
0answers
30 views

Problem mounting NTFS disks

I had initially gotten good results in using /etc/fstab to specify mounting points for my hard disks. But after meddling around with folder permissions, my disks refused to mount. What I was doing: ...
1
vote
0answers
105 views

Arch Windows dualboot: fdisk only lists liveusb?

I'm trying to dual boot windows 10 (secureboot disabled, uefi enabled) with arch. I used the disk management utility in windows to set aside some space for linux, but when I boot the liveusb and run ...
1
vote
0answers
1k views

Impossible to format a SD Card [closed]

I have a Samsung SD Card 16Go, class 10, but I'm unable to format it/add/remove partitions. I tried to use gparted and fdisk, but nothing work. To be more precise, when I do the formating, I have no ...
2
votes
1answer
308 views

Interpreting Gnu `df` command size results on Linux

I'm having a trouble understanding how df reports the size of filesystems: $ df Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda3 924815840 63819748 813948260 ...