Tipping my Fedora, part 3

[updated 2009.6.17]

This is another in a series of posts on my attempt to get acquainted with Fedora on VirtualBox.  YMMV (Your Mileage May Vary), of course.

[The computers are a Windows XP Pro 32-bit (2GB RAM with 512MB assigned to Fedora/VirtualBox) and a Vista 64-bit laptop (4GB RAM with 1GB assigned to Fedora/VirtualBox).]

I’m using the book Fedora 10 and Red Hat Enterprise Linux by Negus and Foster-Johnson [9780470413395] but not the included discs, as I wanted to make sure I had the latest version of Fedora, and I wanted to run it in VirtualBox as a virtual machine, so I could switch back to Windows when needed.  Having a big book on this can be a help in trying to learn a new system, although the variations due to running Fedora inside VirtualBox are not covered.

The book has tips such as:

* double-clicking on a folder to move down to a subfolder, or clicking the folder name at the bottom-left to move up to a parent.  This gives you a menu for selection.  This varies from the little green up-arrow folder in Windows Explorer.

* the “window shade” feature (double-click in the title bar “rolls up” the window instead of maximizing it) needs to be turned on.  System > Preferences > Look and Feel > Windows and in the pop-up, change Maximize to Roll Up. Not a perfectly working gimmick, IMHO.

Screen Resizing

I can log in, and once the Fedora is up, I can use the Auto-Resize Guest Display in VirtualBox (provided I have VirtualBox already set to full screen) to expand Fedora to fit completely inside VirtualBox.  There’s also a full screen option, but it’s easier to switch back to Windows if I just expand to size inside VirtualBox, and that’s enough to get a decent window for Firefox, etc.  (See Part 2 of this series for how that was enabled.)  Mind, it make take several tries to get it to work at times, and you have to have Fedora up for at least 2 or 3 minutes before it seems to want to work.

This also gives me access to the VirtualBox icons at the bottom of the window, which can help when I’m sitting wondering if anything is happening… oh, look, the drive icon is flashing.  Something is still working.  Fedora is not exactly encouraging on a lot of activities, as the little blue circling-around arrow doesn’t always appear for the cursor so you know something is going on.

Media Manipulating

I figured playing a few MP3 files would test the media capabilities… oops.

Fedora, it turns out, can’t do MP3 files.  It’s a matter of licensing.  So, I looked for and found a workaround called Fluendo and installed it, by downloading it (in Fedora using Firefox) and opening it, giving the root password several times in the process, and it installed.  Doing workarounds like this is something I expected, although not for something I had considered this basic (MP3 files).

Then I used Firefox to download some free MP3 files as samples and tried them out by importing them to Fedora’s Rhythmbox music player (which couldn’t handle MP3s before Fluendo).  Worked fine.  (I did this mostly just to see if I could get the connection to the sound card even through VirtualBox.)

The holders of the patent on the MP3 format wanted about 7 1/2 cents (according to the book) per system using this, and Red Hat decided not to include it (well, a lot of people just try Fedora out, much as I’m doing).  Makes sense.  Fluendo, however, legally has an unlimited MP3 license, so this stays within the law.  It’s free; you just can’t redistribute it.

(There’s actually a page in the Fedora wiki on “forbidden items.”  It includes commercial DVDs, since the format for commercial DVD discs is a patented one, so you may not see a lot of movies on Fedora machines without getting some extra software from somewhere — a popular source is rpm.livna.org .)

Terminal

I figured out — even before the book suggested it — that I needed to put an icon for the terminal function on the desktop.

Since Linux systems are aimed at multiple users, you log in as yourself, but often need to become root — the superuser (system administrator) to do certain things.  (I am Root, see me type.)

In the terminal panel, you get a prompt for you as user.  Type su – and enter (the hyphen added puts you in the root directory to begin).  The prompt will change and now you can install stuff, make changes, etc., that you were forbidden to do under your regular login.  Since you (supposedly) set your root password during the setup I described in earlier posts, you are better protected from malware, while using your regular login abilities, which might try to plant viruses, etc.  It does not make you immune to viruses and such; it just makes it harder than usual for the bad guys.

Of course, it also makes it more of an effort to install stuff, but that’s the tradeoff.

Tipping My Fedora, part 2

[last updated 2009.6.7]

I’ve come to the conclusion that one of the biggest obstacles in this Linux endeavor is the fact that I’m doing it over and over, trying to describe the steps each time, and each time I lead up to a Fedora that no longer will load, I have to start over and create a whole new virtual machine.  But some files may be updated, and therefore it may behave differently the next time.

Maybe that explains (in part) why, when I try to get advice from forums, the posts there always seem to skip steps.  After you go through something often enough, it’s certainly easy to leave out steps you’ve gone through before without remembering that others haven’t gone through them yet.

I’ll try to avoid skipping steps here.  I hope.  But I will skip a LOT of attempts to get things to work.

BTW: my work system is a Dell Optiplex 745 running Windows XP Pro on 2GB of RAM.  My personal laptop is Windows Vista 64-bit on 4GB of RAM.

In our last thrilling episode, I created a virtual machine in VirtualBox with Fedora 10.  The next step is to be able to control the resolution in Fedora 10 inside VirtualBox.  Better yet, to optimize Fedora to run in VirtualBox.

VBoxAdditions … eventually

Based on experience in several attempts at this, I went to the Applications dropdown menu, selected System Tools, and right-clicked on Terminal.  I chose to send a link for this to the desktop.  Believe me, you’re going to need to use Terminal a lot, and this is more convenient than digging down through the menus to load it each time.

The screen was still limited to 800×600 maximum.  Needed to find a fix for that.  Should be simple, right?  NOT.  There are a lot of people making suggestions in the VirtualBox forum.  None of them worked for me, and some of them locked up the Fedora so it wouldn’t boot up.  I had to delete it and reinstall it.  Several rounds of this ensued.

Loading packages into Fedora

I will consolidate and condense the advice that actually did work for me here:

  1. Load Terminal
  2. type su – (this will turn you into the root user, and the hyphen puts you in the root directory)
  3. type yum install binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel (this runs installations on a number of packages)

I got a Fedora popup about updates right after this. I approved it to install all updates.  There were a number of them, so I let it go a while and watched the little blinker dot on the VirtualBox hard drive icon flickering at me, sometimes orange, sometimes green, which probably means something for each color.

During this, there is a little open box with a green down arrow at the top next to the double-terminal icon for network activity, which indicates that downloading is going on, at least.  Then the box finally changes to a page in front of the open box, while it tests the changes.  Then comes a plus sign alternating with circular arrows while it does the actual installing.  Certainly resembles Windows in that it takes a while to do updates.  Go eat lunch.  A big lunch.  With dessert.  And gas up your vehicle while you’re at it.  Maybe change the oil, too.

While I waited for all that, I used the System > Preferences > Look and Feel > Screensaver to set it to 30 minutes and not lock me out.  10 minutes default isn’t much time, especially while you’re waiting for updates.

I also tried something from the book, which is to right-click on the top toolbar, and select Add to panel.  I picked a Drawer to add, and then right-clicked on the narrow little thing’s properties so I could widen it out some.  I put on some widgets: a system load indicator (now I had that CPU activity meter!), sticky notes, and a shutdown button.  I added a weather widget to the bar itself.  Now I could open a drawer and use the widgets in there.  Just a slightly different way to get handy widgets out there.

Finally I get a completed message for the updates and the open box disappears.

Now I open the terminal again and — glutton for punishment that I am — I became root again and typed yum update just be sure.  I got “another app is currently holding the yum lock” and after repeating that multiple times, it finally got to check.  Everything is updated.

Installing the VBOXADDITIONS

Now the best advice I found says “By then it’s time for another run at that install script: [root@fedoravm VBOXADDITIONS_2.2.0_45846]# sh VBoxLinuxAdditions-x86.run – which should run smoothly now, install all the guest additions” — only what does that mean?   (Aside from the minor difference in VirtualBox versions, that is.)

It looks like root (judging by the root prompt of #) is inside the directory.  This is the kind of thing that makes Linux harder than it has to be — the advice skipped steps here.

Okay, right-click on the desktop icon for VBOXADDITIONS and look inside it with “browse folder”.  Aha!  There’s the VBoxLinuxAdditions-x86.run file.  Now I need to get to it inside the Terminal function as root.

Used the “up” green arrow in the browse function until I got up to a batch of folders, starting with “bin” and going on.  Okay, this is main directory stuff in Linux.  There’s the “Media” directory and the VBoxLinuxAdditions-x86.run file is in that.

Now that I know that, I can use Terminal and become root with privileges to run it.

  1. Okay, log into Terminal.
  2. Type su without the hyphen, to become root without being in the root directory — I won’t stay there anyway.
  3. Type cd / to get to the main directory.  (Well, it used to work in DOS to change directories.  Seems to work here also.)
  4. Type dir to see the subdirectories folders.  (Another old DOS command.)
  5. There’s the “media” folder.  Type cd media to get into that folder.
  6. Type dir and there’s the folder contents.
  7. Type cd VBOXADDITIONS_2.2.4_47978 to get into that folder.
  8. Type dir and there it is, listed with the other files.
  9. Type sh VBoxLinuxAdditions-x86.run
  10. it runs!

And now it wants to restart.  Whew!  I do a full shutdown.  Restarts are not a safe bet.

Please note that you were not party to a LOT of attempts to get something else to work, before I found this advice.  And even then, it did not tell me how to get to the file in order to run it as root.

Success So Far

This time when I boot, I get a message that the guest OS supports mouse pointer integration and it doesn’t need to capture the mouse anymore, just use it over the Fedora panel.  Oh, joy!  Big improvement there, believe me, not having to swap back and forth.

Oh, and the time is correct in the top toolbar.  That bodes well.

And CTRL-F lets the Fedora FINALLY go to full screen mode, and toggle back and forth (you can’t switch to Windows while in full screen).  All the functions under Machine dropdown menu in VirtualBox now appear to be working.

Looks nice, and windows for stuff like Firefox finally allow the full width of the screen.

And it only took me… was it 10 or 11 attempts? — to get Fedora 10 to run properly in VirtualBox 2.2.4.  I hope it gets easier from here.

I took my notes home and tried it on my Vista 64-bit laptop system.  It worked there, too.  Due to the wide screen, I had to adjust the Firefox window a bit, but it worked properly.

So, it seems I can actually run a virtual machine for Fedora 10 inside VirtualBox on my XP Pro and Vista 64-bit systems.  At least, the basics seem to work.

Tipping my Fedora, part 1

[last updated 2009.6.7]

So, we’re planning to move our library web site onto a Linux server on the campus system (long story omitted, for which all should be grateful).

Finally I have a practical reason to learn Linux.  The question is, do I enjoy or dread it?  I’d like to like it, really.

First, bear in mind that I started out (way back in the ’80s) with a Radio Shack Model 3, upgraded it to a Model 4, and then moved to a 80286 and MS-DOS, Radio Shack Xenix, Windows 3.1, and onwards.  The point being, I started with text-based operating systems, so it’s not a matter of avoiding them just because I can’t do everything with a mouse.

And Linux, at this point, is still very text-based because you seem to need to do some kind of typed instruction or file editing every time you want to do just about anything, including even the basic setup.

As a number of bloggers and columnists have commented, this kind of technical tweaking is a big barrier to acceptance of Linux by the general computer-using public.  Granted, it allows versatility, but most people don’t want to bother with that.  I’ve kind of gotten out of the habit of most of it, myself.

Special note: I’m going to skip a lot (a LOT) of the trial and error that went into this and just cover what actually worked in the end… mostly.  That will save a lot of space, believe me.  I’m also omitting all the “capture” dialogs when I go in and out of VirtualBox/Fedora back and forth to Windows.

Picking the distro

Linux comes in distributions, which are commonly called “distros” (not to be confused with “discos”).  The campus will use Red Hat Enterprise Linux, which is a “pay” distro, for the web site.

However, Red Hat set up an interesting system some time ago.  They took the Fedora distro of Linux and let it be available for free, and when people developed and tested out enough new good stuff on Fedora, Red Hat moved it into the next version of Enterprise.  Very enterprising of them, even if I do pun that myself.

So, to get more familiar with Red Hat Enterprise, I can just use Fedora for free.  In fact, the book I got to help is Fedora 10 and Red Hat Enterprise Linux Bible by Negus and Foster-Johnson (9780470413395).

VirtualBox for a Virtual Machine

However, I was a little wary of dual-booting using my work PC (Windows XP Pro) or even my laptop (Windows Vista 64-bit), because I would need to switch operating systems about 15 or 20 times a day at work (I get a lot of rush interruptions, like the rest of our staff).  I had to be able to switch back to Windows to use programs there (many of them not compatible with Linux).

So, I decided to try using VirtualBox to create a “virtual” machine on each computer and then installing Fedora inside that.  That, of course, creates a separate set of problems and fixes, but that should be interesting.

I did look at some other virtual systems, but this was the one that seemed to have the most functionality with “guest” OS (operating system) while handling various systems on various host systems.

Off we go….

Downloads

First, I got the latest distro of Fedora, which turned out to be version 10.

Now, Fedora comes with either a Gnome (default) or a KDE graphic interface.  Pick one.  Or, pick both and try them both as separate installations.  I don’t know yet which one will be on the campus server, but I’m not sure it matters all that much for what we’ll be doing to manage the web site.

I created a folder in Windows for all the Linux stuff, and started downloading.

Downloaded the stock version of Fedora, which apparently uses Gnome.  This is freeware.  I had the option to get the version with the KDE interface, and I got that on my laptop at home, just to see the differences.

I also got the freeware for VirtualBox which allows me to run other operating systems (such as Windows or Linux) like a program inside Windows.  (You can also run Windows inside Linux, but that’s not relevant to my situation.)  You can set up several different virtual “machines” and start up whichever one you choose — say, have both Gnome and KDE versions of Fedora, a copy of Ubuntu, a beta version of some new system, etc.

Initial Setup for Fedora in VirtualBox

I loaded VirtualBox (version 2.2.4) and it showed a window with a “new” blue sun (well, it’s a Sun product).   This lets you set up the virtual machine for each system.

I set it up by naming my new virtual machine “fedora 10” and giving it 512MB of memory to work with (out of my 2GB, so that’s 25% of my memory and still more than the minimum of 256MB recommended by default).

I pointed the CD/ROM to the F10-i686-Live.iso file  (to start with) to use.

I set a shared file pointing to the directories where I keep some HTML files, so I could use them in the browser in Fedora, and the Linux downloads, and I set a USB device filter up so it would detect my printer on a USB port.

I also set it up with an “expanding” default space of 8GB to start, so anything I added or changed would have room to be saved.

Once I had that, I used the green arrow “start” button.  Things progressed.  Patience was certainly required; sometimes there are long pauses with little or no activity shown in the VirtualBox “guest OS” window.  I sat there wondering if the program had locked up or what, and then something would happen…  but the little icon for the drive activity (a single CD) kept blinking at me every little bit, so I kept waiting.  (There’s also a little blue spinning arrow around the cursor some of the time, which may or may not be visible depending on the type of action.)

BTW (By The Way): the virtual machine shows up as a window inside the VirtualBox window, and while you can enlarge the VirtualBox to full screen, the virtual machine window of Fedora stays at 800×600 by default.  There is a “resize” option in VirtualBox but that just reduces the VirtualBox to fit around the 800×600 panel.  The “Auto-resize guest display” function in VirtualBox is grayed out at this point.  There’s supposed to be a way around this — more later.

The initial login is “automatic” so I did that, and Fedora loaded, using the .iso (“Live”) file to run.

Now I had a nice 800×600 window with Fedora inside VirtualBox.  VirtualBox has something in the icons along the bottom of the window for the USB (which says the printer is on that) and a file folder (which says the shared files I set up are there).

Whenever I clicked inside the Fedora window, I got a little popup from VirtualBox saying that Fedora could capture the cursor/keyboard action for use in Fedora, and I could swap in and out of that using the right CTRL key.  When I approved that, I could work in Fedora.  I could get out by hitting the right CTRL key again.

Fedora 10 has the taskbar at the top with Applications  Places  System and the Firefox button and one for the mail/calendar app provided.  Fedora 10 with Gnome comes with a nice little batch of basic application software like Firefox and ABI Word and such.

In the “panel” (Microsoft doesn’t like you to say “window” when it’s not in Windows, apparently — but at least Linux didn’t elect to call them “doors”) below, are icons for Computer, liveuser’s Home, Trash, and an opened box with a disc saying Install to Hard Drive.  For starters, I am simply “liveuser”.

The “install to hard drive” function lets Fedora (inside VirtualBox) set up a space on my hard drive so Fedora runs faster from that and I can do some long-term work that gets saved.   I started with that and doubleclicked.

Little green dot flashes on the single CD icon at the bottom of the VirtualBox window.  Got a big white box with a small Fedora graphic and a Next button.  Clicked on that.  Got to select my language (U.S. English, as opposed to U.S. International or United Kingdom).  Got to choose a host name, and the default was localhost.localdomain, so I went with that.  Select a city for time zone — but nothing in a lot of states in the middle of the U.S., so I ended up with Chicago as being in the same time zone as Arkansas, at least.

Root password was next, so I set that.  Very important, as I was going to need to do a lot of stuff as root.  Warned my choice was “weak” but stuck with it.

Next I got a scary warning:

The partition table on device sda (ATA VBOX HARDDISK 8189 MB) was unreadable.

To create new partitions it must be initialized, causing the loss of ALL DATA on this drive.

This operation will override any previous installation choices about which about which drives to ignore.

Would you like to initialize this drive, erasing ALL DATA?

Very nice — obscure, confusing, and scary, all in one.  Went to the VirtualBox forum, and finally learned that all this does is format the one little spot you already reserved, and not your entire hard drive.  Given that Fedora doesn’t “know” it’s running in VirtualBox, it also doesn’t “know” that it’s only formatting that one little spot only, rather than setting up a normal boot.  I can cut it some slack on that, but it’s nerve-wracking the first time.  I thought that’s what it meant, but I wasn’t eager to find out that I had guessed wrong.

I told it Yes, and it then moved to another screen about partitioning the hard drive.  I didn’t change anything, but I did check the Review and modify partitioning layout box so I could doublecheck on what was being done.  Yes, just the one little spot being done, according to the layout screen — under 8GB.

Another warning, and then an install boot loader option, which I left in place.  Approved that and moved on.  Another option about replacing files, and approved that (the default was to stop, but I changed it).

Copying live image to hard drive was shown, and the blue line crawled slowly across to mark progress while the little blue arrow circled around the cursor.  Don’t plan on doing much while this is going on, but you only do it once per virtual machine.

Finished up and displayed a congrats screen and told me to reboot the system.  That only means rebooting the virtual machine, not the entire PC.

Went back to the Fedora desktop, and System dropdown menu, and selected Shutdown (not Restart – I needed to change something in VirtualBox) and went through those steps.

Fedora 10 showed up as “powered off” in VirtualBox, so I changed the CDROM in the VirtualBox Settings (that’s why I shutdown rather than restarted) to use the Host CD and checked the “Passthrough” box, using the E: drive (not the D, which would be my hardware CD drive) and then started Fedora 10 again.  You don’t want to use the same .iso file as before since that is for a “Live” version, and you are running on the virtual E: hard drive now.

This time the little VirtualBox icon that looks like a stack of CDs indicating the virtual hard disk was the one with the blinking green dot activity.

Welcome screen, ready to finish the setup.  It wanted to create a standard user and password, for when I didn’t need the extended authorizations of root.  I set up a login for that.

Time and date came next, and I set the time.  It then asked permission to send info on my PC’s configuration to Fedora, and I agreed (nothing confidential in there — I checked).

Now it showed a login for the user I’d just created, and “Other”.

After logging in as my regular user, I got the desktop, but now my user name was on the Home icon.

Now I went up to the Devices menu in VirtualBox and clicked on Install Guest Additions and it told me the software should be automatically started, and asked if I wanted to run it.  I approved.  It installed the VirtualBox Guest Additions and now in the VirtualBox window it showed that .iso file as the CD/DVD-ROM image (instead of the E: drive).

That created a desktop icon with a CD graphic labeled VBOXADDITIONS_2.2.4_47978 .  That showed I was using the VBoxGuest Additions for this release of VirtualBox, which made it more compatible with use in VirtualBox (I certainly hoped).

I checked System and printers — and no printer.  It searched and didn’t find it.  I turned my printer off and back on, and got a Windows popup for the VirtualBox USB to be installed, so I installed it.

Shutdown Fedora, and start it again — this time with the printer showing in the VirtualBox USB icon.

System > Administration > Printing and install a printer.  Looked for and found my Canon inkjet.

Now, Linux apparently has some trouble here, as a lot of manufacturers haven’t bothered to create printer drivers for Linux.  I did some checking, and the one for a printer can be found at the Linux Foundation site search box.  The one for my Canon i560 was called bj8pa06n.upp (well, that’s certainly descriptive…NOT) which is described as “a set of UPP files for the Canon BJC-8200 which comes with Ghostscript 6.50 or newer”.  I looked for the BJC-8200 in the list instead and used that one, and did a test print.  Seemed to work fine, so I went with that.

Still stuck at 800×600 resolution.  That’s next.