July 1, 2008 at 10:26 am
· Filed under Solaris, tips
Why is this soo cool? Because the default way to upgrade the OBP is to have a running system. But some times
If you have a working jump start enviroment most of the work is already done, yaha. You actully dont even have to use a solaris box to act as the upgrade server any tftp server will do.
So basically what I did here is used a already set up jump start server to upgrade the OBP on a Sun Fire v240. I deleted the link to the solaris kernel and created a symlink from the mac address to the upgrade binary.
bash-3.00# pwd
/tftpboot
bash-3.00# ls -l
total 458
lrwxrwxrwx 1 root root 27 Jun 6 11:40 0A2483F9 -> inetboot.SUN4U.Solaris_10-1
lrwxrwxrwx 1 root root 27 Jun 6 11:40 0A2483F9.SUN4U -> inetboot.SUN4U.Solaris_10-1
-rwxr-xr-x 1 root root 217016 Jun 6 11:40 inetboot.SUN4U.Solaris_10-1
drwxr-xr-x 2 root root 512 Jun 5 12:07 ODBUpgrade
-rw-r–r– 1 root root 321 Jun 6 11:40 rm.10.36.131.249
lrwxrwxrwx 1 root root 1 Jun 5 10:23 tftpboot -> .
bash-3.00# ls -l ODBUpgrade/
total 7888
-rw-r–r– 1 root root 1482292 Jun 5 12:07 flash-update-Blade100
-rw-r–r– 1 root root 2534420 Jun 5 12:07 flash-update-SunFire240
Permalink
December 5, 2007 at 9:34 am
· Filed under tips
Deleting file that have special characters in them can be tricky. This is what you have to do to delete them.
because rm -r -file will give you a error
[root@solaris:/]# rm -C
rm: illegal option — C
usage: rm [-fiRr] file …
so what you have to do is search figure out what the inode is
[root@solaris:/]# ls -il -C
total 2723130
32081 -rw-r–r– 1 root root 1392916480 Dec 4 14:55 -C
the 32081 is the inode number
[root@solaris:/u10/app 102]# find . -inum 32081 -exec rm -i {} \;
rm: remove ./-C (yes/no)? y
now the file is gone, yaha!
Permalink
October 17, 2007 at 12:09 pm
· Filed under Solaris, tips
When trying to remove package SMCsudo you get the error
#pkgrm SMCsudo
The following package is currently installed:
SMCsudo sudo
(sparc) 1.6.8p4
Do you want to remove this package? y
## Removing installed package instance <SMCsudo>
(A previous attempt may have been unsuccessful.)
## Verifying package dependencies.
## Processing package information.
## Removing pathnames in class <none>
/usr/local/sbin <shared pathname not removed>
/usr/local/man <shared pathname not removed>
/usr/local/libexec <shared pathname not removed>
/usr/local/etc <shared pathname not removed>
/usr/local/doc <shared pathname not removed>
/usr/local/bin <shared pathname not removed>
## Updating system information.
pkgrm: ERROR: bad read of contents file
pkgrm: ERROR: pathname=/usr/lib/iconv/sparcv9/UTF-8%PCK.so
pkgrm: ERROR: problem=no memory for package information
do
# cd /var/sadm/pkg
which is where the package database is located
then delete the offending package that you are trying to remove.
rm -rf SMCsudo
Then the package is removed the ugly (hack) way.
So then you can now install thenewer version of the same package.
# pkgadd -d /tmp/SMCsudo
Permalink