mattgadient.com

Informational blogging by Matthew Gadient.

Browsing Posts in OS

If you have a hard drive from a Mac computer (or from a Hackintosh), toss it in a regular PC and decide to install Windows to the drive, you might get the following message:

Windows cannot be installed to this disk. The selected disk is of the GPT partition style.

The reason is because the Mac OS uses the “GUID Partition Table” partition scheme, whereas Windows/DOS use what’s known as MBR (Master Boot Record). For whatever reason, the Windows installer is incapable of changing this (funny because I used to use Windows installation CD’s on drives I absolutely could not format with other operating systems and it always used to work).

In any case, you’ll need another program to repartion the drive first. I recommend Hiren’s Boot CD (once you go to that site, the link is way at the bottom just below the final ad). You can also use something like SeaTools if you’ve got a Seagate hard drive to wipe the thing clean (or another tool from another manufacturer).

The steps using Hiren’s Boot CD:

  • Download the ISO on another computer and burn it the image to a CD or DVD.
  • DISCONNECT any other USB drives and other hard drives on the computer you’re installing to so that you don’t accidentally delete stuff on hard drives you don’t want deleted! You should only have the 1 hard drive installed!!!!!
  • Boot from the CD.
  • Choose “Dos programs”
  • Choose “Partition Tools”
  • Choose “GParted Partition Editor” (it’s GUI and easy to use – if your mouse isn’t detected for some reason you’ll have to go crazy with the tab button though)
  • Select the partitions on the hard drive. You might have 2 showing – a 200MB one (probably shows up as fat32) and the other large one that makes up most of the hard drive’s total size (probably shows up as hfs+).
  • –To do this, you click “Partition” – “Delete” – after you’ve done it you need to click the “Apply” button to apply the changes. Remember to do this for all the partitions on the hard drive to wipe it clean.
  • Now you should only have 1 item showing in the list – the unpartitioned drive. Click “Device” – “Create Partition Table”
  • –The default is named fat or fat32 or ms-dos or something. It’s fine. You may have to “Apply” afterwards.
  • Now create a new partition. Choose “Partition” – “New” and select “fat32″ from the side. You COULD choose NTFS, but I prefer to choose FAT32 so that Windows has to delete it and make a new NTFS that’s guaranteed to work. “Apply” again if necessary.
  • Now eject the CD, put in your Windows CD, and hit the reset button on your computer.
  • When you get to the hard drive screen on the Windows installer, it’ll have an error message at the bottom (where the old GPT message was) about the drive needing to be formatted as NTFS. Select the “Delete” option. Then click next and it’ll automatically format the drive as NTFS and install.
  • Once Windows has finished installing, go ahead and reconnect any 2nd/3rd hard drives you had connected before.

I’ll note that ALL the above steps are probably not necessary. However, I prefer to be thorough, and this is the way I’ve done it both times and it worked perfectly.

It’s odd that the Windows installer is smart enough to detect the GPT partition scheme but not smart enough to overwrite it with an MBR scheme. Fortunately, there are other partition managers capable of doing it, and many are included in the Hiren Boot CD. It’s inconvenient, but it works well.

This issue affects the Windows Vista installation disk. It may also affect Windows 7 install DVD and Windows XP installer CD.

If you need more screen real-estate (particularly if using a Netbook), you might want to reduce the size of your taskbar in Windows 7.

It’s pretty easy to do:

  1. right-click on an empty area of the task bar
  2. choose “Properties”
  3. select the “Use small icons” checkbox
  4. click “Apply”

The task bar will shrink. Program icons will change to the size of the icons in your notification area. Only the time will display in the far right (the date will disappear because there’s no room for it below the time anymore, although you can always mouse over the time to see the date).

If you’ve installed Windows 7 on a netbook, you may have followed the Gizmodo Netbook Guide to do so through a USB memory stick.

In the guide, it’s mentioned that during the install, when it reboots (the first time), you can opt to boot the installer again and run compact.exe on the drive through the Repair/CommandPrompt section.

The idea behind it is that some Netbooks have small SSD’s, and it can save you some space. What about those with large slow standard notebook drives though? Is there any speed increase/advantage?

Here’s where I tried to find out.

The hypothesis is that reading from a notebook drive is generally slow. If you compress the data, there’s less to read on the drive which is good (it should speed things up). The trade-off is that the CPU has to decompress the files as they’re read into memory (which may slow things down).

So how does it work out? Like this:

Blue=standard Red=compact.exe

I apologize for the small text in the key (darn Google Docs…). The blue bars are the results for a default install. The red bars are the results when compact.exe was run on the drive during the install.

More specifically, the times (taken with a stopwatch from the moment I hit enter at the boot menu) were as follows: continue reading…

Here’s the deal.

I had a pretty low power machine with an i3, integrated video, etc. It’s life long dream was of course to be our new file server so that I could start shutting off my sauna-in-a-case rig that was serving files 24/7 while out-performing our home furnace in heat output.

The i3 got it’s wish. It’s serving files, the other one’s off, and my room’s 10 degrees colder.

-

Enough blathering though.

-

Here’s what I like about FreeNAS:

  1. ZFS – If you don’t know what the ZFS file system is, it’s pretty bloody amazing – look it up. Look up RAIDZ in particular (the RAID5 of ZFS). Yes, FreeNAS supports the other continue reading…

After setting up users and groups in FreeNAS, I found that I wasn’t able to give any users write access.

I could get guests to read.

I could get users to read.

I couldn’t get anyone to write.

-

For whatever reason, it took a few searches before I came across the mac section of the FreeNAS documentation here. In any case, I’m going to guess that not everyone who uses FreeNAS is an SSH guru (although if you are you can just read the above link and skip the rest). Here’s the somewhat-easy-but-I’m-still-not-happy-about-it-way of doing it…

-

1) Hopefully you got to the point where you made users and put them in the same group.
a) If not, find Access/Users_And_Groups in the menu;
b) create a group (name it something easy)
c) create users (at least one for you!) and add them to your new group
It should look something like this afterwards:

In the above example, "family" is the group. Since my name is Matt, "Matt" is the user we'll be focusing on for the rest. The actual UID numbers used for the user and groups don't really matter - just use the defaults.

d) Make sure you’ve also set up an AFP share (Services/AFP/Shares). The next part here might not matter, but may as well do it anyway just in case – stick your username in the Read/Write access part (may be case sensitive, so be sure to capitalize if necessary).

2) Assuming you got everything in #1 done, it’s time to get you some read/write access. Here’s how we do it:
a) First you need the location of the folder. Easiest way to get this is to navigate to Services/AFP/Shares (just like in the step above), and find the Path. Look below to see what mine looked like:

The part we're interested is highlighted. Select it and copy it to the clipboard (Apple-C on your keyboard or right-click and choose "Copy").

In my case it was /mnt/SeagateZFS/MainStorage/ – select whatever yours is and copy it to the keyboard.

3) Next (and finally), we’re going to issue a couple commands, similar to what’s on the page linked at the very beginning. Head to the Advanced/Command menu.
a) Type in:

chown  macuser:macgroup  /mnt/yourvolume/yoursharedfolder

Replace macuser and macgroup with your name and group from step#1. Use the stuff from step#2 as /mnt/yourvolume/yoursharedfolder (you can either Apple-V or right-click paste to get that part in). I used double-spaces in the above to make it easier to read, but just using single spaces. As an example, mine was:


Hit execute. Not much will happen, except that it’ll display the command you just sent.

b) Type in:

chmod 2775 /mnt/yourvolume/yoursharedfolder

Again, similar to the above, except that where it says /mnt/yourvolume/yoursharedfolder, you’re pasting the stuff from your clipboard (from step#2) again.

Mine looked something like this:

Hit execute.

You’re done. Hopefully things should work. At the very least, you should be able to disconnect/reconnect and start copying files or create folders through your own account. Hopefully other people in your group will have access too, but verify to make sure they have the limited (or unlimited as the case may be) access you want them to have.

If you’re completely lost as to what exactly you just did, you basically just took ownership of the folder with your user account, and assigned it to your group on the filesystem / operating system level.

Hopefully in the future, someone makes changes to make things a little less cumbersome. Granted, there’s not a lot that can be done, but if the FreeNAS GUI automated the permissions setttings (or at least presented a GUI to do it), it would make it a little easier for people. A *very* good place for this would be a new item in the Access Menu called “file and folder permissions” or something to that effect. The menu item could list the shares or the dataset and have a “choose owner”, “choose group”, and “set owner/group/user permissions” section for each share. Worst case scenerio, giving the file manager a facelift and doing it there would help too.

While attempting to create a ZFS raid5 pool in FreeNAS, I had an issue where Size, Used, Free, Capacity, and Health all showed as UNKNOWN. In the configuration tab, the pool/virtual_device/dataset showed up under “current” but never under “detected”. Unfortunately there was absolutely zilch out there for information on this issue.

3 hours later….

(warning: before going any further, this is for a clean installation – if you’ve got data on those drives, it’s gonna be gone if you keep reading…)

-

What you need to do to fix it is:

-

0) pre-step: Delete all your entries in the ZFS section. You’ve probably got entries in the Virtual Device (Pools), Management (Pools), and Dataset (Datasets) sections. Remove them all, and don’t forget to update/save. We’re trying to get things in a clean state here.
-
1) Click Disks/Management from the main menu.
2) Delete all the entries for your current drives (then save the changes).
3) Create new entries. HOWEVER, this time for the formatting you’re going to LEAVE ALL THE DEFAULTS and choose NTFS for the “Preformatted File System” (don’t worry, we’ll be changing it back to “ZFS Storage Pool Device” later). Do this for every drive you’re using, and save/apply the changes.
4) Click Disks/Format from the main menu.
5) One at a time, select each disk, choose ZFS Storage Pool Device as the File System, then hit Format disk.
-
6) Now you should be able to create the Virtual Device, and the actual Management Pool. Once the pool’s added, you should be seeing proper numbers instead of “UNKNOWN”, and ideally everything should be working from here on in.

-

-

-

So what causes this behavior?

In the past I’ve run into issues where FileSystem B will not install properly on a drive that currently has FileSystem A on it. In those cases, I’ve either had to do a low-level format first to completely zero everything out, or try to do an intermediate partition/format with a FileSystem C, then try B again. Presumably, a similar thing happened here.

Now, this hasn’t happened for years before now (although the Mac OS X bootloader likes to resist being installed to drives that had other partition types sometimes), but I seem to recall it being an NTFS-FAT-EXT# circle that had issues in the past. As far as the hard drives I was using for this FreeNAS install, one had a Mac HFS+ partition, and I wouldn’t be surprised if that was the culprit that ZFS didn’t like.

In any case, what we’ve done above is essentially partition/format the drives as NTFS first, which ZFS didn’t have a problem overwriting. In the event you don’t have luck with NTFS as your intermediate file system, try the other partition types. If all else fails, I’d recommend grabbing the diagnostic tool from your hard drive manufacturer (SeaTools for Seagate drives for example), and use it to do a low level format and try again.

For those installing FreeNAS to a USB drive, a common error message is as follows:

gzip: stdout: Broken pip
Error: Failed to dd image on ‘/dev/da0′
Unmount CDROM.
There was a problem while copying files.

Fortunately, the fix is easy.

Step 1: Restart the computer WITHOUT the USB drive plugged in.
Step 2: Let the Live CD boot completely until you’re back at the same menu.
Step 3: Plug the USB drive in, then choose the option to install. It should now work.

From what I read when looking around, it looks like while the CD boots it installs some temporary files of some sort to the USB drive if it’s plugged in at the time, which causes the above error. Just wait until it’s finished booting – the installer’s smart enough to find your USB drive once it’s plugged in.

The answer you’re most likely to get from most uneducated drones when asking this question goes something like this:

There are significantly fewer Macs than Windows machines, so hackers don’t bother making viruses for them. Macs are just as insecure as Windows, they just don’t get targetted.

This is of course, incorrect.

Here’s the real reason (don’t worry, I’ll elaborate):

Mac: Windows:
mac-software-update

You will see something like this when updating a typical Mac program.

firefox-uac-prompt

You will see something like this when updating a typical Windows program.

Woah. Wait. Both are updating a program. What’s the difference?

-

In short, every time you install or update a Windows program, you’re forced to give it full access to your computer. Every. Single. Time. Firefox needs an update? Grant full access. Java needs an update? Grant full access. Some other random program needs to update? Grant full… you get the idea.

Now you might be thinking, “I have to grant every program full access to my computer for it to update itself? That seems silly”. And you’d be right. There’s no reason that every random program should be given full access to your machine. That would be like a bank giving keys to the vault to every customer that walked in.

If Microsoft ran a bank, the vault would be empty. continue reading…

It’s do-able. That said, it wasn’t fun.

I’ll try to walk through the steps it took. Much of this is done by memory, but I just finished, so it’s fairly fresh in my mind (although I’m rather sleep deprived at the moment so bear with me).

It’s worth noting that I used an ATI 4850 video card. If you go with an nVidia card, it may be a lot easier (try it on your own before paining yourself with this process).

Screen shot 2009-11-04 at 1.11.00 PM

Network, video, sound (at least 2-channel anyway), microphone are working. Sleep isn’t (so disable it in the Energy Saver section in System Preferences)

The stuff you might need:
-Retail Snow Leopard disk (hopefully you’ve bought it already)
-An existing install, or Rebel EFI otherwise (it’s a free download).
-USB hard drive or USB memory stick
-the MyHack installer
-Netkas’s PC EFI v10.5
-Voodoo HDA
-Kext Helper

Huge thanks to each of the continue reading…

The MSI GT735 is a nice affordable gaming notebook computer currently going for around $1000 CDN. Here’s the issue though – the model we got from NCIX has 4GB of RAM, yet it comes with 32-bit Windows Vista. As most people are well aware, the 32-bit version caps out at a little over 3GB of usable RAM – the rest is wasted.

Unfortunately, as great as the GT735 is, MSI doesn’t offer up 64-bit drivers on their website – so even if you get Vista/7 x64 to take available of all 4GB of RAM, you may be worried about the driver issue.

Well worry no more. continue reading…

Powered by WordPress Web Design by SRS Solutions © 2010 mattgadient.com Design by SRS Solutions

Powered by CDN Rewrites