You are Unregistered, please register to gain Full access.    

Go Back   PeerDen.com - The Best Damn Torrent Community! > The PeerDen.com Community > Support Forums > General Guides

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 05-24-2008, 10:37 AM

fynstee's Avatar

jing-tzahng mei yong-duh
Points: 17,674, Level: 57 Points: 17,674, Level: 57 Points: 17,674, Level: 57
Activity: 57% Activity: 57% Activity: 57%
 
Join Date: Mar 2008
Posts: 1,665
UL: 68.63 GB
DL: 11.72 GB
Ratio: 5.86
Thanks: 645
Thanked 1,425 Times in 756 Posts
Default Grub boot problems help thread

Solving Grub Boot Problems

GNU Grub boot problems usually occur due to a problem with the Master Boot Record (MBR). This is the bit that tells your PC, during boot up, where to find the operating system.

In my own experience re-installing windows on a multi-boot system has been the most common reason for this to happen, since Windows overwrites the MBR by default. But the MBR can also become corrupted on any system for a variety of reasons. For example:- improper shutdowns, errors during partitioning of your HDD or re-installation of a system back-up etc... can all potentially cause problems to even the most stable system.

Many versions of linux allow people to make rescue diskettes as part of the installation process which can help resolve situations like these. Others (like my own favourite Wolvix) are based on linux live-cd's which you can use to solve a huge variety of different problems.

But not everyone has access to their rescue media, if any was provided in the first place. So for that reason this thread includes a which you can use to boot your PC and to re-install the grub boot loader.

Grub Boot Diskette:-

The Grub.img file contains the first stages in loading the Grub boot loader.

Code:
http://rapidshare.com/files/117209225/grub.img
http://sharkysoft.com/tutorials/linuxtips/floppyimages/rawrite.exe
To copy the grub.img to floppy disc under linux insert a floppy disk, open a Terminal and type:-

dd if=/mnt/hda6/grub.img of=/dev/fd0


replacing the /mnt/hda6/ with the location of the grub.img file on your own PC.

Alternatively on windows run the DOS program rawrite to copy the grub.img file onto a pre-formatted floppy diskette.

note:- once this has been done, you will not be able to read that diskette. This is how it should be

Using your Grub Diskette


Now, boot your PC with the floppy diskette you just created. Be sure to set your PC's bios to boot from floppy disk first if it's not already.

You will be booted into a grub environment similar to the DOS environment found on many windows boot disks.

grub>


Now you need to start looking for the existing grub files on your PC. If you only have one partition this will be quite easy. Grub has it's own system for naming HDD's and partitons:-

Code:
Grub        Description

(hd0)        First storage device on first IDE cable
(hd1)        Second storage device on first IDE cable
(hd2)        First storage device on second IDE cable
(hd3)        Second storage device on second IDE cable
To denote a particular partition a comma and a further number, again starting at zero is added.
Code:
(hd0,0)        First hard disk on first IDE cable, first partition
(hd0,1)        First hard disk on first IDE cable, second partition
(hd0,2)        First hard disk on first IDE cable, third partition
So if you only have one HDD & partition it's likely to be hd0,0

You can confirm this by using the find command. This is used to find which hard disk and which partition on that hard disk certain files reside. What we are looking for are the Grub files on your hard disk. One of these files is called stage1, which should be in the /boot/grub/ folder.

Normally the find command will be :-

Quote:
grub> find /boot/grub/stage1
This will give you the hard disk name and partition that has that file, most likely (hd0,0) for most people.

However, on my PC I have a separate /boot partition, so that I have to slightly amend the find command (by removing the "/boot" folder name) :-

Quote:
grub> find /grub/stage1
When I entered the above find command, Grub returned (hd0,2)

Booting Up


Now that you know where your grub files are found you can boot into linux, or any other OS you may be using, by using the command configfile.
The configfile command loads the Grub menu (the one that you should normally get if you could boot up as usual), from where you will be able to load Linux.

Where there is no separate boot partition:-

Quote:
grub> configfile (hd0,0)/boot/grub/grub.conf
OR
Quote:
grub> configfile (hd0,0)/boot/grub/menu.lst


Try the first command using grub.conf. If this fails then your grub configuration file is likely to be called menu.lst, which is more common on newer distros/systems.

Where there is a separate boot partition:-

Quote:
grub> configfile (hd0,1)/grub/grub.conf

OR
Quote:
grub> configfile (hd0,1)/grub/menu.lst

In each case use the hard drive and partition info returned from your find command. If sucessfull you should now be able to select your Operating System and boot into it as as normal.
__________________
Why can't I download? - "leeching forbidden you are only allowed to seed"

If you have downloaded over 2GB and your ratio has dropped below 0.50 you will not be able to download.

Solutions

1) Leave a completed torrent in your client until you have uploaded enough data to bring your ratio up to 0.75
2) Upload a torrent of your own and seed until your ratio is 0.75 or higher.
3) Donate to the site and gain Premium membership


Please let me know if my torrent or links are dead

Last edited by fynstee : 05-24-2008 at 10:40 AM.
Reply With Quote
Sponsored Links
  #2  
Old 05-24-2008, 10:56 AM

fynstee's Avatar

jing-tzahng mei yong-duh
Points: 17,674, Level: 57 Points: 17,674, Level: 57 Points: 17,674, Level: 57
Activity: 57% Activity: 57% Activity: 57%
 
Join Date: Mar 2008
Posts: 1,665
UL: 68.63 GB
DL: 11.72 GB
Ratio: 5.86
Thanks: 645
Thanked 1,425 Times in 756 Posts
Default

Reinstalling Grub

There is more than one way to re-install grub, you can do it from a Terminal now you have managed to boot into linux. Your distro may have a specific tool for re-installing grub (mine does ;p). But I'll detail how to do it using just the grub diskette used in the first post of this thread.

You already have just about all the info you need now to re-install grub . It's just a matter of booting from the grub diskette and typing in a few commands:-

Quote:
grub> root (hd0,0)
Quote:
grub> install /boot/grub/stage1 (hd0) /boot/grub/stage2 p /boot/grub/menu.lst
root (hd0,0) uses the same hard drive and partition info we received from the find /boot/grub/stage1 command in the above post. It is the location of your grub files.

If you have a separate /boot partition you will need to change the second line to:-

Quote:
grub> install /grub/stage1 (hd0) /grub/stage2 p /grub/menu.lst
The (hd0) is the HDD your grub files are on without the partition info. So is just hd0 in this case, rather than hd0,0 or hd0,1 etc

Also you may need to change the menu.lst to grub.conf depending on which your distro uses to store your grub configuration.

If successful these two lines will have re-installed grub and you can type reboot to test it. Remove your grub diskette and see if your system boots up normally from now on.
Reply With Quote
  #3  
Old 05-24-2008, 11:00 AM

fynstee's Avatar

jing-tzahng mei yong-duh
Points: 17,674, Level: 57 Points: 17,674, Level: 57 Points: 17,674, Level: 57
Activity: 57% Activity: 57% Activity: 57%
 
Join Date: Mar 2008
Posts: 1,665
UL: 68.63 GB
DL: 11.72 GB
Ratio: 5.86
Thanks: 645
Thanked 1,425 Times in 756 Posts
Default

Grub Error messages :-

1 : Filename must be either an absolute filename or blocklist

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

2 : 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.

3 : Bad or corrupt data while decompressing file

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

4 : Bad or incompatible header in compressed file

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

5 : 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.

6 : Mismatched or corrupt version of stage1/stage2

This error is returned if the install command points 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.


7 : 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.

8 : Kernel must be loaded before booting

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

9 : Unknown boot failure

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

10 : 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 probably unable to provide.

11 : Unrecognized device string

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


12 : Invalid device requested

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

13 : Invalid or unsupported executable format

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

14 : Filesystem compatibility error, cannot 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 : File not found

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

16 : 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.

17 : Cannot mount selected partition

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

18 : Selected cylinder exceeds maximum supported by BIOS

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).

19 : Linux kernel must be loaded before initrd

This error is returned if the initrd command is used before
loading a Linux kernel.

20 : Multiboot kernel must be loaded 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
such modules to a non-Multiboot-aware kernel.

21 : Selected disk does not exist

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

22 : No such partition

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

23 : Error while parsing number

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

24 : 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).

25 : 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.

26 : Too many symbolic links

This error is returned if the link count is beyond the maximum
(currently 5), possibly the symbolic links are looped.

27 : Unrecognized command

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

28 : Selected item cannot fit into memory

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

29 : 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.

30 : Invalid argument

This error is returned if an argument specified to a command is
invalid.

31 : File is not sector aligned

This error may occur only when you access a ReiserFS partition by
block-lists (e.g. the command `install'). In this case, you should
mount the partition with the `-o notail' option.

32 : Must be authenticated

This error is returned if you try to run a locked entry. You should
enter a correct password before running such an entry.

33 : Serial device not configured

This error is returned if you try to change your terminal to a
serial one before initializing any serial device.

34 : No spare sectors on the disk
This error is returned if a disk doesn't have enough spare space.
This happens when you try to embed Stage 1.5 into the unused
sectors after the MBR, but the first partition starts right after
the MBR or they are used by EZ-BIOS.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Internet problems with Virgin Media AKA Blueyonder / Telewest fynstee General Support 3 04-26-2008 08:38 PM
Can the church really help with problems? Demonmonkey Humor 3 04-13-2008 02:36 AM



All times are GMT. The time now is 10:07 PM.


Powered by vBulletin®.
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.