HP Visualize J210XC IRIX to HP-UX Migration Guide - Page 26

Modifying the Kernel in Order to Add a Device

Page 26 highlights

Devices Modifying the Kernel in Order to Add a Device For most systems, the default kernel configuration is sufficient and you will not have to modify it in order to add a device. However, kernel drivers such as cs80 (CS80 disk driver) are not included in the default configuration. To configure them, you must rebuild the kernel. Rebuilding the Kernel Manually Below is the basic procedure for manually rebuilding the kernel. For more detailed information see chapter 1 of HP-UX System Administration Tasks. (HP manuals are available either on documentation CDs supplied with the system or at http://docs.hp.com.) 1. Change directory to the build environment (/stand/build). There, execute a system preparation script. system_prep. system_prep writes a system file based on your current kernel in the current directory (that is, it creates /stand/build/system). The -v provides verbose explanation as the script executes. # cd /stand/build # /usr/lbin/sysadm/system_prep -v -s system 2. Edit the /stand/build/system file to add the absent driver(s). 3. Build the kernel by invoking the mk_kernel command. This creates /stand/build/vmunix_test, a kernel ready for testing. # /usr/sbin/mk_kernel -s system 4. Save the old system file and kernel by moving them. Thus, if anything goes wrong, you still have a bootable kernel. # mv /stand/system /stand/system.prev # mv /stand/vmunix /stand/vmunix.prev 5. Move the new system file and new kernel into place, ready to be used when you reboot the system. # mv /stand/build/system /stand/system # mv /stand/build/vmunix_test /stand/vmunix 6. Shut down and halt the system using the /usr/sbin/shutdown -h command. 7. When HALTED, you may cycle power appears on the screen, turn off the computer and unplug the power cord. This is recommended for all devices; for SCSI devices and interface cards, it is required. 8. Install the peripheral device, following directions in the supplied hardware documentation. 9. Power on the peripheral devices, and wait for them to signal ready. Then power on the computer system, which will cause your system to reboot. As HP-UX reboots, it will create the device special files required by the new peripheral device in the appropriate /dev directories. Using SAM to Rebuild the Kernel To use SAM to reconfigure the kernel, login as superuser and ensure you are logged on to the machine for which you are regenerating the kernel. Then complete the following steps: 1. Start SAM. 2. Select the Kernel Configuration menu item. 3. Select Drivers. The following information is provided: • Name of the driver 21

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125

Devices
21
Modifying the Kernel in Order to Add a Device
For most systems, the default kernel configuration is sufficient and you will not have to modify it in order
to add a device. However, kernel drivers such as
cs80
(CS80 disk driver) are not included in the default
configuration.
To configure them, you must rebuild the kernel.
Rebuilding the Kernel Manually
Below is the basic procedure for manually rebuilding the kernel. For more detailed information see chapter
1 of
HP-UX System Administration Tasks
.
(HP manuals are available either on documentation CDs
supplied with the system or at http://docs.hp.com.)
1.
Change directory to the build environment (
/stand/build
). There, execute a system preparation script.
system_prep
.
system_prep
writes a system file based on your current kernel in the current directory
(that is, it creates
/stand/build/system
).
The
-v
provides verbose explanation as the script executes.
# cd /stand/build
# /usr/lbin/sysadm/system_prep -v -s system
2.
Edit the
/stand/build/system
file to add the absent driver(s).
3.
Build the kernel by invoking the
mk_kernel
command. This creates /
stand/build/vmunix_test
, a
kernel ready for testing.
# /usr/sbin/mk_kernel -s system
4.
Save the old system file and kernel by moving them. Thus, if anything goes wrong, you still have a
bootable kernel.
# mv /stand/system /stand/system.prev
# mv /stand/vmunix /stand/vmunix.prev
5.
Move the new system file and new kernel into place, ready to be used when you reboot the system.
# mv /stand/build/system /stand/system
# mv /stand/build/vmunix_test /stand/vmunix
6.
Shut down and halt the system using the
/usr/sbin/shutdown -h
command.
7.
When
HALTED, you may cycle power
appears on the screen, turn off the computer and unplug the
power cord. This is recommended for all devices; for SCSI devices and interface cards, it is required.
8.
Install the peripheral device, following directions in the supplied hardware documentation.
9.
Power on the peripheral devices, and wait for them to signal ready.
Then power on the computer
system, which will cause your system to reboot. As HP-UX reboots, it will create the device special
files required by the new peripheral device in the appropriate
/dev
directories.
Using SAM to Rebuild the Kernel
To use SAM to reconfigure the kernel, login as
superuser
and ensure you are logged on to the machine for
which you are regenerating the kernel.
Then complete the following steps:
1.
Start SAM.
2.
Select the
Kernel Configuration
menu item.
3.
Select
Drivers
. The following information is provided:
Name of the driver