LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-28-2018, 01:17 PM   #1
X-LFS-2010
Member
 
Registered: Apr 2016
Posts: 510

Rep: Reputation: 58
cannot boot from grub USB thumb drive: /dev/sdb not detected...


i suspect a usb kernel config issue - but no idea what there are so many to find.

hardware: using a semi-recent PC running an icore5

grub2 is on the usb thumb and loads kernel fine, kernel has static usb stuff (see below)

VFS: Cannot open root device "sdb2" ...

The kernel loads usbcore ... but the messages go by so quick i can't see them. my scroll lock doesn't seem to work on logitech to read it. with an iphone i photo'ed and saw usb-storage is registered before (scsi).

Next the kernel loads scsi/sata and says it finds "sda" (the pc hardrive which doesn't have linux on it yet, but not sdb,sdc or what. If i am runtime older pc and ranran 'fdisk -l' it'd list both sda and sdb with the usb plugged in at any time (without mounting).

based on some docs i tried kernel param: rootdelay=15. i even tried unplugging the USB and plugging it back in during that 15 seconds. didn't help, still not sdX arrived.

for root= I tried: sdb,sdc,sdd, and UUIDs. (note kernel never mounts never sees fstab)

# obvious. here's what i'd load if module, but it's compiled into kernel being used
usbcore
uhci-hcd # not required for usb-storage
usb-storage

I do realize it's possible to make an initrd or initramfs that would be read off USB at the time the kernel is. I haven't done so: takes time to prepare one. My reasoning is there's no module and no binary I know of that an initrd has to load. It should be all done at some point during boot using kernel i got.

I can't find ANY previous linuxquestion thread on the matter of when and how usb-storage memstick become available when plugged (at what stage in whole boot / runlevel thing). I just know if I add an HDD with linux and it booted that plugged memsticks would be detected as sdb,sdc,sdd. But i'd have to buy gear since my old pc hd is ide not sata.

All I know is allot of people make USB boot disks so there is a recipe not too well shared ?!

i'm just about to try a 71MB initrd shell to see if linux won't choke on it. but again i see no reason, read no reason, why it would help. i already know that merely entering initrd with a trivial shell "doesn't help", same VFS error after exit

Last edited by X-LFS-2010; 05-28-2018 at 10:04 PM.
 
Old 05-28-2018, 08:23 PM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
tl;dr
what are you trying to boot?
and how did you create the bootable usb?
 
Old 05-28-2018, 08:28 PM   #3
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
You claim you don't require initrd to boot the system, yet the system won't boot when you don't have one. Sometimes the system will enumerate the USB drive as /dev/sda when you're booting off it.
 
Old 05-29-2018, 08:54 AM   #4
X-LFS-2010
Member
 
Registered: Apr 2016
Posts: 510

Original Poster
Rep: Reputation: 58
Quote:
Originally Posted by AwesomeMachine View Post
You claim you don't require initrd to boot the system, yet the system won't boot when you don't have one. Sometimes the system will enumerate the USB drive as /dev/sda when you're booting off it.
no and yes.

no it's not even close to true a system needs an initrd to boot. if you built modules into the kernel you need to boot you do not need any initrd at all. the initrd is for solving the "mainstream linux OS" problem of making a kernel for everyone (people who don't built their own kernel). go to www.kernel.org and try it.

yes linux assigns sdX in a bus order manner that can change. however i mentioned about that isn't the issue and that UUID is being used.

Last edited by X-LFS-2010; 05-29-2018 at 09:08 AM.
 
Old 05-29-2018, 09:00 AM   #5
X-LFS-2010
Member
 
Registered: Apr 2016
Posts: 510

Original Poster
Rep: Reputation: 58
Quote:
Originally Posted by ondoho View Post
tl;dr
what are you trying to boot?
and how did you create the bootable usb?
linux kernel 2.6.3x with modules "built-in" to kernel i need to boot is being used on old and hopefully new system. userland is gcc-4.4.5-ish and i'd use linux kernel 4.16.12 if i knew of a firm reason to do so. but upgrading kernel when it's not what's wrong - well many have done it only to find out they still have more to do. i was thinking of upgrading kernel after i got the thing working actually (because the newer pc compiles faster and has more hd space)

the grub-2.02 itself was easy to create. i merely compiled grub-2.02 from source and followed the directions of it's manual.

Last edited by X-LFS-2010; 05-29-2018 at 09:09 AM.
 
Old 05-29-2018, 09:18 AM   #6
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,372

Rep: Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593
what about the drivers for the usb host controller ehci/xhci?
 
Old 05-29-2018, 09:20 AM   #7
X-LFS-2010
Member
 
Registered: Apr 2016
Posts: 510

Original Poster
Rep: Reputation: 58
i skimmed a few kernel changelogs by eye and see USB has had an extremum of problemed releses. several serious and non-serious usb fixes per changelog.

"the industry" promoted USB as cheaper and less complicated than Firewire like it did ide versus scsi. Looking at the record on usb being hacked up to speed 3.0 and the resulting "changes" and reliance on kernel drivers having to service the weak protocols: i wonder if that's true - that it's cheaper and simpler.
 
Old 05-29-2018, 09:26 AM   #8
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
I've never been able to configure a kernel to boot without initrd. I know it's possible. But it isn't easy.
 
Old 05-29-2018, 10:04 AM   #9
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,659
Blog Entries: 19

Rep: Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480
Quote:
Originally Posted by AwesomeMachine View Post
I've never been able to configure a kernel to boot without initrd. I know it's possible. But it isn't easy.
It's very easy if your system is on the hard drive! I've been doing it for years. All you have to do is make sure the pata/sata driver and the root filesystem driver are included in the kernel, not built as modules.

I've heard of people having problems with systems on memory sticks. It's usually due to timing errors. But OP says he's used rootdelay and it didn't help.

Last edited by hazel; 05-29-2018 at 10:06 AM.
 
Old 05-29-2018, 11:29 AM   #10
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
so you have grub on sdb? and where is the kernel sdb?/boot.
can you post your grub.cfg that you are trying to use.
I take it you can boot from a usb device "bios" allowing
 
Old 05-29-2018, 11:48 AM   #11
X-LFS-2010
Member
 
Registered: Apr 2016
Posts: 510

Original Poster
Rep: Reputation: 58
Quote:
Originally Posted by colorpurple21859 View Post
what about the drivers for the usb host controller ehci/xhci?
they are in kernel, static, no need to "load modules"
 
Old 05-29-2018, 11:58 AM   #12
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,659
Blog Entries: 19

Rep: Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480
So you have your usb storage built in plus sata driver plus ext4 filesystem driver.

btw the modern sata driver (libata) handles ide disks too, so you could use your hard drive if you had to.
 
Old 05-29-2018, 12:00 PM   #13
X-LFS-2010
Member
 
Registered: Apr 2016
Posts: 510

Original Poster
Rep: Reputation: 58
Quote:
Originally Posted by spiky0011 View Post
so you have grub on sdb? and where is the kernel sdb?/boot.
can you post your grub.cfg that you are trying to use.
I take it you can boot from a usb device "bios" allowing
grub2 is not an issue: it already loads kernel and initrd, kernel starts

kernel parameters may be an issue. but it was said sdb and UUID were tried / used. the question on parameters is if there is some magic parameter for making usb-storage appear before mounting root (before the VFS message)
 
Old 05-29-2018, 12:02 PM   #14
X-LFS-2010
Member
 
Registered: Apr 2016
Posts: 510

Original Poster
Rep: Reputation: 58
Quote:
Originally Posted by hazel View Post
So you have your usb storage built in plus sata driver plus ext4 filesystem driver.

btw the modern sata driver (libata) handles ide disks too, so you could use your hard drive if you had to.
i don't use ext4. but your right and wrong both: i could risk moving the old ide drive into the new pc. but it would require $purchases and risk of (ie, of dropping it, of twisting a pin, whatever)

it'd be beautiful if these PCs were more network friendly. they aren't!
 
Old 05-29-2018, 12:17 PM   #15
X-LFS-2010
Member
 
Registered: Apr 2016
Posts: 510

Original Poster
Rep: Reputation: 58
here's a for example i'm wondering about

years ago i made a bootable CD. if i remember, the initrd or linuxrc had to have a "second root" because the bios would not let go of the original drive: one had to load a ramdisk root, unmount, remount, the mount the "real root". but cdrom was always a backwards thing: ie, it couldn't be formatted ext2 with a boot partition - they needed to use el torito or something.

i have ZERO idea if those kinds of issues are involved for usb flash. i'm rather hoping it's more like booting from a floppy drive. (that the bios and kernel both have rigorous treatment and require not games being played)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] /dev/sdb: unrecognised disk label and can't boot from usb konakona Linux - Software 1 07-25-2016 12:03 AM
USB Flash Drive: No Media Detected; Format gets: exit code 1: cannot open /dev/sdb: sisterdelirious Linux - Newbie 15 01-30-2012 09:25 PM
cant boot sdb2 (win7); sdb is usb 3.0 externel drive; grub is on sda; ununun Linux - General 11 01-02-2012 01:27 PM
[SOLVED] Grub: If exists sdb, then boot sdb, else sda defaultyeti Linux - Desktop 6 06-28-2011 02:38 AM
USB thumb drive detected by usb but not by scsi ashlock Linux - Hardware 6 06-02-2005 02:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration