Warning: Creating default object from empty value in /home/mirandam/public_html/linux/wp-includes/functions.php on line 292
Fedora, Linux and Stuff

Boot Failure When Fedora 12 Grub Installs to non-MBR Partition

November 17th, 2009 ~ 10:53pm by Mauriat Miranda

I prefer to keep Windows on the MBR. So I install grub to a separate partition. I then allow the Windows Loader to chainload grub (example).

I noticed a problem with the Fedora 12 Anaconda Installer. If I chose to install grub to the First sector of boot partition instead of the MBR, I get an un-bootable system.

It is easy to see the problem if you compare fdisk output. (I reduced the output for clarity)

Before I installed Fedora 12 32-bit to /dev/sda10

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        2089    16779861    7  HPFS/NTFS
/dev/sda4            6268       36479   242677890    f  W95 Ext’d (LBA)
/dev/sda10          23762       25589    14683378+  83  Linux
/dev/sda14          34076       36192    17004771   83  Linux
/dev/sda15          36193       36478     2297263+  82  Linux swap / Solaris

After I installed Fedora 12:

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1        2089    16779861    7  HPFS/NTFS
/dev/sda4            6268       36479   242677890    f  W95 Ext’d (LBA)
/dev/sda10  *       23762       25589    14683378+  83  Linux
/dev/sda14          34076       36192    17004771   83  Linux
/dev/sda15          36193       36478     2297263+  82  Linux swap / Solaris

The boot flag is set to the wrong partition.

To fix this problem

Just boot with a CD/DVD, choose “Rescue” mode and run fdisk at the shell to change the boot flag. If you need more help, details follow:

  1. Boot with the system using your Fedora DVD or CD#1.
  2. Select “Rescue installed system”. (Select the proper settings, networking is not necessary)
    At the “Rescue” screen, you can “Skip” the mounting of your installed system.
    At the “First Aid Kit quickstart” menu, Select “shell”.
  3. At the shell prompt, use fdisk (BE CAREFUL!)
    bash-4.0# fdisk /dev/sda
    Command (m for help): a        (toggle bootable flag)
    Partition number (1-15): 10    (the partition you installed Fedora)
    Command (m for help): a        (command needs to be run twice)
    Partition number (1-15): 1     (the partition with MBR)
    Command (m for help): p        (verify everything looks correct)
    Command (m for help): w        (write table to disk and exit)
    The partition table has been altered!
    Calling ioctl() to re-read partition table.
    Syncing disk.
  4. Reboot.

I doubt this will affect many people since most people choose to install Fedora directly to the MBR. However I am reporting here in case someone else might find this useful. I noticed this a few days ago on Fedora 12-Beta 64-bit, but I had been too busy to check the bug reports. Will do that soon.

If you run into this problem (or similar) please leave a comment or contact me.

UPDATE: Should be fixed for Fedora 13. Bug 533658

Fedora 12 Released

November 17th, 2009 ~ 10:15am by Mauriat Miranda

It’s that time of year again, the Fedora Project announced the release of Fedora 12.

This release has received a great deal of polish, and with that plenty of media and documentation to go along with it.

Please see what’s new in Fedora 12. Some of the highlights include:

  • Optimized performance - The 32-bit packages have been compiled for i686 systems
  • Faster updates - The yum-presto plugin is default and RPM has updated its compression format
  • More comprehensive networking and broadband support
  • Next-generation (Ogg) Theora video
  • Bluetooth on-demand
  • Moblin graphical interface for netbooks
  • Gnome 2.28
  • KDE 4.3 (with updated “Air” theme)
  • Better webcam support
  • Better tablet support
  • Improvements to Virtualization

There is also available a condensed form of the release notes in 1 page, also in PDF.

As always, you can download Fedora 12 using the standard mirrors or using the Torrent (recommended).

When reading through all the information and documentation, it is easy to tell that a great deal of polish went into this release! Happy installing.

NT Bootloader Update

November 5th, 2009 ~ 8:43pm by Mauriat Miranda

This post really has no purpose other than just a snapshot for me.

My current c:\boot.ini:

[boot loader]
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINNT="Microsoft Windows 2000 Professional" /noexecute=optin /fastdetect
multi(0)disk(0)rdisk(0)partition(3)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect
c:\linux1.bin="[ sda7]  Fedora 11   (32)  [06/2009]"
c:\linux2.bin="[ sda8]  Fedora  9   (32)  [05/2008]"
c:\linux3.bin="[ sda9]  Fedora 11   (64)  [06/2009]"
c:\linux4.bin="[sda10]  Fedora 10   (32)  [11/2008]"
c:\linux5.bin="[sda11]  CentOS 5.3  (32)  [07/2009]"
c:\linux6.bin="[sda12]  OpenSuSe 11 (32)  [10/2008]"

That F9 and F10 will be replaced with F12 (beta at the moment). I might even drop in a Ubuntu Karmic Koala in there somewhere (if I get the time).

I know, I really need to retire my Windows 2000!
I think I also need to repartition that system!

Or best idea: I should get a new computer that supports KVM and switch to virtualization instead of this octuple-boot nightmare !!!

Time to start saving …

CentOS 5.4 Released

October 21st, 2009 ~ 6:13pm by Mauriat Miranda

Well CentOS is officially released. Now the mailing list whining can be stopped … until at least 5.5!

For new installs grab an ISO. For upgrades (which is generally safe), just run:

# yum update

Or if you want to be very careful:

# yum clean all
# yum update glibc\*
# yum update yum\* rpm\* python\*
# yum clean all
# yum update
# shutdown -r now

Just read the Release Notes for more specifics, or the RHEL 5.4 Docs.

Please note that CentOS does not have a perfectly fixed release schedule. It is typically 6-8 weeks after RHEL is released. People wanting updates can follow CentOS (Karanbir Singh) on Twitter.

(As a quick note, yesterday Fedora 12 Beta was released.)

Default Xorg Resolution

September 15th, 2009 ~ 10:45pm by Mauriat Miranda

Recent versions of Linux and the Xorg X-Windows system have been engineered to require very little configuration settings to properly detect graphics options and display resolutions. In most cases graphics should “just work”.

The Xorg system stores all its configuration options in the file: xorg.conf. Many distributions including Fedora and CentOS keep this file in the /etc/X11/ directory. In the past this file would contain a great deal of information that was not easy to setup. However as of recent releases, this file is not required for graphics to work correctly. Both Fedora and CentOS will provide a very minimal xorg.conf file if required.

Typically the proper resolution for your display will be detected at run time. While this is great for most users, it often leads to strange resolutions or blank screens depending on your monitor or LCD screen.

EDIT: If you have NO file at all, on the Fedora wiki is: How to create xorg.conf. This works for both Fedora and CentOS.
There are two solutions if you have no xorg.conf. As ‘root’ run either of the following:

# yum install system-config-display
# system-config-display --noui


# yum install xorg-x11-server-Xorg
# Xorg -configure
# cp xorg.conf.new /etc/X11/xorg.conf

Whenever I install Fedora or CentOS with the X-server, I typically edit /etc/X11/xorg.conf and add the following Section (or at least the missing parts):

Section "Screen"
        Identifier "Screen0"
        Device     "Videocard0"
        DefaultDepth     24
        Subsection "Display"
                Viewport   0 0
                Depth     24
                Modes     "1024×768"

The Modes line will control the resolution. You should put the proper resolution for your display. You can also add mutiple modes if you monitor supports it. For example:

Modes     "1280x1024" "1024x768" "800x600"

If you have an LCD and Xorg does not properly detect the resolution, set the mode to the maximum resolution your LCD supports. If you have a standard CRT monitor that Xorg detects higher resolutions (with poor refresh rates) set the mode to the resolution you are comfortable. Also, if you have a CRT you can set multiple modes, then using either Gnome or KDE you can pick a resolution you prefer.

Note: This does NOT apply to everyone (most people will find the defaults correct), however many people have reported that setting a fixed resolution is helpful. Especially for some LCD’s which just seem to go blank.

For more information run man xorg.conf

Edit: 11/23/2009

Personal Taste: Fedora vs Ubuntu

September 5th, 2009 ~ 11:09am by Mauriat Miranda

This is fun. In order to really compare the two, someone must try both:



“…it really is a matter of personal taste”

(via Jef Spaleta)

All-In-One Configuration Tools

August 30th, 2009 ~ 10:09pm by Mauriat Miranda

As I mentioned previously, I run many sites on my web server. Yesterday I decided to clean up some sites that their owners had neglected or not used. One such site was running Apache Tomcat Java Server, which I did not care to leave running.

Now I, like many users of commercial hosting plans, pay for cPanel/WHM which includes a myriad of options/configurations/settings to do almost everything on the server. Back in 2007, I had used the cPanel Addon to install Tomcat. It was an incredibly easy “1-click Install”. I never checked, but I just assumed it worked. Similarly I thought it would be just as easy to uninstall Tomcat. I clicked “Uninstall” and all went well and I didn’t see any immediate problems. Or so I thought …

Last night the Apache Webserver failed. I did not realize till this morning (6 hours later). After some digging I found that it was because Apache could not find some Tomcat/Java module. So much for a proper uninstall. I did not have time to debug the issue, so what did I do? I simply re-installed Tomcat. I just could not afford any more downtime! … I know, I know: Shame on me!

This incident is like many commonly seen in the Linux world: An all-in-one graphical configuration tool can do wonders, but somewhere due to interaction between components it can causes all sorts of unforeseen problems. The root problem here is that it is incredibly difficult to know all the intricacies and nuances for administrating multiple software systems. Add to that the occasional need to manually edit config files, and you create an unmanageable mess.

Do you remember linuxconf? … Back in the day (pre-2002) Red Hat included a configuration tool called linuxconf which could manage multiple system options using a variety of graphical and non-graphical interfaces. While this worked wonders for novices performing simple tasks (mounting disk partitions, adding users, setting network addresses), it caused all sorts of issues for more complex services (web server, mail server, samba). Unfortunately at that time, there were very few complete comprehensive tools for configuring complex servers. Users who got burned using linuxconf, eventually learned that the only guaranteed way to setup things was to read man pages and documentation, and then editing config files manually.

Redhat did eventually abandon linuxconf with RH8.0. And while many users did complain, ultimately it was a smart decision. Software projects cannot be held accountable if some 3rd-party tool mangled their config files. Even more importantly, how can someone be certain the tool made the change they requested without looking at the config output? You can’t.

Sadly even though I expected cPanel to do its job (considering it is not free), I should have been more careful on a live production server. While I’m not saying that every single “all-in-one” tool is a failure, I am saying that trusting any tool without validation is a very poor choice.

SSH Client Configuration

August 25th, 2009 ~ 11:29pm by Mauriat Miranda

I have a VPS which is host to many websites. Some of those sites are permitted ssh access for their admins. However I am the admin to several sites myself. Each site has a different username (login/password) for administration. Additionally I have changed the ssh port to a different number (instead of the default 22) to avoid some script/bot attacks.

All of this makes for very inconvenient ssh usage and plenty of typing errors. For example:

# ssh -p33333 username_site1@site1domain.com
# ssh -p33333 username_site2@site2domain.net

Fortunately ssh provides a client configuration file to make “shortcuts” for things like this.
If you start by reading the ssh_config man page:

# man ssh_config

It will reveal 4 useful options:

  • Host - A “shortcut” name which can be used instead of the full hostname address.
  • Hostname - The real host name which is the actual server to log into.
  • Port - Port number on the host server.
  • User - The username used to log in. Typically ssh will use the current unix username if not specified.

So using the above example. I created the the file: ~/.ssh/config:

[mirandam@atlas ~]$ cd .ssh
[mirandam@atlas .ssh]$ touch config

with the following contents:

Host site1
Hostname site1domain.com
Port 33333
User username_site1
Host site2
Hostname site2domain.net
Port 33333
User username_site2

Now I can ssh to either site with a simpler command. These do exactly the same as the previous ssh commands:

# ssh site1
# ssh site2

NOTE: Read the man page carefully. If you see the following error:

Bad owner or permissions on /home/mirandam/.ssh/config

This means you did not properly set the permissions on the config file. To fix:

# chmod 600 ~/.ssh/config

There are many other options in the config file for users who might have more specific options (X11 Forwarding, Timeouts, Compression, etc.).
For anyone with multiple ssh accounts on different servers, this is very convenient to implement. Note this also works for scp and sftp.