Last thing you'll ever read…again
Posts tagged ubuntu
Tutorial: Boot Ubuntu 9.10 Partition using Virtualbox inside Windows (deprecated)
Nov 22nd
This article is now deprecated as 10.04 has been released. Comments will be disabled. Check back for an updated version.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
So Ubuntu 9.10 got released several weeks ago and people have been asking about how to get my old tutorial working for 9.10.
The problem is that Ubuntu 9.10 uses the new grub 2 boot loader which changes LOTS of things. In this tutorial I will be showing you how to get Ubuntu 9.10 (or any other linux OS with grub2) working under your Windows installation.
Before we begin, you should have a dual boot setup. I will NOT be showing you how to setup a dual boot, if you need help plenty of other guides out there.
Step 1: Creating a grub 2 boot iso
The grub iso file will allow you to specify which partition to boot into.
- Boot into Ubuntu
- (OPTIONAL) Configure your /boot/grub/grub.cfg This is so that you don’t accidentally boot into your Windows partition from inside Windows! Bad things will happen if you do!!!
$ gksudo gedit /boot/grub/grub.cfg
Comment out your Windows Menu, should be towards the bottom - Create the bootable iso
$ grub-mkrescue –overlay=/boot/grub GRUB2CD.iso - (DO THIS STEP ONLY IF YOU PERFORMED STEP 2)
$ gksudo gedit /boot/grub/grub.cfg
Uncomment out your Windows Menu, so you still can boot into windows after the reboot! - Move the iso into a location that is accessible by windows
Step 2: Creating the .vmdk file
This creates a file which tells Virtualbox what partition to actually load as the harddrive. Unfortunately, unlike VMWare Workstation, Virtualbox does not support a GUI interface for selecting RAW hard disks as the “virtual hard drive”.
- Boot into Windows
- cd into the directory you installed virtualbox
- Find out which drive contains Ubuntu (if you don’t know already)
Run the command: VBoxManage.exe internalcommands listpartitions -rawdisk \\.\PhysicalDrive1
(where 1 is the number of the hard drive ubuntu is installed on. E.g. Master should be 0, you’re second hard-drive should be 1 etc…The output should be something like:Number Type StartCHS EndCHS Size (MiB) Start (Sect)
1 0×07 0 /32 /33 1023/254/63 902023 2048
5 0×83 1023/254/63 1023/254/63 49677 1847346543
6 0×82 1023/254/63 1023/254/63 2164 1949086188In this example, my Ubuntu partition is number 5 and the swap is number 6. So my Ubuntu partition lies in PhysicalDrive1
- We now create the VMDK file with the given information
Run the command: VBoxManage.exe internalcommands createrawvmdk -filename C:\ubuntu.vmdk -rawdisk \\.\PhysicalDrive1 -register
Step 3: Setup Virtualbox
Now everything should be ready to setup Virtualbox. Create a new virtual machine. Select the .vmdk file we just created as the hard drive and mount the grub.iso file we created at Step 1.
Step 4: Running the VM
Due to the way grub 2 works, whenever you put into it you now have to load the appropriate grub config file.
Just type the above into terminal and grub should load and boot into your Ubuntu 9.10 installation.
If this has helped you in any way, please take the time to drop a comment (or a donation)! If you have any problems, just post a comment or send me an email through the “Contact me” page.
ISSUES:
- For some reasons Grub does not recognise the partition if you specify the EXACT partition entry of Ubuntu. You have to specify the entire drive for it to be recognised.
- It doesn’t seem to like nvidia drivers in this release so you might have to reset your x.org for it to work inside a VM. Just have to live with the lack of acceleration!
References:
Tutorial: Boot existing Ubuntu Partition using Virtualbox inside Windows (deprecated)
Apr 28th
Edit 22/11/09
Ubuntu 9.10 uses the new grub 2 as its boot-loader thus this article would not work for 9.10. I am currently in the progress of getting 9.10 to work under Virtualbox.
This tutorial would no longer be supported. Any comments regarding support will be ignored.
If you want to get 9.10 working please READ THIS ARTICLE
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I recently got Windows 7 and Ubuntu running in a dualboot. However, since I’m using more of Windows now I figured I should probably find a way to run Ubuntu inside my Windows. VM’s are great, but it’d be better if I can actually boot into my existing Ubuntu partition. So I searched the web and kept on finding tutorials on how to boot existing XP partitions inside Windows. So I decided to extrapolate from those tutorials and work my way through it. I’ll be writing how I did it here.
Before we begin, you should have a dual boot setup. I will NOT be showing you how to setup a dual boot, if you need help plenty of other guides out there.
Step 1: Creating a grub boot iso
The grub iso file will allow you to specify which partition to boot into.
- Boot into Ubuntu
- We create the folders and copy the necessary files to setup an iso
Run the command: cd ; mkdir -p iso/boot/grub ; cp /usr/lib/grub/*-pc/stage2_eltorito /boot/grub/menu.lst iso/boot/grub - Configure your ~/iso/boot/grub menu.lst file to boot your target OS (in this case Ubuntu). Remove the “savedefault” option from your target entry if it exists.
- We now create the bootable iso file
Run the command: cd ; mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o grub.iso iso - Move the iso to a location that’ll be accessable by your Windows partition
Step 2: Creating the .vmdk file
This creates a file which tells Virtualbox what partition to actually load as the harddrive. Unfortunately, unlike VMWare Workstation, Virtualbox does not support a GUI interface for selecting RAW hard disks as the “virtual hard drive”.
- Boot into Windows
- cd into the directory you installed virtualbox
- We find the partition number that needs to be mounted
Run the command: VBoxManage.exe internalcommands listpartitions -rawdisk \\.\PhysicalDrive1
(where 1 is the number of the hard drive ubuntu is installed on. E.g. Master should be 0, you’re second hard-drive should be 1 etc…The output should be something like:Number Type StartCHS EndCHS Size (MiB) Start (Sect)
1 0×07 0 /32 /33 1023/254/63 902023 2048
5 0×83 1023/254/63 1023/254/63 49677 1847346543
6 0×82 1023/254/63 1023/254/63 2164 1949086188In this example, my Ubuntu partition is number 5 and the swap is number 6
- We now create the VMDK file with the given information
Run the command: VBoxManage.exe internalcommands createrawvmdk -filename C:\path\ubuntu.vmdk -rawdisk \\.\PhysicalDrive1 -partitions 5,6 -register
Step 3: Setup Virtualbox
Now everything should be ready to setup Virtualbox. Create a new virtual machine. Select the .vmdk file we just created as the hard drive and mount the grub.iso file we created at Step 1. If everything was successful Ubuntu should boot up nicely.
DONE!
If this has helped you in any way, please take the time to drop a comment! If you have any problems, just post a comment or send me an email through the “Contact me” page.
References:
Ubuntu 8.10 to Windows 7 Beta to Ubuntu 9.04 to Windows 7 RC
Apr 25th
Originally my hard-drive crashed. So I decided to install Windows 7 beta, just to give it a spin. I loved it. Never have I ever gotten used to an operating system so quickly before. Everything just worked.
I promised I would install Ubuntu 9.04 beta when it gets released but it just had too many known issues so I decided to wait until the full version gets released.
I installed Ubuntu today and now I’m running it. To be honest, I don’t enjoy it. The screen feels so much smaller. It’s amazing how the looks of an operating system can actually make your monitor feel small. Windows xp makes my monitor feel HUGE, Ubuntu on the otherhand makes it feel tiny. It also hurts my head a bit just staring at it. Everything is so jagged.
Coincidentally, Windows 7 rc also got leaked today.
So this is what I’m going to do.
Format my computer again. Install Windows 7 rc and then just VM ubuntu. I’ll stick in some more ram so the VM can get some decent amoutns of ram.
Hopefully I haven’t used up considerable amounts of bandwidth setting up Ubuntu.
But yes. Microsoft, you have won me back.
I’ll probably wait until later tonight before downloading/installing the RC. Don’t wanna use up any more bandwidth setting up my OS.
Oh lord what do I do?
Mar 6th
I really like Windows 7. Am I fanboy? I hardly think so. I mean…I’ve had Ubuntu installed as my primary OS for 2.5 years only to remove it after my harddrive crashed and decided to give windows 7 a go. You may even hear me talking about wanting to be able to afford a mac. The problem I’m facing is that Windows 7 RC won’t be released until April 10th. Ubuntu 9.04 won’t be released until April 23rd. The beta for Ubuntu 9.04 is still 3 weeks away and I have uni now so my need for Linux is ever increasing.
Okay, if I am a fanboy then I’m a fanboy of non-virtualisation. You may be thinking “What the hell is he talking about? Virtualisation is great!” Don’t get me wrong, stuff like VMWare is great, but it’s just the way that some people use it.
If you want to test an Operating System for fun…use a VM, if you want to create a development environment for testing purposes…use a vm, if you need to isolate multiple servers for whatever crap you’re doing…use a vm. DO NOT use a VM simply because you want to run an application that’s not available natively. If you’re using linux…then use Wine. If you’re using linux simply for the sake of “programming” please shoot yourself in the head. If you’re a developer and you don’t develop in DOT Net you should be using linux by default. If you desperately need to program using linux tools then just use cygwin.
I often see people running VMs on their laptop, the laptop probably has 2 cores, a shitty graphics card and 2gb ram tops, how the hell can they tolerate running Ubuntu in a vm?!
Learn to Dual boot. If you don’t know how to dual boot…using wubi. Don’t know wubi? Google it.
In the mean time, I’ll be using Wubi. No VMs or cygwin.
I also phoned my old workplace and asked them to take me back. If I do get back I’ll have my laptop back
Tutorial: Hosting/Playing Warcraft 3 Online in Ubuntu…Perfectly
Jan 15th
This post is now deprecated as I no longer maintain this. Comments will be closed.
~~~~~~~~~~~~~~~~~~~~~~
I’ve read too many tutorials on how to setup Warcraft 3 on linux. However, the tutorial usually just ends there. Sure, you have a working version of Warcraft but when it comes to playing online it’s a different matter. Current versions of Wine do not have a working implementation of AcceptEx, this causes in game chat to be broken in battle.net. So when you’re playing team games that could be a problem. In addition, until recently there has been no linux compatible delay reducer. What is delay reducer? Warcraft 3 sets a predefined delay of 250ms for battle.net and 100ms for Lan. Generally 250ms for battle.net results in games with delay and/or lag. If you need more information check out this blog post.
In this tutorial, it’ll be divided into two parts. I’ll be showing you how to setup your system so that you can play and/or host Warcraft 3 games online painlessly and I’ll be showing you how to host Warcraft 3 games under wine.
Whilst there is no stable implementation of AcceptEx at the moment, there is AN implementation available. Thankfully, somebody decided to patch Wine with this implementation and setup a PPA repository. If you want to compile your own version of wine with the patch you can also do so by downloading the patch from the reference link below.
- In terminal type
gksu gedit /etc/apt/sources.list
- Add the following line changing intrepid to name of your version of Ubuntu.
deb http://ppa.launchpad.net/starfall87/ubuntu intrepid main
- Update apt with latest change from sources list:
sudo apt-get update
- Remove current version of wine and install the version from the PPA repository:
sudo apt-get remove wine && sudo apt-get install wine
Now that you have the correct version of Wine installed, I’ll show you how to host a game.
- We need to download Delay Reducer that’s compatible with Wine. Download
- Extract the file somewhere
- Run it by typing inside a terminal after you have had Warcraft 3 running:
wine W3DR_CLI.exe 80
- If you require additional hosting abilities like banlist, autorefresher, custom kicking then read on, otherwise you can stop here…
We can install a program called Snoopy which is developed for Linux for hosting games in Warcraft 3. To install it type inside a terminal:sudo apt-get install snoopy-wc
- Snoopy should now appear under your Application list inside Games.
Snoopy comes with many functionalities and options. Please read this guide on how to use snoopy.
You should be all set now!
If you’re just interested in playing Warcraft 3 online, you only need to run Warcraft and get on battle.net. Otherwise turn on delay reducer and run snoopy to begin hosting a game!
If this has helped you in any way, please take the time to drop a comment!
Edit 19/02/28:
Here is an alternative PPA repository for a patched version of Wine for those who want the latest version. Be warned, this has not been thoroughly tested.
https://launchpad.net/~pxc/+archive
References:
WineHQ Bugzilla – Bug 9787 – Warcraft3 Battle.net Doesn’t work (Needs AcceptEx)
Delay Reducer For Wine
Official Site For Snoopy
More efficient procrastination
Oct 5th
I upgraded my Ubuntu 8.04 to 8.10 beta recently. Here’s what I’ve noticed:
The good:
- Network Manager has been significantly improved…although…the improvements do not affect me and I’m quite comfortable using the old version
- More applications are being supported by Ubuntu
- VLC 0.9.2 was included despite the feature freeze
- Better driver support, my iphone is now successfully detected
- Better xorg support, but doesn’t really affect me since I have it setup correctly anyway
The bad:
- There is a “sound” lag, where the welcome sound would begin playing when my desktop has loaded rather than in the process of loading
- The “shutdown” icon on the top right hand corner is no longer a “shutdown” icon but rather a “logout” icon, and I can’t seem to change it back
- The desktop loading time is noticeably longer
- Still the same old crappy NTFS support, I copied 40gigs worth of movies to my NTFS external hdd, safely ejected it, plugged it into a Windows machine and I had to conduct a detect and repair to be able to recover 70% of the files
Well, it’s still in beta so hopefully when the final gets released in 4 weeks time, it’ll be more solid
I also developed a more efficient method of playing dota
The problem that I faced was that Compiz doesn’t support full screen games that well, it’s extremely buggy. So what I had to do previous was:
- Open terminal
- Type in “metacity –replace”
- cd into the directory and then run wine on warcraft
- Type “compiz –replace” when the game has closed to bring back compiz
The problem was that sometimes when I close down the terminal it would revert back to metacity…or even have no window manager running.
Eventually it turned into this:
- Open up compiz icon
- Change to metacity using the drop down from compiz icon
- Open up terminal
- cd into the directory and then run wine on warcraft
- Change to compiz using drop down when warcraft ends
It fixed the previous problem, has one extra step, but it saves keystrokes.
I recently added some custom commands to my Ubuntu box.
Command 1: metacity –replace
Command 2: sh -c “cd /media/sda1/Program\ Files/Warcraft\ 3 && wine w3l.exe”
Command 3: compiz –replace
I had shortcuts affiliated with the commands being “Shift F#” where # is the command number.
So now my steps to run Warcraft three is:
- Shift F1 to change to metacity
- Shift F2 to run Warcraft
- Shift F3 to change back to compiz when Warcraft have ended
All I need to do now is work out a way in script form to run metacity and then Warcraft and only run Compiz once Warcraft has ended.
Edit 6/10/08:
I’ve now reduced the number of steps to running Warcraft to 1.
- Press Shift F2
The main problem I was facing previously was the fact that Full Screen Games refused to run in fullscreen under Compiz. But recently I discovered that you could setup Window Rules through Compiz. I setup a rule that forces applications with the title “Warcraft” to run in full screen. I also decided to disable some plugins…namely “Expo” and “Scale” to make running of Warcraft “smoother”. I never really used those two plugins, they were there mainly for show. But yes. I guess I have achieved O(1) procrastination. Yay!
Tutorial: Hamachi (with GUI) in Ubuntu 8.04 Hardy Heron
Sep 18th
Hamachi is a freeware application that initiates a virtual private network (VPN) between peers. This is extremely useful for initiating applications such as games over the Local Area Network (LAN).
For more information click here
This Tutorial is for setting up Hamachi with a gui based interface (optional) in Ubuntu 8.04 Hardy Heron.
- Download Hamachi
- Extract it somewhere
- Open up a terminal and CD into the directory
- Run ‘make install’ or ‘sudo make install’ to install hamachi
- Run hamachi-init to generate crypto identity
- Download and Run hamachi-gui – x86 or AMD64
You’re done! Simple! Hamachi-gui should be under your list of applications now or simply run hamachi-gui inside terminal.
If you feel more comfortable at the terminal, here are some commands you can use to setup hamachi manually.
- Run ‘hamachi start’ to launch Hamachi daemon.
- Run ‘hamachi login’ to put the daemon online and to create an account.
- Run ‘hamachi join <network>’ to join the network.
- Run ‘hamachi go-online <network>’ to go online in the network.
- Run ‘hamachi get-nicks’ to download network memberlist
- Run ‘hamachi list’ to list network members and their status.
