Fdisk: Difference between revisions

From CLONWiki
Jump to navigation Jump to search
Boiarino (talk | contribs)
Created page with "'''How to add new disk to Linux machine''' As root: fdisk /dev/sdb Press 'n', then 'p' and follow instructions. In the end, press 'w'. To format: mkfs -t ext4 /dev/sdb1 Add new entry to ''/etc/fstab'': /dev/sdb1 /data ext4 defaults 0 0 Mount new partition: mount -a"
 
Boiarino (talk | contribs)
No edit summary
 
Line 7: Line 7:
Press 'n', then 'p' and follow instructions. In the end, press 'w'.
Press 'n', then 'p' and follow instructions. In the end, press 'w'.


To format:
To format ('-m 0' will prevent reserving space for superuser usage, do not need it for ''/data'' or similar partitions, needed for ''/'' partition only):


  mkfs -t ext4 /dev/sdb1
  mkfs.ext4 -m 0 /dev/sdb1


Add new entry to ''/etc/fstab'':
Add new entry to ''/etc/fstab'':

Latest revision as of 14:16, 10 September 2025

How to add new disk to Linux machine

As root:

fdisk /dev/sdb

Press 'n', then 'p' and follow instructions. In the end, press 'w'.

To format ('-m 0' will prevent reserving space for superuser usage, do not need it for /data or similar partitions, needed for / partition only):

mkfs.ext4 -m 0 /dev/sdb1

Add new entry to /etc/fstab:

/dev/sdb1 /data	ext4	defaults     0   0

Mount new partition:

mount -a