Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
(Solved) Gentoo install on an USB
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
element432
n00b
n00b


Joined: 16 Dec 2016
Posts: 61

PostPosted: Mon Feb 19, 2018 7:17 pm    Post subject: (Solved) Gentoo install on an USB Reply with quote

I've been trying to install gentoo on a USB drive so I can use it at school, instead of the windows computers. I use to just use a persistent kali USB, but I wanted to give this a shot figuring it would be fun to get it working. I wanted it to be able to boot using bios and UEFI and the install went fine. I used genkernel and followed the guide below:

Code:
https://wiki.gentoo.org/wiki/Install_Gentoo_on_a_bootable_USB_stick


When I boot using UEFI, it gives me:

Code:
Could not find the root block device in UUID=5504d9a8-0d40-4024-9d9a-cfb22f91a507.
Please specify another value or:
press Enter for the same
type "shell" for a shell
type "q" to skip..


If I hit enter, it boots fine, so I'm not too sure what to look into for that.

The bigger problem is when I try to boot using bios/legacy, it freezes listing a bunch of ACPI Warnings.

I'm not too sure how to pull up what the warnings actually are to see if that's the cause, any advice would be great! Thanks


Last edited by element432 on Fri Feb 23, 2018 4:26 pm; edited 3 times in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Mon Feb 19, 2018 7:26 pm    Post subject: Reply with quote

element432,

Booting both ways needs a delay for the USB subsystem to get ready before root can be mouthed.
Normally, root is mounted before USB is started. That's a problem for root on USB.

The kernel understands two options, rootwait, which will wait forever for root to appear and rootdelay=<sec>
Both go on the kernel command line.

There is a complicaition, these commands need to apply to the real root filesystem, not your initrd.
That's easy enough if you don't use an initrd. Otherwise, the init script in the initrd needs to process them.
_________________
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
element432
n00b
n00b


Joined: 16 Dec 2016
Posts: 61

PostPosted: Mon Feb 19, 2018 7:36 pm    Post subject: Reply with quote

I need an initrd for genkernel right? This is my first time using genkernel so I'm still figuring it out haha.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Mon Feb 19, 2018 7:59 pm    Post subject: Reply with quote

element432,

Code:
genkernel all
builds you a fully modular kernel, so the way it works demands an inird, which it builds for you.

I've never used genkernel. You can close your eyes, cross your fingers and try those command line parameters.
They may not work. The init script may have its own ideas.

You can use cpio to unpick the initrd.
_________________
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
element432
n00b
n00b


Joined: 16 Dec 2016
Posts: 61

PostPosted: Mon Feb 19, 2018 8:03 pm    Post subject: Reply with quote

Alright,

Would this be what is causing it to not be able to boot when not using UEFI?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Mon Feb 19, 2018 8:12 pm    Post subject: Reply with quote

element432,

Yes. The kernel tries to mount root before it starts USB.
With root on USB, that just has to fail. By the time its failed, started USB and you hit enter, USB is ready, so it works.
_________________
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
element432
n00b
n00b


Joined: 16 Dec 2016
Posts: 61

PostPosted: Mon Feb 19, 2018 8:16 pm    Post subject: Reply with quote

Alright thank you! I'mma see what I can do with not using genkernel. I'll post back after class with an progress haha.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Mon Feb 19, 2018 8:32 pm    Post subject: Reply with quote

element432,

I use rootwait=7 on the USB install I use to build for my netboot and rootwait to mount root on USB for Raspberry Pi, so I know that they both work.
rootwait= is better for debug as rootwait will wait forever if root never appears and not give an error.

-- edit --

According to #gentoo-releng on freenode, rootwait does the right thing.

-- edit --

rootdelay/rootwait was added in generkenel-3.5.0.2. That may mean you need a testing version of genkernel.
_________________
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
element432
n00b
n00b


Joined: 16 Dec 2016
Posts: 61

PostPosted: Mon Feb 19, 2018 11:58 pm    Post subject: Reply with quote

You rock, I used the version of genkernel that was in testing, 3.5.2.5, and added rootwait=and this made me be able to boot using it both ways.
Back to top
View user's profile Send private message
element432
n00b
n00b


Joined: 16 Dec 2016
Posts: 61

PostPosted: Tue Feb 20, 2018 6:50 pm    Post subject: Reply with quote

I can make a new post if need be, but the issue came back again so I'm starting to think it was something else so I removed the (solved) tag.

I was able to boot using legacy bios and UEFI after I upgraded genkernel. Starting today, no real changes besides emerging mate, nmap, and wireshark, I have only been able to boot using UEFI based computers. I get a kernel panic when I boot into bios but I am not entirely sure how to view the whole message. The visible part is:

Code:
[<ffffffff812c9592>] dump_stack+0x68/0x96
[<ffffffff8115b4a6>] panic+0xd4/0x21c
[<ffffffff81093b3b>] > set_curr_task_fair+0x2b/0x60
[<ffffffff8106522e>] do_exit+0xa8e/0xa90
[<ffffffff810652af>]  do_group_exit+0x3f/0xb0
[<ffffffff8106f85b>]  get_signal+0x28b/0x610
[<ffffffff8101d4d8>] do_signal+0x28b/0x610
[<ffffffff8101e109>] ? do_trap+0x69/0x6d0
[<ffffffff8101e257>] ? do_error_trap+0x77/0xe0
[<ffffffff8104fbf1>]   ? __do_page_fault+0x78/oxa0
[<ffffffff810025a8>]  exit_to_usermode_loop+0x78/0xa0
[<ffffffff81002a1f>]   prepare_exit_to_usermode+0x2f/0x40
[<ffffffff8163eafe>]   retint_user+0x8/0x39
Kernel Offset: disabled
---[end Kernel panic - not syncing: Attempted to kill init! exit code=0x00000004
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Feb 20, 2018 7:45 pm    Post subject: Reply with quote

element432,

Code:
Attempted to kill init
is a very bad thing. That's the task that runs as PID 1 and starts the boot process.
Once the system is running its at the top of the process tree. It should actually do very little but if you kill it (don't test this) its rather like pulling the power cord out.

Can you tell where it goes wrong?
In the initrd, after the real root is mounted. ... The idea is to attempt to reduce the problem space.

You mention BIOS and UEFI booting. Have you done a grub update and not updated the out of filesystem parts.
The out of filesystem parts of grub are not used in UEFI mode, only in BIOS mode.
Boot in BIOS mode, chroot into your install and reinstall grub to the MBR.
_________________
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
element432
n00b
n00b


Joined: 16 Dec 2016
Posts: 61

PostPosted: Tue Feb 20, 2018 7:53 pm    Post subject: Reply with quote

Alright, ill redo that once I get back home. I did the whole install, including grub install, via chroot on my UEFI system. I didn't know if it made a difference or not with that, as long as I used:

Code:
grub-install --target=i386-pc /dev/sdx


I'll be back with an update!

Thanks.
Back to top
View user's profile Send private message
element432
n00b
n00b


Joined: 16 Dec 2016
Posts: 61

PostPosted: Wed Feb 21, 2018 3:32 pm    Post subject: Reply with quote

So I got it working on my laptop, I can boot BIOS and UEFI without issue. When I try on a different computer though, I get that same kernel panic that I posted before. I have tried several computers, but they are all exactly the same (college computer lab). I haven't been able to try a different one yet to see if it boots on other places except these ones, or only on my laptop. I'm not sure where to start to try and get it to boot on these computers.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Wed Feb 21, 2018 3:45 pm    Post subject: Reply with quote

element432,

I suspect that the kernel and initrd both load but the root filesystem fails to mount on these other systems.
Then, the initrd initscript falls off the end because it runs out of things to do.

Can you check in both USB2 and USB3 ports?
Don't bother with USB1, its too slow to be useful.
_________________
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
element432
n00b
n00b


Joined: 16 Dec 2016
Posts: 61

PostPosted: Wed Feb 21, 2018 4:04 pm    Post subject: Reply with quote

I tried all the USB ports haha. I just tried it on my friends laptop, booted fine. So could that mean the kernel is missing something, for it to boot on these stupidly old PC's?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Wed Feb 21, 2018 4:14 pm    Post subject: Reply with quote

element432,

Can you get a lspci form the lab PCs?

Will System Rescue CD on a USB stick boot them?
_________________
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
element432
n00b
n00b


Joined: 16 Dec 2016
Posts: 61

PostPosted: Wed Feb 21, 2018 4:20 pm    Post subject: Reply with quote

Came up with this:

Code:
00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] RS880 Host Bridge
00:02.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] RS780 PCI to PCI bridge (ext gfx port 0)
00:0a.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] RS780/RS880 PCI to PCI bridge (PCIE port 5)
00:11.0 SATA controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 SATA Controller [IDE mode]
00:12.0 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
00:12.1 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0 USB OHCI1 Controller
00:12.2 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB EHCI Controller
00:13.0 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
00:13.1 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0 USB OHCI1 Controller
00:13.2 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB EHCI Controller
00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 SMBus Controller (rev 3c)
00:14.2 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 Azalia (Intel HDA)
00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 LPC host controller
00:14.4 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 PCI to PCI Bridge
00:14.5 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI2 Controller
00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 10h Processor HyperTransport Configuration
00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 10h Processor Address Map
00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 10h Processor DRAM Controller
00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 10h Processor Miscellaneous Control
00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 10h Processor Link Control
02:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Cedar [Radeon HD 5000/6000/7350/8350 Series]
3f:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5761 Gigabit Ethernet PCIe (rev 10)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Wed Feb 21, 2018 4:29 pm    Post subject: Reply with quote

element432,

That has both USB1 and USB2 ports.
The USB1 ports usually have Black plastic inserts.
The USB2 ports are usually Blue.

I would not expect USB booting to work (for any useful value of work) on USB1.

It should be OK on USB2. It works for me here. That lspci matches my best system :)
There is a big but ...

USB2 often does not play nicely if there are USB1 devices attached to the same root hub.
You get USB1 speeds for everything. A root hub is a stacked pair of USB connectors.

USB booting rarely works through a USB hub too.
_________________
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
element432
n00b
n00b


Joined: 16 Dec 2016
Posts: 61

PostPosted: Wed Feb 21, 2018 4:40 pm    Post subject: Reply with quote

Alright, I'm in the process of trying every single USB port haha. They all seem black, but I am partially color blind :P. I just left the keyboard plugged in.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Wed Feb 21, 2018 4:45 pm    Post subject: Reply with quote

element432,

A stacked pair is always the same sort.
You only need try one of a pair.
_________________
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
element432
n00b
n00b


Joined: 16 Dec 2016
Posts: 61

PostPosted: Wed Feb 21, 2018 4:45 pm    Post subject: Reply with quote

I tried all of them, kernel paniced with them all.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Wed Feb 21, 2018 4:48 pm    Post subject: Reply with quote

element432,

Put your kernel .config file onto a pastebin site please.
wgetpaste is your friend.
_________________
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
element432
n00b
n00b


Joined: 16 Dec 2016
Posts: 61

PostPosted: Wed Feb 21, 2018 4:53 pm    Post subject: Reply with quote

Here you go!

Code:
https://paste.pound-python.org/show/ubhve0R5bTklhUaj8bDh/
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Wed Feb 21, 2018 5:19 pm    Post subject: Reply with quote

element432,

That's a nice generic works anywhere kernel ... only you have found a case where it doesn't.

Do you use rootwait or rootdelay= on the kernel command line?
If its the latter try a bigger delay. Something very long, like 32 is a good start.
If that works, try 16 ... and so on.

Now you know it works, rootwait is safer.
_________________
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
element432
n00b
n00b


Joined: 16 Dec 2016
Posts: 61

PostPosted: Wed Feb 21, 2018 5:22 pm    Post subject: Reply with quote

I did not have either of those in there, I just tried to rootdelay=32 and had the same kernel panic
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
Goto page 1, 2  Next
Page 1 of 2

 
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