Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

[Solved - reformat] No /dev/sdb1 on FAT32 (LBA) USB drive

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
9 posts • Page 1 of 1
Author
Message
web.user
n00b
n00b
Posts: 17
Joined: Fri May 14, 2021 5:34 pm
Contact:
Contact web.user
Website

[Solved - reformat] No /dev/sdb1 on FAT32 (LBA) USB drive

  • Quote

Post by web.user » Sat May 22, 2021 12:55 pm

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: Select all

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: Select all

FAT-fs (sdb): bogus number of reserved sectors
FAT-fs (sdb): Can't find a valid FAT filesystem
cat /proc/filesystems | grep fat:

Code: Select all

vfat
exfat
grep FAT /usr/src/linux/.config

Code: Select all

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.
Top
alamahant
Advocate
Advocate
Posts: 4034
Joined: Sat Mar 23, 2019 12:12 pm

  • Quote

Post by alamahant » Sat May 22, 2021 1:25 pm

Hi insert usb and run
lsblk
plz
Also

emerge -av dosfstools
:)
Top
web.user
n00b
n00b
Posts: 17
Joined: Fri May 14, 2021 5:34 pm
Contact:
Contact web.user
Website

lsblk

  • Quote

Post by web.user » Sat May 22, 2021 1:27 pm

I insert USB and ran lsblk (not included LUKS and nvme system partitions):

Code: Select all

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)
Top
alamahant
Advocate
Advocate
Posts: 4034
Joined: Sat Mar 23, 2019 12:12 pm

  • Quote

Post by alamahant » Sat May 22, 2021 1:37 pm

Here are mine

Code: Select all

# 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
:)
:)
Top
web.user
n00b
n00b
Posts: 17
Joined: Fri May 14, 2021 5:34 pm
Contact:
Contact web.user
Website

  • Quote

Post by web.user » Sat May 22, 2021 1:43 pm

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: Select all

/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!
Top
alamahant
Advocate
Advocate
Posts: 4034
Joined: Sat Mar 23, 2019 12:12 pm

  • Quote

Post by alamahant » Sat May 22, 2021 1:48 pm

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

partprobe
mkfs.vfat
mkfs.fat -F32
etc
:)
Top
web.user
n00b
n00b
Posts: 17
Joined: Fri May 14, 2021 5:34 pm
Contact:
Contact web.user
Website

Solved

  • Quote

Post by web.user » Sat May 22, 2021 2:37 pm

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.
Top
Hu
Administrator
Administrator
Posts: 24395
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Sat May 22, 2021 3:50 pm

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.
Top
redjard
n00b
n00b
Posts: 1
Joined: Sun Dec 15, 2024 5:16 pm
Contact:
Contact redjard
Website

  • Quote

Post by redjard » Sun Dec 15, 2024 5:47 pm

I came across the same problem just now, and in my case my kernel was indeed missing MBR support.
The kernel flag is

Code: Select all

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
Top
Post Reply

9 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic