Do you like movies about gladiators

by Stephen McGroarty 9/27/2011 11:13:38 AM

Here is something handy, ever needed to use RoboCopy to do a mass copy/sync and had issues with the permissions? Well here are a couple of little command line tools to help with that icacls and takeown

First we will want to see where we are getting Access is Denied from our Robocopy logs, to do logging in robocopy its the /LOG switch. My robocopies look something like this

   1:  robocopy.exe \\Server\d$\Shares\Data D:\Shares\Data /SEC /MIR /R:3 /W:1 /LOG:C:\CopyLogs\Data.txt 

The switches are
/SEC – Keep security settings (permissions) on the files
/MIR – Mirror the files between the servers
/R – Retry count, it will try 3 times
/W – Wait N seconds before retries, currently set to 1
/LOG – Location of the log file

Now you can get fancy with the /LOG by putting a %DATE% in it but this is simpler now (and I know the date syntax is wrong)

so once you get your log files, you want to look for the erorrs of Access is Denied

Once you find those files, on the source server you want to take ownership of the files so you can add yourself as administrator

The takeown command is great for the first part of this.
takeown /F /s servername d:\pathtofie\filename.txt
or for a few files in a single directory
takeown /F /R /S servername d:\pathtofiles\

/F is the filename or folder name
/S is the remote system
/R is recursively

This will scroll all the files in the directory by and say it failed or succeeded

Next we want to be sure that we have full control over the files so that we can read them, we can do this with the icacls command
icacls \\servername\d$\PathToFiles\* /T /C /grant Administrators:F

the /T is for Traversing the folder getting all files under it
/C is continue on errors
/grand is the user/group and the permissions type, F for Full control

And that should give you permissiosn on the server

Currently rated 3.0 by 5 people

  • Currently 3/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

As non-technical as they get

by Stephen McGroarty 9/16/2011 6:57:19 PM

Working with VMware can be simple or difficult, it depends on what you are trying to do. Something simple would be installing VMware ESXi 4.1 from CD to the local hard drive, something complex would be installing VMware ESXi 4.1 from USB flash drive to internal flash media is a bit tricky. And since you found this post I am willing to bet that you are now getting the mboot.c32 not found error. Well lets solve that one first.

To resolve the mboot.c32 not found issue you are using too new of a version of unetbootin you need to use unetbootin 4.9.4 this will solve that issue and allow the installer to boot from USB. The same methods apply, I am not going to post screen shots, just click the ISO option and browse to your downloaded ISO the create.

After you have it on USB you can now boot from it, but it won’t install, go ahead, try it. You will get an error of

Unable to find the system image to install. 
This is due to the image not being mounted correctly or the CD-ROM not
being supported.

Well at this point the simple way to solve it would be to throw the USB stick out and go find an external DVD drive, but really what fun would that be.

The next thing that is needed is this replacement for ienviron.vgz located on Eric Sloof’s blog.

Once you have that, delete the ienviron.vgz from your USB stick and put this one there. It mainly has changes to the partition sizes so that it can install to a USB.

Ok so now that you have both these items in place, how to use them easily, well lets make a kickstart file.

Create a file on the USB drive and call it ks.cfg then edit it with notepad. Mine is here

   1:  vmaccepteula
   2:  rootpw changemetosomethingthatyouwoulduseandisshorterforconvenence
   3:  autopart --disk=mpx.vmhba32:C0:T0:L0 --overwritevmfs 
   4:  install usb 
   5:  network --bootproto=dhcp --device=vmnic0 

Milage may vary on the script, make sure that mpx.vmhba32:C0:T0:L0 is your internal flash memory or it will overwrite your USB drive

Now to the config file, you need to modify the syslinux.cfg file and add ks=usb to line 8,

   1:  default menu.c32
   2:  menu title VMware VMvisor Boot Menu
   3:  timeout 80
   4:   
   5:  label ESXi Installer
   6:  menu label ^ESXi Installer
   7:  kernel mboot.c32
   8:  append vmkboot.gz ks=usb --- vmkernel.gz --- sys.vgz --- cim.vgz --- ienviron.vgz --- install.vgz --- mod.tgz
   9:   
  10:  label ^Boot from local disk
  11:  menu label ^Boot from local disk
  12:  localboot 0x80

Once that is complete, plug the USB drive into your new VMware host and it will automagicly install to the internal flash and then just tell you to press enter to reboot. That’s it.

Currently rated 3.0 by 5 people

  • Currently 3/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Update to xCopy

by Stephen McGroarty 8/21/2011 10:39:41 PM

I know I said I would show how to restore from a bad flash on a droid, but I honestly havent had a chance just yet. But I just got an external drive that I am not doing automated backups to so I thought I would share the information.

I like xcopy, just because it is installed on all windows computers. It is a simple application that just copies the data, but it can do things like copy data newer than a given point and synchronize files on a local or network drive. We actually just did a user home directory migration using xcopy just because it works that well.

Today we are just doing local, so this is more of an update to a pervious post

First we want to setup out script with the select directories. Because this my desktop that we are working on I didn’t want to back up everything just my documents and pictures so I did that in the .bat file.

notepad backups.bat

xcopy c:\users\smcgroarty\Desktop  e:\Backups\Desktop\ /e /d /c
xcopy “c:\users\smcgroarty\Documents e:\Backups\Desktop\ /e /d /c
xcopy “c:\users\smcgroarty\My Music“ “e:\Backups\My Music\” /e /d /c
xcopy “c:\users\smcgroarty\My Pictures”  “e:\Backups\My Pictures\” /e /d /c

Save the file, and run it manually to make sure everything processes correctly. If you run it twice, than it should take a lot less time since the /d option is only for files that have a newer time stamp on the source than on the destination.

Next we want to set it as a Scheduled Task so that it will always run, on lets say Wednesday evenings at 10:24PM

We need to go to Control Panel > Administrative Tools > Task Scheduler

In Windows 7 we are going to select “Create Basic Task”

Give it a simple name, like Backups or LocalBackups, the description is optional but I always like to include it.

Select Next and give it a time you want it to run, and then next will let you select the time.

Selecting Next will allow you to start a program, and then browse to the location of the backup script you created.

Select Next and then finish, and then Bob’s your uncle, the task will be up and going once a week at the random time you specified.

Currently rated 3.0 by 5 people

  • Currently 3/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

In the beginning there was root

by Stephen McGroarty 7/30/2011 8:04:41 PM

This is for the Motorola Droid 2 Global, but these steps should work for other Droids as well.

First step you need to root your phone, the simplest way is to download the z4root app from XDA-Developers.It allows you to do a permanent root or a temporary root, this is good if you just want to install one or two quick things, but for our purposes, we want a permanent root. It also allows you to unroot your phone later if you choose not to do the rest of this.

After your phone is rooted you can verify it with app Superuser. You can download it from the Market by searching for Superuser or from here. This is only to verify that root is working correctly.

The next app is ClockworkMod This will allow you to install the ROMs of your choice. Before you start with installing the ROM, ClockworkMod has a feature for allowing backups. It is recommended that you back it up.The restore function also works, so if you ever decied for any reason you want to go back to stock you can.

General Navigation for ClockworkMod – These settings are for the Droid 2 Global, they might work on your phone.

Menu UP – Volume up button
Menu Down – Volume down button
Enter/Select – Camera button
Back/Cancel – Power Button

Menus:

- reboot system now
- apply sdcard:update.zip
- wipe data/factory reset
- wipe cache partition
- install zip from sdcard
- backup and restore
- mounts and storage
- advanced

Backup your data first

The data backup is simple, it takes a few moments, and the restore works.

Select the backup and restore menu and then select backup, yes its that simple. This will take about ten minutes and will show you a status bar while its creating the backup. And this also only back ups the data on the phone, but it does backup everything, installed applications, text message/picture message conversations, all settings. If you choose to restore your phone it will be as from this point.

After your data is backed up you will want to reboot your phone and hook it to your computer as a USB drive.

The next step is up to you, finding a ROM. At the time of this writing there were three ROMs for the Droid 2 Global, CyanogenMod-7, Hexen, and AngelRom. After playing with all three for a while I decieded on CyanogenMod-7 because it was the only gingerbread based rom. Although I did run Hexen for the better part of the day and saw large battery improvements with it.

I downloaded the rom to my laptop, and rebooted it into clockworkmod. This time I selected “- wipe data/factory reset” and then “-wipe cache partition”. One of the times I was reloading a rom I did not select these two options and it turned my phone into a brick, I will write a recovery article later.

After wiping all data and doing a factory reset on the phone, you want to select “-install zip form sdcar” and this will allow you to browse your SDCard. Once you select the ROM you will and selected Yes install ROM name you will be given a status screen. It should take about ten minutes to flash the rom, once it is completed it will reboot into the new version.

It might take a few moments to get things setup on the system, but remember to read the information on the rom you have selected.

After I got mine completely setup, this is what I had
screenshot-1312090427501

Motorola Droid 2 Global running Gingerbread

Currently rated 3.0 by 5 people

  • Currently 3/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , , ,

Android

How to manage your time

by Stephen McGroarty 7/21/2011 3:57:07 PM

Windows Server 2008 R2 and time sync issues seem to be more common than one would think. After poking around for a bit I was able to come up with a few steps to assist with that.

First we want to set the time server on the domain controllers, I like pool.ntp.org but the choice is up to you
w32tm /config /manualpeerlist:Pool.ntp.org /syncfromflags:manual /reliable:yes

We have no set it to use an external source and told it that we can use this server as a time server.

Lets restart the time services
net stop w32time
net start w32time

And finally synchronize the service
w32tm /resync

Well that part is completed, now lets move to the client servers.

This can be done manually by logging into each server if there is only a few, or creating a batch script to against them all.

We want to first stop the time service
net stop w32time

Now we want to remove all configurations from the registry
w32tm /unregister

And then reregister the new settings in the registry, this will pole the settings from the domain controller
w32tm /register

Now lets restart the service.
net start w32time

This should work for most of the domain member computers and it can be used to change that one server that keeps getting out of sync.

Currently rated 2.5 by 4 people

  • Currently 2.5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , ,

Administration

What about a full lab setup

by Stephen McGroarty 6/28/2011 7:11:28 AM

Wow it has been a little too long, but here we go.

I got my hands on some hardware to play with and configure so I thought I would share the design with you, loyal fans. What I have is a basic design setup, 2TB storage and 5 servers that I wanted to virtualize and in both Hyper-V and VMware. The general hardware overview:
1

With this, i am going with Boot from SAN for the Hyper-V servers and Boot from USB on the. There is no special requirements or tweaks for either of these setups, they both should just work.

The conceptual view of the environment is simple and basic, but I wanted to relay that each server type is on both host types. This design has an Active Directory and Database server on both the Hyper-V and the VMware clusters

2

 

3

Now we start getting to the meat of it, how am dividing up the storage to the servers, best answer I can give is, Evenly
4

I did two separate 500GB volumes for admin data, VMs that are require more up time in general, and then a 250GB volume for the general data. On the Admin volume i will also have machine templates and required ISOs for installing software and OSes.

And finally an overview of how it all relates to each other. The authentication services and the monitoring talk to everything, while the web servers and the file servers just talk to themselves.
5

Currently rated 3.0 by 5 people

  • Currently 3/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , ,

Administration

HP iLO upgrade and you

by Stephen McGroarty 1/11/2011 6:03:09 AM

Downloaded the latest iLo firmware, link is at the bottom of this document, and save it to your local computer. It will be an executable file, select it and choose the Extract option

image

This will prompt you for a location to extract the files to; the files will not be in a folder unless you specify “Create Folder”. After selecting the location click Close and browse to the created folder.

In the folder there will be a file named ilo2_XXX.bin where XXX is the current version of the firmware.

image

Verify the files location and then open up a web browser, HP recommends using Internet Explorer for this process

image

After logging into the Onboard Administrator, select the server that you want to perform the update on.

image

After connecting to the server, under the server name select iLo then Web Administration

image

The workstation will connect to iLo and it should automatically log you into it.

Once logged in select the Administration tab and then the Firmware should be selected already.

image

Select Browse and go to your extracted firmware image, then select “Send firmware image

It will take a few moments to do the firmware update on the blade, and after it is completed the server will restart the iLo console and ask to you login.

To verify that the server has updated iLo correctly close the window. The firmware revision number should appear on the main page, but it might take a moment to fresh.

Sources:

cpqlocfg.exe – Self installer that installs under C:\Program Files\HP\cpqlocfg\
http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareDescription.jsp?lang=en&cc=us&swItem=MTX-232d69dde5874c11b3ebc27ee3&jumpid=reg_R1002_USEN

Newest Blade Firmware:
http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareIndex.jsp?lang=en&cc=us&prodNameId=1135772&prodTypeId=18964&prodSeriesId=1146658&swLang=8&taskId=135&swEnvOID=1005#29213

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

There and back again

by Stephen McGroarty 12/23/2010 8:34:20 AM

Ok first, yes I have been pretty absent on this site for a while, just been caught up doing a few things with work on a “short term” that took longer than they should of. But I am going to see about doing this once a week now. And for this weeks fun and excitement, how about a simple xcopy script?

You have data on location 1 and you want something simple and quick that can be used to copy the data and keep it synchronized. How about an xcopy? Its already installed, it doesn't have any odd requirements, and it can be set as a batch file and run as a scheduled task.

First you need to know the location you want the files copied from and to, I usually set this script up on the storage server just so I don't have that run on my desktop and surprise me.

The script should be simple 

xcopy /e /d /y \\myworkstation\mydata\need this c:\Backups\MyBackups 

Important switches:
/e – Everything including empty directories
/d – Date, if there is no date given then it will take things that just have a different date or are new
/y – Yes to overwrite

you should now test this command on from your server/storage location and verify that you have permissions and the path set correctly.

After that set it as  a new scheduled task. I think i will save the scheduled tasks for a later date. But this should help you sync those files between two locations.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , ,

Administration

Link to a link

by stephen mcgroarty 6/27/2010 7:43:14 PM

Ok I am just going to post the link to my forum post over at my.is

http://my.is/forums/f93/second-time-around-411930/

It is what i am doing with my IS300, nothing special, just stockish

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Cars

A good waste of time

by Stephen McGroarty 6/22/2010 9:26:38 AM

Want to change your Windows 7 Logon Screen? First thing you want to do is find a really cool/fun/neat image, I like this one. After you find one you want, go Start (in this case Windows Logo in the lower left hand corner) and type regedit

Once you are there find the key HKLM\Software\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\Background

You will have to add the DWORD Value OEMBackground with a value of 1
Be careful not to have any extra spaces if you are cut and pasting OEMBackground to the value name or it wont work

After that, go to start and type C:\Windows\System32\oobe\ and add the folder Info, then inside of Info add the folder Backgrounds

Once you have the backgrounds folder you want to  copy your image there with the name of backgroundDefault and make sure it is a jpg file
Also note, that if the image size is over 256K it wont display

If you did it right, when you lock your workstation (winkey+L) you will see the image

IMAG0002

Also there are some other values you can play with, in the HKLM\Software\Microsoft\Windows\CurrentVersion\Authentication\LogonUI folder you can add the DWORD value of ButtonSet with a value of 1 or 2
1 = Darker Text Shadows and button colors
2 = No Shadows and no transparent buttons

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen
Hacked by Stephen McGroarty
Content © Stephen McGroarty


About the author

Stephen Mcgroarty - Avatar Stephen McGroarty

I am a Microsoft Certified Professional with Windows 2003 Server. I have a firm understanding of Linux, Windows, and everything needed for both workstation and servers.

E-mail me Send mail

Calendar

<<  February 2012  >>
SuMoTuWeThFrSa
2930311234
567891011
12131415161718
19202122232425
26272829123
45678910

View posts in large calendar

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2012