Fórumok » Beállítások »
Partíció létrehozása (új lemez esetén)
Pesta KI adta hozzá csaknem 1 hónapja
Legyél root userrel!¶
Lemezek/Partíciók kilistázása
fdisk -l
Ilyesmit kell láss :
root@hostname:~# fdisk -l Disk /dev/sda: 25 GiB, 26843545600 bytes, 52428800 sectors Disk model: Virtual disk Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: F3F2DD2F-F6E4-48BD-9D1B-2407D4DE4D0D Device Start End Sectors Size Type /dev/sda1 2048 2203647 2201600 1G EFI System /dev/sda2 2203648 52426751 50223104 23.9G Linux filesystem Disk /dev/sdb: 150 GiB, 161061273600 bytes, 314572800 sectors Disk model: Virtual disk Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 byte
Futtasd az fdisket a kívánt lemezen
fdisk /dev/sdx
Most add ki az utasításokat az fdisk nek, mit csináljon!
- g (GPT)
- n (Új partíció)
Ha az egész lemezt akarod partícionálni, entert nyomj, mikrot az értékeket várja.
- w (write)
root@hostname:~# fdisk /dev/sdb
Welcome to fdisk (util-linux 2.39.3).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Device does not contain a recognized partition table.
Created a new DOS (MBR) disklabel with disk identifier 0x5d66cf29.
Command (m for help): g
Created a new GPT disklabel (GUID: 77813FBD-9FE4-43DB-A3CD-EEA792B3B950).
Command (m for help): n
Partition number (1-128, default 1):
First sector (2048-314572766, default 2048):
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-314572766, default 314570751):
Created a new partition 1 of type 'Linux filesystem' and of size 150 GiB.
Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
root@hostname:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 25G 0 disk
├─sda1 8:1 0 1G 0 part /boot/efi
└─sda2 8:2 0 23.9G 0 part /
sdb 8:16 0 150G 0 disk
└─sdb1 8:17 0 150G 0 part
sr0 11:0 1 1024M 0 rom
Formázd ext4 re:
mkfs.ext4 /dev/sdx1
A csatolás Itt van leírva.¶
| fdisk-tarticionalas.png (59,6 KB) fdisk-tarticionalas.png | fdisk-lista | ||
| fdisk-tarticionalas-2.png (80,5 KB) fdisk-tarticionalas-2.png | fdisk-tarticionalas-2 |