Trying to get a driver (one of ours) working on Solaris 10 / 11 (this box happens to be Sol 10), with dev studio 12.3. It seems to be built, however, it crashes when loading, thanks to a NULL pointer dereference and the box now endlessly reboots.

I found a way to get the ok prompt on my PC keyboard (hold Shift-Break) but I cannot seem to find a way to boot the box and not load the drivers! Single-user mode loads them too!

Do I have to reinstall the OS or is there a keyboard-warrior way out of this?

  • 1
    Try boot -a and when prompted for /etc/system filename enter /dev/null. – steve Sep 11 '17 at 21:15
  • 1
    @steve That's definitely worth a try since it's fast and easy, but unless the driver is only being loaded via /etc/system in the first place via something like forceload, the driver is still likely to get loaded by default means. – Andrew Henle Sep 12 '17 at 10:40
  • I tried entering /dev/null for the name of the system file and it loaded the drivers anyway. – Jon Sep 12 '17 at 14:21

You need to add an exclude line to a copy of /etc/system, then use that to boot.

Per the system.4 man page:

exclude: <namespace>/<modulename>

Do not allow the listed loadable kernel module to be loaded. exclude commands are cumulative; the list of modules to exclude is created by combining every exclude entry in the system file.

You should probably create a failsafe /etc/system file when working with kernel modules.

See SPARC: How to Boot a System Interactively for the full process, including an alternate kernel. That's probably overkill for your needs.

This should work:

  1. Boot via CD/DVD
  2. Mount the root filesystem
  3. Make a copy of /etc/system: cp /a/etc/system /a/etc/system.failsafe
  4. Add exclude: your/driver to the failsafe copy.
  5. Boot interactively: boot -a
  6. When prompted for /etc/system, enter /etc/system.failsafe.
  • I popped in both DVDs and tried to boot via 'boot cdrom -s'. Both fail with "Can't open boot device". – Jon Sep 12 '17 at 14:28
  • 1
    @Jon Does boot cdrom -s even try to access the CD/DVD? In other words, to you see the CD/DVD light flashing and/or hear the access? – Andrew Henle Sep 12 '17 at 15:17
  • The drive has no lights on it. It's just a slot with the eject button underneath. I saw no other lights blink on the front of the box. – Jon Sep 12 '17 at 15:23
  • Perhaps the device alias for the cdrom is invalid? At the ok prompt devalias. I see you added the SPARC tag, which server model is it? – sleepyweasel Sep 12 '17 at 18:06

Have you tried booting off a CD/DVD and mounting the root drive to remove your disable/drivers?

And since you mention Solaris 10, have you tried booting to another ABE (alternate boot environment) if your using LU (Live Upgrade)? Which would also allow you to mount the primary BE (Boot Environment) and disable/remove your drivers.

You could also try to see if there are any defined on the boot device at the ok prompt with: boot <device> -L In case of success, it prints the bootable BE's on the device -- memory says also syntax on how to boot to one.

  • I have not, but I just asked around and located the sparc solaris 10 dvd. I don't understand the acronyms in your second para. Could you give me a quick guide or link on how to use the dvd to do this? I've done it in the past with linux, but solaris is really new to me. – Jon Sep 11 '17 at 21:16
  • 1
    I edited the response above to spell out the acronyms, as well as adding a command to see if there are any ABEs on the boot device. There are numerous docs/blogs showing how to use live upgrade as well as booting off a dvd. – sleepyweasel Sep 12 '17 at 17:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.