Partitioning in Windows 7

Needed to remove junk from a USB thumb drive. Google search yielded a nice find at

1) Type “DISKPART” from the Command Prompt (accessible by clicking on Start and then typing “cmd” into the open field); you will then see the following prompt: DISKPART>

2) Type “LIST DISK” to see what number your USB drive is listed as.

3) Type “SELECT DISK 2” (if your USB is disk 2; replace # with your disk #); Diskpart will confirm that “Disk 2 is now the select disk.”

4) Type “SELECT PARTITION 1” (this command selects what should be the only partition on your USB drive, the small one that you want to delete to get back the larger, full partition size). Diskpart will confirm with “Partition 1 is now the selected partition.”

5) Type “DELETE PARTITION”. This will delete the old partition. There are no warning prompts if you have existing data – make sure you have copied everything off before doing this!

6) Type “CREATE PARTITION PRIMARY” to create a new, full-size partition. Diskpart will confirm with message of “Diskpart succeeded in creating the specified partition.” You can type in “LIST PARTITION” to confirm the new, full-size.

7) Type “EXIT” to leave Diskpart. You can now format your USB drive by using the standard Windows formatting process.

Hits: 1

FreeNAS Debian UPS Specs

Initially the UPS was being monitored by a FreeNAS installation, this was changed due to performance issues unrelated to the UPS monitoring software. Details on the migration are still being compiled, meanwhile, read this.

How come I feel there was a lot of time wasted?!

Here are the readings from the UPS. I am disappointed that it is not reporting battery voltage, but at least I am getting % charged.

battery.charge: 100                     Battery charge (percent of full)
battery.charge.low: 28			Remaining battery level when UPS switches to LB (%) powerpanel			Driver name
driver.parameter.pollinterval: 2	
driver.parameter.port: /dev/ttyS0	Serial or USB port
driver.version: 2.2.2			Driver version - NUT release		
driver.version.internal: 0.23		Internal driver version
input.frequency: 60.3			Input line frequency (Hz)		
input.frequency.nominal: 60		Nominal input line frequency (Hz)
input.transfer.high: 145		High voltage transfer point (V)
input.transfer.low: 90			Low voltage transfer point (V)
input.voltage: 123			Input voltage (V)
input.voltage.nominal: 120		Nominal input voltage (V)
output.voltage: 0			Output voltage (V)
output.voltage.nominal: 120		Nominal output voltage (V)
ups.beeper.status: enabled		UPS beeper status
ups.delay.shutdown: 0			Shutdown with delay command (seconds)
ups.delay.start: 45			Wait before (re)starting (seconds)
ups.firmware: 5.100			UPS firmware
ups.load: 46				Load on UPS (percent of full)
ups.mfr: CyberPower			UPS manufacturer
ups.model: OP1500			UPS model
ups.serial: [unknown]			UPS serial number
ups.status: OL				UPS status
ups.temperature: 35.3			UPS temperature (degrees C)

Hits: 2

HTC Sync Issue when VMware is Installed

HTC Sync fails to recognize the phone when a VMware virtual machine is running.

This is because the VMware USB Controller default setting is to “Automatically connect new USB devices” to the virtual machine. When this is done the phone is connected as a drive which does not allow syncing.

To avoid this behavior, just un-check the selection box and reboot the virtual machine.

Hits: 3

Mounting Jumpdrives in FreeBSD

After my fiasco trying to get FBSD to auto mount when the jumpdrive was inserted, I ended up just creating a little perl script to take care of it for now (being finals week and all). It’s not much and does absolutely no error checking, but if anyone has any suggestions, they are more than welcome.

Keep in mind, you must have the proper settings active in your kernel for this to work.

Here it is:

#!/usr/bin/perl -w

use strict;

# If no arguments are given, print a brief help message
if (!defined($ARGV[0]))
print “\n”;
print “Help:\n”;
print “Lexar Jumpdrive mounting script\n”;
print “\n”;
print “You must provide one of the following arguments:\n”;
print “m Mounts the Jumpdrive.\n”;
print “u UnMounts the Jumpdrive.\n”;
print “\n”;
print “Example: lexar m\n”;
print “\n”;

# m mounts the jumpdrive
elsif ($ARGV[0] eq “m”)
# mounting the jumpdrive at /lexar
# this can be set to whatever you like
system “/sbin/mount -t msdos /dev/da0s1 /lexar”;
print “Jumpdrive mounted at /lexar.\n”;

elsif ($ARGV[0] eq “u”)
# umounts the jumpdrive
system “/sbin/umount /lexar”;
print “Jumpdrive unmounted.\n”;

Hits: 124

Fixing fstab Problems in FreeBSD

I made a bad decision that resulted in a non-bootable (to single user only) FreeBSD system. Now I realize that no one really cares what kind of jam I’m in, just like I don’t normally care what kind they are in. But when you have to sit through some ‘open sourcer’ stroke his own ego with the “I know something or where to find it, and you dont. I know its a simple question to answer quickly, but Im just gonna post tidbits of a manpage out of context” attitude, it really irritates me.

I use alot of opensource and I try to avoid doing that to others (usually successful), as well as avoiding the “the distro I use is better, so you should just switch to fix your problem” answers. There is definately reason to read the documentation, but at some point its just proper to be upstanding and state “such and such should fix your problem, when you’re back up and running make sure to look at the manpage”. Their normal excuse is “I’m sick of answering all these newbie questions that are in the clearly addressed manpages”. To that I say, THEN GET OUT OF ?N*X SUPPORT CHANNELS.

Anyway, I digress. Now to the real problem, me blowing up my /etc/fstab and how to fix it, in case it happens to you!

I started a forum thread entitled “Opensource Attitudes” to address the rant portion of this. If anyone has any questions about the technical side of this article, feel free to start a thread in the appropriate forum.

So the faulty decision I made was to add a USB jumpdrive to my fstab. I wouldn’t recommend this :)

To fix the ensuing cluster, I did the following:

1. Rebooted into Single User Mode
2. Mount (to see whats mounted and how)
3. cat /etc/fstab (to see what filesystems I normally mount)
4. mount /dev/ad0s2a /usr (to get my utilities, namely vi)
5. mount -u -w / (This mounts / writeable so you can save your new fstab)
6. vi /etc/fstab to remove your bad entry or whatever it is that was changed
7. reboot

At this point everything should be back to where it was before the fateful edit, if not, just repeat the steps above until it is.

It’s also a good idea to make a copy of your /etc/fstab in case it’s fat-fingered yet again. That way, you can at least see the way it was previously broke (better yet, make a backup before your initial edit of the working copy… lesson learned)

Hope this saves some of you from the open-source ego-trip, at least for fixing your file systems.

Hits: 8