Discussion:
installing boot driver
Edward Ned Harvey (opensolarisisdeadlongliveopensolaris)
2012-08-25 01:43:27 UTC
Permalink
On a 64bit intel (amd64) system ...
I have an HBA. I have a driver for the HBA. I can boot the live cd, and I can load the driver with a "sudo add_drv blah blah" command. At this point, the storage becomes available, and I can install the OS. But I'd like to be able to boot from it... ;-)

I'm not very familiar with the solaris boot process, and I'm getting lost in all the different versions of documentation. I'd like to know if I'm going the right direction...

I believe (correct me if I'm wrong) the boot-time drivers are loaded via the boot_archive file. This is the solaris analog of linux initrd. It's a filesystem that gets loaded into ram before the / filesystem is mounted, and discarded from ram after the / filesystem is mounted.

So I *think* I need to modify the boot_archive, to include my driver in (boot_archive)/kernel/drv/amd64
And I think I need to probably generate some sort of conf file ... that will contain all the parameters I specified on the "sudo add_drv" command line...

But I can't seem to figure out where to put some conf file (if indeed I need to do that)

There's this "bootadm update-archive" command, that I'm sure fits into the puzzle somewhere... But all the man pages just say "Updates the boot archive, if required." Not exactly the most informative man page... I don't know what it's trying to update from, or to, or based on what criteria.

Do I just load the driver once into the running kernel, and then run the bootadm update-archive command? Does it fetch the currently running config, and save it to the boot_archive file?

If I'm not mistaken, the disk blocks of the kernel and the boot archive get hard-coded into grub, right? Do I need to installgrub after doing the above?

Thanks for any help...
eXeC001er
2012-08-25 13:06:32 UTC
Permalink
You need to mount installed root-fs and copy the driver to it. After that
you need to:

1. add driver to installed system

# add_driver -b /path/to/root-fs/mountpoint <additional parameters>

2. update boot_archive

# bootadm update-archive -R /path/to/root-fs/mountpoint

Thanks.

2012/8/25 Edward Ned Harvey (opensolarisisdeadlongliveopensolaris) <
On a 64bit intel (amd64) system ... ****
I have an HBA. I have a driver for the HBA. I can boot the live cd, and
I can load the driver with a "sudo add_drv blah blah" command. At this
point, the storage becomes available, and I can install the OS. But I'd
like to be able to boot from it... ;-)****
** **
I'm not very familiar with the solaris boot process, and I'm getting lost
in all the different versions of documentation. I'd like to know if I'm
going the right direction...****
** **
I believe (correct me if I'm wrong) the boot-time drivers are loaded via
the boot_archive file. This is the solaris analog of linux initrd. It's
a filesystem that gets loaded into ram before the / filesystem is
mounted, and discarded from ram after the / filesystem is mounted. ****
** **
So I *think* I need to modify the boot_archive, to include my driver in (
boot_archive)/kernel/drv/amd64****
And I think I need to probably generate some sort of conf file ... that
will contain all the parameters I specified on the "sudo add_drv" command
line... ****
** **
But I can't seem to figure out where to put some conf file (if indeed I
need to do that)****
** **
There's this "bootadm update-archive" command, that I'm sure fits into
the puzzle somewhere... But all the man pages just say "Updates the boot
archive, if required." Not exactly the most informative man page... I
don't know what it's trying to update from, or to, or based on what
criteria.****
** **
Do I just load the driver once into the running kernel, and then run the
bootadm update-archive command? Does it fetch the currently running
config, and save it to the boot_archive file?****
** **
If I'm not mistaken, the disk blocks of the kernel and the boot archive
get hard-coded into grub, right? Do I need to installgrub after doing
the above?****
** **
Thanks for any help...****
_______________________________________________
opensolaris-discuss mailing list
Edward Ned Harvey (opensolarisisdeadlongliveopensolaris)
2012-08-25 23:14:36 UTC
Permalink
You need to mount installed root-fs and copy the driver to it. After that you
1. add driver to installed system
# add_driver -b /path/to/root-fs/mountpoint <additional parameters>
2. update boot_archive
# bootadm update-archive -R /path/to/root-fs/mountpoint
This is kinda funny ...

First of all, the miniroot (or whatever, installation environment) has a lock file, /a/var/run/AdDrEm.lck
This prevents add_drv or bootadm update-archive from running. But by googling around, it seems safe to simply remove the lock file.

Second of all, while the installer is running, it's mounted as /a
But the moment it finishes and displays the "Reboot" button, it's remounted as / and it's really difficult to do anything about that. If you try to remount, unmount, volume is busy. But when you ls or cd or whatever ... You're still seeing the filesystem of the live cd environment, not the chrooted installation environment. (Weird.)

So if you wait that long, it's too late, you can't run the bootadm update-archive. If you don't wait long enough (let's say, the zfs filesystem hasn't been created yet, or the kernel directory doesn't exist yet) then it also fails.

So you have to do the following stuff, in the middle of the installation, while the installation progress meter is running.

The process I have now, is as follows:

(I'm not sure how precise the timing needs to be, but I know there is some sensitivity, and I'm documenting what I did successfully.)

To install openindiana on a system with 3ware 9650SE adapter...
Go to 3ware.com, (lsi.com, whatever) and download 9.5.4-Codeset-Complete.iso (this is the complete utility, including configuration tool and manuals, drivers, etc, everything.)

Boot from the openindiana live cd.
Personally, I found it useful to sudo svcadm enable svc:/network/ssh:default
And then ssh into the system, so I can use my clipboard to paste commands. But that's not necessary.
You need to extract the "tw" driver file from the iso. If it's easier to do this on another computer, go for it. Otherwise:
download the iso to the openindiana computer. (You can't eject livecd while booted from livecd)
sudo mkdir /mnt/cd
sudo mount -F hsfs 9.5.4-Codeset-Complete.iso /mnt/cd
sudo cp /mnt/cd/packages/drivers/opensolaris/amd64/tw /kernel/drv/amd64/
Copy the "tw" file to /kernel/drv/amd64/

sudo add_drv -m "* 0666 root sys" -i '"pci13c1,1003" "pci13c1,1004" "pci13c1,1005" "pci13c1,1010"' -c scsi tw

Now the storage drivers are loaded. You can begin installing the OS.

When the installer gets to around 30% or so, do this:
sudo cp /kernel/drv/amd64/tw /a/kernel/drv/amd64/

When it gets to around 75%, do this:
sudo rm /a/var/run/AdDrEm.lck
sudo bootadm update-archive -R /a

You should be long since completed with the above commands, before the installer reaches 90%

When the installer gives you the Reboot button... Reboot.

Notice, it boots up but doesn't go through grub or anything. Shutdown, halt, or go to the shutdown menu and un-select "skip boot menu on restart." This will force the system to completely reset, and go through BIOS, and grub. This should solidly confirm for you, that the system is able to load the necessary drivers during boot.

If you want, you can quit now. But it's really useful to install the 3ware management utilities, so you can reconfigure disks, manage disks, get email alerts, etc. So I recommend continuing:

Mount the iso as described above. (or just burn a disc and insert the disc)
cd /mnt/cd/packages/installers/tools/opensolaris
sudo ./setupSolaris_x86.bin
(Or, perhaps) sudo ./setupSolaris_x86.bin -console

Continue reading on narkive:
Loading...