View previous topic :: View next topic |
Author |
Message |
soustan n00b
Joined: 12 Apr 2020 Posts: 7
|
Posted: Fri Jan 17, 2025 5:34 pm Post subject: I can't format the disk partitions before installing Gentoo |
|
|
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 |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54736 Location: 56N 3W
|
Posted: Fri Jan 17, 2025 5:49 pm Post subject: |
|
|
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 |
|
|
soustan n00b
Joined: 12 Apr 2020 Posts: 7
|
Posted: Fri Jan 17, 2025 6:04 pm Post subject: |
|
|
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 |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54736 Location: 56N 3W
|
Posted: Fri Jan 17, 2025 6:18 pm Post subject: |
|
|
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 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 |
|
|
soustan n00b
Joined: 12 Apr 2020 Posts: 7
|
Posted: Fri Jan 17, 2025 6:33 pm Post subject: |
|
|
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 |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54736 Location: 56N 3W
|
Posted: Fri Jan 17, 2025 7:03 pm Post subject: |
|
|
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 |
|
|
soustan n00b
Joined: 12 Apr 2020 Posts: 7
|
Posted: Sat Jan 18, 2025 11:38 am Post subject: |
|
|
NeddySeagoon,
I deleted the partition table and overloaded the computer.
After restarting the computer, I disabled the SSD disk with Debian OS. Leaving only one SSD (2 TB) to install Gentoo OS on it. Next, I changed the disklabeltype from "gpt" to "dos".
After that, I divided the only SDD (2TB) back into the following sections:
#fdisk -l
However, the system writes to me again that...
"The GPT backup table is not at the end of the device."
I understand that I cannot format the disk partitions further (#mkfs.vfat -F 32 /dev/sda1, .../dev/sda2, ... /dev/sda3 and others).
Code: | # mkfs.vfat -F 32 /dev/sda1
mkfs.fat 4.2 (2021-01-31)
mkfs.vfat: unable to open /dev/sda1: Device or resource busy
|
1. However, I do not understand how (with which commands) I can remove the message "The GPT backup table is not at the end of the device." ?
2. In order to continue formatting partitions and installing Gentoo OS.
Please(!), can you help me answer this question? |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54736 Location: 56N 3W
|
Posted: Sat Jan 18, 2025 4:46 pm Post subject: |
|
|
soustan,
fdisk is confused.
making a dos partition table does not destroy an existing gpt table.
If you are expecting to use UEFI to boot, you must use a GPT disk label. UEFI firmware cannot read a DOS partition table. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
soustan n00b
Joined: 12 Apr 2020 Posts: 7
|
Posted: Sat Jan 18, 2025 4:58 pm Post subject: |
|
|
NeddySeagoon,
But if not, I can boot from a bootable USB stick only in non-UEFI mode ! Because, computer print "Kernel panic...", for UEFI mode. Then should I use only disklabeltype DOS ? |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54736 Location: 56N 3W
|
Posted: Sat Jan 18, 2025 5:02 pm Post subject: |
|
|
soustan,
What computer do you have?
How do you boot your Debian install, its on GPT too. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
soustan n00b
Joined: 12 Apr 2020 Posts: 7
|
Posted: Sat Jan 18, 2025 5:14 pm Post subject: |
|
|
NeddySeagoon,
I wrote to you earlier that I disconnected the SSD drive(Debian OS).
And now, I'm booting from a bootable USB stick.
On which Gentoo OS is installed (livegui-amd64-20250105T170325Z.iso ).
And as the disk on which I'm going to install Gentoo OS.
I am using an SSD disk(2 TB).
Conclusions, after the reboot, I provided you with the above. SSD (2TB) = /dev/sda .
And Disk model: Transcend 8GB = /dev/sdb (livegui-amd64-20250105T170325Z.iso )
#fdisk -l
I hope that I have now explained the current situation clearly? |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54736 Location: 56N 3W
|
Posted: Sat Jan 18, 2025 5:20 pm Post subject: |
|
|
soustan,
I am looking forward. I think I understand the current situation.
However you boot Debian needs to be carried over for Gentoo too or you will be switching between BIOS/UEFI to change between the two.
The answer to how Debian boots influences what we do to install Gentoo. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
|