Solaris grub: Difference between revisions
m (Text replacement - "<source" to "<syntaxhighlight") |
|||
Line 10: | Line 10: | ||
=== Set speed and port in grub === | === Set speed and port in grub === | ||
< | <syntaxhighlight lang=bash> | ||
# bootadm set-menu console=serial serial_params=0,115200,8,N,1 | # bootadm set-menu console=serial serial_params=0,115200,8,N,1 | ||
# bootadm generate-menu -f | # bootadm generate-menu -f | ||
Line 21: | Line 21: | ||
/rpool/boot/grub/menu.lst | /rpool/boot/grub/menu.lst | ||
< | <syntaxhighlight lang=bash> | ||
title Oracle Solaris 10 X86 | title Oracle Solaris 10 X86 | ||
findroot (pool_rpool,0,a) | findroot (pool_rpool,0,a) | ||
Line 35: | Line 35: | ||
=== Set speed === | === Set speed === | ||
/boot/solaris/bootenv.rc | /boot/solaris/bootenv.rc | ||
< | <syntaxhighlight lang=bash> | ||
setprop ttya-mode '115200,8,n,1,-' | setprop ttya-mode '115200,8,n,1,-' | ||
</source> | </source> | ||
Line 43: | Line 43: | ||
=== Set console login speed === | === Set console login speed === | ||
/etc/ttydefs | /etc/ttydefs | ||
< | <syntaxhighlight lang=bash> | ||
console115200:115200 hupcl opost onlcr:115200::console | console115200:115200 hupcl opost onlcr:115200::console | ||
</source> | </source> | ||
< | <syntaxhighlight lang=bash> | ||
# svccfg -s svc:/system/console-login setprop ttymon/label= astring: "console115200" | # svccfg -s svc:/system/console-login setprop ttymon/label= astring: "console115200" | ||
# svcadm refresh svc:/system/console-login | # svcadm refresh svc:/system/console-login | ||
Line 61: | Line 61: | ||
== Set speed for SP host serial == | == Set speed for SP host serial == | ||
< | <syntaxhighlight lang=bash> | ||
-> set SP/serial/host pendingspeed=115200 commitpending=true | -> set SP/serial/host pendingspeed=115200 commitpending=true | ||
Set 'pendingspeed' to '115200' | Set 'pendingspeed' to '115200' | ||
Line 75: | Line 75: | ||
=grub rescue>= | =grub rescue>= | ||
The problem: | The problem: | ||
< | <syntaxhighlight lang=bash> | ||
GRUB loading... | GRUB loading... | ||
Welcome to GRUB! | Welcome to GRUB! | ||
Line 88: | Line 88: | ||
Find your devices: | Find your devices: | ||
< | <syntaxhighlight lang=bash> | ||
grub rescue> ls | grub rescue> ls | ||
(hd0) (hd0,gpt9) (hd0,gpt2) (hd0,gpt1) (hd1) | (hd0) (hd0,gpt9) (hd0,gpt2) (hd0,gpt1) (hd1) | ||
Line 96: | Line 96: | ||
In this example the boot environment is named Solaris11.3SRU1. | In this example the boot environment is named Solaris11.3SRU1. | ||
Remember to replace <i>Solaris11.3SRU15</i> with your boot environment name. | Remember to replace <i>Solaris11.3SRU15</i> with your boot environment name. | ||
< | <syntaxhighlight lang=bash> | ||
grub rescue> ls (hd0,gpt2)/ROOT/Solaris11.3SRU15/@/boot/grub/i386-pc | grub rescue> ls (hd0,gpt2)/ROOT/Solaris11.3SRU15/@/boot/grub/i386-pc | ||
... normal.mod ... | ... normal.mod ... | ||
Line 103: | Line 103: | ||
===Set the prefix to the right place=== | ===Set the prefix to the right place=== | ||
Remember to replace <i>Solaris11.3SRU15</i> with your boot environment name. | Remember to replace <i>Solaris11.3SRU15</i> with your boot environment name. | ||
< | <syntaxhighlight lang=bash> | ||
grub rescue> set | grub rescue> set | ||
prefix=(hd0,gpt2)//@/boot/grub/i386-pc | prefix=(hd0,gpt2)//@/boot/grub/i386-pc | ||
Line 111: | Line 111: | ||
===Now you can load and start the module called "normal"=== | ===Now you can load and start the module called "normal"=== | ||
< | <syntaxhighlight lang=bash> | ||
grub rescue> insmod normal | grub rescue> insmod normal | ||
grub rescue> normal | grub rescue> normal | ||
Line 125: | Line 125: | ||
==Normal grub is bootet, now start the Solaris== | ==Normal grub is bootet, now start the Solaris== | ||
At the <i>grub></i> prompt enter the following lines. Remember to replace <i>Solaris11.3SRU15</i> with your boot environment name. | At the <i>grub></i> prompt enter the following lines. Remember to replace <i>Solaris11.3SRU15</i> with your boot environment name. | ||
< | <syntaxhighlight lang=bash> | ||
insmod zfs | insmod zfs | ||
zfs-bootfs /ROOT/Solaris11.3SRU15/@/ zfs_bootfs | zfs-bootfs /ROOT/Solaris11.3SRU15/@/ zfs_bootfs |
Revision as of 16:52, 25 November 2021
Set SP-console on x86-systems to 115200 Baud
You need to set the new speed in all three places:
- grub
- SP host serial
- BIOS serial
Solaris 11
Set speed and port in grub
<syntaxhighlight lang=bash>
- bootadm set-menu console=serial serial_params=0,115200,8,N,1
- bootadm generate-menu -f
- eeprom console=ttya
- eeprom ttya-mode=115200,8,n,1,-
</source>
Solaris 10
Set speed and port in grub
/rpool/boot/grub/menu.lst <syntaxhighlight lang=bash> title Oracle Solaris 10 X86 findroot (pool_rpool,0,a) kernel$ /platform/i86pc/multiboot -B $ZFS-BOOTFS,console=ttya,ttya-mode="115200,8,n,1,-" module /platform/i86pc/boot_archive
title Solaris failsafe findroot (pool_rpool,0,a) kernel /boot/multiboot -s -B console=ttya,ttya-mode="115200,8,n,1,-" module /boot/amd64/x86.miniroot-safe </source>
Set speed
/boot/solaris/bootenv.rc <syntaxhighlight lang=bash> setprop ttya-mode '115200,8,n,1,-' </source>
Active after reboot.
Set console login speed
/etc/ttydefs <syntaxhighlight lang=bash> console115200:115200 hupcl opost onlcr:115200::console </source>
<syntaxhighlight lang=bash>
- svccfg -s svc:/system/console-login setprop ttymon/label= astring: "console115200"
- svcadm refresh svc:/system/console-login
- svcadm restart svc:/system/console-login
</source>
Set speed in BIOS
Enter BIOS setup with F2 or CTRL+E, then go to
Advanced -> Serial Port Console Redirection -> Bits per second : 115200
Set speed for SP host serial
<syntaxhighlight lang=bash> -> set SP/serial/host pendingspeed=115200 commitpending=true Set 'pendingspeed' to '115200' Set 'commitpending' to 'true'
-> show SP/serial/host speed
/SP/serial/host Properties: speed = 115200
</source>
grub rescue>
The problem: <syntaxhighlight lang=bash> GRUB loading... Welcome to GRUB!
error: couldn't find a valid DVA. Entering rescue mode... grub rescue> </source>
Get into the normal grub
Find your devices: <syntaxhighlight lang=bash> grub rescue> ls (hd0) (hd0,gpt9) (hd0,gpt2) (hd0,gpt1) (hd1) </source>
Find the directory where the normal.mod file resides
In this example the boot environment is named Solaris11.3SRU1. Remember to replace Solaris11.3SRU15 with your boot environment name. <syntaxhighlight lang=bash> grub rescue> ls (hd0,gpt2)/ROOT/Solaris11.3SRU15/@/boot/grub/i386-pc ... normal.mod ... </source>
Set the prefix to the right place
Remember to replace Solaris11.3SRU15 with your boot environment name. <syntaxhighlight lang=bash> grub rescue> set prefix=(hd0,gpt2)//@/boot/grub/i386-pc root=hd0,gpt2 grub rescue> set prefix=(hd0,gpt2)/ROOT/Solaris11.3SRU15/@/boot/grub/i386-pc </source>
Now you can load and start the module called "normal"
<syntaxhighlight lang=bash> grub rescue> insmod normal grub rescue> normal
GNU GRUB version 1.99,5.11.0.175.2.0.0.42.2
Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists possible device or file completions.
grub> </source>
Normal grub is bootet, now start the Solaris
At the grub> prompt enter the following lines. Remember to replace Solaris11.3SRU15 with your boot environment name. <syntaxhighlight lang=bash> insmod zfs zfs-bootfs /ROOT/Solaris11.3SRU15/@/ zfs_bootfs set kern=/platform/i86pc/kernel/amd64/unix $multiboot /ROOT/Solaris11.3SRU15/@/$kern $kern -B $zfs_bootfs insmod gzio $module /ROOT/Solaris11.3SRU15/@/platform/i86pc/amd64/boot_archive boot </source>