fachinformatiker-wiki

it's easy when it's here

User Tools

Site Tools


linux:fdisk

fdisk

Create new partition on empty disk:

fdisk /dev/sdb

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x86992fcf.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): p

Disk /dev/sdb: 1073.7 GB, 1073741824000 bytes
255 heads, 63 sectors/track, 130541 cylinders, total 2097152000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x86992fcf

   Device Boot      Start         End      Blocks   Id  System

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4, default 1): <ENTER>
Using default value 1
First sector (2048-2097151999, default 2048): <ENTER>
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-2097151999, default 2097151999): <ENTER>
Using default value 2097151999

Command (m for help): p

Disk /dev/sdb: 1073.7 GB, 1073741824000 bytes
255 heads, 63 sectors/track, 130541 cylinders, total 2097152000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x86992fcf

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048  2097151999  1048574976   83  Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

Format with ext4:

mkfs.ext4 /dev/sdb1

Mount the partition:

mkdir /mnt/disk
mount /dev/sdb1 /mnt/disk
This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.  More information about cookies 
linux/fdisk.txt · Last modified: 2024/07/31 12:00 by gsys