Updates from May, 2009 Toggle Comment Threads | Keyboard Shortcuts

  • Dark Liquid 11:45 am on May 24, 2009 Permalink | Reply
    Tags: data recovery, ,   

    Disk Recovery 

    Well, that was pretty cool, I just managed to recover the data off of a dying 30GB hard drive on my friends laptop. It was surprsingly easy, all I really needed was time.

    First of all I downloaded and burnt off the latest beta of SystemRescueCD. After booting from that on the laptop, I set up the networking on it and downloaded dd_rhelp from freshmeat. I then mounted I directory on my main desktop machine via sshfs on the laptop and ran the following command:

    That command basically uses the dd_rescue tool on the SystemRescueCD to copy the first partition of the first hard drive into a file on my desktop computer (via the sshfs mount point at, you guessed it, /mnt/ssh). dd_rhelp is nice because it makes the process faster apparently but leaving all the bad sector, I/O error retrying till the end, instead skipping over errors when they happen in order to copy the actually working stuff first. Then it goes in and fills in the blanks. I left this running for about 16 hours after which it had all of the drive except for about 0.5MB which just would not copy. I cancelled the copying at this point and went to work on the backup image on my desktop.

    First of all I backed up the backup image. Some of the things I might do to it could be destructive and I don’t want to wait another 16 hours to grab the data again, if the drive will even work. On the backup, I then ran the following command:

    This scanned the filesystem in the backup image (in this case FAT32) for errors and asked me to choose a way to fix them. I basically told it to not mess around with anything except broken filenames and incorrect cluster sizes under the assumption that if this could actually see files to mess around with, chances are I didn’t need to play with the actual FAT table on the disk.

    After running that and writing the changes to the image, I mounted the file into my system and copied off all the data my friends would most likely want (the entire Documents and Settings folder in this case) and burnt it all onto a DVD for them. I’ll keep the hard drive image around in case they discover there is something else they need in the next few weeks but yep, that was it. Easy.

    I must say I was damned impressed with SystemRescueCD, it’s chocablock full of very useful tools and it’s ability to do networking and it’s provision of ssh tools makes it very nice to work with indeed. I could not have done this without it. Well, actually that’s a lie, I was prepared to burn a customised copy of DSL with all the tools I needed compiled and built into it but luckily I found SystemRescueCD before I wasted my time on that.

    Fun stuff.

     
  • Dark Liquid 8:48 am on May 23, 2009 Permalink | Reply
    Tags: ,   

    Windows 7 So Far 

    Been using Windows 7 a little bit and hit a few snags. It didn’t detect the Macbook hardware very well but sticking in the OSX Leopard Install Disc and installing the drivers sorted that out. The two-finger scrolling isn’t very smooth and to right click you need to hold two fingers on the touchpad then press the mouse button. Weird. I’ve installed a bunch of security updates and done everything it recommends (install anti-virus, run a Windows Defender scan, etc) and I’m just waiting for the anti-virus scan to finish. So far it’s not been too annoying though and most of the dialogues have actually been useful and helpful. The only thing that I’ve been annoyed by so far is the autorun functionality. The Windows Explorer program displays your devices (when clicking on the Computer link) as a bunch of icon button things and clicking them only does autorun it seems, to actually look inside the disk I had to open the tree view of the computer tab link thingy and browse into the disk. Didn’t seem very intuitive. Also, the autorun popped up asking whether I wanted to run the autorun programs but when the autorun programs actually run, it asked again about whether or not I would like to allow them to modify my computer which was kind of annoying since I’d already agreed to run them. I get that running the program and allowing it full system access are two different things but it would be nice if perhaps they could detect it was an installer or something and ask me this all at once rather than have two similar questions asked separately in quick succession.

    Aero seems to run a little slowly which is quite disappointing considering compiz under Linux seems to run very well now I’ve applied the changes I mentioned in my last post. Perhaps the drivers or graphics card needs driving in some better way similar to the changes I made under Linux but no idea how I’d make them, sounds like I need to do some searching on that one if it’s even possible.

    IE8 is still as horrible as IE7. I hate it’s interface, I hate the way it does things and it renders stuff weird in some cases, such as the TinyMCE controls on WordPress’ Post Entry box. I just find it a chore to use and it UI just seems to get in the way of what I want to do. I haven’t used it for doing anything complicated like debugging a javascript app or anything like that but I don’t imagine I’d be in for a fun time if I did given my previous experience with older versions of IE.

    I found the font rendering looked pretty shitty by default, but playing around with the ClearType tool made it all render much better and I can’t really complain now, though I think the rendering under Linux looks better.

    Conclusions

    So far though, no major complaints, most things seems fairly easy to find and fairly well explained by the help text. I think generally the actual system maintenance and customisation tools are much easier to use and far more friendly to new users than they used to be in older versions. Not a bad operating system as far as they go so far, but not tried to do much stuff yet, still only really had some basic usage out of it, not tried developing anything or messing with multimedia of any kind yet so the jury is still out on that one.

     
  • Dark Liquid 6:43 am on May 23, 2009 Permalink | Reply
    Tags: guide, , laptop, , macbook, osx, ,   

    Macbook Triple-Boot with OSX Leopard, Windows 7 and Ubuntu 9.04 

    Well, since my macbook decided to screw up after a failed software update under OSX (thanks Apple) I decided to rebuild my system from scratch.

    Since I’ve been considering doing this study-from-home Games Development course, I need Windows and I don’t too much fancy paying for it, Windows 7 is available legally for free, so I decided to use that. Since this was a new build, I upgraded to Leopard since my old OSX install was Tiger and my old linux install was an old Intrepid install that had been dist-upgraded to Jaunty so this time I decided to use Jaunty from scratch.

    First of all, I booted off of the OSX disks and partitioned my 120GB hard drive into two sections. The first was 30GB for OSX, the rest was free space.

    Once OSX had finished installing, I used Disk Utility from within OSX to further partition the drive’s free space to give me a 20GB partition for Windows 7, a small 1GB partition at the end of the drive for swap and the rest was given over to Jaunty. I formatted all 3 of these partitions as FAT or MS-DOS format. I couldn’t actually format them this way from the partitioning tool s after I created the partitions with the Mac filesystem, I reformatted them with Disk Utility individually. I probably didn’t need to format them at all, but what the hell.

    Why didn’t I just use BootCamp? It seemed annoying. The BootCamp Assistant insisted on not letting me have control over my paritions and seemed very Windows-centric, not offering any mention of Linux. It also didn’t mention Windows 7, just XP and Vista so I decided since it didn’t seem to be supported anyway that I’d go with other methods instead rather than try and force it to work how I wanted and pray it worked.

    Next, I did all the system software updates for OSX so that they wouldn’t interfere with any later steps. I then downloaded and installed reFIT, a nice EFI bootloader that made everything else very easy.

    After that I rebooted and installed Windows 7. Windows 7 insists on a NTFS formatted partition so I formatted my previously FAT formatted 20GB partition and let it use that. The install went quite smoothly without any issues. After each restart, the reFIT bootloader should display a Windows symbol with a harddrive overlaid on it in it’s menu. Boot from that until you are finally at a working Windows 7 desktop.

    At this point I rebooted and tried to access my OSX install using the option on reFIT, it worked fine, much to my surprise, and it seems thatinstalling Windows no longer trashes your bootloaders.

    After that, I booted my Jaunty install disk (I used the alternate install disk because my normal one wouldn’t even boot in the computer). Installation was easy but there are a few things to watch out for. Make sure to select custom partitioning at the partitioning stage and then select the large empty FAT partition as the main / parition for Linux. I used ext4 as my filesystem but use whatever you like. Then select the small 1GB FAT partition for swap. I am assuming you have a basic grasp of how to partition and format things with the Ubuntu installer which for the most part is fairly self-explanatory anyway. Another thing to watch out for is the bootloader installation. With my paritioning layout of EFI, OSX, Windows 7, Linux and Linux Swap, I opted to install the GRUB boot loader onto (hd0, 3) or directly into the linux partition. Once the installer finished, I checked I could still boot into each system and everything worked fine, no hassle. The reFIT menu now had three icons an Apple, Windows and Linux one, each with harddrive overlays and they all worked fine.

    At this point you have a working triple-boot system. However, the linux install doesn’t perform very well out of the box. I followed the very good instructions to improve my Linux experience on my macbook here: https://help.ubuntu.com/community/MacBook2-1/Jaunty

    UPDATE!!!

    I was having quite a few driver issues and things such as sound wouldn’t work. However thanks to the advice of Jonas Wisser I decided to download the BootCamp drivers from the Snow Leopard prerelease. These worked a treat and basically fixed everything as far as I can tell so far.

    Some words of warning:

    • My original system got trashed because an OSX update died, I’m guessing it tried to update the EFI firmware which I had replaced with reFIT. Having reFIT installed could make your system unbootable after you do an OSX update so I’d recommend keeping the reFIT installer around so you can reinstall it after doing updates before rebooting, just in case.
    • Windows 7 is a free release candidate until March 2010 where it will apparently degrade until you either pay for the full version which should then be released or it stops working all together.
    • Some stuff in Linux doesn’t work perfectly on the Macbook, such as the iSight having a green capture issue. This is discussed more on the page linked to previously.

    Conclusions

    So far I’m very pleased with my new install. Nothing has exploded yet, no weird errors, the installation was flawless. Basically nothing has really gone wrong or broken. I’m not much of a fan of Windows and I’ve barely even touched my Windows 7 install but I’m quite impressed by it, it seems pretty stable so far and it’s not done any of the things that normally annoy me immensely about Windows yet, so for the time being I think Microsoft might have finally released a decent version of Windows. I wont be switching any time soon, or ever, but so far I can at least tip my hat to Microsoft on what so far appears to be a job well done. I haven’t played much with Leopard yet, so I can’t really say how I feel about it other than it’s not very much different to Tiger so far, except with a little more polish in some areas. Jaunty I had running on here before and so far it’s working nicely. Just need to fully test out all the changes I made as recommended via that link I posted earlier to see if I can make it even better.

     
    • zahadum 5:26 pm on May 23, 2009 Permalink

      thanx for the tips! – especially about the alt EFI bootloader!

      I know you didn’t want to be shackled by bootcamp – but some people would benefit from the results from that encounter too!

      btw: for those mac users who don’t have any back kground with Linux, it would be night e if you. iuld explain your choicecof the jaunty distro.

    • Dark Liquid 5:52 pm on May 23, 2009 Permalink

      I’m sure some people would like to know about using bootcamp but it seemed to want to much control over the whole process for my tastes and I’m not about to reinstall my laptop again to try it out! :P As for the choice of Jaunty for my linux distro, well, I’ve been a ubuntu user for a while now primarily because it’s a well supported, easy to use distro that has a large, knowledgeable community behind it. I have jaunty installed on my desktop machine and so keeping to the same distro for my laptop made sense since I’d know more or less what i was getting into.

    • Antoineq 2:10 am on June 2, 2009 Permalink

      Thank for your step by step!

      Everything goes fine until I tried to boot ubuntu from refit. I have a cute little Tux in the center of the screen and Ubuntu is not booting. Do you think it’s a partition problem? No problem with os x and windows 7 tough.

      Any idea?

    • Magnus Øverli 10:58 pm on June 2, 2009 Permalink

      Hi! Want to thank you for an outstandingly simple and understandable guide to triple booting an macbook! I have tried so many other sites but saved my day(and night)

      -M-

    • Dark Liquid 6:23 am on June 3, 2009 Permalink

      Perhaps your bootloader on your ubuntu partition has gone screwy. I’d recommend using a linux rescue CD to boot you linux partition, or if that’s too difficult, booting a rescue CD, chrooting into the linux partition and then installing the bootloader again. That’s a bit of an involved process that I can’t really walk you through I’m afraid, but that’s the only idea I have. There is probably a decent tutorial on how to repair bootloaders out there. Make sure to install it to the linux partition, rather than the whole drive though.

    • Tim 2:56 am on June 7, 2009 Permalink

      Your system is EFI boot hence Windows not screwing it up. :P

    • Dark Liquid 7:55 am on June 7, 2009 Permalink

      Yes, that’d explain it.

    • Duncan Strong 9:58 pm on June 17, 2009 Permalink

      This is very useful and timely given my current situation.

      It is also written at just the right level of detail given my level of experience.

      I’m very glad I stumbled upon this post…thanks for putting it together!

    • Mike Lin 12:26 pm on June 22, 2009 Permalink

      Would you mind telling me where you got the snow leopard prerelease drivers? Or if it would be legal to send it to me?

    • Antoine 3:48 am on June 23, 2009 Permalink

      Hi!

      It’s working now, thank you again for your advice!

    • Dark Liquid 4:50 am on June 23, 2009 Permalink

      Well, the best way to get is to actually have access to the Snow Leopard beta in which case you can just use BootCamp from within to make the driver CD but if not there are plenty of ISOs of the driver disk floating around on the net just waiting to be torrented. I’m sure you’ll find something with a simple search for “snow leopard boot camp driver torrent” or the like.

    • Steve Lin 8:51 pm on June 24, 2009 Permalink

      How did you format the other partions to FAT? I see Mac OS Extended (Journaled) as the only option.

    • Dark Liquid 9:02 pm on June 24, 2009 Permalink

      What I did is format them as whatever was available in the installer and then booted into OSX and used Disk Utility to reformat them as FAT. The thing is, it probably isn’t even required as you are only going to be reformatting the partitions anyway from within the Win7 and Linux installers but I wasn’t sure so if there would be any weirdness going on so I did it anyway.

    • Steve 11:38 pm on June 24, 2009 Permalink

      I created the partitions and erased the ones prepared for win7, ubuntu, and swap to FAT. Then I installed reFIT and rebooted. Every was fine and I can see the reFIT menu on boot up and my OSX still works fine. Now I am trying to install win7 from dvd by doing a reboot. reFIT sees the DVD and allows me to boot from it. So I tried and it took a long time before it finally goes to a screen that says “CDBOOT: Couldn’t find BOOTMGR”. Did I miss a step? What did I do wrong? Thanks.

    • Dark Liquid 5:24 am on June 25, 2009 Permalink

      Sounds like your DVD didn’t burn the bootloader on properly. I’ve had issues with other software where the data has been fine but the bootloader for some reason didn’t work. Usually a reburn of the disk on slow settings sorts that out.

    • Steve 1:08 pm on June 25, 2009 Permalink

      Ok there was definitely something wrong with the first disk. OSX was not even able to mount it. I reburned it at 2x and now it can at least mount it and see its contents but when I try to boot with it, I get an error message that it’s not a system disk. Sorry to keep bugging you about this but I desperately want to get this to work. Thanks so much for your help.

    • Steve 1:23 pm on June 25, 2009 Permalink

      Hey it’s working now and I don’t know why :) . I tried rebooting it one more time just for kicks and it detected it. It’s installing right now. I may be back for questions when I try to install Ubuntu tho. Thanks.

    • Steve 2:39 pm on June 25, 2009 Permalink

      Ok I finally got the thing running BUT I noticed 2 big problems. 1. You can’t adjust the brightness, its stuck on the brightest setting. 2. The system runs hot. Although running Win7 works on a MacBook, I don’t think I want to risk damaging my system by running it with these problems. Have you or anyone else been able to solve this? I’m assuming that I’m going to have the same problem when I try to install Ubuntu. Should I even bother trying?

    • Dark Liquid 5:05 pm on June 25, 2009 Permalink

      You may notice I updated the post regarding this. Installing the snow leopard prerelease boot camp drivers solve pretty much all power management and brightness control issues and I’ve found linux runs more or less the same as OSX regarding power management after I followed all the instructions on the article I linked to regarding running ubuntu on the macbook.

      Yes, there is an element of risk here, I can’t promise you that your mac won’t burst into flames but I’ve been running mine fine for quite a while now and my mac seems to survive running for several hours in either linux or win7 without incident on my 3 year old hardware.

    • Steve 5:33 pm on June 25, 2009 Permalink

      Hmmm… ok I guess I’ll have to try that. Thanks so much for your help and quick replies.

    • Steve 8:30 pm on June 25, 2009 Permalink

      Back again… I got Ubuntu installed and it worked but I think after I installed all the system updates and tried to reboot, all I get now the grub command line when I choose to boot into Ubuntu.

    • Steve 8:33 pm on June 25, 2009 Permalink

      Crap, now Win7 doesn’t boot anymore either, it just sits there at the gray windows flag icon and not doing a thing.

    • Dark Liquid 4:43 am on June 26, 2009 Permalink

      Hmm, not sure what is going on there. When you installed the Ubuntu installation you made sure to select to install the bootloader on the same partition as the main linux partition and didn’t let the installer mess around with any of the existing partitions, right? That’s all I can think might have caused it.

      If you installed the bootloader onto the MBR, you probably want to uninstall it. I’m guessing here though and any suggestions I have might just make things worse, so bear that in mind.

      As far as I am aware you can’t actually uninstall the bootloader, just overwrite it so I expect you’ll want to let the Win7 tools do that. I have no idea how to actually fix bootloader problems with Win7 but I imagine booting off of the win7 install disk and using it to boot the installed win7 system should allow you to repair the win7 install or it might magically offer some way to fix it itself once booted or from within the cd boot menu.

      Assuming that is done and you can reach th epoint where you can boot into the win7 partition (and your osx partition still works) you can try reinstalling the bootloader in linux but make 100% sure you do not install it into the MBR but instead install it onto the partition the actual linux root fs is on. You may also need to edit your grub config.

    • Steve 4:57 pm on June 26, 2009 Permalink

      I’m not sure what I did with the boot loader when I installed ubuntu I can’t remember if there were any options as to where to install it. Any how, I wiped everything and reinstalled osx and now I’m pretty much where I was before I started all this. Not sure if I want to try this again any time soon. But thank you so much for your help.

    • Stephen Byerley 6:20 am on July 10, 2009 Permalink

      Hi, thanks for this guide! I’m reading up in preparation for the arrival of my brand new 13in MacBook Pro. Other triple-boot guides warn that you can only have four partitions (weird apple partition, OS X, Linux, Windows), prohibiting a swap partition. You don’t seem to have had that problem…can you shed any light on this?
      (I’m not actually worried about swap, but I was thinking of having a shared data partition–any thoughts?)

    • Dark Liquid 7:02 am on July 10, 2009 Permalink

      Well, if a shared data partition is all your looking for, I use OSX as my shared data partition :P With the snow leopard boot camp drivers for windows, it can mount the hfs+ filesystem, as can linux, so they can all use that.

      I don’t recall having any issues what so ever having 4 partitions (OSX, Linux, swap, Win7) in addition to ‘the weird apple one’ which is the EFI partition I believe. I do however have chunks of free space between each of my partitions of about 50-100mb each, not sure why but that’s how OSX insisted on partitioning it so I’m assuming it was to do with the EFI system – I wouldn’t recommend trying to reclaim it or doing any partition under linux/windows.

    • Dark Liquid 2:42 pm on May 17, 2010 Permalink

      I expect it will be fine – certainly I wouldn’t imagine it would break things, at worst just failing to boot from grub into anything but Linux. It’s possible the other OSes might get confused and mess up their config but I couldn’t say for sure

    • Miguel 3:39 pm on May 17, 2010 Permalink

      Hi, thanks for your simple guide. I just tried it on a MacBook Pro 6.2, to install Snow Leopard + Win7 + Ubuntu Lucid, and so far it seems that everything works fine. Sure, there’ll be some tweaks to be done here and there, but mostly it works.

      I have one doubt, though. On the GRUB loader, which I installed on my Ubuntu partition, I have the options to boot Windows and OSX too. I’m afraid of trying, in case it messes up something. Do you know what would happen if I try? I’ll probably remove those entries from GRUB, anyways, since they don’t make much sense.

    • Miguel 7:27 am on May 24, 2010 Permalink

      Ok, thanks for your reply. I think I’m not going to try right now because I do a lot of work with my laptop and I wouldn’t like to mess it up. I may try when I do the next format (which I hope is in a few years :P )

      BTW, something werid happened with the order of the comments or is it my computer messing things up?

  • Dark Liquid 8:52 am on May 22, 2009 Permalink | Reply
    Tags: hardware, ,   

    Minor Rant 

    Haven’t posted in a while. I’ve been crazy busy, not quite sure what with but it seems like I’m always doing something else and never have enough time for anything recently.

    Anyway, the main thing I wanted to talk about was the ridiculous prices of some books I’ve been looking at recently.

    As some people might already be aware, I’m working on designing a computer architecture from scratch in my spare time. I’m using Verilog to synthesise the hardware because it’s prohibitively expensive to play around with this kind of thing with discrete logic chips, not to mention difficult and unwieldy. Now, I don’t really know Verilog very well so I’m learning it as I go, I also don’t know much about some kinds of optimisations you can make to do things like binary multiplication happen quickly in hardware. With that in mind, I thought I might buy some books on the subject.

    Or not, because they are all over £100!!!

    What the hell!? I can understand that there would be a premium on specialist knowledge like that, but what about hobbyists? Self-learning materials are either non-existent or prohibitively expensive or aren’t self-learning materials at all and are instead reference guides for people who are already experts. There are tons of cool things I’d like to learn but don’t have the time or inclination to sit down with a tutor and learn properly. Besides, so far everything job-wise that’s gone right for me has happened as a result of things I’ve taught myself, so paying for education from someone else isn’t something I’m too hot on.

    With these issues in mind, I’m going to do my best to document my learning process so that others can follow it. Hopefully someone will find it useful or entertaining in some way.

     
    • Adrian Howard 11:37 am on May 23, 2009 Permalink

      Time to make friends with your local librarian? Inter-library loans are a pretty cheap and effective solution to this sort of problem in my experience :-)

    • Dark Liquid 5:00 pm on May 23, 2009 Permalink

      You’re probably right. In that case the problem then becomes getting off of my lazy arse and actually going to a library. Why isn’t there an online book lending library thingy, like there is with DVD rentals?

  • Dark Liquid 9:20 am on May 6, 2009 Permalink | Reply
    Tags: , , ,   

    Stuff 

    Wow, things have been a little crazy recently. Work has been ish and we’re down to just me and the boss for the time being which is pretty sad. Hopefully thing’s will pick up again soon and we’re taking this as an opportunity for a company reboot so we’ll see.

    My WiiFit exercise regime isn’t happening. I’m always busy with something it seems so I never get time. I’ve not actually used it for exercise in about 3 weeks now. Terrible I know. At least my body seems to be pretty happy hovering around 15.5st rather than still ramping up the pounds of fat :)

    I’ve still been trying to write as much as possible and have managed to get Dru to start contributing more to protagonize which I am now a moderator of! So now I get to abuse my power for evil good. Woohoo!

    I’ve been trying to keep the Bournemouth.rb Ruby Group up and running recently. So far we’re only small, but we’ve managed to run a few meetups so far. Currently we’re trying to find some projects to hack on together – if you have any ideas post them up on the Bournemouth.rb wiki. I’m quite enjoying this whole community lark. Let’s hope it lasts! If you are a rubyist in Bournemouth or if you’re just interested in the Ruby programming language and looking to get into it then try coming along, signup on the Bournemouth.rb mailing list for more info.

     
c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
l
go to login
h
show/hide help
shift + esc
cancel