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

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Forum Archive > Main Support Categories > Installation & Upgrades
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Hello, Unregistered You are browsing a READ only archive of the main support categories pre 4/21/2008. You will not be able to post or reply any threads in this section.

Installation & Upgrades
For questions about upgrading and installation of your new Ubuntu OS.

 
Thread Tools Display Modes
Old February 15th, 2008   #1
Ubun2_h8r
First Cup of Ubuntu
 
Join Date: Feb 2008
Beans: 3
Ubuntu Installation Grub error 21!!!!

Okay its been nearly a whole day now i've been trying to sort out Ubuntu so that it can work properly with no avail. After installing Ubuntu on my internal hard drive with no problems, i restarted to find an error message appear saying something along the lines of grub 1.5, error 21. I've spent all day and night looking through different forums and searching for my problems and have tried many things, all of them have failed. Now im just about ready to give up, I registered here purely because i want a way to either get Ubuntu working properly or start Windows again from scratch. Luckily, before attempting to install Ubuntu i backed up all of my personal files onto numerous external hard drives, so if it means i need to restart Windows from scratch, i am more than willing, however i don't have the Windows xp recovery Cd or a floppy disk drive.

The specs for my PC are as follows

Sony VGC RC-204 Media Edition
2x300GB SATA Hard Drives
6GB RAM
Intel Pentium D Processor.

now at this moment in time im stuck on the live cd of ubuntu and ive deleted the partitions it created (after trying to install it twice) the second time i changed the grub thing from (hd0) to (hd1)

i must stress im new to this software and i am not very familiar with command prompts etc i have guessed my way to where i am now, but after going through many forums ive started understanding the problem,

Can someone please take the time and patience to help thanks in advance.
Ubun2_h8r is offline   Reply With Quote
Old February 15th, 2008   #2
logos34
Ubuntu addict and loving it
 
logos34's Avatar
 
Join Date: Jun 2006
Beans: 7,419
Ubuntu 8.04 Hardy Heron
Re: Ubuntu Installation Grub error 21!!!!

menu.lst may be getting the root wrong. Try the suggestions here.

You might want to post your partitions. Open a terminal on the live cd and type

sudo fdisk -l

post it.
logos34 is offline   Reply With Quote
Old February 15th, 2008   #3
Herman
Ubuntu addict and loving it
 
Herman's Avatar
 
Join Date: Jul 2005
Location: Hughenden, Australia
Beans: 4,543
Ubuntu 9.04 Jaunty Jackalope
Re: Ubuntu Installation Grub error 21!!!!

Grub error 21.?

That means the hard disk you're trying to boot doesn't exist!

You should get your self a copy of Super Grub Disk and after the installation is finished, try to boot it the normal way first. If it still doesn't boot, you should be able to boot it with Super Grub Disk if it's bootable at all.

Besides being useful to boot with, Super Grub Disk will certainly give you access to GRUB's Command Line Interface which is useful for testing and experimenting to try to determine what the problem could be so we can probably fix it.

Does or did this computer have any kind of RAID at any time?
Have you checked your BIOS settings to make sure both of your hard disks are properly set up and detected in your BIOS?

Regards, Herman
Herman is offline   Reply With Quote
Old February 15th, 2008   #4
Ubun2_h8r
First Cup of Ubuntu
 
Join Date: Feb 2008
Beans: 3
Re: Ubuntu Installation Grub error 21!!!!

opened a terminal and typed sudo fdisk -l got this:



Warning: invalid flag 0x0000 of partition table 5 will be corrected by w(rite)

Disk /dev/sda: 300.0 GB, 300069052416 bytes
255 heads, 63 sectors/track, 36481 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xc1b82823

Device Boot Start End Blocks Id System
/dev/sda1 1 912 7325608+ 12 Compaq diagnostics
/dev/sda2 * 913 31307 244147837+ 7 HPFS/NTFS
/dev/sda3 31308 72961 334585755 f W95 Ext'd (LBA)

Disk /dev/sdb: 300.0 GB, 300069052416 bytes
255 heads, 63 sectors/track, 36481 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0fd93b00

Device Boot Start End Blocks Id System
/dev/sdb2 34546 36481 15550920 5 Extended
/dev/sdb5 35259 36481 9823716 82 Linux swap / Solaris
/dev/sdb6 34546 35258 5727109+ 82 Linux swap / Solaris

Partition table entries are not in disk order


no idea about the raid thing, but i checked the bios and both hard drives are detected

Last edited by Ubun2_h8r; February 15th, 2008 at 03:55 PM..
Ubun2_h8r is offline   Reply With Quote
Old February 15th, 2008   #5
Herman
Ubuntu addict and loving it
 
Herman's Avatar
 
Join Date: Jul 2005
Location: Hughenden, Australia
Beans: 4,543
Ubuntu 9.04 Jaunty Jackalope
Re: Ubuntu Installation Grub error 21!!!!

Quote:
Warning: invalid flag 0x0000 of partition table 5 will be corrected by w(rite)
I'm not sure what that means exactly, but there's a good chance that's your problem.
Herman is offline   Reply With Quote
Old February 15th, 2008   #6
Herman
Ubuntu addict and loving it
 
Herman's Avatar
 
Join Date: Jul 2005
Location: Hughenden, Australia
Beans: 4,543
Ubuntu 9.04 Jaunty Jackalope
Re: Ubuntu Installation Grub error 21!!!!


Boot your Ubuntu Live CD and open a terminal.
Do 'sudo fdisk /dev/sda'
Code:
sudo fdisk /dev/sda
It should repeat the same Warning message.

You can type 'm' after the prompt for a list of commands and what they are for.

Press 'w' to rewrite the partition table. (correctly we hope).

Reference Link: http://ubuntuforums.org/showthread.php?t=437814 thanks to Najand.

EDIT: I tested this procedure in one of my computers and it rebooted without any problems to is seems as if that command is safe enough. If anything did go wrong I think i would use TestDisk next.

Last edited by Herman; February 15th, 2008 at 04:29 PM..
Herman is offline   Reply With Quote
Old February 15th, 2008   #7
Ubun2_h8r
First Cup of Ubuntu
 
Join Date: Feb 2008
Beans: 3
Re: Ubuntu Installation Grub error 21!!!!

okay this is what happened:


ubuntu@ubuntu:~$ sudo fdisk /dev/sda

The number of cylinders for this disk is set to 36481.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 5 will be corrected by w(rite)

Command (m for help): m
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
ubuntu@ubuntu:~$

then it just stopped???
Ubun2_h8r is offline   Reply With Quote
Old February 15th, 2008   #8
Herman
Ubuntu addict and loving it
 
Herman's Avatar
 
Join Date: Jul 2005
Location: Hughenden, Australia
Beans: 4,543
Ubuntu 9.04 Jaunty Jackalope
Re: Ubuntu Installation Grub error 21!!!!

Yes, just type 'exit' to close the terminal and your problem should be fixed.

EDIT: Or type 'sudo fdisk -lu' again to make sure first, before closing the terminal.

Last edited by Herman; February 15th, 2008 at 04:57 PM..
Herman is offline   Reply With Quote
Old February 15th, 2008   #9
Discov3ry
5 Cups of Ubuntu
 
Join Date: Oct 2007
My beans are hidden!
Re: Ubuntu Installation Grub error 21!!!!

Are you setting it up as a RAID 1 setup?

Can you post /boot/grub/menu.lst?
Discov3ry is offline   Reply With Quote
Old February 15th, 2008   #10
Herman
Ubuntu addict and loving it
 
Herman's Avatar
 
Join Date: Jul 2005
Location: Hughenden, Australia
Beans: 4,543
Ubuntu 9.04 Jaunty Jackalope
Re: Ubuntu Installation Grub error 21!!!!

Hello Discov3ry
Have you seen this video: Installing Ubuntu Part2 , Ubuntu Screencasts?
It might contain something interesting for you, I don't know much about RAID.

Regards, Herman
Herman 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 01:47 PM.


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