LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 02-13-2006, 04:14 AM   #1
tijo.thomas
Member
 
Registered: Feb 2006
Location: bangalore
Posts: 34

Rep: Reputation: 15
Question 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
 
Old 02-19-2006, 05:21 AM   #2
Vampirite
Member
 
Registered: Apr 2005
Location: England
Distribution: Arch Linux
Posts: 223

Rep: Reputation: 30
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.
 
Old 02-19-2006, 09:03 AM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
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)
 
Old 02-19-2006, 09:23 AM   #4
aus9
Guru
 
Registered: Oct 2003
Posts: 5,060

Rep: Reputation: Disabled
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
su
grub
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
 
Old 02-19-2006, 09:40 AM   #5
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
Quote:
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
TOTAL 512
Depending on the method for putting grub in the mbr, you can wipe out the partition table. (eg the misuse of "dd")
 
Old 02-19-2006, 10:32 AM   #6
Vampirite
Member
 
Registered: Apr 2005
Location: England
Distribution: Arch Linux
Posts: 223

Rep: Reputation: 30
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!

Last edited by Vampirite; 02-19-2006 at 10:33 AM.
 
Old 02-20-2006, 03:03 AM   #7
tijo.thomas
Member
 
Registered: Feb 2006
Location: bangalore
Posts: 34

Original Poster
Rep: Reputation: 15
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??

--Tijo
 
Old 02-20-2006, 07:54 AM   #8
aus9
Guru
 
Registered: Oct 2003
Posts: 5,060

Rep: Reputation: Disabled
well U could read 6.2 of this http://www.tldp.org/HOWTO/Large-Disk-HOWTO-6.html and see that some errors are to be ignored...yep ignored.

then read 14.2 of this which talks about LBA and other stuff http://www.tldp.org/HOWTO/Large-Disk...14.html#ss14.4

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.
 
Old 02-20-2006, 10:49 AM   #9
crperez
LQ Newbie
 
Registered: Nov 2005
Posts: 5

Rep: Reputation: 0
Hi, I was having the same problem and step 1 worked for me. Thanks aus9!
 
Old 02-21-2006, 04:04 AM   #10
tijo.thomas
Member
 
Registered: Feb 2006
Location: bangalore
Posts: 34

Original Poster
Rep: Reputation: 15
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
 
Old 02-21-2006, 04:05 AM   #11
tijo.thomas
Member
 
Registered: Feb 2006
Location: bangalore
Posts: 34

Original Poster
Rep: Reputation: 15
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

Last edited by tijo.thomas; 02-21-2006 at 04:07 AM.
 
Old 02-21-2006, 04:46 AM   #12
aus9
Guru
 
Registered: Oct 2003
Posts: 5,060

Rep: Reputation: Disabled
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
http://www.linuxquestions.org/linux/...a_Linux_System
http://wiki.linuxquestions.org/wiki/Partition

raid types
http://wiki.linuxquestions.org/wiki/...rtition_Drives


more techo but worth the read
http://www.xs4all.nl/~lennartb/bootloaders/node3.html

Last edited by aus9; 02-21-2006 at 06:16 AM. Reason: add new link
 
Old 02-23-2006, 03:01 PM   #13
Vampirite
Member
 
Registered: Apr 2005
Location: England
Distribution: Arch Linux
Posts: 223

Rep: Reputation: 30
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.
 
Old 02-24-2006, 08:01 AM   #14
aus9
Guru
 
Registered: Oct 2003
Posts: 5,060

Rep: Reputation: Disabled
vamperite

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?
 
Old 02-24-2006, 08:44 AM   #15
SpiderIRE
Member
 
Registered: Jan 2005
Distribution: FC (Planet CCRMA Kernel)
Posts: 81

Rep: Reputation: 15
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:

C:\linux.bin="Linux"

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

-David
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Booting of raw ISO from GRUB/LILO (though preferably GRUB) Orkie Linux - Software 28 12-15-2013 10:37 PM
Booting hangs jak4u Mandriva 1 03-26-2005 03:51 AM
booting morphix for cd/ hangs on grub jlengach Linux - Software 0 09-28-2004 12:46 PM
hangs on booting yisnixslow Slackware 5 03-26-2004 11:58 AM
RH 9 hangs on booting rtzra Linux - Hardware 1 05-29-2003 06:17 AM


All times are GMT -5. The time now is 09:34 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration