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 [sfdisk]

A script-oriented tool for partitioning block devices.

0
votes
0answers
12 views

How to mention the staring size in sfdisk when using extended partition?

I'm using the below sfdisk script for eMMC partition on the target Linux platform and is working fine. #!/bin/sh # wait for the SD/MMC device node ready while [ ! -e $1 ] do sleep 1 echo “wait for $...
0
votes
1answer
31 views

sfdisk strange behavior: total size of partitions greater than device size

I have a ssd(256 Gb), when I'm trying to part it: sfdisk /dev/sda << EOF 2048,8388608,S ,104857600,L ,,E ,20971520,L ,20971520,L ,20971520,L ,,L EOF fi the output is: Disk /dev/sda: 238.5GiB, ...
2
votes
1answer
103 views

Why partx can't read the partition table of some disks

partx fails to read the partition table of /dev/sdb on this system. Why does it return this 'failed to read partition table' shown below, instead of null/empty ? Will this 'failed' result always mean ...
0
votes
1answer
113 views

How to create multiple partitions of the same size from command line?

I need to create 20 partitions of the same size (cue to the first comment only the first 3 can be primary and the 4th needs to be extended an the other remaining 17 in it) I tried: for i in $(seq 1 ...
0
votes
1answer
33 views

Is there a way to import a layout with multiple partitions into ramdisk?

I dumped the partition layout of a disk, with: sfdisk -d /dev/sda > part_table cat part_table output label: dos label-id: 0x0004bc49 device: /dev/sda unit: sectors /dev/sda1 : start= ...
1
vote
1answer
412 views

sfdisk - “This disk is currently in use” - but nothing seems to be using it?

# sfdisk /dev/mmcblk0p1 Welcome to sfdisk (util-linux 2.29.2). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Checking that no-one is ...
0
votes
1answer
280 views

how mapping of sfdisk partition size is working

We are using a Python script for running sfdisk creating partitions on our Linux. The code is as below: stdin,stdout=\ (lambda x:(x.stdin,x.stdout))\ (subprocess.Popen( ...
1
vote
1answer
886 views

What is PARTUUID from blkid when using msdos partition table?

I use msdos partition table, so there is no PARTUUID supported (it's only on GPT partition tables) root@xenial:~# fdisk -l Disk /dev/sda: 200 GiB, 214748364800 bytes, 419430400 sectors Units: sectors ...
0
votes
1answer
1k views

lsblk + capture only the disks

I want to capture only the disks from lsblk as showing here fd0 also appears in spite its not really disk for use in this case we can just do lsblk | grep disk | grep -v fd0 but maybe we missed ...
2
votes
1answer
3k views

bad geometry: block count 967424 exceeds size of device (415232 blocks)

I am trying to understand what I did wrong with the following mount command. Take the following file from here: http://elinux.org/CI20_Distros#Debian_8_2016-02-02_Beta Simply download the img file ...
3
votes
1answer
527 views

Can I hide the fact that my USB is LUKS encryted?

Say I have a LUKS encrypted USB (full disk). I am looking for a way to hide the fact that it is a LUKS device. Which strategy would you use to hide the fact that my USB is a LUKS device? My approach ...
5
votes
3answers
928 views

replacing raid hard drives before failure (3 years old!)

I'm thinking that the smart thing to do with my raid setup is to replace the drives before they start failing and as they start to get old... I can't really afford a lot of cloud backup space, and I ...
4
votes
1answer
762 views

sfdisk --no-read doesn't work

I am trying to extend a partition using sfdisk on debian 8. I am running the following command: sfdisk -H 255 -S 63 --quiet --Linux --leave-last -uM --force --no-reread /dev/md1 -N4 < /tmp/abc ...
3
votes
1answer
230 views

sfdisk lists an unknown device /dev/xvda4

When I run sfdisk -l on my Ubuntu 14.04 machine, it returns the following: Disk /dev/xvda: 36473 cylinders, 255 heads, 63 sectors/track Units = cylinders of 8225280 bytes, blocks of 1024 bytes, ...
2
votes
2answers
655 views

How can I manipulate a partition table file without fdisk checking the validity of it?

I'm creating an image in memory (/tmp is a tmpfs): $ dd if=/dev/zero of=/tmp/sdcard.img bs=512 count=3147775 It's supposed to hold a partition table and the first 3 partitions of a device $ losetup ...
1
vote
1answer
3k views

sfdisk doesn't work anymore?

I updated my OS to Ubuntu GNOME 15.10 but now I have a huge issue : sfdisk doesn't work! I really need it to build partitions on my SD cards for an embedded Linux but it seems that the options ...
1
vote
0answers
2k views

Issues while eMMC partitioned using sfdisk

I am writing firmware(MLO,u-boot.img, uImage(ver 3.12), dtb, rootfs.tar.gz) programming script for am335x based custom board. Rootfile system is to be put onto the eMMC. Firmware programming script ...
6
votes
2answers
3k views

Is it possible to enlarge the / partition without rebooting?

I can enlarge the root (/) partition with fdisk without rebooting (deleting an recreating it with the same 1st sector, but greater last sector). However, I cannot make the kernel to re-read the ...
4
votes
1answer
589 views

Approximate partition table backup with sfdisk

I wanted to convert some logical partitions to extended ones, so I was following this accepted answer. However, at the step of backing up my current partition table, I messed up and typed the ...
1
vote
1answer
2k views

sfdisk don't like partitions - want to dump another hard drive to restore software RAID

I'm using Cent OS 6.5. I have two Hard Drive which are exact copies of each others (/dev/sda and /dev/sdb). /dev/sda failed and had to be replaced. I am trying to copies everything from /dev/sdb to ...
8
votes
1answer
7k views

Forced reread of partition table: difference between BLKRRPART and BLKPG ioctl? (Linux)

When I want Linux to consider newly created partitions without rebooting, I have several tools available to force a refresh of the kernel "partition cache": partx -va /dev/sdX kpartx -va /dev/sdX ...
1
vote
1answer
745 views

Specify partition data in sfdisk and parted

With this line: (echo o; echo n; echo p; echo 1; echo ; echo +24G; echo a; echo t; echo 7; echo w) | fdisk /dev/sda I can create a new active primary partition for NTFS, 24 Giga large. The syntax is ...
2
votes
2answers
1k views

Errors from cfdisk with new external USB backup drive

I've picked up an HP SimpleSave sd500a backup drive. This is a 2.5", 500GB drive. It has a mysterious CD-like partition, but otherwise seems to contain a WD Scorpio Blue disk. It seems that the CD-...
58
votes
8answers
104k views

How to see disk details like manufacturer in Linux

With sfdisk -s I can see the disk capacity as follows: $ sfdisk -s /dev/cciss/c0d0: 143338560 total: 143338560 blocks How do I see disk details like disk manufacturer? I tried hdparm, but got an ...