View previous topic :: View next topic |
Author |
Message |
web.user n00b
Joined: 14 May 2021 Posts: 17
|
Posted: Sat May 22, 2021 12:55 pm Post subject: [Solved - reformat] No /dev/sdb1 on FAT32 (LBA) USB drive |
|
|
Hi! I enabled FAT/VFAT kernel options, but when I insert USB, ls /dev/sd* shows that there are /dev/sdb but no /dev/sdb1. Fdisk recognizes the partition:
Code: | Disk /dev/sdb: 14.32 GiB, 15376000000 bytes, 30031250 sectors
Disk model: Ultra
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: dos
Disk identifier: 0x00000000
Device Boot Start End Sectors Size Id Type
/dev/sdb1 32 30031249 30031218 14.3G c W95 FAT32 (LBA) |
Also, Arch Linux laptop shows /dev/sdb1 and I can mount it.
I tried partprobe /dev/sdb but no luck. When I try to mount /dev/sdb, it fails and the following appears in dmesg:
Code: | FAT-fs (sdb): bogus number of reserved sectors
FAT-fs (sdb): Can't find a valid FAT filesystem |
cat /proc/filesystems | grep fat:
grep FAT /usr/src/linux/.config
Code: | CONFIG_FAT_FS=y
CONFIG_VFAT_FS=y
CONFIG_FAT_DEFAULT_CODEPAGE=437
CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
# CONFIG_FAT_DEFAULT_UTF8 is not set
CONFIG_EXFAT_FS=y
CONFIG_EXFAT_DEFAULT_IOCHARSET="utf8" |
I use GPT table for my system, and USB drive is MSDOS, it can be the cause.. Help please, I ran out of ideas.
Last edited by web.user on Sat May 22, 2021 2:31 pm; edited 1 time in total |
|
Back to top |
|
|
alamahant Advocate
Joined: 23 Mar 2019 Posts: 3926
|
Posted: Sat May 22, 2021 1:25 pm Post subject: |
|
|
Hi insert usb and run
lsblk
plz
Also
emerge -av dosfstools _________________
|
|
Back to top |
|
|
web.user n00b
Joined: 14 May 2021 Posts: 17
|
Posted: Sat May 22, 2021 1:27 pm Post subject: lsblk |
|
|
I insert USB and ran lsblk (not included LUKS and nvme system partitions):
Code: | NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 500G 0 disk
└─sda1 8:1 0 500G 0 part
sdb 8:16 1 14.3G 0 disk |
Thanks for suggestion, but I've already emerged dosfstools (and tried to fsck.vfat with no luck) |
|
Back to top |
|
|
alamahant Advocate
Joined: 23 Mar 2019 Posts: 3926
|
Posted: Sat May 22, 2021 1:37 pm Post subject: |
|
|
Here are mine
Code: |
# DOS/FAT/EXFAT/NT Filesystems
CONFIG_FAT_FS=m
CONFIG_VFAT_FS=m
CONFIG_FAT_DEFAULT_CODEPAGE=437
CONFIG_FAT_DEFAULT_IOCHARSET="ascii"
CONFIG_FAT_DEFAULT_UTF8=y
CONFIG_EXFAT_FS=m
CONFIG_EXFAT_DEFAULT_IOCHARSET="utf8"
# end of DOS/FAT/EXFAT/NT Filesystems
|
I never had a problem with fat.
Maybe bad usb.....
Or missing kernel usb ..config
_________________
|
|
Back to top |
|
|
web.user n00b
Joined: 14 May 2021 Posts: 17
|
Posted: Sat May 22, 2021 1:43 pm Post subject: |
|
|
Tried to build as modules and modprobe them, still doesn't work.
Seems like you are right about bad usb, I think it is somehow poorly formatted. file -s /dev/sdb shows this:
Code: | /dev/sdb: DOS/MBR boot sector; partition 1 : ID=0xc, start-CHS (0x0,0,33), end-CHS (0x3ff,254,63), startsector 32, 30031218 sectors, extended partition table (last) |
I think 'MBR boot sector' on USB drive is really strange..
By the way, other USB drives work normally, I will reformat this one.
Thanks for help! |
|
Back to top |
|
|
alamahant Advocate
Joined: 23 Mar 2019 Posts: 3926
|
Posted: Sat May 22, 2021 1:48 pm Post subject: |
|
|
gdisk /dev/sdb
-> o
->n
->w
partprobe
mkfs.vfat
mkfs.fat -F32
etc _________________
|
|
Back to top |
|
|
web.user n00b
Joined: 14 May 2021 Posts: 17
|
Posted: Sat May 22, 2021 2:37 pm Post subject: Solved |
|
|
You was right, it is a bad USB. After reformatting drive, it works like a charm . That's strange that it worked on another computer by the way.
Again, thanks for help. Marking this thread as solved. |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 22853
|
Posted: Sat May 22, 2021 3:50 pm Post subject: |
|
|
Since the partition was not visible in Linux, it did not matter whether your kernel understood the filesystem that was on the partition, because you never got far enough to need the kernel to understand it. My guess would be that your Gentoo kernel has GPT support, but not MBR support, and that the Arch kernel had both. When you reformatted the partition, you rebuilt with a partition type that your kernel did understand. |
|
Back to top |
|
|
redjard n00b
Joined: 15 Dec 2024 Posts: 1
|
Posted: Sun Dec 15, 2024 5:47 pm Post subject: |
|
|
I came across the same problem just now, and in my case my kernel was indeed missing MBR support.
The kernel flag is
Code: |
CONFIG_MSDOS_PARTITION=y
|
Without this flag, mbr drives will show up without partition block devices, i.e. the /dev/sdb without /dev/sdb1 as op described.
This documented in Gentoo wiki > Partition > Master Boot Record (MBR) > Kernel configuration |
|
Back to top |
|
|
|