Windows 10 on a Mac Pro 2013

The Mac Pro 2013 is the most powerful machine I have at home. I love the hardware looks, its small form factor and its quietness, plus it is still fast enough for my needs. As I realized I hadn’t used macOS for months and I needed to recover the SSD space that this system was using, I’ve done the unthinkable: I have installed Windows 10 as the only OS on this machine. Here is all you need to know to make Windows 10 work well on this hardware, no matter if you choose to use Boot Camp or do a full clean install as I did.

March 1, 2022 · Tags: <a href="/tags/lab-notes">lab-notes</a>, <a href="/tags/mac">mac</a>, <a href="/tags/windows">windows</a>
Continue reading (about 13 minutes)

Putting a PowerMac G5 to good use

A few months ago I bought an old PowerMac G5 off of Craigslist and since then I have been experimenting with various operating systems and configurations. Before I tell you more about these, let me briefly explain why I got such a machine. I had always wanted one of these beasts. They look gorgeous (to me) and, to convince myself to get it, I thought that I would play with the PPC64 architecture. How? By getting NetBSD to run properly on these machines while learning enough to iron out the few rough edges that I thought were left. Unfortunately, that story didn’t go well (more below), so I ended up experimenting with various other operating systems.

July 15, 2013 · Tags: <a href="/tags/featured">featured</a>, <a href="/tags/mac">mac</a>, <a href="/tags/powerpc">powerpc</a>, <a href="/tags/review">review</a>
Continue reading (about 6 minutes)

Installing FreeBSD with a ZFS root on a PowerMac G5

Suppose you have a nice PowerMac G5 big beast around and want to install a modern operating system on it. Suppose that you want FreeBSD to run on it. Suppose that you would like to use ZFS as much as possible, say to use the machine as a NAS. If all of the above apply to you, you have come to the right place! Read on for how I got FreeBSD 10.0-CURRENT with a ZFS root to work on a PowerMac G5. I am pretty sure the instructions here apply to other PowerPC-based machines as well, although the specific details on how to set up the boot loader most likely differ.

July 11, 2013 · Tags: <a href="/tags/freebsd">freebsd</a>, <a href="/tags/mac">mac</a>, <a href="/tags/powerpc">powerpc</a>, <a href="/tags/zfs">zfs</a>
Continue reading (about 4 minutes)

Setting up my old Mac Mini G4 as a development machine

I've spent quite a few time last week setting up my old Mac Mini G4 — a PPC 1.2GHz with 1GB of RAM running NetBSD/macppc current — as a "workstation" for the development of Kyua and other tools for NetBSD. Yes, this machine is very slow, but that's the whole point of the exercise I'm going to narrate below. I recently got approval from the NetBSD core team to import Kyua into the NetBSD source tree and replace ATF with it... which is great, but when thinking about it objectively, I am reluctant to unnecessarily "punish" all NetBSD users by increasing the build time of the system significantly. Don't get me wrong: Kyua itself runs efficiently on old machines, but building the code — particularly the hundreds of tests that come with it — takes just too long. This slowdown is not too noticeable on a relatively-modern machine, but it's unacceptable on not-so-old machines. Of course, I could proceed with the import right now (with the code disabled by default) and make it leaner later, but this would cause quite a first bad impression on our users. So it's better to delay the import a little bit until, at least, I have had a chance to simplify some core parts of the code. Mind you, this simplification work is already in progress and quite advanced: it consists on modularizing (as separate processes) some critical parts of the code and writing these with a much simpler style and in plain C. But back to the original point of my post. The first thing to mention about this experience is that with some effort and long waits, I've got a pretty decent setup for development even on this old machine. From time to time, I miss having a real Unix desktop at hand for development (no OS X, you are not one of those). The GUI behaves relatively well with a 1920x1200 display, running Fluxbox, traditional xterms, Mutt for GMail access and a bunch of other applications. Unfortunately, too many things feel really sluggish. A few specific examples: Firefox 16 is barely usable. I'm not sure there are many alternatives to decent web browsing for such an old non-Intel platform. Dillo is blazing fast and allows me to access online documentation and mailing list archives (just enough for development), but it's pretty much useless for any other purpose given the "Web 2.0".Any operation that involves pkgsrc takes ages. Even when building the simplest packages, one can notice the system crawl through all of the pkgsrc infrastructure. Sometimes this is the fault of a bad algorithm; other times it's just sh(1) being the wrong tool for something as complex as pkgsrc internals.Things like basic code editing in Emacs 24 are slow at responding to typing. Disabling font lock mode makes it feel fast again, but it's just surprising to see that even color coding is slow.I still remember my old and trusty machine from 10 years ago (a Pentium II 233 MHz): with a similar setup, it was significantly snappier. Yes, software has evolved and these packages now have many more features... but really, does editing a text file have to be sluggish? Leaving aside sluggishness, there is also the problem of instability. NetBSD/macppc is a tier 2 port, and things don't work as well as one would like. I personally would enjoy bringing this port to tier 1... but I currently lack the time (and basic knowledge of the architecture) to do so :-/ Anyway, the result of this exercise: the new code I'm writing to modularize Kyua builds damn fast in this machine, and keeping it this way is the whole point of having such an old machine as a build environment. So I'll try to keep using it to develop these new components of Kyua.

October 22, 2012 · Tags: <a href="/tags/kyua">kyua</a>, <a href="/tags/lab-notes">lab-notes</a>, <a href="/tags/mac">mac</a>, <a href="/tags/netbsd">netbsd</a>
Continue reading (about 3 minutes)

Installing NetBSD/macppc on a Mac Mini G4

Yesterday, I spent a while installing NetBSD/macppc 5.0.1 on a Mac Mini G4. The process wasn't easy, as it involved the following steps. I'm omitting many details, as they are "common knowledge" to Mac users (or otherwise can be easily found on the net): After booting the installer from the CD image, drop into the shell.Use pdisk to create an Apple_HFS partition for the boot loader and two Apple_UNIX_SVR2 partitions, one for the root file system and another for swap.Run sysinst and install the system. When asked to repartition the disk, just say Use existing partition sizes.Once the system is installed, drop again into the shell before rebooting.Mount your hard disk into /mnt and chroot into it.Fetch a copy of pkgsrc.Install the sysutils/hfsutils package.Use hformat to create a new HFS file system in the Apple_HFS partition we created.Mount the installation CD.Copy, using hcopy, the ofwboot.xcf file from the CD to the boot partition.Reboot.Drop into the OpenFirmware setup (Command+Option+P+R).Set boot-device to hd:,ofwboot.xcf.Set boot-file to netbsd.And here is the tricky thing to get the machine to auto-boot: Set boot-command to ." hello" cr " screen" output boot, not mac-boot.I found the last command somewhere on the Internet (dunno where now), but, supposedly, a regular mac-boot should have worked. In fact, it works if you call this command from the prompt, but not during automatic boot. (It turns out to be a problem with the version of OpenFirmware I have.) Just writing down the steps in case I need them later on. Installing Debian stable was much, much easier, but the installer for testing crashes every day with a different error, so I gave up. (Oh, by the way, I did the same installation into an old PowerMac G3 and that was really painful. The machine refused to boot from any of the CDs I tried and the prebuilt kernels hang during initialization due to a bogus driver. In the end: netbooting and using custom kernels.)

January 11, 2010 · Tags: <a href="/tags/mac">mac</a>, <a href="/tags/netbsd">netbsd</a>
Continue reading (about 2 minutes)

Reinstalled Mac OS X in multiple partitions, again

Past weekend, for some strange reason, I decided to dump all the MBP's hard disk contents and start again from scratch. But this time I decided to split the disk into multiple partitions for Mac OS X, to avoid external fragmentation slowdowns as much as possible. I already did such a thing back when the MBP was new. At that time, I created a partition for the system files and another for the user data. However, that setup was not too optimal and, when I got the 7200RPM hard disk drive six months later, I reinstalled again in a single partition. Just for convenience. But external fragmentation hurts performance a lot, specially in my case because I need to keep lots of small files (the NetBSD source tree, for example) and files that get fragmented very easily (sparse virtual machine disks). These end up spreading the files everywhere on the physical disk, and as a result the system slows down considerably. I even bought iDefrag and it does a good job at optimizing the disk layout... but the results were not as impressive as I expected. This time I reinstalled using the following layout: System: Mounted on /, HFS+ case insensitive, 30GB.Users: Mounted on /Users, HFS+ case insensitive, 50GB.Windows: Not mounted, NTFS, 40GB.Projects: Mounted on /Users/jmmv/Projects, HFS+ case sensitive, 30GB.Windows had to go before Projects so that the MBR partition table was constructed correctly; otherwise Windows failed to start after installation. The Projects partition holds those small files as well as the virtual machines. And Users keeps all the personal stuff such as photos, music and documents, which are mostly static. Using this layout, the machine really feels a lot faster. Applications start quickly, programs that deal with personal data such as iPhoto and iTunes load the library faster, and I don't have to deal with stupid disk images to keep things sequential on disk. However, the price to pay for such layout is convenience, because now the free disk space is spread in multiple partitions.

July 5, 2008 · Tags: <a href="/tags/fragmentation">fragmentation</a>, <a href="/tags/mac">mac</a>, <a href="/tags/macos">macos</a>
Continue reading (about 2 minutes)

Serial console cable for an old Mac

I'm currently working on the NetBSD/mac68k kernel to migrate it from the old rcons framebuffer driver to a more modern one that supports colors, virtual terminals, custom fonts and all other assorted goodies that come with wscons. Unfortunately, I've found a very mysterious system hang-up with my code that I cannot easily debug from the machine itself because the console does not work at all. Hence, I needed to have a serial console for this machine, a Performa 630. The problem is that old Macintoshes use a DIN-8 connector for their serial line, as opposed to the DE-9 (or DE-25) used in PCs. Fortunately it is possible to connect the two by properly wiring a conversion cable, and that's what I've done today. My first attempt failed because I built a DTE-DCE cable (used to connect to modems and other communications equipment), but in the end I got it, which resulted in a "null-modem" cable to connect the two machines. Here is the scheme I used: DIN-8 (DTE)DC-9 (DCE)DC-9 (DTE)1782873324555236N/CN/C7N/CN/C855 N/C stands for "Not connected". Use at your own risk.

September 5, 2007 · Tags: <a href="/tags/cables">cables</a>, <a href="/tags/mac">mac</a>
Continue reading (about 1 minute)

Random MacBook Pro notes

Some things I have had in my mind for a while but for which I'm lazy to post full-blown posts: Updated the internal Hitachi 160GB 5400RPM drive to a Seagate Momentus 7200.2. There is a lot of people who say that the difference between 5400RPM and 7200RPM is negligible in laptop disks. Screw that. For daily tasks (browse the network, read your mail, etc.) it may not be too noticeable, but for disk intensive operations it really is. Some numbers: Half-Life 2 now takes 20 seconds less (from a total of 1'50") to start. A NetBSD build.sh sets now takes 1'52" compared to the 4'15" it took before. A NetBSD build.sh release with already-built sources (i.e. a release build that does no CPU-intensive operations) has been cut down to half the total time: 11'53" now as opposed to the old 23'10". And I didn't "benchmark" iPhoto, but it surely starts up much faster now. Quite a bit of a difference I say! The video card, an ATI Radeon Mobility X1600 128MB, is starting to show its limits. Been trying some game demos and they are barely playable at the native resolution, 1440x900, which is the lowest I have found at the 16:10 aspect ratio. I refuse to play with an aspect ratio that does not match the physical screen... BioShock is usable but with game detail set to a minimum, and even then some scenarios feel slow. I feel that this game should look gorgeous with high detail settings. F.E.A.R. is certainly playable (finished it) but with details set to a relatively low level. Lost Planet: Extreme Conditions is simply unusable. Silent computing... well, the machine is truly silent when doing light operations, but I hate doing heavyweight tasks on it such as building NetBSD, encoding video or playing games. Not because it is slow, but because the fans spin up to their maximum speed (around 6000RPM) and they make a damn lot of noise. Maybe this noise would not be that noticeable on a desktop computer, but as we are talking of a laptop, we are very close to the fans during usage. Been using the external Apple USB keyboard I have (not the new flat model, which by the way looks cool) with the laptop for a while. That keyboard is crap after some months of usage. It does not feel smooth to the touch any more. The MacBook Pro's built-in keyboard is much, much better. /me considering a Mac Pro in the not-so-distant future.

August 26, 2007 · Tags: <a href="/tags/mac">mac</a>
Continue reading (about 2 minutes)

Processor speed and desktop usage

Back in July 7th, I disassembled my MacBook Pro to see if I could easily replace its hard disk for a faster one. I hadn't bought it yet because I first wanted to check that the whole process was easy. The thing is that, after a couple of problems, I could disassemble it. So I then ran to the local store to buy the new drive. But oh! They didn't have it. I decided to not reassemble the computer as one of the disassembling steps was quite scary and I didn't want to repeat it unless really necessary. Stupid me. It has already been three weeks and they have not yet received any unit; I hate them at this point. And yes, I've been all this time with the laptop partly disassembled, working with external peripherals and without the battery. Which is very annoying because, even though I didn't think I really needed mobility, it is important once you get used to it. Anyway. I have been using the machine as usual all these three weeks, and have kept working on my SoC project intensively. Lately, I noticed that my builds were running slower than as I remembered: for example, I went away for two hours and when I came back a full NetBSD/i386 release build had not finished yet. That was strange, but I blamed the software: things keep growing continuously, and a change in, e.g., GCC, could easily slow down everything. But yesterday, based on this thread, I installed CoreDuoTemp because I wanted to see how the processor's frequency throttling behaved. I panicked. The frequency meter was constantly at 1GHz (and the laptop carries a 2.16GHz processor) no matter what I did. Thinking that it'd be CoreDuoTemp's fault, I rebooted into Windows and installed CPU-Z. Same results. For a moment I was worried that the machine could be faulty or that I had broken it in the disassembly process. Fortunately, I later remembered another post that mentioned that MacBook Pros without a battery installed will run with the processor at the minimum speed; seems to be a firmware bug. Effectively: I reassembled the machine today — with the old, painful, slow, stupid, ugly, etc. disk! —, installed the battery and all is fine again. Why I am mentioning all this, though? Well, the thing is... if it wasn't for the software rebuilds, I wouldn't have noticed any slowdown in typical desktop usage tasks such as browsing the web, reading the email, chatting, editing photos or watching videos. And the processor was running at half of its full power! In other words, it confirms me that extra MHz are worthless for most people. It is "annoying" to see companies throwing away lots of perfectly-capable desktop machines, replacing them with more powerful ones that won't be used to its full capacity. (OK, there are other reasons for the switch aside the machine's speed.) Just some numbers. Building ATF inside a Parallels NetBSD/i386 virtual machine took "real 4m42.004s, user 1m20.466s, sys 3m16.839s" without the battery, and with it: "real 2m9.984s, user 0m22.725s, sys 1m39.053s". Here, the speed is noticeable :-) I will blog again when I have the replacement disk and possibly post some pictures of the whole procedure.

July 27, 2007 · Tags: <a href="/tags/mac">mac</a>, <a href="/tags/processor">processor</a>
Continue reading (about 3 minutes)

Recovering two old Macs

Wow, it has already been three years since a friend an I found a couple of old Macintoshes in a trash container1. Each of us picked one, and maybe a year ago or so I gave mine to him as I had no space at home to keep it. Given that he did not use them and that I enjoy playing with old hardware, I exchanged those two machines by an old Pentium 3 I had laying around :-) The plan is to install NetBSD-current on at least one of them and some other system (or NetBSD version) in the other one to let me ensure ATF is really portable to bizarre hardware (running sane systems, though). The machines are these: A Performa 475: Motorola 68040 LC, 4MB of RAM, 250MB SCSI hard disk, no CD-ROM, Ethernet card. A Performa 630: Motorola 68040 LC, 40MB of RAM, 500-something IDE hard disk (will replace it with something bigger), CD-ROM, Ethernet card.I originally kept the Performa 630 and already played with it when we found the machines. Among other things, I replaced the PRAM battery with a home-grown solution, added support to change the NetBSD's console colors (because the black on white default on NetBSD/mac68k is annoying to say the least) and imported the softfloat support for this platform. Then, the turn for Performa 475 came past week. When I tried to boot it, it failed miserably. I could hear the typical Mac's boot-time chime, but after that the screen was black and the machine was completely unresponsive. After Googling a bit, I found that the black screen could be caused by the dead PRAM battery, but I assumed that the machine could still work; the thing is I could not hear the hard disk at all, and therefore was reluctant to put a new battery in it. Anyway, I finally bought the battery (very expensive, around 7€!), put it in and the machine booted! Once it was up, I noticed that there was a huge amount of software installed: Microsoft Office, LaTeX tools, Internet utilities (including Netscape Navigator), etc. And then, when checking what hardware was on the machine I was really, really surprised. All these programs were working with only 250MB of hard disk space and 4MB of RAM! Software bloat nowadays? Maybe... Well, if I want this second machine to be usable, I'll have to find some more RAM for it. But afterwards I hope it'll be able to run another version of NetBSD or maybe a Linux system. 1 That also reminds me that this blog is three years old too!

July 16, 2007 · Tags: <a href="/tags/atf">atf</a>, <a href="/tags/hardware">hardware</a>, <a href="/tags/mac">mac</a>
Continue reading (about 3 minutes)

Six months with the MacBook Pro

If memory serves well, today makes the sixth month since I have got my MacBook Pro and, during this period, have been using it as my sole computer. I feel it is a good time for another mini-review. Well... to get started: this machine is great; I probably haven't been happier with any other computer before. I have been able to work on real stuff — instead of maintaining the machine — during these months without a hitch. Strictly speaking I've got a couple of problems... but that was "my fault" for installing experimental kernel drivers. As regards the machine's speed, which I think is the main reason why I wanted to write this post: it is pretty impressive considering it is a laptop. With a good amount of RAM, programs behave correctly and games can be played at high quality settings with a decent FPS rate. But, and everything has a "but": I really, really, really hate its hard disk (a 160 GB, 5400 RPM drive). I cannot stress that more. It's slow. Painfully slow under medium load. Seek times are horrible. That alone makes me feel I'm using a 10 year-old machine. I'm waiting for the shiny-new big 7200 RPM drives to become a bit easier to purchase and will make the switch, even if that means my battery life will be a bit shorter. About Mac OS X... what can I say that you already don't know. It is very comfortable for daily use — although that's very subjective, of course; it's quite "funny" to read some reviews that blame OS X for not behaving exactly like Windows — and, being based on Unix, allows me to do serious development with a sane command-line environment and related tools. Parallels Desktop for Mac is my preferred tool so far as I can seamlessly work with Windows-only programs and do Linux/NetBSD development, but other free applications are equally great; some worth of mention: Adium X, Camino or QuickSilver. At last, sometimes I miss having a desktop computer at home because watching TV series/movies on the laptop is rather annoying — I have to keep adjusting the screen's position so it's properly visible when laying on bed. I can imagine that an iMac with the included remote control and Front Row could be awesome for this specific use. All in all, don't hesitate to buy this machine if you are considering it as a laptop or desktop replacement. But be sure to pick the new 7200 RPM drive if you will be doing any slightly-intensive disk operation.

June 21, 2007 · Tags: <a href="/tags/mac">mac</a>, <a href="/tags/macos">macos</a>, <a href="/tags/parallels">parallels</a>, <a href="/tags/review">review</a>
Continue reading (about 3 minutes)

MacBook Pro review

Since the Intel Macs were published, I had been planning to get one of them; I settled on getting an iMac 20" by next Summer (so that it'd carry Leopard "for free"). But last December I found a great offer on the MacBook Pro 15.4", being the total price similar to what I was planning to buy. Furthemore, going for the MacBook Pro instead of the iMac let me get rid of my iBook G4 and my desktop PC. Now it has been a little over two weeks since I received the MacBook Pro 15.4", equiped with a Core 2 Duo at 2.16GHz and the 2 GB of RAM, 160 GB hard disk updates. It has been enough time to get a decent impression of the machine, so let me post a little review. The laptop is great overall. It is fast, full of features and tiny details, and has an excelent look (highly subjective ;-). Compared to the iBook G4, which had a 12" 4:3 screen, this one is noticeable bigger (15.4" 16:10) but is thinner and weights almost the same. Sincerely I don't care too much because it was also replacing the desktop PC I had, so I really wanted to have a large resolution to work comfortably (plus a decent video card, only available in the Pro model). As regards performance, the Core 2 Duo is certainly faster than the processors in the other machines. For example, the old PC needed between 5 to 6 hours to build a full NetBSD release, while the C2D takes less than 2 (1.45, if I recall correctly). Games also behave appropriately, even at the highest available resolution (1400x900). Unfortunately, the hard disk (which does 5400RPM "only") is a bottleneck for my typical development (or gaming) tasks, as I outlined in a previous post. Somewhat related to the previous post, the hardware virtualization available in these new microprocessors is awesome. Anyone who deals with cross-development should consider getting one of them: it's impressive to see two (or more!) different operating systems working at the same time at native speeds. Aside that, the machine is full of tiny details. You probably know most of them: the MagSafe connector, the keyboard's backlight, the integrated webcam and microphone or the Apple Remote. I kinda like this last item, although it does not shine as it could if it was in an iMac. However it has its problems too. When the fans spin up, it becomes very noisy... and this happens as soon as you start building any piece of software or launch a game. On another order of things, I've been attempting to install Windows XP on a partition that is not at the end of the disk and haven't been successful, which means it is restricted to the slower part of the drive (a pity for games, specially). But well, not that I can blame Apple because Boot Camp is still beta. Not much more I can say. These machines have been reviewed in depth all around already. And to conclude, a shot of my current desktop :-)

January 14, 2007 · Tags: <a href="/tags/mac">mac</a>, <a href="/tags/review">review</a>
Continue reading (about 3 minutes)