Posts Tagged ‘linux’

Windows Vista and Ubuntu Dual-Boot (Gateway T-1628; resolving install error 0×80070017)

Thursday, March 12th, 2009

So Internet Explorer 7 has been out for a while now, and I finally caved — I can’t get it to work using the wonderful ies4linux, so I need to have a copy of Windows available to test sites in action.

Fortunately I still had the re-installation disc from the copy of Vista I wiped from the laptop when I got it. Here’s how I set up my dual-boot:

  1. Burn an Ubuntu Live CD; boot from that CD, and launch the GParted partition editor from the System > Administration menu.

    Note: This step is where I ran into the most issues. I tried to create a new partition for Windows, following the instructions from this guide — but the Windows install would freeze at “expanding files 0%”, and later give me error # 0×80070017. Googling suggested that this error might have been a problem with the disc, but that didn’t really make sense since this was a factory disc. Eventually I figured out that it just meant there was some problem communicating between the disc and the hard drive — Vista didn’t like the partition I’d set up after my Ubuntu partition.

    Here’s how I solved this issue: I used GParted to move my Ubuntu install forward on the disk, then created a partition (without formatting it) for Vista at the beginning of the drive. Then — since Ubuntu’s bootloader was still at the beginning of the drive, and Vista gets confused when it sees that trace of another operating system — I needed to zero out the new partition, with dd if=/dev/zero of=/dev/sda1 where sda1 is the new partition. Warning! If you try to use that command without knowing what you are doing, you may well zero out your whole drive!! ALWAYS HAVE BACKUPS.

  2. Put in Windows CD; choose “Custom Install”; select the new partition as the destination (it should be called “Unallocated” or something — it was pretty recognizable after my work with GParted); click through until it starts installing; wait a LONG LONG time.
  3. Boot into Windows! Plug in ethernet cord; reboot to install drivers, etc. that allow me to have nice things like correct screen resolution and wireless internet.
  4. Use the Ubuntu Live CD and these instructions to restore my bootloader and set up dual-boot
  5. Happily choose between Ubuntu and Vista every time I boot up!

In general, this install would have gone a lot smoother had Vista been able to peacefully coexist with another bootloader. Different versions of Linux have no problem living on different partitions, and when you have an existing Windows install, you can easily install Linux in a separate partition without any confusion. But then, I guess that’s because Linux is designed to be used the way its users want to use it, and Windows is designed to be used the way Microsoft wants you to use it.

Using Vista a little bit gave me a better appreciation for people who try Linux and don’t care for it — I found myself disliking things about Vista just because it was unfamiliar and didn’t come set up the way I like it. But even though I know I could customize it and get more comfortable with it, I’ll still stick with Ubuntu for most of my computing, since I know it’s what ultimately gives me the most flexibility.

Command Line Magic

Monday, May 19th, 2008

Using the command line rather than a graphical interface is one of the things that a lot of people find most intimidating about the idea of using Linux. While (my last post notwithstanding!) you can accomplish most things without ever opening up the Terminal, I’ve grown more and more enamored of using the command line whenever possible.

I found gaining fluency with the command line to be like apprenticing to a magician; at first, you utter the magic incantations syllable by syllable knowing only what will result from the whole. But the more spells you learn, the easier it becomes to notice that each part has meaning, eventually acquiring the knowledge to recombine them in ways you’ve never seen and feel confident that you can predict what will result. Once you gain experience, it’s simply faster to rattle off a handful of magic words than to navigate through the space of the graphical desktop.

If you have a Linux or Mac OS X machine, you can try this at home (Windows has a command line too, but it’s not as integrated with the rest of the system and uses different syntax). Open the “Terminal” application and give it a try:

echo 'hello world'

will print the phrase ‘hello world’

pwd

will give you the name of the directory you’re currently in

ls

will list all the files in your directory

cat groceries.txt

will print the contents of groceries.txt (if groceries.txt is a text file) to the screen

man grep

will print the manual page for the command grep

Commands can have arguments that modify their functions:

ls -l

will list all the files in your directory, in a longer format

firefox &

will launch firefox in the background

The output from a command can be piped into another command:

cat groceries.txt | grep apples

will grep (search) for the phrase ‘apples’ in the printed text of groceries.txt

ls | grep groceries

will search for ‘groceries’ in the list of files in the current directory

echo 'bananas' >> groceries.txt

will append the line ‘bananas’ to the bottom of the file groceries.txt

Not only that, but commands can be used to search for other commands:

man -k search

will give you a list of the names and short descriptions of all the commands whose short descriptions include the phrase ’search’

Share folders between two Ubuntu computers on the same LAN with NFS

Saturday, May 17th, 2008

While most things about Ubuntu work pretty much the way you want/expect the first time, one exception is sharing folders between two computers on the same LAN (”Local Area Network” — in this case, multiple computers in the same house sharing an internet connection via a router). Surprisingly, it’s easier/more intuitive to do this between an Ubuntu computer and a Windows computer! I wish Ubuntu would make a more intuitive, graphical way for non-technical users to do this — though I certainly have fun tinkering with these things and learning more about networking (or what-have-you) as I go.

Through some command-line magic, I’ve gotten my laptop to be able to access the music folder on my desktop — right now I’m playing music on my laptop that’s actually stored on my desktop’s much bigger hard drive. Sweet! How did I manage this?

Say you have two computers, both running Linux (in this case they’re both running Ubuntu and I can’t vouch that this will work on any other distro, but I suspect it would) — the server, which has the folder you want to share on its physical media, and the client, which will connect to the server and access its data.

On the client:
1. In a Terminal window, run

sudo apt-get install nfs-common

— this installs the software you’ll need.
2. Run

ifconfig

to find your IP on the local network; it should look something like

inet addr:192.168.1.101

(If you see more than one instance of “inet addr” in the output of ifconfig, choose the address that doesn’t begin with 127.)

On the server:
3. In a Terminal window, run

sudo apt-get install nfs-kernel-server

4. Edit the

/etc/hosts

file and add a line that looks like this:

neuron 192.168.1.101

where “neuron” is replaced with the hostname or a nickname for your client (in this case, “neuron” is the name of my laptop) and “192.168.1.101″ is replaced with the IP you found in step 2.
5. Test this — in a Terminal, run

ping -c 1 neuron

(or whatever name you used) and see if you get a response. If you get a response like “unknown host”, something is wrong — re-check your work from the previous steps (and check that the two computers are really on the same network!). If you get a response like “… 64 bytes from neuron… 1 packets transmitted, 1 received … ” then everything is hunky-dory so far and you are ready to move on!
6. Edit the

/etc/hosts.allow

file and add a line that looks like this:

ALL: 192.168.1.101

(again, use the IP that you found in Step 2).
7. Edit the

/etc/exports

file and add a line that looks like this:

/home/music 192.168.1.101(rw,sync,subtree_check,no_root_squash)

where again 192… is replaced with the IP from step 2, and “/home/music” is replaced with the full path to the folder you want to share. Note that for some reason it is important that the parenthesized arguments don’t have a space between them.
8. Run

sudo /etc/init.d/nfs-kernel-server restart

9. Run

ifconfig

and get the IP of your server, the same way that you found it for the client.

Back on the client!
10. Edit

/etc/hosts

and add a line like

192.168.1.103 boffin

where “192.168.1.103″ is replaced with the IP of your server (from step 9) and “boffin” is replaced with the hostname/nickname of your server (”boffin” is the name of my desktop).
11.

ping -c 1 boffin

to check that this worked, just like in Step 5.
12. Make a mountpoint for your shared directory — in my case, I used

mkdir /media/boffin-music

13. Mount the shared directory at the mountpoint, like this:

sudo mount -t nfs boffin:/home/music /media/boffin-music

replacing “boffin” with your server’s name, “/home/music” with the location on the server of your shared folder, and “/media/boffin-music” with the mountpoint you created in step 12.
14. Now you should be able to browse to the mountpoint and see your shared files, and open them, and use them. Awesome!

Gateway T-1628 and Ubuntu Linux

Wednesday, May 14th, 2008

I posted recently about buying a new laptop — how is it working out, you may wonder?

Pretty well overall. The screen has remarkable clarity, the keyboard is comfortable, and the battery life is okay; on the other hand, the speakers are the quietest and tinniest-sounding speakers of any computer I’ve ever owned/used extensively. At 14.1″ for the screen, it’s just a little bulkier than I’d like (the 12″ iBook was a perfect size; how come computers that small now seem to be a luxury item?), and I’d prefer a slot-loading drive to the tray DVD drive it has. But overall it meets my needs, for now.

Judging by a quick Google search, I’m probably one of the first people to install Linux on this particular machine. It was a little tricky to find an install disk that would boot correctly; it’s a 64-bit machine, but the Hardy 64-bit installer had a problem with xorg and the Gutsy 64-bit disk had a problem with the installer. The Gutsy x86 disk worked fine — though I had to use the partitioner to wipe the entire disk rather than creating a partition alongside the Windows partition, since this computer came with a hidden partition with a “backup” install of Windows Vista. This seems like a particularly egregious invasion of the user’s freedom to use the computer as they wish — fortunately, blanking an entire hard drive still works!

Wireless and sound didn’t work right away; I used Ndiswrapper to install the RTL8187B Realtek driver, which I was able to download from the internet. To get sound to work, I needed to install linux-backports-modules-generic, run alsamixer and turn everything to unmuted/full volume, and reboot.

I did the installation process the day before Hardy’s official release; on release day, I used the updater to install the new release, and everything that had been working before still worked fine. I still haven’t gotten around to fixing suspend/hibernate, which didn’t work out-of-box, but I’m optimistic that I’ll get it going when I have more time to tinker.

Sweet Gnome Feature

Wednesday, May 7th, 2008

When I first started preferring Linux to Mac OS (which was my main OS for about six years before I started using Linux), my main motivation was tweaking the desktop — I started to hate the Dock’s lack of textual information, and I discovered that I could modify the look and feel of the fluxbox window manager to my tastes far more easily than any other desktop environment I’d used. That’s why it’s kind of ironic that I’m now using the less-customizable Gnome on all my installations (though I’m far from wedded to it — anyone with window manager recommendations, or tweaking-Gnome-a-bit-beyond-the-usual tutorials, please weigh in in the comments!).

There’s a lot of ease-of-use to like about Gnome, though. One thing I’m particularly psyched about is the keyboard shortcuts menu. Not only does it make it trivial to set up the function keys (volume control, play/pause, etc.) on my laptop to do what they look like they should do, but it’s customizable for far less obvious purposes. You can essentially assign any key combo or function key to any action. I already have my most commonly-used applications — the terminal and Firefox — as ready and obvious icons on the top panel, but who wants to use the mouse to go all the way up there? I have F2 open a new terminal and F3 open a new instance of Firefox. Every one of the several times a day I hit F2 to get a new terminal window, I smile a little thinking of the several seconds I’m saving.

And then I use those seconds to refresh LiveJournal. Every productive action has an unproductive reaction, I guess?

Best Buy Employee Has Never Heard of Linux?

Tuesday, May 6th, 2008

A few weeks ago I decided to buy myself a new laptop. I did everything wrong, and I was aware of it; I didn’t research my hardware needs, I didn’t research driver compatibility, I didn’t comparison-shop on the internet, and I reneged on my promise to myself to vote with my dollars for manufacturers who offer pre-installed open systems as an option (sorry, Dell!). I just woke up knowing that after months without a functional laptop, essentially tethered to my desktop workstation, I wanted a laptop and I wanted it that day.

So I found myself at Best Buy. I asked an employee whether I could buy a computer that didn’t come with Windows or MacOS pre-installed, and predictably, he said no and seemed confused at the question. This was what I expected. But then, as I asked him to unlock a couple models so I could see how they felt, we had the following exchange:

Me: It looks like the specs on this one are a little better for the price.
Best Buy Dude: Yeah, and you’ll need that three gigs of RAM to run Vista.
Me: Oh, I’m not going to be running Vista.
BBD [startled]: Oh! Uh… you know the success rate for installing a new operating system is basically zero, right? For people trying to put XP on these?
Me: Oh, I’m not going to be running XP either. I’m going to be installing Ubuntu.
BBD: What?
Me: Ubuntu? Linux?
BBD: What’s that?
Me: It’s an operating system. You should look it up, it’s free.
BBD: So what is it, is it like, a word processor?
Me: … It’s an operating system. You should look it up!
BBD: Yeah, OK, maybe.

Yikes! I don’t expect salespeople at big box stores to be free software geeks by a long shot, but you’d think people who help people pick out computers for a living would at least have a vague grasp of what’s going on in the tech world. Or at least, you know, know what an operating system is.

"Girlfriend Linux"

Wednesday, April 30th, 2008

So with the release of Hardy Heron, an Ubuntu-using blogger puts the new system to the “girlfriend test” — he gives his Windows-familiar but Ubuntu-n00b girlfriend a list of tasks to accomplish, and watches her try to accomplish them (she’s able to do most, but not all, of the tasks without any instruction).

This blog post has gotten a lot of attention in just a few days, and with good reason — it touches on a lot of hot-button issues regarding Linux and Ubuntu. The blogger says, “Linux won’t truly be ready for the desktop until someone computer illiterate can sit down at a the computer and with little effort do what they want to do” — and he considers his intelligent, tech-savvy girlfriend’s failure at a few of the tasks to be a sign that this isn’t the case. This is a problematic assessment — many of the tasks he chose are the kinds of things only power users even think to do (Photoshop a picture, download a torrent). A truly computer-illiterate user or even an ordinary non-power-user would be interested in much more basic tasks — e.g. I installed Ubuntu on my mom’s laptop a few months ago (hi, Mom!), and she hasn’t had to ask me for tech support, presumably because she only uses her computer for a handful of things and those things are easy to do.

That said, this type of test is definitely a useful way to see what aspects of the interface are more and less user-friendly; for example, installing Flash, which is one of the first few things I do on any new installation, is completely non-obvious and requires command-line usage — not a good idea for something many non-savvy users will want to do right away.

Of course, there’s always going to be the double-standard folks who will use any non-user-friendly aspect of a Linux distro as an example of how “Linux is too hard”, while ignoring any program that’s buggy, interface that’s confusing, or task that requires the command line on another OS. Their counterparts are the “Linux isn’t Windows!!!” people (”Linux isn’t Windows, so don’t expect someone used to Windows to be able to use it easily”) — I agree, Linux isn’t and shouldn’t be a clone of Windows, but if you want Windows users to switch to Linux, you should care about making Linux easy to use for people used to Windows, just like if you want new computer users to be able to start out on Linux you should care about making it easy to use for people who haven’t used a computer before. Fortunately we’ve seen a lot of progress in these areas in the past few years, and I’m confident that Linux developers will continue to produce distros that are easier and easier for all levels of users.

Oh, and for the “Linux users don’t have girlfriends”(/”girls don’t use Linux”/”there are no girls on the internet”) people? Get over yourselves. It’s not funny, it’s not original, and it’s not true… in fact, I happen to live with a Linux user who not only has a girlfriend but had her install Flash for him :).

Ubuntu Installations

Thursday, February 21st, 2008

Yesterday I installed Gutsy Gibbon on my boyfriend’s Dell laptop (the Inspiron 9200). I continue to be amazed at how smoothly Ubuntu installations run; wireless (!!!) and printing worked out of the box. The one weird glitch is that at bootup, after the phrase “Starting up…” appears, the load hangs with a blank screen — until you press Ctl-Alt-F2. No idea why, but I’ll keep tinkering.

I also recently switched from Gentoo to Ubuntu on my main desktop workstation, after using Gentoo as my primary operating system for about a year. I picked Gentoo (with fluxbox!) initially because I wanted to start from scratch, know everything on my system, and gain the knowledge and experience that would come from compiling and installing everything myself. And I did — but now I’m ready for a setup where, when I plug in my digital camera, I’m prompted to download pictures instead of digging around in /dev/ looking for the device. I know that if I want to install/uninstall/tweak/configure anything, I have the freedom to do so — the freedom of the GPL!
When I initially put the Ubuntu live disk into my desktop, I was booted into busybox (initramfs) rather than the Ubuntu desktop; the fix was to press F6 at the boot menu and edit the boot parameters (if I recall correctly, add ‘all_generic_ide’ before the ‘–’). After that, everything installed smoothly — I was able to put the existing contents of my hard drive in a new partition, which is now my dedicated /home partition.

This is my third recent Ubuntu installation — at Christmas I installed it on my mom’s Dell Vostro (dual-booting with XP — I love that the installation disk makes it easy to keep your Windows installation as-is). That needed some configuration for the wireless card, but other than that everything was simple to get set up.

Since last year’s Feisty (which I installed on my (now-defunct) iBook, after dual-booting Edgy and OSX) I’ve been totally psyched about Ubuntu; its out-of-the-box settings and programs, for ease of use, sane defaults, configurability, etc top any proprietary system I’ve used. Hardware support isn’t consistent enough for the non-technical user to be able to install it on their own; but non-technical users rarely install their own systems, proprietary or free. Once it’s set up, the modern Ubuntu distribution strikes the perfect balance of ease-of-use and workability (as good as or better than Windows or OSX) and configurability (potentially infinite, as with any GPL’d product!), perfect for any level of user.

Rockbox on the iPod Nano!

Tuesday, July 24th, 2007

In my never-ending quest to free myself from the fetters of non-free software and to amuse myself by putting new operating systems on things I find in my house, I installed Rockbox on my iPod nano recently.

It was essentially pretty easy. The hardest part was actually figuring out the difference between Rockbox and iPod Linux. It turns out that Rockbox is a music player, like the original Apple firmware, and iPod Linux is a Linux that runs Linux programs. I toyed around with iPod Linux (played some Tetris!), but since my goal was to have a music player, I moved on.

First step: converting my MacPod (HFS+, which Linux hates) to a WinPod (FAT32, a more widely supported filesystem). Interestingly, Mac OS, Windows, and Linux all recognize the WinPod, while only Mac OS and some subset of Linuxes recognize the MacPod. To convert a MacPod to a WinPod, just plug it into a computer that’s running Windows (if you can find such a thing!); you’ll automatically be prompted to reformat. You lose all the data on the iPod when you do this, so back up first if it’s anything important. After that, it’s just a matter of following the instructions here.

So now my iPod dual-boots, just like my laptop — and just like my laptop, it will rarely if ever see the Apple OS boot up again. There’s nothing that Apple’s iPod software did that I preferred to Rockbox, and plenty of things Rockbox does that I like better. To name a few: it’s free as in speech; it plays .ogg files (the .ogg standard is also free as in speech!); it lets me choose to keep my existing filetree organization, or use its ID3-based database, or both; it lets me put (any kind of!) files on it and then retrieve them on any computer under the same name and format; it’s highly skinnable, so I can get it to look more attractive than the original Apple look; and it allows finer tuning of settings (for example, I can choose whether or not it stops playing when headphones are unplugged, set how long it waits before going to sleep, &c). Using it under Linux (or any OS) is simply a matter of mounting it as a drive and then copying files directly to its filetree, rather than using a specific piece of software. Without a doubt, Rockbox has increased my ability to use this piece of hardware the way I want to.