Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Ubuntu 9.10 is out!!!

When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu.

The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely.

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

 
Thread Tools Display Modes
Old October 30th, 2004   #1
jdong
Ultimate Coffee Grinder
 
jdong's Avatar
 
Join Date: Oct 2004
Location: Cambridge. MA
Beans: 5,063
Ubuntu 8.10 Intrepid Ibex
FAQ: MY system froze at GRUB!

Symptoms
After a Ubuntu install (especially on a dual-boot-with-Windows system), your system will boot to the words GRUB, then freeze shortly thereafter.

After a Ubuntu install on a Dual-boot, Windows freezes while trying to boot

Cause
This is due to a difference in hard disk geometry. Windows uses CHS (Cylinder/Head/Sector) numbering for drives in its partition table, while Linux 2.6.x uses LBA (Logical Block Addressing) mode. Linux will write its info in LBA, which windows couldn't read, thus the system freezes. In addition, you may get "mixed" chs and lba, which'll make grub freeze quite effectively!

Fix

Download the System rescue CD at http://www.sysresccd.org
-or-
Use Knoppix, Kanotix, or your favorite LiveCD that has the sfdisk command and grub.


1. Boot the liveCD
2. Run sfdisk -d /dev/hda | sfdisk --no-reread -H255 /dev/hda.
3. Run grub-install (hd0) to reinstall GRUB.
4. Reboot!
jdong is offline   Reply With Quote
Old October 31st, 2004   #2
josel
5 Cups of Ubuntu
 
josel's Avatar
 
Join Date: Oct 2004
Location: Denmark
Beans: 27
Re: My system's frozen at a GRUB prompt!

Could this maybe explain the following problem i have on a laptop?

Try 1) Windows installed as only system. Therafter i resize the disk with qtparted and install ubuntu with no problems. When i try to boot, Grub hangs on "stage 1_5 install". I dont even get a prompt.

Try 2) All partitions are wiped out and i install ubunto. Everything works OK. Thereafter i install Windows (intending to use systemrescuecd to fix grub thereafter)... it installs OK but i cannot boot neither XP nor ubuntu. REstoring grub does not help.
Im only capable of booting from the XP cd if there is unformatted diskspave left. if i have an ext3 and ntfs partition the cd will not boot (i find this weird).

I have tryed other combinations with no succes, so if someone recognises the symptoms i have and has had succes with the above solution i will give it another try , or else its XP on that laptop
josel is offline   Reply With Quote
Old October 31st, 2004   #3
jdong
Ultimate Coffee Grinder
 
jdong's Avatar
 
Join Date: Oct 2004
Location: Cambridge. MA
Beans: 5,063
Ubuntu 8.10 Intrepid Ibex
Re: My system's frozen at a GRUB prompt!

Quote:
Originally Posted by josel
Could this maybe explain the following problem i have on a laptop?

Try 1) Windows installed as only system. Therafter i resize the disk with qtparted and install ubuntu with no problems. When i try to boot, Grub hangs on "stage 1_5 install". I dont even get a prompt.

Try 2) All partitions are wiped out and i install ubunto. Everything works OK. Thereafter i install Windows (intending to use systemrescuecd to fix grub thereafter)... it installs OK but i cannot boot neither XP nor ubuntu. REstoring grub does not help.
Im only capable of booting from the XP cd if there is unformatted diskspave left. if i have an ext3 and ntfs partition the cd will not boot (i find this weird).

I have tryed other combinations with no succes, so if someone recognises the symptoms i have and has had succes with the above solution i will give it another try , or else its XP on that laptop
Sounds like this will fix it. It's a safe procedure, unless your partition table is so borked that fdisk can't interpret it.
jdong is offline   Reply With Quote
Old November 2nd, 2004   #4
josel
5 Cups of Ubuntu
 
josel's Avatar
 
Join Date: Oct 2004
Location: Denmark
Beans: 27
Re: HOWTO: My system's frozen at a GRUB prompt!

Well, i took a different aproach and tryed with a Knoppix harddisk install intending to upgrade it to debian unstable. I was surprised that writing the bootmanager to mbr didnt cause any problems. So now i can boot both Windows and Knoppix. Knoppix 3.6 installed LILO and i had previously tryed with LILO from Ubuntu with no success.

Has my laptop triggered a bug in the Ubuntu installer?

I use a Fujitsu Siemens Amilo 1425 with XP Home.
josel is offline   Reply With Quote
Old November 2nd, 2004   #5
jdong
Ultimate Coffee Grinder
 
jdong's Avatar
 
Join Date: Oct 2004
Location: Cambridge. MA
Beans: 5,063
Ubuntu 8.10 Intrepid Ibex
Re: HOWTO: My system's frozen at a GRUB prompt!

No, it's more of a Linux 2.6/Windows interaction. Knoppix uses kernel 2.4. LiLO seems less affected by this bug; even with an inconsistent partition table it'll boot.
jdong is offline   Reply With Quote
Old November 3rd, 2004   #6
Verlager
5 Cups of Ubuntu
 
Join Date: Nov 2004
Beans: 34
This didn't work...

These are the instructions?

1. Boot the liveCD (ok)

2. Run sfdisk -d /dev/hda | sfdisk --no-reread -H255 /dev/hda.
[OK, but it asks for the --force option because it considers the params to be out of bounds and/or rediculous]

3. Run grub-install (hd0) to reinstall GRUB.

This is the correct syntax? ---> grub-install (hd0)

I don't believe that. I never heard of parenthesis on a Linux command line. What is the real syntax, assuming installing to hd0?

4. Reboot!
Verlager is offline   Reply With Quote
Old November 6th, 2004   #7
jdong
Ultimate Coffee Grinder
 
jdong's Avatar
 
Join Date: Oct 2004
Location: Cambridge. MA
Beans: 5,063
Ubuntu 8.10 Intrepid Ibex
Re: This didn't work...

Quote:
Originally Posted by Verlager
These are the instructions?

1. Boot the liveCD (ok)

2. Run sfdisk -d /dev/hda | sfdisk --no-reread -H255 /dev/hda.
[OK, but it asks for the --force option because it considers the params to be out of bounds and/or rediculous]

3. Run grub-install (hd0) to reinstall GRUB.

This is the correct syntax? ---> grub-install (hd0)

I don't believe that. I never heard of parenthesis on a Linux command line. What is the real syntax, assuming installing to hd0?
Yes, those are the instructions. Sometimes you need the force option, but not always.

Yes, #3 is correct. Please read the man page for grub-install. Quoted:

Quote:
INSTALL_DEVICE can be a GRUB device name or a system device filename.
jdong is offline   Reply With Quote
Old November 7th, 2004   #8
Verlager
5 Cups of Ubuntu
 
Join Date: Nov 2004
Beans: 34
ooops!

Quote:
Originally Posted by jdong
Symptoms
After a Ubuntu install (especially on a dual-boot-with-Windows system), your system will boot to the words GRUB, then freeze shortly thereafter.

Fix

Download the System rescue CD at http://www.sysresccd.org
-or-
Use Knoppix, Kanotix, or your favorite LiveCD that has the sfdisk command and grub.

1. Boot the liveCD
2. Run .
3. Run grub-install (hd0) to reinstall GRUB.
4. Reboot!
Note that there are two parts to the sfdisk cli: sfdisk -d /dev/hda | sfdisk --no-reread -H255 /dev/hda Where does the --force option go?

Also, after: Run sfdisk -d /dev/hda | sfdisk --no-reread -H255 /dev/hda

I ran: cfdisk /dev/hda

I got an error message:

Fatal error: Bad primary partition 1: partition ends in the final partition cylinder.
Press any key to exit cfdisk.


and grub-install (hd0)
just gave an wonderful error message zsh: unknown file attribute in the latest System Rescue CD (a gentoo subset, I believe)
__________________
PLEASE do not offer assistance unless you know the answer to be reasonably correct. A few mis-typed chars can break an install and drop-kick the user back into the Stone Age for hours. We can make ubuntu stronger by making our forum answers as complete and definitive as possible, so that others may confidently refer to them.
Verlager is offline   Reply With Quote
Old November 7th, 2004   #9
jdong
Ultimate Coffee Grinder
 
jdong's Avatar
 
Join Date: Oct 2004
Location: Cambridge. MA
Beans: 5,063
Ubuntu 8.10 Intrepid Ibex
Re: FAQ: MY system froze at GRUB!

Force goes in the second half of the command.
jdong is offline   Reply With Quote
Old November 23rd, 2004   #10
HungSquirrel
Ubuntu Extra Shot
 
HungSquirrel's Avatar
 
Join Date: Oct 2004
Location: Mobile, AL, USA
Beans: 336
Ubuntu 8.10 Intrepid Ibex
Send a message via AIM to HungSquirrel Send a message via MSN to HungSquirrel
Re: FAQ: MY system froze at GRUB!

After trying this FAQ, I believe the correct syntax is grub-install hd0, without the parentheses.

At any rate, I have had no luck fixing GRUB. I simply need to re-install it so I can boot Ubuntu again. (I installed Windoze on my Fat partition so I could play HL2, and of course NTLDR was happy to overwrite GRUB.)

When I issue the grub-install command in a root shell on Knoppix 3.4, I get the following:

Code:
root@ttyp0[knoppix]# grub-install hd0
mkdir: cannot create directory `/boot/grub': Read-only file system
Same if I give it a Unix device name.

Code:
root@ttyp0[knoppix]# grub-install /dev/hda
mkdir: cannot create directory `/boot/grub': Read-only file system
It is trying to rebuild a /boot dir on the Knoppix CDROM, which of course it cannot do.

I have tried chrooting into my Ubuntu install, but doing grub-install that way gave me other errors.

Code:
root@ttyp0[knoppix]# chroot /mnt/hdb3 /bin/bash
root@Knoppix:/ # grub-install /dev/hda
/sbin/grub-install: line 1: sort: command not found
/sbin/grub-install: line 1: uniq: command not found
/sbin/grub-install: line 1: expr: command not found
/sbin/grub-install: line 429: /dev/null: Permission denied
/sbin/grub-install: line 431: /dev/null: Permission denied
Those binaries are located in /usr, but for some reason I was not allowed to mount my /usr in the chrooted shell.

Code:
root@Knoppix:/ # mount /usr
mount: block device /dev/hdb5 is write-protected, mounting read-only
mount: cannot mount block device /dev/hdb5 read-only
It does this even though the partitions are not mounted according to Knoppix's /etc/mtab.

I've tried everything I can think of. I seek help from someone much smarter than I.


Edit: fixed, with an unbelievably complicated mount. I booted the Ubuntu install disk, and after my partitions had been detected, switched to tty2 and did the following:

Code:
mkdir foo
mount /dev/ide/host0/bus0/target1/lun0/part3 foo
chroot foo /bin/bash
mount /usr
grub-install /dev/hda
/dev/ide/host0/bus0/target1/lun0/part3 is /dev/hdb3 in normal Linux land. That's the most confusing device name I have ever seen.
__________________
$ whatis themeaningoflife
themeaningoflife: not found

Last edited by HungSquirrel; November 23rd, 2004 at 12:39 AM..
HungSquirrel is offline   Reply With Quote

Bookmarks

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

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

Forum Jump


All times are GMT -4. The time now is 10:43 AM.


vBulletin ©2000 - 2009, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry