Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved - reformat] No /dev/sdb1 on FAT32 (LBA) USB drive
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
web.user
n00b
n00b


Joined: 14 May 2021
Posts: 17

PostPosted: Sat May 22, 2021 12:55 pm    Post subject: [Solved - reformat] No /dev/sdb1 on FAT32 (LBA) USB drive Reply with quote

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:
Code:
vfat
exfat

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
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3925

PostPosted: Sat May 22, 2021 1:25 pm    Post subject: Reply with quote

Hi insert usb and run
lsblk
plz
Also

emerge -av dosfstools
_________________
:)
Back to top
View user's profile Send private message
web.user
n00b
n00b


Joined: 14 May 2021
Posts: 17

PostPosted: Sat May 22, 2021 1:27 pm    Post subject: lsblk Reply with quote

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
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3925

PostPosted: Sat May 22, 2021 1:37 pm    Post subject: Reply with quote

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
View user's profile Send private message
web.user
n00b
n00b


Joined: 14 May 2021
Posts: 17

PostPosted: Sat May 22, 2021 1:43 pm    Post subject: Reply with quote

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
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3925

PostPosted: Sat May 22, 2021 1:48 pm    Post subject: Reply with quote

gdisk /dev/sdb
-> o
->n
->w

partprobe
mkfs.vfat
mkfs.fat -F32
etc
_________________
:)
Back to top
View user's profile Send private message
web.user
n00b
n00b


Joined: 14 May 2021
Posts: 17

PostPosted: Sat May 22, 2021 2:37 pm    Post subject: Solved Reply with quote

You was right, it is a bad USB. After reformatting drive, it works like a charm :D. That's strange that it worked on another computer by the way.
Again, thanks for help. Marking this thread as solved.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22819

PostPosted: Sat May 22, 2021 3:50 pm    Post subject: Reply with quote

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
View user's profile Send private message
redjard
n00b
n00b


Joined: 15 Dec 2024
Posts: 1

PostPosted: Sun Dec 15, 2024 5:47 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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