Tuesday 7 May 2013

Minecraft Service

Download Minecraft Server
Download the latest Minecraft Server
Run it, and check that it is the correct version.

Download CraftBukkit
Download CraftBukkit
Edit the batch file RunServerWithMods.cmd:

@ECHO OFF
SET BINDIR=%~dp0
CD /D "%BINDIR%"
"C:\Program Files (x86)\Java\jre7\bin\java.exe" -Xmx1024M -Xms1024M -jar craftbukkit-1.5.2-R0.2-20130608.060232-13.jar -nojline

Test the server
Test the server by running RunServerWithMods.cmd. Check that the latest client will work with the new server.
Install Summary - Download yajsw and extract to any folder.
- Open task manager and find the "java" pid under processes. This is most likely your minecraft server.
- Open a command prompt and browse to the "bat" folder under yajsw. (ex. D:\yajsw-beta-10.3\bat).
- Run genConfig.bat  (ex. genConfig.bat 2467).

Note that the config writes the value
wrapper.java.app.jar = craftbukkit-1.5.2-R0.2-20130608.060232-13.jar

for future updates to Minecraft you just need to change this line entry pointing to the new bukkit version.

wrapper.conf
- Browse to "conf" folder (ex. D:\yajsw-beta-10.3\conf) and open wrapper.conf in a text editor.
- Set the working directory (wrapper.working.dir) to your minecraft .jar server file. (ex. \minecraftserver\ for D:\minecraftserver\).
- Uncomment wrapper.app.password and enter your admin account password. Make sure the username on the line above is correct (mine was MinecraftService).
- Fill in service name and descriptions (wrapper.ntservice.name)

Create/Install Service
- Run installService.bat from the bat directory. (ex. D:\yajsw-beta-10.3\bat)
- Open Services Manager through administration tools.
- Right click the server, properties.
- Browse to "Log On" tab.
- Change to "This Account" and use the same account in your wrapper.conf.

Start the service.

You may want to create a new user account for the service. In this scenario, go to Computer Management > User Rights Assignment and Configure for Logon as a Service. I also made my service account a member of the administrators service.

Saturday 4 May 2013

Bootable USBs - IMG to USB, ISO to USB

Option 1
ISO to USB: use the Windows 7 USB/DVD Download Tool.
Option 2
IMG to USB disk imager: Win32 Disk Imager - http://sourceforge.net/projects/win32diskimager/?source=dlp

Option 3 (worked the best)
Manual steps for IMG or ISO to USB for Windows 7 or 8 is described here:
This approach involves creating the bootable USB separately from copying the files over.

Plug in your USB Flash drive if you have not already done so.
Start a Command Prompt as an administrator (click the Start button and type CMD, right-click on cmd.exe and select “Run as administrator" and accept the UAC prompt, assuming you are using Windows Vista or Windows 7)

Type diskpart and then press ENTER For each line, type the parts on BOLD and press ENTER after each entry, the notes are for reference only

DISKPART> list disk (note: this will list the disks on your system. Typically look for the one that matches the capacity of your USB flash drive)
DISKPART> select disk x (note: x is the number for your USB flash drive you obtained from the list command above)
DISKPART> clean (note: this will erase your USB flash drive)
DISKPART> create partition primary (note: this will create a new primary partition on the USB Flash drive)
DISKPART> select partition 1 (note: this will select the partition you just created)
DISKPART> active (note: this will set the new partition as active, which identifies it as a valid system partition)
DISKPART> format FS=NTFS QUICK (note: this will perform a quick format on the USB Flash drive)
DISKPART> assign (note: this will assign a drive letter to the partition)
DISKPART> exit

d, Now we need to put the boot files from the ISO image you downloaded earlier on to the USB Flash drive. You will need to mount the ISO image using SlySoft’s Virtual CloneDrive. To do this, right-click on the ISO image you downloaded (i.e. Windows8-ConsumerPreview-64bit-English.iso) and select “Mount”. If you do not see the “Mount” option, it may mean that the Virtual Clone Drive (or similar) tool is not installed. Once you have selcted “Mount”, a drive letter will be assigned to the ISO image. Make a note as to what drive letter has been assigned to the ISO, in my case drive “F:”.

Next, you will need to start a Command Prompt as an administrator (click the Start button and type CMD, right-click on cmd.exe and select “Run as administrator" and accept the UAC prompt, assuming you are using Windows Vista or Windows 7).

Navigate to your ISO drive, in my case “F:” and type the following:

cd \boot (thanks Ron T for pointing this out)

bootsect /nt60 y: (note: where y: is the drive letter assigned to your USB Flash drive – this will copy across the boot files)

e, Lastly we will need to copy the installation files across from the ISO image to the USB Flash drive. To do this, type the following:

XCOPY X:\*.* Y:\ /E /J /H (note: where x: is the drive letter assigned to your ISO image and y: is the drive letter assigned to your USB Flash Drive)

You should note have a Windows 8 Bootable USB flash drive.

NEW: Option 4

Use WinUSB Maker:

http://blog.powerbiz.net.au/online-tools/how-to-create-a-bootable-usb-from-windows-8-1-and-windows-server-2012r2-iso-media/