cfgadm -alv | grep -i disk
Monthly Archives: June 2015
virtualbox: find list bridges
VBoxManage list bridgedifs
solaris 11 update
pkg update
Packages to update: 8
Create boot environment: No
Create backup boot environment: Yes
DOWNLOAD PKGS FILES XFER (MB) SPEED
Completed 8/8 52/52 3.1/3.1 319k/s
PHASE ITEMS
Removing old actions 36/36
Installing new actions 42/42
Updating modified actions 35/35
Updating package state database Done
Updating package cache 8/8
Updating image state Done
Creating fast lookup database Done
Reading search index Done
Updating search index 8/8
Updating package cache 1/1
—————————————————————————
NOTE: Please review release notes posted at:
http://www.oracle.com/pls/topic/lookup?ctx=solaris11&id=SERNS
solaris search package by file
root@solaris:~# pkg search -l -H -o pkg.name /lib/libpower.so.1
system/kernel/power
pkg search: pkg: Search performance is degraded
pkg rebuild-index
root@solaris:~# pkg rebuild-index
Building new search index 574/574
solaris 11 enable root ssh
vi /etc/ssh/sshd_config
PermitRootLogin yes
vi /etc/default/login
#CONSOLE=/dev/console
#Remove “;type=role” from the root entry in /etc/user_attr like this:
usermod -K type=normal root
svcadm restart svc:/network/ssh:default
Now we are in:
Last login: Tue Jun 16 11:05:14 2015
Oracle Corporation SunOS 5.11 11.2 June 2014
dnf disable repo
dnf config-manager –set-disabled repo-name
virtualbox: kernel driver not installed (rc=-1908) fedora
sudo dnf install binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel dkms
sudo dnf install VirtualBox-4.3
sudo /etc/init.d/vboxdrv setup
virtualbox: Makefile:183: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR= and run Make again. Stop.
sudo dnf install kernel-devel-$(uname -r)
cannot find package “fmt” in any of
unset GOROOT
Starting Dovecot Imap: doveconf: Fatal: Error in configuration file /etc/dovecot/sni.conf line 8: ssl_ca: Can’t open file /var/cpanel/ssl/installed/cabundles
cp -v /etc/dovecot/sni.conf /etc/dovecot/sni.conf.back
> /etc/dovecot/sni.conf
service dovecot start
cannot download, $GOPATH not set. For more details see: go help gopath
export GOPATH=~/go
export PATH=$PATH:$GOPATH/bin
golang change text in file
This will replace string “katinas” with “super duper”.
package main
import (
"io/ioutil"
"log"
"strings"
)
func main() {
var file string
file = "test.txt"
input, err := ioutil.ReadFile(file)
if err != nil {
log.Fatalln(err)
}
lines := strings.Split(string(input), "\n")
for i, line := range lines {
if strings.Contains(line, "katinas") {
lines[i] = "super duper"
}
}
output := strings.Join(lines, "\n")
err = ioutil.WriteFile(file, []byte(output), 0644)
if err != nil {
log.Fatalln(err)
}
}
ipmi set boot device
ipmitool -H 127.0.0.1 -U USER chassis bootdev
Password:
bootdev
bootdev
none : Do not change boot device order
pxe : Force PXE boot
disk : Force boot from default Hard-drive
safe : Force boot from default Hard-drive, request Safe Mode
diag : Force boot from Diagnostic Partition
cdrom : Force boot from CD/DVD
bios : Force boot into BIOS Setup
floppy: Force boot from Floppy/primary removable media
ipmitool -H 127.0.0.1 -U USER chassis bootdev pxe
Password:
Set Boot Device to pxe
udev rename back to eth0
cat > /etc/udev/rules.d/99-rename-to-eth0.rules << EOF
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="$(cat /sys/class/net/ens33/address)", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
EOF