-   Linux - Software (
-   -   GRUB hangs on booting (

tijo.thomas 02-13-2006 03:14 AM

GRUB hangs on booting
Hi All,

Here I am facing a problem with GRUB. The problem is that when i boot up my machine, grub hangs saying as "GRUB". It does not come up showing the boot loader. Then I found that the problem lies with the parition table. I went with the rescue mode and found that my partition table has become odd.. Following is the output of my fdisk command..Can somebody tell me how resolv this problem..??

Device Boot Start End Blocks Id System
/dev/hda1 * 1 26 102406 83 Linux
Partition 1 has different physical/logical endings:
phys=(12, 191, 63) logical=(25, 51, 63)
Partition 1 does not end on cylinder boundary.

phys=(12, 191, 63) should be (12, 127, 63)
/dev/hda2 26 156 524317+ 82 Linux swap
Partition 2 has different physical/logical beginnings (non-Linux?):
phys=(12, 192, 1) logical=(25, 52, 1)
Partition 2 has different physical/logical endings:
phys=(78, 6, 63) logical=(155, 56, 63)
Partition 2 does not end on cylinder boundary.

phys=(78, 6, 63) should be (78, 127, 63)
/dev/hda3 156 508 1421343 83 Linux
Partition 3 has different physical/logical beginnings (non-Linux?):
phys=(78, 7, 1) logical=(155, 57, 1)
Partition 3 has different physical/logical endings:
phys=(254, 248, 63) logical=(507, 122, 63)
Partition 3 does not end on cylinder boundary.

phys=(254, 248, 63) should be (254, 127, 63)

Appreciate your help,
Tijo Thomas

Vampirite 02-19-2006 04:21 AM

YES! That happened to me! I installed FreeBSD 6.0 and it messed up my partitions, thing is, every partition and GRUB works, but I have the "Partition 1 does not end on cylinder boundary" error. I do not want to repartition my system incase I lose all my data.

I really need help on this.

pixellany 02-19-2006 08:03 AM

Does not seem like a GRUB issue....I would infer that GRUB hangs because it cannot get to the files it needs---that in turn is (maybe) because there is an issue with the partition tables.
First, do not do ANYTHING to this disk that might overwrite you data. The data may well be recoverable.
Please describe your actions leading up to this---ie what did you do that might have mucked up the partition table(s)

aus9 02-19-2006 08:23 AM

yep there are lots of partition table issues some important and others not.

1 boot a live cd and see if you can click on your partitions after loading kanotix or knoppix etc if you can no problemo

then if ONE is ok..... no harm is done by re-installing grub into mbr and mbr is only a separate 512 byte file at beginning of hard drive that contains a bootloader and does not change your partition table.....using kanotix or knoppix open a terminal and its your commands
root (hdX,y) as per my tut...where is /boot partition
setup (hd0)

if 1 fails then you may need to rescue your partition table

2....not sure what distro cd you used for rescue mode......they are often just a bunch of tools....some even allow ntldr back into mbr

3 Next time consider backing up your partition table using the dd command or partimage....assuming 1 was ok

pixellany 02-19-2006 08:40 AM


Originally Posted by aus9
then if ONE is ok..... no harm is done by re-installing grub into mbr and mbr is only a separate 512 byte file at beginning of hard drive that contains a bootloader and does not change your partition table.....

This is an acknowledged nitpick:
the mbr is 446 bytes
partition table 64 bytes
"signature" 2 bytes
Depending on the method for putting grub in the mbr, you can wipe out the partition table. (eg the misuse of "dd")

Vampirite 02-19-2006 09:32 AM

I have all my partitions perfect, my Windows 98 one first Primary, then in an Extended, 3 data partitions, Linux Swap, then Linux Root.

The MBR and GRUB works fine, But I have this unused space at the end of all, and the extended reports the "Partition 1 does not end on cylinder boundary" problem.

I would just backup all of my data and format and repartition the whole thing, but I haven't got the time, space and media to do this.

I haven't formatted the data drives since 2000 or something!

I need a way to fix this without destroying data, all partitioning programs crash, only fdisk and cfdisk work!

tijo.thomas 02-20-2006 02:03 AM

This happens on my Virtual Machine which is a migrated or cloned from another. The source VM is installed with RHEL (min packages) which works fine and the partition table is perfect. This VM is migrated to another virtualization layer and then the migrated Virtual machine gets this problem.

This does not happen if the migrated VM is migrated from the source with default packages. And so probably, the package which handle the partitioning is missing there in the above case.

One possible way of solution is by rebuilding the partition table or find the correct rpms required for this..Anybody can help me out in this??


aus9 02-20-2006 06:54 AM

well U could read 6.2 of this and see that some errors are to be ignored...yep ignored.

then read 14.2 of this which talks about LBA and other stuff

then you have to troubleshoot and decide if it was a grub error or some other error.

pretending you are committed to this scheme that you want perfectly aligned boundaries....consider that if you do use a tool to correct it (if it needed it) then you will have to re-install your stuff or use images to put on to the new partitions.

plse advise if you have done my request and used a live cd or not....if you wish to ignore me thats fine with me.

crperez 02-20-2006 09:49 AM

Hi, I was having the same problem and step 1 worked for me. Thanks aus9!

tijo.thomas 02-21-2006 03:04 AM

Vampirite.. I think you can use fdisk in your case. How is your disk partitioned? Is your first partition, a boot partition? If yes, then you can resolv this..

Make a backup of /boot. Then type fdisk -l /dev/hda. Mention the correct parameter to delete the partition. Create a new one with correct CHS. Asssign a Bootable Flag if it is /boot. Format it using mkfs. Restore back your backup. Hope this works..It did worked for me..


tijo.thomas 02-21-2006 03:05 AM

Hi aus9..That's a pretty cool stuff..Can you please let me know some more articles on CHS, MBR.. I mean more on Basics

aus9 02-21-2006 03:46 AM

there is no such thing as a dumbed down article of any use so you have to umm read lots and cut the chaff, heh heh

try these

raid types

more techo but worth the read

Vampirite 02-23-2006 02:01 PM

Ok, it was actually partition 2, which is my extended partition and which contains my data partitions (and linux one).

Today, I tried to resolve this, in cfdisk I had some free space between the extended and primary, thinking this might be a problem, I created a partition and formatted it as ext2 but it didn't make a difference.

aus9 02-24-2006 07:01 AM


I do not use the bsd slices way of partition so can not help you directly.

how much unused space are you concerned about?

can you still boot all you want?

are you short of disk space?

(2) there is a known issue with MS....sorry that likes to use hidden sectors which may be reported as free space but not much not much ok?

SpiderIRE 02-24-2006 07:44 AM

I haven't had time to read all the things mentioned before so this mightn't help, but i had the same problem last week when i re-set my laptop to dual boot and i solved it by reinstalling grub (this allowed me to boot into Linux)! and then ran the dd command (so that i could boot into windows as well):

dd if=/dev/hda2 of=/dev/hda1/linux.bin bs=512 count=1

then added this line to my boot.ini file:


This worked just fine for me! But you might have to change the hd* part to suit yourself!


All times are GMT -5. The time now is 08:41 PM.