3. Fix HW difference between VMware and VirtualBox VM
Tuesday Apr 14, 2009
3. Fix HW difference between VMware and VirtualBox VM
This entry is part of Mastering Sun VirtualBox Workshop
Process FIX For Solaris 10 using Recovery Console
1. Boot into Solaris Safeboot mode. You can get access at the Grub menu, usually is the 2nd or 3rd option.
2. Mount the found Solaris partition on /a , Safeboot will usually find the slice on the disk with Solaris and
ask if you want it to mount on /a. Select Yes.
3. Move /a/dev, /a/devices, and /a/etc/path_to_inst to another name (I just append .orig) and then create new directories,
(mkdir) /a/dev and /a/devices, and touch file /a/etc/path_to_inst.
3. Run "devfsadm -r /a" , "devfsadm -c disk -r /a", "devfsadm -i e1000g -r /a" to rebuild the device tree
4. set TERM so we can use 'vi', TERM=vt100; export TERM
Now we need to fix boot disk patch changes Edit /a/boot/solaris/bootenv.rc and fix the line with "setprop bootpath '/pci@0,0....' to match
the path you'll find mounted for /a (i.e. run a 'df -k' command, and you should see /a mounted from /dev/dsk/c0d0s0 or something, then
run 'ls -l /dev/dsk/c0d0s0' or whatever your device listed was, and you should see the actual link point to ../../devices/pci@0,0/...ide..)
Fix also disk naming in /a/etc/vfstab to match new "cy(ty)dy" scheme. Change each instance of cx(tx)dxs0 to cy(ty)dys0 etc.
5. Force to reconfigure on next boot with 'touch /a/reconfigure'
6. Recreate archive "bootadm update-archive -v -R /a" to rebuild the boot-archive on /a
7. If is used another net driver then e1000, rename /a/etc/hostname.* to /a/etc/hostname.e1000g0
and if exist /a/etc/dhcp.* to /a/etc/dhcp.e1000g0
8. Run "cd /; sync; sync; sync; umount /a"
9. fsck -F ufs /dev/dsk/c0d0s0
10. reboot in normal grub menu with "init 6"
Process FIX for OpenSolaris 200805 using Live-CD
Note: Use this procedure up to B100b
- Get right version of OpenSolaris ISO image
- Add CD-ROM iso image into Virtua lDisk Manager
- Attach registered ISO image from Virtual Disk Manager in VMs CD-ROM
Note: I test both LiveCD based kernel snv86 and latest snv93
1. Start OpenSolaris 200805 LiveCD and select second "text console" option
2. Select Language
3. Login - Live CD user user is "jack" and password "jack''', then switch to root "su -", password is "opensolaris".
4. Check if see zfs pool "zpool import", default name is rpool
5. Import this pool "zpool import -f rpool"
6. Find name zfs name for root mount with "zfs list", default is "rpool/ROOT/opensolaris" with legacy mount,
if you already update system you can see numbers after opensolaris like "rpool/ROOT/opensolaris-1"
7. Mount it as /a "mkdir /a; mount -F zfs rpool/ROOT/opensolaris /a"
8. Move /a/etc/path_to_inst to another name (I just append .orig) and then empty one "touch file /a/etc/path_to_inst"
9. Run "devfsadm -C -r /a" , "devfsadm -c disk -r /a", "devfsadm -i e1000g -r /a" to clean and rebuild the device tree
10. Now we need to fix boot disk patch changes , fix disk naming with "vim /a/etc/vfstab" to match actual disk "cy(ty)dy" scheme.
Check disk name with "echo | format", it will display name like c4d0, change each instance of cx(tx)d0s0 to cy(ty)d0s0 etc.
11. Copy actual zfs cache to /a "cp /etc/zfs/zpool.cache /a/etc/zfs/zpool.cache"
12. Force to reconfigure on next boot with 'touch /a/reconfigure'
13. Recreate archive "bootadm update-archive -v -R /a" to rebuild the boot-archive on /a
14. If is used another net driver then e1000, rename /a/etc/hostname.* to /a/etc/hostname.e1000g0
and if exist /a/etc/dhcp.* to /a/etc/dhcp.e1000g0
15. Run "cd /; sync; sync; sync; umount /a"
16. reboot in "boot from hard drive" LiveCD grub menu with "init 6"
Process FIX for OpenSolaris 200811 using Live-CD
Note: Use this procedure from B101a +
- Get right version of OpenSolaris ISO image
- Add CD-ROM iso image into Virtua lDisk Manager
- Attach registered ISO image from Virtual Disk Manager in VMs CD-ROM
Note: I test LiveCD B101a based kernel
1. Start OpenSolaris 200811 LiveCD and select second "text console" option
On some virtualization IDE CD-ROM emulation is broken, add to kernel line fix as "-B atapi-cd-dma-enable=0"
Alternatively on XEN/xVM like Virtualization you can use kernel/ramdisk files from Nevada "Recovety Console"
2. Select Language
3. Login - Live CD user user is "jack" and password "jack''', then switch to root "su -", password is "opensolaris".
4. Check if see zfs pool "zpool import", default name is rpool
5. Import this pool "zpool import -f rpool"
6. Find actual BE name with '''beadm list''' (Default is opensolaris), if you already update system you can see numbers
after opensolaris like "rpool/ROOT/opensolaris-1"
7. Mount BE it as /a "mkdir /a; beadm mount opensolaris /a"
8. Move /a/etc/path_to_inst to another name (I just append .orig) and then empty one "touch file /a/etc/path_to_inst"
9. Run "devfsadm -C -r /a" , "devfsadm -c disk -r /a", "devfsadm -i e1000g -r /a" to clean and rebuild the device tree
10. Copy actual zfs cache to /a "cp /etc/zfs/zpool.cache /a/etc/zfs/zpool.cache"
11. Force to reconfigure on next boot with 'touch /a/reconfigure'
12. Recreate archive "bootadm update-archive -v -R /a" to rebuild the boot-archive on /a
13a. If you use NWAM networking you don't need any reconfiguretion
13b. If you use a Sol10 like default networking, change driver then e1000,
rename /a/etc/hostname.* to /a/etc/hostname.e1000g0 and if exist /a/etc/dhcp.* to /a/etc/dhcp.e1000g0
14. If you need to add some additional drivers you can install them from repitory
For example QEMU/KVM/xen/xVM need rtl8139 driver , so we need to install package SUNWrtls
"pkg -R install SUNWrtls"
15. Run "cd /; sync; sync; sync;"
16. Important !! Umount /a with "beadm umount opensolaris"
17. Reboot in "boot from hard drive" LiveCD grub menu with '''init 6"
- Remove CD ISO image from Virtual Machine











Do you have instructions for doing this with a Sol...