Create a new disk

rruseva

New Member
Joined
May 11, 2022
Messages
4
Reaction score
1
Credits
29
Hello
I am new to Linux and I found trouble trying to create a new disk.
The commands that I use are those: sudo su -> fdisk -l (to check the disks) -> man fdisk -> fdisk /dev/sdb (the disk that I want to create). There is a message that No such directory.
Any idea how to create a new disk?
 


captain-sensible

Well-Known Member
Joined
Jun 14, 2019
Messages
2,868
Reaction score
1,936
Credits
17,766
i'm not being facetious but you mean format a new drive ? gParted is a gui and good to play , also cfdisk from command line.

So most of us just use sudo with command; so your going su -> # meaning root ?

maybe post output of fdisk -l so we can see , but did you unmount /dev/sdb ? if so then it won't show up with fdisk -l
 
OP
R

rruseva

New Member
Joined
May 11, 2022
Messages
4
Reaction score
1
Credits
29
I have only one disk - sda and my task is to create/add new disk
 

dos2unix

Well-Known Member
Joined
May 3, 2019
Messages
1,449
Reaction score
1,055
Credits
8,957
I have only one disk - sda and my task is to create/add new disk

If you only have one disk, then obviously you can't add another one.
Are you booting from a USB drive? Or is this drive your OS disk?
 

forester

Active Member
Joined
Mar 5, 2022
Messages
324
Reaction score
180
Credits
2,350
Code:
sudo passwd root
Follow instructions given to create new root password
Login as root offline
CSS:
cfdisk /dev/sda
I learned to use cfdisk along with gparted, as I like to check to see if I used gparted correctly, especially with extended partitions.

Once partitions created and as wanted, hit capital W to write and install on partition created for it.
 

dos2unix

Well-Known Member
Joined
May 3, 2019
Messages
1,449
Reaction score
1,055
Credits
8,957
I learned to use cfdisk along with gparted,

One thing to be aware of... cfdisk looks for SATA drives first ( /dev/sda ).
In my case, my OS drive is an nvme drive. My SATA drive is external.
So if you're not careful, you can delete your data drive, not your OS drive. :)
 
OP
R

rruseva

New Member
Joined
May 11, 2022
Messages
4
Reaction score
1
Credits
29
What to do in that case? Should I create a new virtual machine and install again linux?
 

forester

Active Member
Joined
Mar 5, 2022
Messages
324
Reaction score
180
Credits
2,350
@dos2unix -- good info re: nvme I was not aware of with cfdisk
@rruseva -- state VM being used, hardware information wcith initial post requesting help. It makes is easier on us and not including correct info may lead to a system problem.

"Linux assumes users know exactly what they are doing!"
 

KGIII

Super Moderator
Staff member
Gold Supporter
Joined
Jul 23, 2020
Messages
6,467
Reaction score
5,726
Credits
52,033
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Linux.org Hosting Donations
Consider making a donation

Members online


Top