Install Solaris on Oracle Virtual Box - · PDF file1/10/2013 ·...
Transcript of Install Solaris on Oracle Virtual Box - · PDF file1/10/2013 ·...
1 | P a g e
Install Solaris on Oracle Virtual Box:
Download software as below:
Oracle Virtual Box Version: 4.2.18 – (VirtualBox-4.2.18-88781-Win)
http://www.oracle.com/technetwork/server-storage/virtualbox/downloads/index.html
http://download.virtualbox.org/virtualbox/4.2.18/VirtualBox-4.2.18-88781-Win.exe
Solaris 10 64 bit - V37084-01
https://edelivery.oracle.com/EPD/Search/get_form
2 | P a g e
OR
http://download.oracle.com/otn/solaris/10/sol-10-u11-ga-x86-dvd.iso
Oracle Software:
http://download.oracle.com/otn/solaris/oracle12c/121010/solaris.x64_12cR1_database_1of2.zip
http://download.oracle.com/otn/solaris/oracle12c/121010/solaris.x64_12cR1_database_2of2.zip
Install the Virtual Box Software and Create New virtual Machine, and then follow below
steps to install Solaris:
New Virtual Machine name below is : solserv64bit1
4 | P a g e
5 | P a g e
6 | P a g e
8 | P a g e
9 | P a g e
10 | P a g e
11 | P a g e
12 | P a g e
13 | P a g e
14 | P a g e
15 | P a g e
16 | P a g e
17 | P a g e
18 | P a g e
19 | P a g e
20 | P a g e
21 | P a g e
22 | P a g e
23 | P a g e
24 | P a g e
25 | P a g e
26 | P a g e
27 | P a g e
To share the windows file system
Right Click on Vmserver (solserv64bit1) and click Setting..
Click on shared folder as below highlighted:
28 | P a g e
33 | P a g e
34 | P a g e
35 | P a g e
Add Partitions To The Added Disk:
Login as root user.
# cat /etc/vfstab #device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/dsk/c0t0d0s1 - - swap - no -
/dev/dsk/c0t0d0s0 /dev/rdsk/c0t0d0s0 / ufs 1 no -
/dev/dsk/c0t0d0s7 /dev/rdsk/c0t0d0s7 /export/home ufs 2
yes -
/devices - /devices devfs - no -
sharefs - /etc/dfs/sharetab sharefs - no -
ctfs - /system/contract ctfs - no -
objfs - /system/object objfs - no -
swap - /tmp tmpfs - yes -
36 | P a g e
# format Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c0t0d0 <ATA -VBOX HARDDISK -1.0 cyl 2085 alt 2 hd 255 sec 63>
/pci@0,0/pci8086,2829@d/disk@0,0
Specify disk (enter its number): ^C
# devfsadm � This command will discover the new disk we recently added
above.
# format Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c0t0d0 <ATA -VBOX HARDDISK -1.0 cyl 2085 alt 2 hd 255 sec 63>
/pci@0,0/pci8086,2829@d/disk@0,0
1. c0t2d0 <ATA -VBOX HARDDISK -1.0 cyl 1956 alt 2 hd 255 sec 63>
/pci@0,0/pci8086,2829@d/disk@2,0
http://docs.oracle.com/html/B10766_08/presolaris.htm
========================================================
On x86 systems only, use the fdisk command to create a Solaris partition on the disk if one does not
already exist.
Solaris fdisk partitions must start at cylinder 1, not cylinder 0. If you create a new fdisk
partition, you must label the disk before continuing.
Note:
To prevent the CRS or database files from overwriting the partition table, do not use slices that
start at cylinder 0 (for example, slice 2).
# format Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c0t0d0 <ATA -VBOX HARDDISK -1.0 cyl 2085 alt 2 hd 255 sec 63>
/pci@0,0/pci8086,2829@d/disk@0,0
1. c0t2d0 <ATA -VBOX HARDDISK -1.0 cyl 1956 alt 2 hd 255 sec 63>
/pci@0,0/pci8086,2829@d/disk@2,0
Specify disk (enter its number): 1 selecting c0t2d0
[disk formatted]
FORMAT MENU:
disk - select a disk
type - select (define) a disk type
partition - select (define) a partition table
current - describe the current disk
format - format and analyze the disk
37 | P a g e
fdisk - run the fdisk program
repair - repair a defective sector
label - write label to the disk
analyze - surface analysis
defect - defect list management
backup - search for backup labels
verify - read and display labels
save - save new disk/partition definitions
inquiry - show vendor, product and revision
volname - set 8-character volume name
!<cmd> - execute <cmd>, then return
quit
format> p WARNING - This disk may be in use by an application that has
modified the fdisk table. Ensure that this disk is
not currently in use before proceeding to use fdisk.
format> fdisk No fdisk table exists. The default partition for the disk is:
a 100% "SOLARIS System" partition
Type "y" to accept the default partition, otherwise type "n" to edit the
partition table.
y
format> p
PARTITION MENU:
0 - change `0' partition
1 - change `1' partition
2 - change `2' partition
3 - change `3' partition
……
……
7 - change `7' partition
select - select a predefined table
modify - modify a predefined partition table
name - name the current table
print - display the current table
label - write partition map and label to the disk
!<cmd> - execute <cmd>, then return
quit
partition> print Current partition table (original):
Total disk cylinders available: 1955 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 unassigned wm 0 0 (0/0/0) 0
1 unassigned wm 0 0 (0/0/0) 0
2 backup wu 0 - 1954 14.98GB (1955/0/0) 31407075 3 unassigned wm 0 0 (0/0/0) 0
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 0 0 (0/0/0) 0
6 unassigned wm 0 0 (0/0/0) 0
7 unassigned wm 0 0 (0/0/0) 0
8 boot wu 0 - 0 7.84MB (1/0/0) 16065
9 unassigned wm 0 0 (0/0/0) 0
38 | P a g e
partition> 0 ===> Assign 10GB disk space for partition number 0
Part Tag Flag Cylinders Size Blocks
0 unassigned wm 0 0 (0/0/0) 0
Enter partition id tag[unassigned]: ===> Enter blank Enter partition permission flags[wm]: ===> Enter blank Enter new starting cyl[0]: 1 ******IMP Note : never start from zero (0) instead start with 1, as explained above. Enter partition size[0b, 0c, 1e, 0.00mb, 0.00gb]: 10.00gb ===> allocate 10GB
partition> p Current partition table (unnamed):
Total disk cylinders available: 1955 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 unassigned wm 1 - 1306 10.00GB (1306/0/0) 20980890 ==>chk sz 1 unassigned wm 0 0 (0/0/0) 0
2 backup wu 0 - 1954 14.98GB (1955/0/0) 31407075
3 unassigned wm 0 0 (0/0/0) 0
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 0 0 (0/0/0) 0
6 unassigned wm 0 0 (0/0/0) 0
7 unassigned wm 0 0 (0/0/0) 0
8 boot wu 0 - 0 7.84MB (1/0/0) 16065
9 unassigned wm 0 0 (0/0/0) 0
partition> 1 ==> creating second partition
Part Tag Flag Cylinders Size Blocks
1 unassigned wm 0 0 (0/0/0) 0
Enter partition id tag[unassigned]:
Enter partition permission flags[wm]:
Enter new starting cyl[0]: 1307 ==> ***IMP** here cylinder number must start from 1307, just after 1306 which was for 1st partition. Enter partition size[0b, 0c, 1307e, 0.00mb, 0.00gb]: 4.97gb
`4.97gb' is out of range
Enter partition size[0b, 0c, 1307e, 0.00mb, 0.00gb]: 4.96gb (Re-Enter Size less)
partition>
Verify the partition size and start cylinder number for each partition ( 0 & 1) ================================================================================
partition> p Current partition table (unnamed):
Total disk cylinders available: 1955 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 unassigned wm 1 - 1306 10.00GB (1306/0/0) 20980890 1 unassigned wm 1307 - 1954 4.96GB (648/0/0) 10410120 2 backup wu 0 - 1954 14.98GB (1955/0/0) 31407075
3 unassigned wm 0 0 (0/0/0) 0
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 0 0 (0/0/0) 0
6 unassigned wm 0 0 (0/0/0) 0
39 | P a g e
7 unassigned wm 0 0 (0/0/0) 0
8 boot wu 0 - 0 7.84MB (1/0/0) 16065
9 unassigned wm 0 0 (0/0/0) 0
partition> label ==> Save partition information
Ready to label disk, continue? y
partition> q
FORMAT MENU:
disk - select a disk
type - select (define) a disk type
partition - select (define) a partition table
current - describe the current disk
format - format and analyze the disk
fdisk - run the fdisk program
repair - repair a defective sector
label - write label to the disk
analyze - surface analysis
defect - defect list management
backup - search for backup labels
verify - read and display labels
save - save new disk/partition definitions
inquiry - show vendor, product and revision
volname - set 8-character volume name
!<cmd> - execute <cmd>, then return
quit
format> verify
Primary label contents:
Volume name = < >
ascii name = <ATA -VBOX HARDDISK -1.0 cyl 1955 alt 2 hd 255 sec 63>
pcyl = 1957
ncyl = 1955
acyl = 2
bcyl = 0
nhead = 255
nsect = 63
Part Tag Flag Cylinders Size Blocks
0 unassigned wm 1 - 1306 10.00GB (1306/0/0) 20980890 1 unassigned wm 1307 - 1954 4.96GB (648/0/0) 10410120 2 backup wu 0 - 1954 14.98GB (1955/0/0) 31407075
3 unassigned wm 0 0 (0/0/0) 0
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 0 0 (0/0/0) 0
6 unassigned wm 0 0 (0/0/0) 0
7 unassigned wm 0 0 (0/0/0) 0
8 boot wu 0 - 0 7.84MB (1/0/0) 16065
9 unassigned wm 0 0 (0/0/0) 0
format> q #
40 | P a g e
Creating File system now
========================
Filesystem can be made of RAW or Character device
Slices or partition can be either Character device or Raw devices as below
ls -ltrh /dev/dsk/c0t2d0s0
ls -ltrh /dev/dsk/c0t2d0s1
Character Devices
===================
# ls -ltrh /dev/dsk/c0t2d0s0
lrwxrwxrwx 1 root root 47 Jul 10 19:34 /dev/dsk/c0t2d0s0 ->
../../devices/pci@0,0/pci8086,2829@d/disk@2,0:a
# ls -ltrh /dev/dsk/c0t2d0s1
lrwxrwxrwx 1 root root 47 Jul 10 19:34 /dev/dsk/c0t2d0s1 ->
../../devices/pci@0,0/pci8086,2829@d/disk@2,0:b
#
Raw Devices
=============
# ls -ltrh /dev/rdsk/c0t2d0s0
lrwxrwxrwx 1 root root 51 Jul 10 19:34 /dev/rdsk/c0t2d0s0 ->
../../devices/pci@0,0/pci8086,2829@d/disk@2,0:a,raw
#ls -ltrh /dev/rdsk/c0t2d0s1
lrwxrwxrwx 1 root root 51 Jul 10 19:34 /dev/rdsk/c0t2d0s1 ->
../../devices/pci@0,0/pci8086,2829@d/disk@2,0:b,raw
#
http://www.shrubbery.net/solaris9ab/SUNWaadm/SYSADV1/p101.html
We will use character devices for creating the New file system.
=================================================================
newfs /dev/dsk/c0t2d0s0
newfs /dev/dsk/c0t2d0s1
# newfs /dev/dsk/c0t2d0s0
newfs: construct a new file system /dev/rdsk/c0t2d0s0: (y/n)? y
Warning: 870 sector(s) in last cylinder unallocated
/dev/rdsk/c0t2d0s0: 20980890 sectors in 3415 cylinders of 48 tracks, 128
sectors
10244.6MB in 214 cyl groups (16 c/g, 48.00MB/g, 5824 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 98464, 196896, 295328, 393760, 492192, 590624, 689056, 787488, 885920,
20055584, 20154016, 20252448, 20350880, 20449312, 20547744, 20646176,
20744608, 20843040, 20941472
41 | P a g e
#
# newfs /dev/dsk/c0t2d0s1
newfs: construct a new file system /dev/rdsk/c0t2d0s1: (y/n)? y
Warning: 3960 sector(s) in last cylinder unallocated
/dev/rdsk/c0t2d0s1: 10410120 sectors in 1695 cylinders of 48 tracks, 128
sectors
5083.1MB in 106 cyl groups (16 c/g, 48.00MB/g, 5824 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 98464, 196896, 295328, 393760, 492192, 590624, 689056, 787488, 885920,
9441312, 9539744, 9638176, 9736608, 9835040, 9933472, 10031904, 10130336,
10228768, 10327200
#
#
Check Filesystem or any issues
================================
fsck /dev/dsk/c0t2d0s0
fsck /dev/dsk/c0t2d0s1
# fsck /dev/dsk/c0t2d0s0
** /dev/rdsk/c0t2d0s0
** Last Mounted on
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3a - Check Connectivity
** Phase 3b - Verify Shadows/ACLs
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cylinder Groups
2 files, 9 used, 10331200 free (16 frags, 1291398 blocks, 0.0% fragmentation)
#
# fsck /dev/dsk/c0t2d0s1
** /dev/rdsk/c0t2d0s1
** Last Mounted on
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3a - Check Connectivity
** Phase 3b - Verify Shadows/ACLs
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cylinder Groups
2 files, 9 used, 5126169 free (17 frags, 640769 blocks, 0.0% fragmentation)
#
42 | P a g e
Information before mounting
====================================
# df -h
Filesystem size used avail capacity Mounted on
/dev/dsk/c0t0d0s0 8.1G 4.0G 4.1G 50% /
/devices 0K 0K 0K 0% /devices
ctfs 0K 0K 0K 0% /system/contract
proc 0K 0K 0K 0% /proc
mnttab 0K 0K 0K 0% /etc/mnttab
swap 936M 984K 935M 1% /etc/svc/volatile
objfs 0K 0K 0K 0% /system/object
sharefs 0K 0K 0K 0% /etc/dfs/sharetab
/usr/lib/libc/libc_hwcap1.so.1
8.1G 4.0G 4.1G 50% /lib/libc.so.1
fd 0K 0K 0K 0% /dev/fd
swap 935M 148K 935M 1% /tmp
swap 935M 28K 935M 1% /var/run
/dev/dsk/c0t0d0s7 7.1G 7.2M 7.0G 1% /export/home
winshare 225G 77G 148G 35% /mnt/sf_winshare
Create Directory for which the Filesystem needs to assign.
==============================================================
mkdir /u01
mkdir /u02
Mount Filesystem with above Directories:
===============================================================
mount -F ufs /dev/dsk/c0t2d0s0 /u01
mount -F ufs /dev/dsk/c0t2d0s1 /u02
Above Command will update into /etc/mnttab file
================================================
cat /etc/mnttab
Check currently if they mounted
================================
# mount |egrep 'u01|u02'
/u01 on /dev/dsk/c0t2d0s0
read/write/setuid/devices/rstchown/intr/largefiles/logging/xattr/onerror=panic/dev
=840080 on Mon Sep 2 20:32:09 2013
/u02 on /dev/dsk/c0t2d0s1
read/write/setuid/devices/rstchown/intr/largefiles/logging/xattr/onerror=panic/dev
=840081 on Mon Sep 2 20:32:09 2013
#
43 | P a g e
# df -h
Filesystem size used avail capacity Mounted on
/dev/dsk/c0t0d0s0 8.1G 4.0G 4.1G 50% /
/devices 0K 0K 0K 0% /devices
ctfs 0K 0K 0K 0% /system/contract
proc 0K 0K 0K 0% /proc
mnttab 0K 0K 0K 0% /etc/mnttab
swap 936M 984K 935M 1% /etc/svc/volatile
objfs 0K 0K 0K 0% /system/object
sharefs 0K 0K 0K 0% /etc/dfs/sharetab
/usr/lib/libc/libc_hwcap1.so.1
8.1G 4.0G 4.1G 50% /lib/libc.so.1
fd 0K 0K 0K 0% /dev/fd
swap 935M 148K 935M 1% /tmp
swap 935M 28K 935M 1% /var/run
/dev/dsk/c0t0d0s7 7.1G 7.2M 7.0G 1% /export/home
winshare 225G 77G 148G 35% /mnt/sf_winshare
/dev/dsk/c0t2d0s0 9.9G 10M 9.7G 1% /u01
/dev/dsk/c0t2d0s1 4.9G 5.0M 4.8G 1% /u02
To make permanent visible after every restart add two mount details in /etc/vfstab
==================================================================================
Backup /etc/vfstab as below
==============================
# cat /etc/vfstab #device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/dsk/c0t0d0s1 - - swap - no -
/dev/dsk/c0t0d0s0 /dev/rdsk/c0t0d0s0 / ufs 1 no -
/dev/dsk/c0t0d0s7 /dev/rdsk/c0t0d0s7 /export/home ufs 2
yes -
/devices - /devices devfs - no -
sharefs - /etc/dfs/sharetab sharefs - no -
ctfs - /system/contract ctfs - no -
objfs - /system/object objfs - no -
swap - /tmp tmpfs - yes -
# cp /etc/vfstab /etc/vfstab.orig.bkp
# vi /etc/vfstab
Add below 2 lines in vfstabfile
/dev/dsk/c0t2d0s0 /dev/rdsk/c0t2d0s0 /u01 ufs 2 yes - /dev/dsk/c0t2d0s1 /dev/rdsk/c0t2d0s1 /u02 ufs 2 yes -
# cat /etc/vfstab
#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/dsk/c0t0d0s1 - - swap - no -
44 | P a g e
/dev/dsk/c0t0d0s0 /dev/rdsk/c0t0d0s0 / ufs 1 no -
/dev/dsk/c0t0d0s7 /dev/rdsk/c0t0d0s7 /export/home ufs 2
yes -
/dev/dsk/c0t2d0s0 /dev/rdsk/c0t2d0s0 /u01 ufs 2 yes - /dev/dsk/c0t2d0s1 /dev/rdsk/c0t2d0s1 /u02 ufs 2 yes - /devices - /devices devfs - no -
sharefs - /etc/dfs/sharetab sharefs - no -
ctfs - /system/contract ctfs - no -
objfs - /system/object objfs - no -
swap - /tmp tmpfs - yes -
#
Restart Server and check if they are getting mounted :
# init 6 => will reboot server.