Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Monday, June 2, 2008

GRUB Error Codes Revealed

GRUB Error Messages

Errors Reported by the Stage 1

The general way that the Stage 1 handles errors is to print an error string and then halt. Pressing Ctrl-Alt-Del will reboot.

The following is a comprehensive list of error messages for the Stage 1:

  • "Hard Disk Error"

    This error message will occur if the Stage 2 or Stage 1.5 is being read from a hard disk, and the attempt to determine the size and geometry of the hard disk fails.

  • "Floppy Error"

    This error message will occur if the Stage 2 or Stage 1.5 is being read from a floppy disk, and the attempt to determine the size and geometry of the floppy disk fails. It's listed as a different error since the probe sequence is different than for hard disks.

  • "Read Error"

    This error message will occur if a disk read error happens while trying to read the Stage 2 or Stage 1.5.

  • "Geom Error"

    This error message will occur if the location of the Stage 2 or Stage 1.5 is not in the area supported by reading the disk with the BIOS directly. This could occur because the BIOS translated geometry has been changed by the user or the disk is moved to another machine or controller after installation, or GRUB was not installed using itself (if it was, the Stage 2 version of this error would have been seen during that process and it would not have completed the install).


Errors Reported by the Stage 1.5

The general way that the Stage 1.5 handles errors is to print an error number in the form "Error: " and then halt. Pressing Ctrl-Alt-Del will reboot.


Errors Reported by the Stage 2

The general way that the Stage 2 handles errors is to abort the operation in question, print an error string, then (if possible) either continue based on the fact that an error occurred or wait for the user to deal with the error.

The following is a comprehensive list of error messages for the Stage 2 (error numbers for the Stage 1.5 are listed before the colon in each description):

  • 1 : "Selected item won't fit into memory"

    This error is returned if a kernel, module, or raw file load command is either trying to load it's data such that it won't fit into memory or it is simply too big.

  • 2 : "Selected disk doesn't exist"

    This error is returned if the device part of a device- or full filename refers to a disk or BIOS device that is not present or not recognized by the BIOS in the system.

  • 3 : "Disk read error"

    This error is returned if there is a disk read error when trying to probe or read data from a particular disk.

  • 4 : "Disk write error"

    This error is returned if there is a disk write error when trying to write to a particular disk. This would generally only occur during an install of set active partition command.

  • 5 : "Disk geometry error"

    This error is returned when a read is attempted at a linear block address beyond the end of the BIOS translated area. This generally happens if your disk is larger than the BIOS can handle (512MB for (E)IDE disks on older machines or larger than 8GB in general).

  • 6 : "Attempt to access block outside partition"

    This error is returned if a linear block address is outside of the disk partition. This generally happens because of a corrupt filesystem on the disk or a bug in the code handling it in GRUB (it's a great debugging tool).

  • 7 : "Partition table invalid or corrupt"

    This error is returned if the sanity checks on the integrity of the partition table fail. This is a bad sign.

  • 8 : "No such partition"

    This error is returned if a partition is requested in the device part of a device- or full filename which isn't on the selected disk.

  • 9 : "Bad filename (must be absolute pathname or blocklist)"

    This error is returned if a filename is requested which doesn't fit the syntax/rules listed in the Filesystem Description.

  • 10 : "Bad file or directory type"

    This error is returned if a file requested is not a regular file, but something like a symbolic link, directory, or FIFO.

  • 11 : "File not found"

    This error is returned if the specified filename cannot be found, but everything else (like the disk/partition info) is OK.

  • 12 : "Cannot mount selected partition"

    This error is returned if the partition requested exists, but the filesystem type cannot be recognized by GRUB.

  • 13 : "Inconsistent filesystem structure"

    This error is returned by the filesystem code to denote an internal error caused by the sanity checks of the filesystem structure on disk not matching what it expects. This is usually caused by a corrupt filesystem or bugs in the code handling it in GRUB.

  • 14 : "Filesystem compatibility error, can\'t read whole file"

    Some of the filesystem reading code in GRUB has limits on the length of the files it can read. This error is returned when the user runs into such a limit.

  • 15 : "Error while parsing number"

    This error is returned if GRUB was expecting to read a numbur and encountered bad data.

  • 16 : "Device string unrecognizable"

    This error is returned if a device string was expected, and the string encountered didn't fit the syntax/rules listed in the Filesystem Description.

  • 17 : "Invalid device requested"

    This error is returned if a device string is recognizable but does not fall under the other device errors.

  • 18 : "Invalid or unsupported executable format"

    This error is returned if the kernel image boing loaded is not recognized as Multiboot or one of the supported native formats (Linux zImage or bzImage, FreeBSD, or NetBSD).

  • 19 : "Loading below 1MB is not supported"

    This error is returned if the lowest address in a kernel is below the 1MB boundary. The Linux zImage format is a special case and can be handled since it has a fixed loading address and maximum size.

  • 20 : "Unsupported Multiboot features requested"

    This error is returned when the Multiboot features word in the Multiboot header requires a feature that is not recognized. The point of this is that the kernel requires special handling which GRUB is likely unable to provide.

  • 21 : "Unknown boot failure"

    This error is returned if the boot attempt did not succeed for reasons which are unknown.

  • 22 : "Must load Multiboot kernel before modules"

    This error is returned if the module load command is used before loading a Multiboot kernel. It only makes sense in this case anyway, as GRUB has no idea how to communicate the presence of location of such modules to a non-Multiboot-aware kernel.

  • 23 : "Must load Linux kernel before initrd"

    This error is returned if the initrd command is used before loading a Linux kernel. Similar to the above error, it only makes sense in that case anyway.

  • 24 : "Cannot boot without kernel loaded"

    This error is returned if GRUB is told to execute the boot sequence without having a kernel to start.

  • 25 : "Unrecognized command"

    This error is returned if an unrecognized command is entered into the command-line or in a boot sequence section of a config file and that entry is selected.

  • 26 : "Bad or incompatible header on compressed file"

    This error is returned if the file header for a supposedly compressed file is bad.

  • 27 : "Bad or corrupt data while decompressing file"

    This error is returned the run-length decompression code gets an internal error. This is usually from a corrupt file.

  • 28 : "Bad or corrupt version of stage1/stage2"

    This error is returned if the install command is pointed to incompatible or corrupt versions of the stage1 or stage2. It can't detect corruption in general, but this is a sanity check on the version numbers, which should be correct.

Thanx to: erich@uruk.org

Wednesday, May 7, 2008

Geting Great Wallpapers and Themes and Much More...

The best place to get jazzy artwork and themes for ubuntu is: www.gnome-look.org

Go thru the various stuff put up, especially in the 'most downloaded' and the 'highest rated' sections.


Theme tar-balls (.tar files) can be installed by drag-dropping them to the apperance window.

Same applies for icon-themes, cursor-themes, etc


See how glamorous your computer dearest can be!!!

Friday, May 2, 2008

TOP 5 : Media Players For Linux

One of the many perks of being a Linux user is that you have plenty of excellent software to choose from. This is especially true if you are in search for an essential application like a media player because there are definitely loads of options. However, this could sometimes be a disadvantage particularly to new-to-Linux users for the reason that they could get overwhelmed with the many choices they have.

To somehow guide those who are still looking for a media player that will suit their needs, I have put together a list that I hope will help.

Amarok

Amarok is a free software music player for Linux or other varieties of Unix. It makes use of core components from the K Desktop Environment, but is released independently of the central KDE release cycle.

Amarok serves many functions rather than just playing music files. For example, Amarok can be used to organize a library of music into folders according to genre, artist, and album, can edit tags attached to most music formats, associate album art, attach lyrics, and automatically "score" music as it is played.

Here are the primary functions or uses for Amarok:
* Playing media files in various formats including but not limited to (depending on the setup) FLAC, Ogg, MP3, AAC, WAV, Windows Media Audio, Apple Lossless, WavPack, TTA and Musepack. Amarok does not play digital music files embedded with DRM.
* Tagging digital music files (currently FLAC, Ogg, WMA, AAC, MP3, and RealMedia).
* Associating cover art with a particular album, and retrieving the cover art from Amazon
* Creating and editing playlists, including smart and dynamic playlists. The dynamic playlists can use such information as the "score" given to a song by an Amarok script, and the playcount which is stored with the song.
* Synchronizing, retrieving, playing, or uploading music to the following digital music players: iPod, iriver iFP, Creative NOMAD, Creative ZEN, MTP, Rio Karma and USB devices with VFAT (generic MP3 players) support.
* Displaying artist information from Wikipedia and retrieving song lyrics.
* Last.fm support, including submitting played tracks (including those played on some digital music players) to Last.fm, retrieving similar artists, and playing Last.fm streams.
* Podcast

Rhythmbox

Rhythmbox is an audio player that plays and helps organize digital music. Originally inspired by Apple's iTunes, it is free software, designed to work well under the GNOME Desktop using the GStreamer media framework. It is currently under active development.

Playback from a variety of digital music sources is supported, excluding MIDI. The most common playback is music stored locally as files on the computer (the 'Library'). Rhythmbox supports playing streamed Internet radio and podcasts as well. The Replay Gain standard is supported.



Totem

Totem is a free software media player (audio and video) for the GNOME computer desktop environment that runs on Linux, Solaris, BSD and other Unix and Unix-like systems. It is officially included in GNOME starting from version 2.10 (released in March 2005), but de facto it was already included in most GNOME environments. The default backend is GStreamer framework but Totem can also use xine libraries. Totem is included as the default media player in many desktop Linux distributions, including Ubuntu, Mandriva Linux and others.

Thanks to a large number of plugins developed for GStreamer, Totem is able to play all mainstream media formats, both open and proprietary ones. It also understands numerous playlist formats, including SHOUTcast, M3U, XML Shareable Playlist Format (XSPF), SMIL, Windows Media Player playlists and RealAudio playlists. Playlists are easily manageable using drag-and-drop features.


VLC

VLC media player is a portable multimedia player, encoder, and streamer supporting many audio and video codecs and file formats as well as DVDs, VCDs, and various streaming protocols. It is able to stream over networks and to transcode multimedia files and save them into various different formats. VLC used to stand for VideoLAN Client, but that meaning is now deprecated.

VLC uses a large number of free decoding and encoding libraries. Many of its codecs are provided by the libavcodec codec library from the FFmpeg project, but it uses mainly its own muxer and demuxers. It also gained distinction as the first player to support playback of encrypted DVDs on Linux by using the libdvdcss DVD decryption library.

Version 0.8.6, which adds support for WMV version 9 and enhances support for H.264, was released on 10 December 2006.

MPlayer

MPlayer is a free and open source media player distributed under the GNU General Public License. The program is available for all major operating systems, including Linux and other Unix-like systems; Microsoft Windows and Mac OS X. Versions for OS/2, AmigaOS and MorphOS are also available. The Windows versions work with some minor problems, and also in DOS using HX DOS Extender. A port for DOS using DJGPP is also available.

MPlayer supports a wide variety of media formats. In addition to its wide range of supported formats MPlayer can also save all streamed content to a file.

MPlayer is a command line application that has different optional GUIs for each of its supported operating systems. Commonly used GUIs are gmplayer (the default GUI for GNU/Linux and other Unix-like systems, and Microsoft Windows), MPlayer OS X (for Mac OS X), MPUI (for Windows) and WinMPLauncher (also for Windows). Several other GUI frontends are also available for each platform.

Funny : A Message from Steve Ballmer to Ubuntu








Good day to everyone.




After two years in the making, Canonical Ltd. has announced right on cue the Long Term Support (LTS) release of Ubuntu 8.04. In behalf of Microsoft Corporation, I would like to congratulate Mark Shuttleworth and each and every Ubuntu community members who made it all possible.

Now, you might be wondering why I'm posting my message here in this mostly Linux and Open Source related blog. My friends, my answer to that is simple , " I LOVE LINUX". Yes I do. It's a secret that I've been trying to keep for so many years. And because it's a secret no more, I would like to take this opportunity to tell the whole world that I love all the Free and Open Source guys. I love Linus Torvalds, Eric S. Raymond and Jon "Maddog" Hall. I love Richard M. Stallman and his hair, and all the FOSS people that I failed to mention here, I love them all. Seriously, I want to be like them.

Let me tell you another secret. I have been using this new version of Ubuntu since yesterday. Mark sent me a very special limited edition of Ubuntu 8.04 on a Blu-ray disk, the one with a serial and activation number. And all I can tell you is this; I really adore what I'm seeing that I wanted to do the monkey dance all over again. The Wubi thing, which let you install Ubuntu inside Windows is just magnificent. I also tried the spinning cube desktop effects and was just blown away that I immediately called Mr. Gates. He told me that he's been playing with it since last year and have been wanting to implement it on the next Windows version. However, he told me that he wanted to beat Linux by putting 3 desktop cubes spinning together side-by-side. I told him that it was a bad idea. Why not put 6 cubes? Bill then told me that he'd think about it.

We all know that Windows Vista is the finest, greatest and most excellent computer operating system in the history of mankind. But after extensively using Ubuntu last night for 26 long minutes, I can say that it is a good OS. Not as superb and as breathtaking as Vista but it is good nonetheless. And because Ubuntu is a nice OS, we are offering to buy Canonical Ltd. for 999.9 Billion Dollars. Take it or leave it Mr. SpaceShuttleworth.

I won't end this message without leaving you this wonderful motto. I want you all to live and breathe with this motto and place it deep inside your heart.
"SAY NO TO PIRACY"

Thank you very much!

Sincerely,
Steve Ballmer
Microsoft, CEO


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Disclaimer: This is just a silly parody taken from the internet and should not be taken seriously. It is purely for fun and no harm is intended to anyone.
Credits: www.junauza.com

Wednesday, April 30, 2008

How to:Restore an over written GRUB boot partition:

Hi guys, sometimes when we install a fresh copy of Windows or even repair windows, the MBR gets overwritten leaving us stuck with only windows and no way to access our dah'lin linux system. Here I have tried to present a short HOWTO on how to get back your all O.S. in bootable form through grub after windows install, repair or whatever...



Step 1: Boot from a live CD

(Why: booting from a live CD puts you in a linux environment with root privileges which are needed to edit grub)

Step 2:
Execute the following in the terminal without the $ sign... $ stands for the prompt(similar to c:\> in windows)
(Applications->Accessories->Terminal )

$sudo -i

(Why: sudo -i converts the current terminal session into root session.You wont have to attach sudo before every command)

Step 3:
Execute

$grub


This will put you to the Grub shell

Step 4:
Find your previous bootable linux partition by


grub>find /boot/grub/stage1

Suppose you get:
(sd0,7)
which meens that in the drive that is referenced at sd0, the partition is the 7th partititon.
you may get different outputs of the type (disk_code,num)
so in the following steps, replace the disk_code by your actual disk code( hd0...sd0...sda... etc) and num by your partition number.
DONT BLINDLY COPY !!! :-p

Step 5:
Reset back the root partition to the original partition by executing:

grub>root (disk_code,num)

(Dont forget to substitute the values of disk_code and num )


Step 6:
Install grub starting with the MBR by executing:

grub>setup (disk_code)

This will install part of the bootloader into the MBR and the main parts into the partition where your linux is installed.
Again...Dont forget to substitute the values of disk_code and num )

Step 7:
Assuming all went well, give yourself a pat on the back as you hav just reinstalled the bootloader and stopped yourself from making the idiotic mistake of format-and-install-again-and-again.... :-)

Now for the last parts...execute

grub>exit

(Why: Simply to quit grub and go back to the main prompt for the last step)

Step 8:
Restart the system either by the graphical way (System->Shutdown->Restart ) or the terminal by executing

$reboot


easy huh???
watch out for a howto on the basics of editing the grub's menu file (menu.list).....coming soon...