PDA

View Full Version : Help a Linux Nublet (Ubuntu)



Nominus Experse
02-08-2008, 04:09 AM
Well, due to XP not knowing what to do with SATA HDDs, I decided to install Ubuntu on my laptop (under the help of many people here). However, I am now a very small nublet in a brave new world, so any help would be appreciated.

So, basically, the premise of this thread is to throw out everything a Ubuntu user ought to know and/or have.


Like, how can I run games like Morrowind, Diablo II, Alpha Centuari, Warcraft III....

o_O
02-08-2008, 04:09 AM
I would whole-heartedly recommend Linux, but you should definitely be aware that if you aren't familiar with Unix-like operating systems then it <i>will</i> be a steep learning curve.

These days, distributions like Ubuntu are making huge strides forward in terms of hardware detection and compatibility, which has made setting up things like wireless a damn site easier, and that used to be one of the hardest and least stable things about setting up a home network.

Nonetheless, it's inevitable that you're going to have to learn to use a command line interface. Once you're comfortable with a CLI you'll find that it's far easier and faster to use than a GUI. Mice annoy me now because they take too long to point and click compared to typing out a command. For example, it's faster for me to manually connect to a wireless network using the command:
su -c 'wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf && iwconfig wlan0 essid [network name] && dhcpcd wlan0' than it is to start up the GUI and wait for it to automatically connect. :p

As far as games go, you have a couple of well-supported options.
- WINE: I recommend this. It's a re-implementation of Windows libraries, so it's not directly ported from Windows, but re-implementing the behaviour of the operating system. For this reason it's not an emulator (<b>W</b>ine <b>I</b>s <b>N</b>ot an <b>E</b>mulator :p). It's making a huge amount of progress towards good DirectX support, and in my opinion, moreso than it's commercial brother, Cedega.

- Cedega: This is a fork of the WINE project that split from WINE quite a few years ago. Maybe 6 or 7 years. It's commercial, so you have to pay, but the goal of the project is to tweak and fix the software specifically to play Windows games well and to provide support for them. There are great success stories with Cedega (games like Oblivion and UT2k4) but I never had a lot of success with it.

- You could also try a virtual machine running XP, however it probably won't be that successful, as DirectX support in most VM software is VERY experimental (if present at all). You also need disk space for a whole XP installation and enough RAM to run Linux, XP and whatever game you're running simultaneously.

- The other solution (and for me at the moment, most preferable) is to dual-boot Windows XP and Linux. You have two OSes on the computer, and depending on what you need to do, just boot into the relevant one. There is a "dd" method to copy a virtual Windows installation to an actual partition, similar to the method I posted above. My laptop currently quint-boots 4 types of Linux and XP. :p

You'll find that most older games will run reasonably well under Linux, but they almost invariably require some (actually usually a lot :p) tweaking, and they usually have minor inconsistencies with the game as run on Windows. Small drawing errors and artifacts usually. I've had Morrowind running mostly perfectly, and Oblivion easily playable. Check out <a href="http://www.winehq.org/">WineHQ</a> for info on WINE. The AppDB has lists of compatible software and success rate information for thousands of different apps.

If you run into difficulties running Linux, there is a <i>huge</i> amount of community support. Post problems here because there are a few total Linux geeks here who are more than willing to help. :p

EDIT: Do use Ubuntu if you decide to go for Linux. It's pretty much perfect for beginners - it eases you into CLI usage whilst maintaining an easily navigable GUI. You can install it off of the live CD after trying it out for a while. I think the thing you'll be most impressed with after installing any type of Linux is the ease of installing software.

crono_logical
02-08-2008, 07:44 AM
*lazy and copies Face's post from the other thread* :p

Nominus Experse
02-08-2008, 08:18 AM
I must say,I do like the sound of this packaging/repository system. The system shouldn't be nearly as cluttered, right?

After fiddling with Ubuntu for a few hours, I'm beginning to wonder why I didn't try Linux earlier in my life.

o_O
02-08-2008, 02:17 PM
Well I wasn't expecting to see a post from me in this thread. xD

The packaging and repository system is great. There are a bunch of different types, Ubuntu's being aptitude. Some things to be aware of:

- You can run aptitude from the command line or using a GUI. The most popular GUI is Synaptic and it works well, however you'll probably start using the command line more frequently as you become more familiar and comfortable with it.

- To install a package from the command line, use a command like: "sudo apt-get install [package-name]"
"sudo" tells the shell to perform the command as root (Administrator in Windows-talk. You will be asked for your password).
"apt-get" is the name of the application. This is simply to start the package-management tool.
"install" is the command passed to the package-management tool, which (amazingly), installs a package. You could replace it with "remove" to uninstall a package, for example.
"package-name" is the name of the package in the software repository. To find the name of a particular package, you can use the command "apt-cache search [keyword]". You can also find packages for Ubuntu by browsing Ubuntu packages (http://packages.ubuntu.com).

- Aptitude searches in cached repository databases. Basically, it downloads a list of all available package names, descriptions and download locations to your computer and searches them when you want to install a package, rather than searching on the server every time. For this reason, you need to sync your cache about once fortnightly, to ensure you have an up-to-date package list. You can do so with "sudo aptitude update".

- 99% of packages on Linux have dependencies. Dependencies are packages which the one you're installing relies on. For that reason, dependencies must be installed first or simultaneously to a package that requires them. Aptitude provides dependency resolution, thankfully, meaning you'll rarely have to worry about them.

- Occasionally, you may need to manually install "dpkg" (Debian) package files, for example if the repository info is incorrect, out of date, or if the package is simply not in the repo. You can do that with the command "sudo dpkg -i /path/to/package.dpkg". This method of installation provides no dependency resolution, so you'll often need to research dependencies or install each one manually by trial and error.

It's awesome you decided to try Linux. I reckon that in time, you'll be using it more than Windows - only keeping a Windows partition or machine for when you need to use it. :p

Baloki
02-08-2008, 03:37 PM
I would recommend switching to Windows if you are planning to play games :p

Nominus Experse
02-08-2008, 06:14 PM
I would recommend switching to Windows if you are planning to play games :p
The laptop will be primarily used for writing and internet browsing. I only wish to have the option to play a few of my favourite games when I wish to. Seeing that they are older types, I think they ought to be more or less compatible with Linux, but then again, I am a nubcake, so who knows.

I found a site saying how to play Diablo II and Morrowind, so that's two out of the four or so I really want to be able to play.



Oh, and Face, thanks again. You're a tremendous help - as always.

Baloki
02-08-2008, 06:20 PM
Wine HQ (http://www.winehq.org/)

o_O
02-09-2008, 02:05 AM
<a href="http://appdb.winehq.org/objectManager.php?sClass=application&iId=1015">Morrowind</a>: You can see that using a WINE version of 0.9.50 or above gives the game a gold rating. That means a little bit of tweaking will get it running perfectly. For interest's sake, Oblivion also has a gold rating.

<a href="http://appdb.winehq.org/objectManager.php?sClass=application&iId=74">Diablo II</a>: DII and LoD both have a platinum rating, which is that it works flawlessly out of the box. :p

<a href="http://appdb.winehq.org/objectManager.php?sClass=application&iId=897">Warcraft III</a>: Gold for Frozen Throne and platinum for Reign of Chaos.

I'm not sure what Alpha Centauri is, but I found this:
<a href="http://appdb.winehq.org/objectManager.php?sClass=application&iId=332">Sid Meier's Alpha Centauri</a>: The Windows version is rated "garbage", but apparently it was ported to Linux, if you can find it. :p
<a href

Mirage
02-09-2008, 04:16 AM
Sid Meier's would be the same thing, just the full title. So it's the same game.

Nominus Experse
02-09-2008, 06:10 AM
How can I add more workspaces?

EDIT:
I can't get Diablo II to run. When I try to run it, I get a dialog box stating:

UNHANDLED EXCEPTION:
ACCESS_VIOLATION (c0000005)

EDITRA:
Okay, Wine and Linux are confusing the fuck out of me, so I'm going to say fuck it for now. How do I go about installing Windows XP as a secondary OS?

EDITGA:
Alright, screw XP. I'm going to simply get my hands on an illegally downloaded legitimate copy of Vista and use that as a terribly boated form of Wine-for-idiots-like-me and do a dual-boot of Vista and Ubuntu.

o_O
02-09-2008, 02:15 PM
Before you do that, you might want to try this:
Some people managed to fix that error in Diablo II by installing the latest nVidia drivers. To run the game, you must have WINE configured properly, as well. Run "winecfg" from a terminal. Windows version must be NT4 or higher. I'd set it to XP SP2. Also, create a cdrom drive letter (e.g. D:\) by clicking advanced, then setting the drive type to cdrom.

As for installing Vista, there are some things to be aware of. When you turn on your PC, the BIOS looks towards the boot sector of the first drive. The boot sector contains information (known as the bootloader) that enables your operating systems to be found and started. It's likely that you're currently using GRUB (Grand Unified Bootloader) to boot Linux. Windows uses a different bootloader to Linux, and the aggressive Windows installer likes to commandeer the entire partition, including the boot sector and install its own bootloader (winloader for Vista and NTLDR for XP) without preserving anything that's currently in a different bootloader. Basically, it assumes it's the only OS on the computer and destroys all other boot data.

So when you install Vista, it's going to put winloader there and it will be as if you no longer have Linux (except the disk space is still taken up :p). So there are ways to fix it - I'll tell you the easiest.

Ok, assume you have Linux installed and have just installed Vista.
- You need to boot from your Linux live CD, and start a terminal.
- You need to mount your Linux partition. You can likely use this command: "sudo mkdir /mnt/linux && sudo mount /dev/sda1 /mnt/linux". The only thing that would change would be the "sda1" part, to match your actual Linux partition.
- You need to do what is called a "chroot". It basically allows you to jump from your live CD environment to your hard drive Linux installation. Here are the commands needed:
sudo mount -t proc /proc /mnt/linux/proc
sudo mount -o bind /dev /mnt/linux/dev
chroot /mnt/linux /bin/bash
source /etc/profile- Then you need to mount your boot partition (if you have a separate one). "sudo mount /dev/sda2 /boot". Change /dev/sda2 to the correct boot partition.
- Then you need to reinstall grub. This is very simple; simply run "grub-install /dev/sda" where /dev/sda is the actual drive you installed Linux on. It should give you a message about Device.map, and give you some devices in parentheses of the form (hd0,1).
- Then you need to edit your fstab. This is the file which tells Linux where to put important directories at boot. Run the command "sudo nano /etc/fstab" to start the editing. Add this data at the bottom of the file:
title "Windows Vista"
rootnoverify (hd0,1)
makeactive
chainloader +1
- Then reboot, and you should see a menu allowing you to choose which operating system to boot into.

If you post your partition table before formatting, I'll be able to make the instructions more accurate for your installation. You can get it using "fdisk -l" from a terminal. You're brave if you try this. It's unknown territory to many Linux users, but rest assured that the nature of Linux means anything that breaks can be fixed. If it won't boot, all we need to do is edit some files, basically. :p

Nominus Experse
02-10-2008, 08:44 PM
Vista states that it can't be installed on my HDD because it isn't NTSF. How do I go about changing my HDD (or rather, part, since I only want around 30 gigs to be set aside for Vista's playground) to NTSF?


Also, here is what I get when I enter fdisk -I:

trevor@My-smurfing-Laptop:~$ fdisk -I
fdisk: invalid option -- I

Usage: fdisk [-b SSZ] [-u] DISK Change partition table
fdisk -l [-b SSZ] [-u] DISK List partition table(s)
fdisk -s PARTITION Give partition size(s) in blocks
fdisk -v Give fdisk version
Here DISK is something like /dev/hdb or /dev/sda
and PARTITION is something like /dev/hda7
-u: give Start and End in sector (instead of cylinder) units
-b 2048: (for certain MO disks) use 2048-byte sectors
trevor@My-smurfing-Laptop:~$

o_O
02-10-2008, 09:55 PM
Oh, my bad, I should have clarified - It's <pre>fdisk -l</pre> Lowercase L. :p

Also, as far as resizing your partition goes, that could be a tricky - shrinking partitions has a few things to be aware of. Here is a simple description of how partitions work:

You can have 4 primary partitions on a disk, or 1-3 primary partitions and an extended one. The extended partition can contain additional partitions and is used because historically, disks were unable to contain more than 4 partitions.
Anyway, a partition is like a physical division halfway through the disk. You can think of it like a container, to hold data. The <i>filesystem</i> is the means to actually store the data. It essentially stores information about every file on the partition, enabling the OS to locate and perform operations on them.

The partition is the physical limit of one volume. The partition <i>contains</i> the filesystem, which <i>contains</i> file data. In 99.99999% of cases, the partition size is the same size as the partition size. However you may have different sizes if the filesystem or partition has been resized.

You may not store file data either outside a partition or a filesystem. When you grow a partition, that's fine, because you're extending the partition but leaving the filesystem intact. This means that you aren't encroaching on any part of the disk where files reside.
However, in the event of shrinking a partition to make room for another, you need to ensure that you shrink the filesystem as well as the partition, since you can't have a filesystem larger than it's container, or partition. It's like trying to fit 5 bottles of beer into one. So you need to shrink the filesystem, but the problem with this is that you don't know where the files are in the filesystem - You could be shrinking it down past some system files and then you simply lose them.

All that aside, you should be aware of that, but you don't have to deal with it all manually (you can if you want but I wouldn't recommend it :p). Use the tool "gparted" from the terminal (install with "sudo apt-get install gparted" if you don't have it already), and you should easily be able to shrink the partition down and format it as NTFS. :p

Nominus Experse
02-10-2008, 10:01 PM
It says I need "root privileges" in order to run gparted (since it's a tool of mass destructions)...

o_O
02-10-2008, 10:33 PM
Oh, just run "sudo gparted". Sometimes that might give you trouble, so you might need to do "DISPLAY=:0 sudo gparted" or even "DISPLAY=:1 sudo gparted".

Failing that, try "su -c 'gparted'" and finally "su" followed by "gparted". :p

Nominus Experse
02-10-2008, 10:44 PM
Ah, thanks Face

EDIT: OMFG, WTF? I can't resize the drive I need to. It has this stupid lock on it or something.

o_O
02-10-2008, 11:21 PM
I think the problem is that the partition you want to resize is mounted. Try doing the same thing from your Ubuntu live CD. I can't guarantee it'll work just like that, but it won't give you the same error. :p

Nominus Experse
02-11-2008, 09:30 PM
Face, your advice was much appreciated, but I simply couldn't get it to work right - at the time. ubuntu felt the need to become hung up when scanning the mirror, and it wasn't until later that I realized I could ahve simply of disabled/disconnected my ethernet/wireless in order for ubuntu to move on and finsih its installation. So blegh on me.

However, I do want to extend a tremendous "OMFG I LOVE YOU BIG LONG TIME" to you for all you've done - in both this thread and the previous one. Even though not everything worked out perfectly, it's now up and going, and much of my Linux nubness was watered down by your watchful, helpful eye.posts.

So thanks.


And also thanks to all of the others that have bothered to post here as well.



And Vista, no matter how pretty you look or pretend to be, the fact that one of your updates fucked my registry up so badly that I couldn't rename, restore, or remove files and folders from the Recycle Bin... I didn't like you already, and then you went and did that.

Luckily, the computer gods of the intertubes had already found a remedy for your piss-ass updates...



Oh, and ubuntu, I like you lots. If I didn't have a girlfriend, I would mount you immediately, har har har.




...someone shoot me.

<b>*sniped*</b>

o_O
02-11-2008, 10:01 PM
No problem. I like a chance to be geeky. :p

Perhaps in the future you'll come back to Ubuntu. That's what I did when I first started using Linux, though my first distro was Red Hat (and a good reason not to stay with it :p). It's definitely something you should start off doing as an endeavour towards knowledge, rather than immediate productivity. :p

Nominus Experse
02-11-2008, 11:21 PM
I'm still dual-booting with ubuntu, and may one day move completely over to it (when I understand WINE and other unfamiliar things found in Linux)

o_O
02-11-2008, 11:25 PM
Oh you are! Awesome! :D I clearly skipped over these words:
it's now up and goingI must say, I'm impressed with how you've made it work for you. You haven't asked any dumb questions, so congrats on being resourceful and not demanding to be spoonfed like so many Linux noobs. :p

Citizen Bleys
02-20-2008, 03:35 PM
You can get XPee installed instead of Vista if you hate Vista. XP does recognize SATA drives no problem. What it doesn't grok from a direct-from-install-cd boot is AHCI. You can either put AHCI drivers for your hard disk on a USB key and use F6 during bootup to use those, or go into your BIOS and turn off AHCI. Depending on your BIOS, you may have to disable Flash Cache Module. Once XP is installed, download your drivers and you can turn AHCI back on.

Same thing happened to me with a new laptop. I needed to ditch Vista because of a bad gaming fps issue with the graphics card which I later learned could have been resolved with a simple hotfix instead of an hour-long XP install.

Also, Gentoo (or Sabayon) > Ubuntu. Ubuntu's nice, but not as nice as a portage distro.

o_O
02-20-2008, 09:05 PM
Also, Gentoo (or Sabayon) > Ubuntu. Ubuntu's nice, but not as nice as a portage distro.

I second that. Gentoo's the only distro that I've stuck with and consistently had installed over the past four years. Portage is probably the single best thing in any Linux distribution. But I would definitely recommend using Ubuntu at first, if only for a month or two, so that you learn the ropes of Linux. I'd hate to tell somebody to sit there and do an installation of Gentoo as their first distro. :p

My first Gentoo installation was good fun. I chose to install KDE and Gnome, and in a stroke of brilliance compiled them with -j1 and -O3 C flags and every use flag. Not to mention it was a 64bit kernel in the early days of mainstream 64bit processors (which means out of date and unstable packages even from the stable source tree), so it was all for nothing anyway. It took three days. :(