DefinIT Because if IT were easy, everyone would do it…

14Mar/080

Installing Windows XP without a CD drive

Posted by Sam McGeown

When the Dell engineer said “they’ve asked if you can reinstall the OS” my heart sank. Not because I felt like he was weasling out of work - unusually they were very helpful. Not because installing XP is a hard task, I’ve done it over 100 times on all sorts of hardware.

No, the reason I let out a sigh was because this particular laptop, the Latitude X1, has no internal CD/DVD drive. I also did not have a spare USB one to hand. I did however, have a USB floppy drive. After 2 weeks of trying this off and on, I can tell you that there is no definitive “this will work”. I have tried countless USB flash drive methods and generally had no success (this is more to do with missing the “DOS can’t read NTFS” step below I think).

So without further ado, here’s my final and successful method for Installing Windows XP without a CD drive.

I used the following:

Set the BIOS - As obvious as it sounds, you need to set your BIOS to boot from USB, generally you need to enable that functionality AND change the boot order or you’ll get your HD boot.

Share the i386 - You can do this any way you like, personally I shared the entire CD drive of my 2nd desktop because I wanted some of the extras too, but you only need the i386 folder. Use as little security as you feel comfortable with, and remove the share once you’re finished.

Create the boot floppy - On your 2nd computer, plug in the USB Floppy and insert your first disk; format the disk using the “Create an MS-DOS startup disk” option. Once you’ve downloaded the Universal TCP/IP Boot Disk from the link above, unzip it somewhere and run the MakeDisk.bat. Follow the easy instructions to create your boot disk, label it and set it aside for now.

Create a utility floppy - Download SMARTRIVE.EXE, Aefdisk, XCOPY.EXE and XCOPY.MOD onto the second floppy. Label it and set it aside.

Boot the floppy - On the machine to be installed, boot to your Universal TCP/IP boot disk. Follow the instructions until you get to the command prompt. Switch floppies and copy SMARTRIVE.EXE, Aefdisk, XCOPY.EXE and XCOPY.MOD onto the ram drive (N:).

n:\> copy a:\*.* n:\

Create your partitions - Using Aefdisk you can now go ahead and create your partitions, I want a 1GB FAT16 partition to install from (you could at this point install from the network without copying the CD across, but next time you wanted to reinstall you’d have to go through all of this again). The rest of the hard drive is going to be NTFS ready for the install.

*WARNING THIS WILL DELETE YOUR EXISTING PARTITIONS*

n:\> Aefdisk 1 /delall /formatfat /pri:1024:6 /ext:0:7

Woah woah woah! What’s all that?! The command runs “Aefdisk” on hard disk “1″ with the “/delall” flag, which deletes any exisiting partitions, “/formatfat” which formats the next partition FAT. “/PRI” is a primary partition, “:1024″ is the partition size, “:6″ is the hex partition type which in this case is FAT16 >32mb. “/ext” is an extended partition, “:0″ tells it to use all remaining space on the drive, “:7″ is the partition type which is NTFS.

Connect to the network share - Using the “net use” command you can now connect to the share you created earlier. (I’ve shared the CD drive as D on my machine “test-xp”)

n:\> net use f: \\test-xp\d

Running SMARTDRV.EXE - You don’t *need* SmartDrive, but it will speed up your installation A LOT. I didn’t run it the first time I tried this and after 24 hours it still hadn’t got past the text based part of the install. With SmartDrive it installed in less than an hour. When you run it the first time there is no output, it’s just loaded into memory. If you run it a second time it will give you a status display.

n:\> smartdrive.exe

Copy the i386 - Now using XCOPY.EXE you can copy the i386 (or the whole CD) to your installation partition, which should now be located at c:\. I copied the entire CD because it has some extras I required.

n:\> xcopy f:\ c:\

Running setup…or not! - Finally, you’d think it was all plain sailing from here, but there is just one final gotcha - if you run “c:\setup.exe” you will get an error message because it’s a Win32 application and won’t run in DOS. Don’t worry though, the you can run c:\i386\winnt.exe to begin the process. The familiar blue setup screen launches and it’ll ask you where the setup files are, make sure it says “c:\i386″ and off you go!

n:\> c:\i386\winnt.exe

And finally… - It is possible to complete this process on a USB Flash Drive, all you need to do is make the flash drive bootable (using this HP Utility has worked for me), copy the files from a boot floppy and then carry one from there.

 Hope that helps!

21Feb/080

Retrieving Your Exchange Server 2003 License Key

Posted by Sam McGeown

Recently I found the need to retrieve the key from an existing Exchange Server for a reinstall - the software is legally licensed but the key was somehow lost. A trawl through my registry revealed that the key is stored in an obscure place:

HKLM\SOFTWARE\Microsoft\Microsoft Integration\{GUID}\PID3.0

This was the case on a Windows Server 2000 install with Exchange Server 2003 installed, when I get the chance I will test this on Server 2003.

7Jan/080

Using NTDSUtil to transfer FSMO Roles by command line

Posted by Sam McGeown

I’ve just removed a domain controller (DC) from my root domain, the very first server not only in the domain, but the forest. The roles were migrating to a newer server, far more up to the job, but it isn’t a job to be taken lightly. If you mess up the root domain, you’ve potentially got problems all the way down your domain hierarchy.

 

Let me explain; the primary domain controller in a domain (normally the first domain controller) hosts all the FSMO roles. It also is (by default) the only copy of the Global Catalog (GC). Potentially, even if you have other domain controllers in the forest, you could end up with a seriously crippled domain.

So, you want to transfer them safely off of your old domain controller (from now on DC1) to your new one (from now on DC2). You must ensure that the following are transfered:

  • Schema Master - The only server in the FOREST that can edit the Schema, all other DCs recieve a read-only copy
  • Domain Naming Master - The only server in the FOREST that can add/remove domains in the Directory.
  • Infrastructure Master - Updates an objects Security ID (SID) and Distinguished Name (DN). One per DOMAIN.
  • Relative ID (RID) Master - Processes RID pool requests to all DCs in the Domain. One per DOMAIN.
  • Primary Domain Controller (PDC) Emulator - Windows Time Server (amongst other things) for Kerboros, it’s authoritative for it’s domain. If it’s the root domain, it’s authoritative for the Enterprise.

This can potentially cause irreparable damage to your Active Directory, so I strongly advise you check that your domain is in good working order and has been fully backed up before you attempt to transfer any roles.

  1.  On any domain controller open a command prompt and run “ntdsutil” (Note: You need to be an ENTERPRISE admin to modify Schema, Domain Naming and Infrastructure masters and a DOMAIN admin for the rest)
  2. Type “roles” to enter FSMO Maintenance mode.
  3. Type “connections” to enter the server connections mode, and “server ” to select the server you are transferring roles to. E.G: “server DC2″.
  4. Type “q” to drop back into FSMO Maintenance mode.
  5. Type “transfer ” to transfer the role you want to transfer. You will get a pop up warning asking if you are sure, if you are, click “Yes”. can be:
    • domain naming master
    • infrastructure master
    • RID master
    • PDC
    • schema master
  6. I transferred the roles in that order, it shouldn’t make much difference which order that you do it. Once all the roles are transfered, type “q” again to drop out, and “q” again to quit NTDSUtil.
26Nov/070

Installing on Vista: Error 1327 invalid drive when using mapped drives

Posted by Sam McGeown

Incredibly irritating error when you go to install under your user account when you’re using mapped drives for your documents. All our domain users have a userfolder on the server, it’s mapped as z:\ and there is a folder redirection set up. It’s pretty standard in a corporate/domain environment, so why does it cause so many Vista installations to fail?

 

This is something I’ve run into time and time again and There are a couple of things you can try…sometimes they work individually, sometimes not!

  1. Reset your “My Pictures” location to the default (yes, that is stupid; no, I don’t know why Unrelated Program X wants to install something into “My Pictures”).
  2. Edit your registry (BACK IT UP FIRST) to remove references to your mapped drive.
    1. Run Regedit.
    2. Navigate to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
    3. Change any references that use the drive letter to use the %USERPROFILE% variable.
    4. Restart.
  3. If you’re using UAC (User Account Control) you might need to map the network drive as the administrator. This is a pain in the @$$ because you have to disconnect the drive under your user account first. Of course, if you’ve got ANY documents open, this will upset your profile. Anyway, steps for that:
    1. Disconnect the currently mapped drive.
    2. Open the command prompt as the administrator. Type "net use \\[server]\share and check that it’s mapped by typing “net use”.
    3. Open explorer and navigate to your shared folder and right click, use the “Map Network Drive” wizard to map the share under your user profile.
    4. If all above fails (as in my case), your only option is to log in as a user that doesn’t map drives (machine local admin works for me, but then you have to enable that user as it’s disabled by default. You also have to provide a password for it - don’t forget to disable again after an install.)
  4. I could rant about how rubbish this is, but to be honest I am to hacked off at wasting my afternoon trying to work around this.

18Oct/070

I’m qualified!

Posted by Sam McGeown

It’s been a while since I’ve posted here, that’s for various reasons, one of which was that I have been preparing for, and taking, my MCSA exams. So here it is…

  • MCTS Windows Vista, Configuring (70-620) 
  • MCP Managing and Maintaining a Windows Server 2003 Environment (70-290)
  • MCP Implementing, Managing and Maintaining a Windows Server 2003 Network Infrastructure (70-291)
  • CompTIA Security+ (SYO-101)

Which all add up to an MCSA Windows Server 2003 Security+. I’ll add the links to my online certificates as MS sort them out.

12Jul/070

iTunes crashes on startup under Vista

Posted by Sam McGeown

I had an odd problem today, I logged on to begin my day’s work and plugged in my iPod as per normal. iTunes crashes, Vista tries to recover. iTunes closes. iTunes opens. iTunes crashes. Vista tries to recover.

As you can imagine that gets tiresome, so I tried repairing iTunes, reinstalling iTunes, installing older versions of iTunes, all to no avail. The solution in the end was to remove Quicktime and do a fresh install. I’ve not managed to find what caused the crash, so I’m assuming Quicktime has corrupted somehow. It’s possible the Apple Software Update was trying to upgrade it an crashed leaving it in a non-running state - but that’s just speculation.

28Jun/070

Installing Visual Studio 2003 SP1 on Vista

Posted by Sam McGeown

I’ve finally cracked the installation problems with VS 2003 SP1 on Vista. The problem seems to be that the SP must be installed under the same credentials that Visual Studio was installed. I.e. I installed Visual Studio under the domain administrator credentials, but I run my day-to-day under a standard user credential. When installing the SP1 I was elevating my standard user credential rather than running as the domain admin. I don’t know what difference that makes to anything, but it’s worked!

 

 Where was that purchase requisition for 2005?

26Jun/070

Moving and resizing a VMWare System Disk

Posted by Sam McGeown

I’ve recently had to upgrade my VM Server due to an increase in load. I had 2 virtual servers running off of the same hard disk, with 768mb of RAM split between the lot. After jamming 2 new 1GB sticks of DDR in, and a new 120GB hard drive it was time to re-allocate some of these resources…here’s how:

WARNING! You should always perform a backup on a server you can’t afford to lose BEFORE any operation that could potentially destroy the disk (think what would happen if you had a power cut while resizing…)

Step 1 - Moving the Virtual Server.

This is laughably easy;

  • Stop the virtual server from your admin interface
  • copy the virtual server folder over:
    copy “C:\Vitual Machines\SRV-WEB-DEV-01″ ”D:\SRV-WEB-DEV-01″
  •  Next time you boot the Virual Machine, you’ll have to re-attach the .vmdk in it’s correct location.

Step 2 - Resizing the VMWare Disk

Not quite so easy, but still not going to bother most.

  • Using the built in command line VMWare tool (C:\Program Files\VMware\VMware Server\vmware-vdiskmanager.exe) or the handy graphical front end written by Robert Petruska. Help on using the command line utility is available by typing “vmware-vdiskmanager.exe /?”. The command I used was:
vmware-vdiskmanager.exe -x 40Gb D:\SRV-WEB-DEV-01\SRV-WEB-DEV-01.vmdk
  • Once you’ve resized the drive you’ll need to resize the C: partition, or create a new partition of the space. There are 3 ways to do this that I know of.
    • The method I used was to mount the vmdk file to another virtual server so that I could use diskpart.exe (technet article here) to resize the partition - I’m running Windows Server 2003 on my VMs.
    • You can use a gParted live CD if you don’t have another virtual server available. I’ve used this in the past and it has been very reliable - you can also mount the ISO as your VM’s CD drive.
    • PartitionMagic and many other comercial solutions are also available - I’m not going to list them - google it!

That’s it - when you boot to your new machine you should have a nice big space to play with. One of the benefits of now having a 3 disks is being able to run each VM on a separate physical disk, which gives a nice performance boost. If you’ve got a spare disk hanging around you could always create an extra virtual disk, attach it and use it as a swap disk for your VM giving another performance boost.

15Jun/070

DRM Free iTunes music with QTFairUse

Posted by Sam McGeown

I’m not going to go into the rights and wrongs of DRM, I will say that I’m strongly against piracy and if your intention is to strip DRM for those kind of reasons, kindly go somewhere else for your info. If you’re wanting to strip DRM for a legitimate personal use, such as playing in another media player or an MP3 player other than an iPod - read on!

 QuickTimeFairUse is a great little application that takes your .m4p protected iTunes files and captures the decrypted data directly from the memory of your computer. This means that there’s no loss of quality at all from the process! The captured AAC data is then re-compressed into an .m4a unprotected file. That’s not the only benefit either, QTFairUse will also modify your iTunes library to point to the new .m4a file - including keeping all the metadata, album art and play information, so if you’re like me and have dynamic playlists generated by most played or five star rated it will keep them happy! It will back up your .m4p files and library too, so if something goes wrong you can easily revert back - not that I’ve ever had to. It’s also faster than real-time, it takes 5-15 seconds per song on my laptop with plenty of RAM.

The current download version does not support iTunes 7.2.0 (the latest one) so you’ll need to open the config file QTFairUse6.cfg and add the following to the end:

[Version8]
Desc=7.2.0
DebugCheck=0×4DE385
FrameCopy=0×826130
EndOfTrack=0×50E1D0
SndOut=0×5131D7,EB
LoopStart=0×651531
LoopCopy=0×6515E5
LoopEnd=0×651864
LoopPatch=0×651860,52

Once you’ve done that, run QTFairUse.exe and select the options that you require. You can scan your entire library or drag and drop files into the window. I don’t change any of the default settings because, well they’re great. The only thing I change is the location of the backup to a folder in My Music called M4P Backup.

8Jun/070

Visual Studio Project Location Not Trusted

Posted by Sam McGeown

Just a quick post today about trust levels for .NET assemblies that are hosted remotely. My current set up at work means that I am maintaining one version of our web site while working on developing a new one - not uncommon. I have 2 virtual servers running Server 2003, IIS and SQL Server, each an identical copy of our production server. Each solution and it’s projects are stored on each virtual server, with the project folders shared and mapped as drives on my laptop. (Before I get messages saying “why don’t you use source control, you can create branches etc, etc” - I am aware of that and the decision not to use source control is based on other factors that I’m not going to get into.)

 Anyhow, on to the problem and, the solution.

When opening a Visual Studio solution from a mapped or network location, you get a “project location not trusted” error. By default, your .NET configuration grants FULL trust to your local machine, so you won’t get that message working on a local project. Also by default, the Local Intranet is given a step below full trust - and here is the problem. You will need to be a local administrator on your computer to make these changes.

Open a command prompt, navigate to:

  1. cd %systemroot%\Microsoft.NET\Framework\\

Run the following command:

  1. CasPol.exe -pp off -m -ag 1.2 -url file://r:\folder\* FullTrust

or, for an unmapped folder

  1. CasPol.exe -pp off -m -ag 1.2 -url file://computername/folder/* FullTrust

This will set the share to full trust and allow you to work with the remote folder/mapped drive as if it’s on your local machine.

For more details about using CasPol.exe and a break down of the above commands, check out the .NET Security Blog

Page 15 of 16« First...1213141516