Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Booting headless Ultra 60 via GRUB
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on Sparc
View previous topic :: View next topic  
Author Message
gtbX
Tux's lil' helper
Tux's lil' helper


Joined: 11 Oct 2003
Posts: 126

PostPosted: Sat Jan 21, 2023 6:13 am    Post subject: Booting headless Ultra 60 via GRUB Reply with quote

I've been experimenting with the 64bit UL on Sparc, and have hit an issue booting via GRUB.

I've been following the handbook installing the new system, and have installed grub according to the documentation. However, when trying to reboot, it just hangs:

Code:
Resetting ...


Sun Ultra 60 UPA/PCI (2 X UltraSPARC-II 450MHz), No Keyboard
OpenBoot 3.17, 1024 MB memory installed, Serial #1xxxxxxx.
Ethernet address 8:0:20:x:x:x, Host ID: 80xxxxxx.



Rebooting with command: boot                                         
Boot device: disk  File and args:
GRUB Loading kernel..



Sending a break signal does nothing; I have to hard power-cycle to recover. This is a headless system with serial console - maybe grub is trying to show the graphical boot menu? Fortunately I can still boot using silo on the second disk, but that's not a permanent solution. This is the output I get when trying to run grub-install:

Code:
# grub-install --target=sparc64-ieee1275 --recheck --force --skip-fs-probe /dev/sda1
Installing for sparc64-ieee1275 platform.
grub-install: warning: Discarding improperly nested partition (hostdisk//dev/sda,sun1,sun2).
grub-install: warning: Discarding improperly nested partition (hostdisk//dev/sda,sun1,sun4).
grub-install: warning: Discarding improperly nested partition (hostdisk//dev/sda,sun1,sun5).
grub-install: warning: Attempting to install GRUB to a disk with multiple partition labels.  This is not supported yet..
grub-install: warning: Embedding is not possible.  GRUB can only be installed in this setup by using blocklists.  However, blocklists are UNRELIABLE and their use is discouraged..
Installation finished. No error reported.



As a secondary issue (when I do get it booted) only one CPU is detected by Linux, but I should probably make a separate thread for that.
Back to top
View user's profile Send private message
Murmass
n00b
n00b


Joined: 03 Oct 2023
Posts: 1

PostPosted: Tue Oct 03, 2023 2:19 am    Post subject: Reply with quote

Since this is a headless system, it might be that GRUB is trying to display its interface over a graphical console and isn't set up to use the serial console. You should configure GRUB to use the serial console. You can do this by modifying the /etc/default/grub.
_________________
https://rentola.fi/


Last edited by Murmass on Wed Oct 11, 2023 6:17 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Oct 03, 2023 9:34 am    Post subject: Reply with quote

gtbX,

I boot a server with grub output redirected to a serial port.

It needs
Code:
# Set to 'text' to force the Linux kernel to boot in normal text
# mode, 'keep' to preserve the graphics mode set using
# 'GRUB_GFXMODE', 'WIDTHxHEIGHT'['xDEPTH'] to set a particular
# graphics mode, or a sequence of these separated by commas or
# semicolons to try several modes in sequence.
#GRUB_GFXPAYLOAD_LINUX=
GRUB_GFXPAYLOAD_LINUX=text
in /etc/default/grub and grub.cfg rewritten.
That gets me the grub menu on the serial port.

I used to run a U10. When that failed it was replaced by one of the first Raspberry Pis :)
Grub was not an option then.

Code:
GRUB Loading kernel..
if that means what it says, do you have serial console support set up on the kernel command line and in the kernel?

Can you put your grub.cfg onto a pastebin please?
_________________
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
gtbX
Tux's lil' helper
Tux's lil' helper


Joined: 11 Oct 2003
Posts: 126

PostPosted: Sat Oct 14, 2023 4:05 am    Post subject: Reply with quote

I tried setting "GRUB_GFXPAYLOAD_LINUX=text", and re-ran grub-mkconfig, but there was no change in the result. It still hangs at Loading kernel..

I also tried uncommenting "GRUB_TERMINAL=console", but that didn't make a difference either (the comment even suggests it's only for x86(_64))

/etc/defaults/grub

I would think that if it was loading the graphical UI, it would eventually time-out and continue booting the default kernel. I've waited a few minutes and nothing seems to happen. The fact that sending a break (e.g Stop-A from a serial console) doesn't get the "ok" prompt back leads me to believe that it's crashed for some reason.

Is there a particular reason that SILO isn't supported for 64-bit userlands? Perhaps it needs a 32bit compiler available?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sat Oct 14, 2023 11:55 am    Post subject: Reply with quote

gtbX,

You need to set up the serial port for grub.
Code:
GRUB_TERMINAL="console serial"
GRUB_SERIAL_COMMAND="serial efi0 --speed=115200 --word=8 --parity=no --stop=1"


It won't be efi0 on a U60.

You need to set up the kernel to output the console on the serial port too.
Code:
# Append parameters to the linux kernel command line for non-recovery entries
#GRUB_CMDLINE_LINUX_DEFAULT=""
GRUB_CMDLINE_LINUX_DEFAULT="earlyprintk console=tty0 console=ttyS0,115200n8"

console=tty0 is the normal console and console=ttyS0,115200n is the serial console on /dev/ttyS0.
That's 115200 baud, no parity and 8 data bits.

The serial ports settings need to be the same everywhere, or you get nothing or a big mess.
My /etc/default/grub for an EFI system is there.

Lastly /etc/inittab needs to be edited to set up a serial console.
Code:
# SERIAL CONSOLES
s0:12345:respawn:/sbin/agetty -L 115200 ttyAMA0 vt100
#s0:12345:respawn:/sbin/agetty -L 9600 ttyS0 vt100
#s1:12345:respawn:/sbin/agetty -L 9600 ttyS1 vt100

Without that, you get all the kernel messages on the serial console but no login: prompt.
Note that my serial port starts out as ttyS0 but here its ttyAMA0.

/boot/grub/grub.cfg contains

Code:
        echo    'Loading 6.3.1-gentoo ...'
        linux   /6.3.1-gentoo root=UUID=00cae814-b56c-4b3d-89b9-a5ac50a08ec9 ro net.ifnames=0 earlyprintk console=tty0 console=ttyS0,115200n8 console=ttyAMA0,115200n8 rcutree.use_softirq=0
        echo    'Loading Initramfs ...'
        initrd  /initramfs
The serial port device names change, so I give both on the kernel command line.
The initrd is because I have root in LVM on top of kernel RAID.

-- edit --
I've been very naughty here. Editing /boot/grub/grub.cfg directly.
_________________
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
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on Sparc 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