Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Cannot boot from usb flash drive
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
nxe9
n00b
n00b


Joined: 05 Jun 2021
Posts: 48

PostPosted: Tue Sep 06, 2022 9:53 am    Post subject: Cannot boot from usb flash drive Reply with quote

Error
Code:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block

Kernel config
https://dpaste.com/22TN7KDXP

fstab
Code:
PARTUUID=6eb5624a-6638-694e-a34c-d5a8c1d15cf1   /boot   vfat    defaults,noatime        0 2
PARTUUID=0e608335-af75-0443-8e78-b758a2925a2b   /   ext4    noatime                 0 1


System types are vfat and ext4
Code:
df -Th
/dev/sdf1      vfat
/dev/sdf2      ext4


The value of PARTUUID is definitely ok. I double checked it. I boot with pure efi. Previously, I tried with grub without success too. My other systems boot using efi without any problems.

I suspect I'm missing some drivers that support booting from usb flash drive, but which ones? I should add that I have a arch linux usb that boots from usb with no problems, so the hardware can certainly do this.
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3879

PostPosted: Tue Sep 06, 2022 10:18 am    Post subject: Reply with quote

Plz see
[url]
https://wiki.gentoo.org/wiki/USB/Guide#Kernel_configuration
[/url]
_________________
:)


Last edited by alamahant on Tue Sep 06, 2022 10:38 am; edited 1 time in total
Back to top
View user's profile Send private message
nxe9
n00b
n00b


Joined: 05 Jun 2021
Posts: 48

PostPosted: Tue Sep 06, 2022 10:37 am    Post subject: Reply with quote

alamahant wrote:
Plz see
[url]
https://wiki.gentoo.org/wiki/USB/Guide#Kernel_configuration
[/url]


As far as I can see, I have everything on the list activated. I am omitting USB Network Adapters, USB Serial Converter support, USB Type-C and Thunderbolt (my mainboard doesn't have any usb-c) and USB Audio, as these points do not seem to apply to me.

alamahant wrote:
In menuconfig search for
Code:

CONFIG_HID

Code:
CONFIG_HID=y
is activated in my config.
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3879

PostPosted: Tue Sep 06, 2022 10:59 am    Post subject: Reply with quote

Plz search for
Code:

CONFIG_USB_UAS

Code:

Symbol: USB_UAS [=m]                                                                                          │ 
  │ Type  : tristate                                                                                              │ 
  │ Defined at drivers/usb/storage/Kconfig:189                                                                    │ 
  │   Prompt: USB Attached SCSI                                                                                   │ 
  │   Depends on: USB_SUPPORT [=y] && USB [=y] && SCSI [=y] && USB_STORAGE [=m]                                   │ 
  │   Location:                                                                                                   │ 
  │     Main menu                                                                                                 │ 
  │       -> Device Drivers                                                                                       │ 
  │         -> USB support (USB_SUPPORT [=y])                                                                     │ 
  │ (1)       -> USB Mass Storage support (USB_STORAGE [=m])                                                      │ 
  │                 

_________________
:)
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4236
Location: Bavaria

PostPosted: Tue Sep 06, 2022 11:03 am    Post subject: Reply with quote

nxe9,

"Config_hid" is needed for your keyboard and has nothing to do with booting from an usb drive. For booting from an USB device you must have compiled all necessary modules static into your kernel. You have this - Good ! But sometimes USB devices need more time to be available, so, I assume the only you are missing is:
Code:
CONFIG_CMDLINE="root=PARTUUID=0e608335-af75-0443-8e78-b758a2925a2b rootwait"

If this does not help we need the numbers behind your kernel panic error ("Kernel panic - not syncing: VFS:"); is it (0,0) or other ?
Back to top
View user's profile Send private message
nxe9
n00b
n00b


Joined: 05 Jun 2021
Posts: 48

PostPosted: Tue Sep 06, 2022 4:11 pm    Post subject: Reply with quote

alamahant wrote:
Plz search for
Code:

CONFIG_USB_UAS


Simply activating option CONFIG_USB_UAS was not enough. Still not able to boot.

pietinger wrote:
Code:
... rootwait"

Fantastic :). It works now.

Thank you all for your help. As usual, you have helped me.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Sep 06, 2022 7:52 pm    Post subject: Reply with quote

nxe9,

The kernel normally mounts root before it starts USB.
That's a problem with root on USB. rootwait fixes that.
_________________
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
nxe9
n00b
n00b


Joined: 05 Jun 2021
Posts: 48

PostPosted: Wed Sep 07, 2022 8:30 am    Post subject: Reply with quote

NeddySeagoon wrote:
The kernel normally mounts root before it starts USB.

However, I don't think it's a question of such design but simply a question of timing. I tried to mount usb-root inside init (initramfs) and it failed. Once 'sleep(10)' was added, it started to work.
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