Archive for the 'Docs' category
Thumbdrive for redundant boot device (OpenSolaris)
July 27, 2008 7:46 pm
First disable automating; this may be volfs or hal depending on the version of solaris 10/11
# svcadm disable volfs
Now plug in the thumbdrive and determine the location for the logical node
bash-3.00# rmformat -l Looking for devices... 1. Logical Node: /dev/rdsk/c0t0d0p0 Physical Node: /pci@0,0/pci-ide@1f,1/ide@0/sd@0,0 Connected Device: TEAC CD-224E-N 1.AA Device Type: CD Reader 2. Logical Node: /dev/rdsk/c4t0d0p0 Physical Node: /pci@0,0/pci15d9,7980@1d,7/hub@5/storage@1/disk@0,0 Connected Device: Corsair Flash Voyager 1.00 Device Type: Removable bash-3.00#
/dev/rdsk/c4t0d0 will be the root of what we’re working with in this example
Now run:
# fdisk -B /dev/rdsk/c4t0d0s0
Now you can get the geometry using the following:
# fdisk -W - /dev/rdsk/c4t0d0s0
Now, look at output from previous step and find max MB (MAXSIZE) of usable storage. You do this by multiplying bytes/sector (usually 512 at the top) with num sectors at the bottom of output (in my case, a 4 GB drive had roughly 7.9Million sections or so) divide by (1024*1024) to yield MB (should be 3900 MB or so for a 4GB flash stick.
slices: 0 = 2MB, {$MAXSIZE-3}MB, "wm", "root" :
1 = 0, 1MB, "wu", "boot" :
2 = 0, {$MAXSIZE - 1}MB, "wm", "backup"
Here is a “slices.txt” file for a 256 mb thumbdrive
slices: 0 = 2MB, 244MB, "wm", "root" : 1 = 0, 1MB, "wu", "boot" : 2 = 0, 246MB, "wm", "backup"
Now put this label to the drive
# rmformat -s ./path/to/slices.txt /dev/rdsk/c4t0d0p0
Now to refresh Solaris devices:
# devfsadm; devfsadm -C
Now to create the filesystem, mount it and copy the necessary files
# newfs /dev/rdsk/c4t0d0s0 # mkdir /mnt/backup # mount /dev/dsk/c4t0d0s0 /mnt/backup # cd /mnt/backup # cp -r /boot ./boot # cp -r /platform ./platform
Now lets make this bootable
# fdisk /dev/rdsk/c4t0d0p0
Set partition 1 active using option 2
# cd /mnt/backup/boot/grub/ # installgrub stage1 stage2 /dev/rdsk/c4t0d0s0
Now safely unmount
# cd /;umount /mnt/backup
references:
Categories: Docs
No Comments »
AppleTalk on Solaris (AFP)
7:45 pmAppleTalk has been quite a popular choice for networking computers mainly because it’s, well, made by Apple. It was supposedly made solely for Apple computers but the Internet folks have never been one to settle for should be’s and would rather run after could be’s. If cheap mobile phones today can be hacked to become as efficient as high-end phones, why not try making AppleTalk work on other operating systems right? That’s what we’re aiming to do on this page, make AppleTalk work on Solaris.
[Taken from: www.unixzone.dk]
Netatalk 2.0.3 requires some patching to compile on Solaris 10 (or OpenSolaris)
- Requirements:
- netatalk
- Berkeley DB 4.2.52
- GCC compiler, Sun Studio didn’t work for me
- Patches: netatalk-2.0.3/sys/netatalk/at.h and netatalk-2.0.3/sys/solaris/tpi.c
Click <HERE> for build instructions for DB
On Solaris we don’t use ranlib, LDFLAGS adds /usr/local/lib to the
library search path where my Berkeley DB libs are , rest of the options
are self-explanatory.
# gzip -cd netatalk-2.0.3.tar.gz | tar xf - # gzip -cd patches.tar.gz | tar xf - # cd netatalk-2.0.3 # RANLIB=echo CC=gcc LDFLAGS=-R/usr/local/BerkeleyDB.4.2/lib ./configure --prefix=/opt/netatalk --with-ssl-dir=/usr/sfw --with-bdb=/usr/local/BerkeleyDB.4.2 --without-pam --disable-ddp --disable-tcp-wrappers --disable-srvloc --with-cnid-dbd-backend # echo "#define SOLARIS2 10" >>config.h
Depending on the version of your Solaris installation, you’ll want to
change this to match, ie. 8, 9, 10, or 11 for OpenSolaris.
Patch the source to support x64 Solaris
# patch -i ../patches/at.h.patch sys/netatalk/at.h Looks like a unified context diff. done # patch -i ../patches/config.h.patch ./config.h Looks like a normal diff. done # patch -i ../patches/endian.h.patch sys/netatalk/endian.h Looks like a normal diff. done # patch -i ../patches/tpi.c.patch sys/solaris/tpi.c Looks like a unified context diff. done
Build and install the software
# make # make install
Under Solaris, you must create atalkd.conf, since Solaris provides no
method for determining the names of the available interfaces. It is
sufficent to name the available interfaces in atalkd.conf, one per line.
E.g.
eri0
on a line by itself on many Suns, hme0 on Ultras etc. See atalkd(8).
Create init script and add to Sun’s svc system
# cp distrib/initscripts/rc.atalk.sysv /opt/local/lib/svc/method/netatalk
Place netatalk.xml somewhere on the file system
# svccfg import /path/to/netatalk.xml # svcadm enable netatalk # rm /path/to/netatalk.xml
Now for configuration:
# cd /opt/netatalk/etc/netatalk/ # ls -l total 96 -rw-r--r-- 1 root root 5066 Apr 4 15:21 AppleVolumes.default -rw-r--r-- 1 root root 25124 Apr 2 14:49 AppleVolumes.system -rw-r--r-- 1 root root 11259 Apr 4 14:59 afpd.conf -rw-r--r-- 1 root root 1059 Apr 4 11:57 atalkd.conf -rw-r--r-- 1 root root 1429 Apr 4 15:01 netatalk.conf -rw-r--r-- 1 root root 1479 Apr 2 14:49 papd.conf drwxr-xr-x 2 root root 512 Apr 3 11:49 uams #
Add the following to “afpd.conf”:
"Solaris AFP" -uamlist uams_guest.so -loginmesg "Welcome, $u!" -transall -noddp -tcp
Configure “netatalk.conf” as seen here:
# Appletalk configuration
# Change this to increase the maximum number of clients that can connect:
AFPD_MAX_CLIENTS=50
# Change this to set the machine’s atalk name and zone, the latter containing
# the ‘@’ sign as first character — compare with nbp_name(3) if in doubt
#
# NOTE: If Netatalk should register AppleTalk services in the standard zone
# then you need not to specify a zone name here.
#
# If your zone has spaces in it, you’re better off specifying
# it in afpd.conf if you realize that your distribution doesn’t
# handle spaces correctly in the startup script. Remember to use
# quotes here if the zone name contains spaces.
#
#ATALK_ZONE=”@some zone”
ATALK_NAME=`echo ${HOSTNAME}|cut -d. -f1`
# specify the Mac and unix charsets to be used
ATALK_MAC_CHARSET=’MAC_ROMAN’
ATALK_UNIX_CHARSET=’LOCALE’
# specify this if you don’t want guest, clrtxt, and dhx
# available options: uams_guest.so, uams_clrtxt.so, uams_dhx.so,
# uams_randnum.so
#AFPD_UAMLIST=”-U uams_clrtxt.so,uams_dhx.so”
# Change this to set the id of the guest user
AFPD_GUEST=nobody
# Set which daemons to run (papd is dependent upon atalkd):
ATALKD_RUN=no
PAPD_RUN=no
CNID_METAD_RUN=yes
AFPD_RUN=yes
TIMELORD_RUN=no
A2BOOT_RUN=no
# Control whether the daemons are started in the background
ATALK_BGROUND=no
# export the charsets, read form ENV by apps
export ATALK_MAC_CHARSET
export ATALK_UNIX_CHARSET
Add the following to “AppleVolumes.default”:
:DEFAULT: cnidscheme:dbd /Storage "Storage" rwlist:nobody
Categories: Docs
No Comments »





