Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to boot Gentoo USB from grub using serial console?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
pgu
l33t
l33t


Joined: 30 Jul 2009
Posts: 722
Location: Oslo, Norway

PostPosted: Mon Dec 02, 2024 12:45 pm    Post subject: How to boot Gentoo USB from grub using serial console? Reply with quote

I'm accessing this system remotely.
It has a Gentoo install image on a USB stick which is inserted.
I'm not able to change the boot device using ipmi.
I can boot into grub from the one of the local nvme's.
I know that the USB stick is at hd0:

Code:

grub> ls (hd0,gpt3)/
./ .disk/ boot/ efi/ image.squashfs livecd mach_kernel memtest.efi64 memtest64.
bios README.txt System/
grub> ls (hd0,gpt3)/boot
./ ../ gentoo gentoo-config gentoo.igz grub/ System-gentoo.map


What commands do I need to run in order to boot from this and and redirect the console input/output to the serial console (/dev/ttyS0)?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Mon Dec 02, 2024 7:27 pm    Post subject: Reply with quote

You need to do three things.
1. get the grub output on the serial port. That looks like it done.
2. tell the kernel console=ttyS0,<serial settings>
3. edit /etc/inittab to start agetty on the serial port, or you will not see a login prompt.
it's commented out as the last line nomally.

I can't get to my server to get the detail, probably until the new year.
_________________
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
zen_desu
n00b
n00b


Joined: 25 Oct 2024
Posts: 50

PostPosted: Mon Dec 02, 2024 7:46 pm    Post subject: Reply with quote

If you're able to use IPMI and use a EDK2 console or similar on your server, GRUB isn't really necessary. If you want to use GRUB you must enable its console module.

I use the following cmdline options:
Code:
console=tty0 console=ttyS0,115200


The result is that it sends the kernel console to the VGA display and the serial which is shared between a physical port and IPMI.

I have this added to my inittab:
Code:
s0:12345:respawn:/sbin/agetty -L 115200 ttyS0 vt100


Which spawns an agetty session on the serial interface.

One issue you may run into is that an initramfs or the init can do stuff which redirects the output to somewhere other than the serial interface.
_________________
µgRD dev
Wiki writer
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5212
Location: Bavaria

PostPosted: Mon Dec 02, 2024 8:45 pm    Post subject: Reply with quote

Moved from Installing Gentoo to Documentation, Tips & Tricks.
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks 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