Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
I can't format the disk partitions before installing Gentoo
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
soustan
n00b
n00b


Joined: 12 Apr 2020
Posts: 4

PostPosted: Fri Jan 17, 2025 5:34 pm    Post subject: I can't format the disk partitions before installing Gentoo Reply with quote

Good day, Everyone!

I can't format the disk partitions before installing Gentoo OS.

During the installation of Gentoo OS, it is necessary to format the hard disk partitions.
The system is installed on a separate disk (SSD) ---> /dev/sdb.

#fdisk /dev/sdb

Debian12 OS(/dev/sda) is also installed on this computer.

#fdisk /dev/sda

I am trying to format a partition (SSD) ---> /dev/sdb1 into a FAT32 file system.
However, the following error occurs.
Code:
#mkfs.vfat -F 32 /dev/sdb1
mkfs.fat 4.2 (2021-01-31)
mkfs.vfat: unable to open /dev/sdb1: Device or resource busy


# mount

Please tell me where I am wrong? How do I format the sections correctly?

Fixed pastbin link -- NeddySeagoon - twice ... and again
... and code tags
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54725
Location: 56N 3W

PostPosted: Fri Jan 17, 2025 5:49 pm    Post subject: Reply with quote

soustan,

Code:
# fdisk /dev/sdb
 
Welcome to fdisk (util-linux 2.40.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
 
This disk is currently in use - repartitioning is probably a bad idea.
It's recommended to umount all file systems, and swapoff all swap
partitions on this disk.


That suggests that part of /dev/sdb is in use.

Code:
unable to open /dev/sdb1: Device or resource busy
says that sdb1 exists but is being used by something else.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
soustan
n00b
n00b


Joined: 12 Apr 2020
Posts: 4

PostPosted: Fri Jan 17, 2025 6:04 pm    Post subject: Reply with quote

NeddySeagoon,

I understand that the ssd drive is busy with something. However, the output of the #mount ,
command is he doesn't write anything about it.
How to understand this and how to find out what /dev/sdb is doing?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54725
Location: 56N 3W

PostPosted: Fri Jan 17, 2025 6:18 pm    Post subject: Reply with quote

soustan,

Try a reboot. After you have made changes with fdisk, the syncing are rereading partiton tables does not always work.
A restart forces the kernel to read the partition tables again.

Beware that kernel device names are not deterministic. They are allocated in device discovery order which can change from boot to boot.
Take care that you make your filesystems on the right device.

Use
Code:
fdisk -l
to check.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
soustan
n00b
n00b


Joined: 12 Apr 2020
Posts: 4

PostPosted: Fri Jan 17, 2025 6:33 pm    Post subject: Reply with quote

NeddySeagoon,

Output of the #fdisk -l command.
The fact is that after restarting the computer, nothing in the sense that the disk partition /dev/sda1 does not change. And he's still busy.
Maybe some other command output is needed?

GPT PMBR size mismatch (7465131 != 15820799) will be corrected by write.
The backup GPT table is not on the end of the device.

Perhaps it's all about this recording?
However, I cannot understand what "will be corrected by write" means??
I have already written down the partition table by specifying the "w" symbol. Or is there something else that needs to be done?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54725
Location: 56N 3W

PostPosted: Fri Jan 17, 2025 7:03 pm    Post subject: Reply with quote

soustan,

Code:
GPT PMBR size mismatch (7465131 != 15820799) will be corrected by write.
The backup GPT table is not on the end of the device.


The Primary Master Boot Record (PMBR) the partition table, does not match the size of the device. Hence, 7465131 != 15820799.
I don't see where either of those numbers come from.

There is a secondary boot record, which is supposed to be at the end of the device but
Code:
The backup GPT table is not on the end of the device
says that its in the wrong place.
Both problems
Code:
will be corrected by write.


That makes me nervous. If there is nothing on your
Code:
Disk /dev/sdb: 1.86 TiB, 2048408248320 bytes, 4000797360 sectors
Disk model: SSD 2TB
yet, I would make a new partition table on it and start from there.

If you move the backup partition table, you don't know what's in the space where it will be moved to.
It should be outside of any partition but your last partition ends at sector 4000796671, which looks about right for a 4000797360 sector volume.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
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