Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved]Need some help applying a filesystem to a partition
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
GMifflen
n00b
n00b


Joined: 23 Jul 2022
Posts: 4

PostPosted: Sat Jul 23, 2022 5:00 am    Post subject: [Solved]Need some help applying a filesystem to a partition Reply with quote

Hello,

I've been following along with the amd64 handbook, and have started to making the filesystems in my partitions.

But, after inputting

Code:
livecd # mkfs.vfat /dev/sda1


I get the error

Code:
mkfs.fat 4.2 (29 Oct 2011)
mkfs.vfat: unable to open /dev/sda1: Device or resource busy


the only red flag(or text in this case) that I can see, is that when using

Code:
Command (m for help): fdisk /dev/sda


I get the message

Code:
This disk is currently in use - re-partitioning is probably a bad idea. It's recommended to umount all file systems, and swapoff all swap partitions on this disk


and when i do

Code:
livecd # umount -a


I get the response

Code:
umount: /mnt/livecd: target is busy
umount: /mnt/cdrom: target is busy
umount: /: target is busy
umount: /dev: target is busy
umount: /run: target is busy


If more info is needed please tell me,
any help is greatly appreciated

GMifflen


Last edited by GMifflen on Sat Jul 23, 2022 6:45 am; edited 2 times in total
Back to top
View user's profile Send private message
luna80
Veteran
Veteran


Joined: 01 Feb 2004
Posts: 1546
Location: switzerland

PostPosted: Sat Jul 23, 2022 5:33 am    Post subject: Reply with quote

are you using a livecd/usb key?

probably /dev/sda is the disk of install media support and not the disk you want to use

please paste the output of

Code:
#ls -all /dev/

_________________
*** !f j00 c4n r34D tH15 tH3N j00 n33D t0 l0g Off ***
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20067

PostPosted: Sat Jul 23, 2022 5:51 am    Post subject: Re: Need some help applying a filesystem to a partition Reply with quote

GMifflen wrote:
Code:
Command (m for help): mkfs.vfat /dev/sda1
If that isn't a copy / paste error, "Command (m for help):" looks like the prompt for the fdisk tool. mkfs is run from a shell prompt, not from within fdisk.

Example from the Gentoo Handbook
Code:
root # fdisk /dev/sda

Use the p key to display the disk's current partition configuration:
Command (m for help):p

Disk /dev/sda: 28.89 GiB, 31001149440 bytes, 60549120 sectors
Disk model: DataTraveler 2.0
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: 21AAD8CF-DB67-0F43-9374-416C7A4E31EA
 
Device        Start      End  Sectors  Size Type
/dev/sda1      2048   526335   524288  256M EFI System
/dev/sda2    526336  2623487  2097152    1G Linux swap
/dev/sda3   2623488 19400703 16777216    8G Linux filesystem
/dev/sda4  19400704 60549086 41148383 19.6G Linux filesystem
After disk partitioning is complete, file system creation would look something like this (also from the Handbook):
Code:
root # mkfs.vfat -F 32 /dev/sda1
root # mkfs.ext4 /dev/sda3

_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
GMifflen
n00b
n00b


Joined: 23 Jul 2022
Posts: 4

PostPosted: Sat Jul 23, 2022 6:07 am    Post subject: Reply with quote

luna80, that was the problem, I was trying to partition the flash drive instead of my main drive.

Thanks a million, hopefully everything works fine from here!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum