View previous topic :: View next topic |
Author |
Message |
pgu l33t
Joined: 30 Jul 2009 Posts: 722 Location: Oslo, Norway
|
Posted: Mon Dec 02, 2024 12:45 pm Post subject: How to boot Gentoo USB from grub using serial console? |
|
|
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 |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54605 Location: 56N 3W
|
Posted: Mon Dec 02, 2024 7:27 pm Post subject: |
|
|
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 |
|
|
zen_desu n00b
Joined: 25 Oct 2024 Posts: 41
|
Posted: Mon Dec 02, 2024 7:46 pm Post subject: |
|
|
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 |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5184 Location: Bavaria
|
|
Back to top |
|
|
|