LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-19-2009, 11:19 AM   #1
Yves Parmentier
LQ Newbie
 
Registered: Jun 2009
Posts: 23

Rep: Reputation: 15
Error 21


I have a fixed hard disk on which there are two DOS partitions, C: and D:
On partition D: Windows 2000 Professional SP4. is installed.
I have a usb hard disk F: (160 GB) on which I installed, with a live CD, Ubuntu Linux. I made three partitions on the sdc disk:
- primary partition "/" of 10 GB;
- a primary swap partition of 1GB;
- a "/home" partition of 70 GB.
The remaining space on this hard disk contained data from Windows 2000.

All went well up to the reboot.
I could no longer choose to boot either with Windows 2000 or Ubuntu.
Grub started immediately and I received following message: "Grub 1.5 loading please wait" and immediately thereafter "Error 21" and the system got stuck.

I could not reaccess my fixed hard disks C: and D: by trying to reboot with the setup disk of Windows 2000 (trying to make a new setup of Windows).
The setup got stuck.

Now I am working with the live CD which, fortunately, could boot, but I cannot access my e-mails (in Outlook)nor my other Windows-based programs.

I am desperate.
 
Old 06-19-2009, 11:31 AM   #2
amani
Senior Member
 
Registered: Jul 2006
Location: Kolkata, India
Distribution: Debian 64-bit GNU/Linux, Kubuntu64, Fedora QA, Slackware,
Posts: 2,766

Rep: Reputation: Disabled
Boot the system with the Ubuntu CD with your external drive on

Install grub to /dev/sda (the internal hard disk)
in rescue mode


#grub-install /dev/sda
 
Old 06-19-2009, 12:04 PM   #3
Yves Parmentier
LQ Newbie
 
Registered: Jun 2009
Posts: 23

Original Poster
Rep: Reputation: 15
I do not know how to enter commands in linux.
I know, though, that my fixed hard disk C: is sda, the D: partition with Windows 2000 on it, is sdb.

I do not want any changes to my internal hard disks C: and D:

Will what you ask me to do, not affect my Windows partitions?
 
Old 06-19-2009, 12:46 PM   #4
NeddySeagoon
Gentoo support team
 
Registered: May 2009
Location: 56N 3W
Distribution: Gentoo
Posts: 178

Rep: Reputation: 40
Yves Parmentier,

Quote:
I know, though, that my fixed hard disk C: is sda, the D: partition with Windows 2000 on it, is sdb.
Maybe not. Grub uses the BIOS detection order for hard drives and that can be affected by the boot order.
Some BIOSes report the boot drive as (hd0) to grub, regardless of which drive it actually is.

The kernel does its own detection. Usually, USB devices are detected after PCI, mostly because root is mounted before USB is started.

As you have grub installed, where is it?
On the external drive or one of the internal drives?

I suspect your system will boot straight into Windows if you unplug the USB device.

Error 21 means that Grub cannot find the drive or partition its looking for. In this case, wherever your Linux /boot is. From this I conclude that your BIOS has renumbered your USB drive to be (hd0) to grub but when you installed grub it appeared to be (hd2). Now its looking on (hd2) for /boot and can't find it.

Knowing the content of your /boot/grub/device.map may help. Grub writes this file when its installed to the MBR showing how your drives were numbered. In situations such as this, you may edit it and tell grub to use it during the install, rather than the discovered device order, which can change.

We also need to know which MBR grub is installed on.
 
Old 06-20-2009, 02:26 AM   #5
Yves Parmentier
LQ Newbie
 
Registered: Jun 2009
Posts: 23

Original Poster
Rep: Reputation: 15
Error 21

I will need some time to find the answer to your questions since I am not familiar with linux.
I have tried a reboot with the usb drive, on which Ubuntu is installed, but the system booted with grub and the error 21, was the result.
I post you a thread when I'm ready.
Thanks in advance for the help
 
Old 06-20-2009, 07:45 AM   #6
Yves Parmentier
LQ Newbie
 
Registered: Jun 2009
Posts: 23

Original Poster
Rep: Reputation: 15
Grub is in the folder "boot" of my usb hard drive (17GB) which at installation had the name "sdc".
The "device.map" contains the following:
(hd0) /dev/sda
(hd1) /dev/sdb
(hd2) /dev/sdc

Where can I find on which MBR grub is installed?
 
Old 06-20-2009, 10:19 AM   #7
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 7,281

Rep: Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381
In your first post, you indicate you have two windows partitions on "a fixed hard disk" and that you have windows 2000 Professional SP4 installed on the "D" partition. Later in this post you indicate you cannot access your "fixed hard disks C: and D. My question is, how many actual physical hard drives do you have? Are you talking about two separate physical hard drives for windows or one hard drive with two partitions?

The Error 21 for Grub is: 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.

This usually indicates Grub is looking for bootloader files on a partition that doesn't exist, a drive not connected or labelled incorrectly in the /boot/grub/menu.lst file.

Do you know how to access a command prompt in Ubuntu? You should have an icon somewhere that says terminal or konsole. I think Ubuntu has a System tab at the top of the screen. Look for it there. If you find it, it would be helpful if you could give us your actual partition information using this command: sudo fdisk -l (lower case Letter L), post that output here. Also, as sudo, access the /boot/grub/menu.lst file and post here. sudo cat /boot/grub/menu.lst.

If you installed Grub to the master boot record of the external drive, you should be able to boot Ubuntu and or windows if the drive is connected and set to first boot priority in the BIOS.

If you installed Grub to the master boot record of you internal drive and do not have the external connected, you likely won't be able to boot anything until you make some changes.
 
Old 06-23-2009, 01:28 AM   #8
Yves Parmentier
LQ Newbie
 
Registered: Jun 2009
Posts: 23

Original Poster
Rep: Reputation: 15
error 21

I have, indeed one internal hard drive with two DOS-partitions C: and D:.
I have also the usb-disk F:.

I tried to modify the boot order, with the system running on the live CD.
When I tried to save the modified grub-file, the message was that I had no permissions to save.

Then I tried to reinstall Ubuntu on drive F:, the partitions on C: and D: being left as they were.
All went well up to about 95% of the setup, when suddenly the setup was interrupted. I fell back on the home window.
I looked at the F: disk and saw that all my windows data on this disk had disappeared.
There was no longer a boot map, nor a grub map on this disk. The disk was empty.

I tried, from my Windows 2000 CD to reinstall Windows (new install), since I could not boot with Windows.
The setup procedure started and erased the Windows files.
The setup procedure rebooted, with the intention to resume the installation procedure.
But it did not resume, it wanted to start again with the setup.
So, my Windows 2000 is gone from my harddisk (C: and D

When I reboot without the live CD, I get error 21.
When I reboot with Windows CD I am entering a setup, which does not work.
When I boot with the Ubuntu live CD, I can work.
But, I need to be able to boot with Windows.
How can I get rid of this error 21 message?
 
Old 06-23-2009, 01:56 AM   #9
Yves Parmentier
LQ Newbie
 
Registered: Jun 2009
Posts: 23

Original Poster
Rep: Reputation: 15
error 21

I have, indeed one internal hard drive with two DOS-partitions C: and D:.
I have also the usb-disk F:.

I tried to modify the boot order, with the system running on the live CD.
When I tried to save the modified grub-file, the message was that I had no permissions to save.

Then I tried to reinstall Ubuntu on drive F:, the partitions on C: and D: being left as they were.
All went well up to about 95% of the setup, when suddenly the setup was interrupted. I fell back on the home window.
I looked at the F: disk and saw that all my windows data on this disk had disappeared.
There was no longer a boot map, nor a grub map on this disk. The disk was empty.

I tried, from my Windows 2000 CD to reinstall Windows (new install), since I could not boot with Windows.
The setup procedure started and erased the Windows files.
The setup procedure rebooted, with the intention to resume the installation procedure.
But it did not resume, it wanted to start again with the setup.
So, my Windows 2000 is gone from my harddisk (C: and D

When I reboot without the live CD, I get error 21.
When I reboot with Windows CD I am entering a setup, which does not work.
When I boot with the Ubuntu live CD, I can work.
But, I need to be able to boot with Windows.
How can I get rid of this error 21 message?
 
Old 06-23-2009, 09:21 AM   #10
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 7,281

Rep: Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381
You indicate you have an internal and one external drive and you refer to drives sda, sdb and sdc. Each of these refers to a physical hard drive. If you have only two physical hard drives, you should not have and "sdc". The partitions are indicated by numbers. Your first partition with the C and D partitions would be sda1 and sda2 if they are on the same drive.

Using the Live CD, open a terminal and type: sudo fdisk -l (lower case Letter L) and post the output. Also from the terminal run the commands:

sudo grub (should give you a Grub prompt: grub>)
here type: geometry (hd0)
geometry (hd1)

post the output.

If you have a windows installation CD, you should have a Recovery option and if you select that you should be able to enter: fixmbr, or fixboot to repair your mbr.

Last edited by yancek; 06-23-2009 at 09:26 AM.
 
Old 06-23-2009, 11:25 AM   #11
Yves Parmentier
LQ Newbie
 
Registered: Jun 2009
Posts: 23

Original Poster
Rep: Reputation: 15
error 21

I entered the commands.

This is what I finally got on the screen:

grub> geometry (hd0)
drive 0x80: C/H/S = 1027/255/63, The number of sectors = 16514064, /dev/sda
Partition num: 0, Filesystem type unknown, partition type 0x7
Partition num: 4, Filesystem type unknown, partition type 0x7

grub> geometry (hd1)
drive 0x81: C/H/S = 4899/84/19, The number of sectors = 7819264, /dev/sdb
Partition num: 0, Filesystem type is fat, partition type 0xc


What next?
 
Old 06-23-2009, 01:08 PM   #12
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 7,281

Rep: Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381
The results of the geometry commands you posted show you have two windows partitions on the first hard drive and a FAT (windows) partition on the second drive. You don't have any Linux partitions?

When I reboot without the live CD, I get error 21.

Just guessing here because I don't know what you did. From your earlier post, it seems you tried to install Ubuntu? The grub geometry output shows no Linux partitions. Grub installs a small file in the master boot record (as do all boot loaders) and the rest of the boot files are on the partition it points to. In your case, the Ubuntu partition. Since you don't have any Ubuntu partition, it won't boot.

Run the fdisk -l command I suggested in my last post and post the output. It seems your installation of Ubuntu didn't work. The geometry output shows two drives yet you referred earlier to sdc which would have been a third drive. Did you have another drive attached (usb stick?) when you did the installation?

Do you have your windows installation CD? Have you tried the fixmbr or fixboot commands from the Recovery option with your windows CD? I don't use windows but I expect if you google 'recover xp mbr' or something similar you should find info you need.
 
Old 06-23-2009, 05:04 PM   #13
NeddySeagoon
Gentoo support team
 
Registered: May 2009
Location: 56N 3W
Distribution: Gentoo
Posts: 178

Rep: Reputation: 40
Yves Parmentier,

Your partition tables look a little odd but they must be your internal drives as no Linux partitions are present. Thats as to be expected as you installed Linux on your external drive.

Can your redo the experiment with the external drive connected please.
 
Old 06-24-2009, 03:06 AM   #14
Yves Parmentier
LQ Newbie
 
Registered: Jun 2009
Posts: 23

Original Poster
Rep: Reputation: 15
error 21

What do you mean with posting the output?
I entered the commands you indicated, but had only the results that I sent you and the grub> command.

I had, indeed a usb-stick attached. Sorry if this complicates the things.

When I tried, without success, to reinstall Ubuntu, 85% of the setup was done. It stopped and rebooted automatically after setup of the "time" settings.
Booting without the live CD gave error 21.
Then I booted with the live CD
When I then looked at my usb-harddisk, I found on it:
name: 158,5 Gb
9,5 GB used, file system ext 3
135,8 Cb free and, 13,2 Gb qualified as "some unreadable"

I have the installation CD of Windows, but after a reboot the setup blocks.

Whenever I try something the usb-harddisk is plugged into the PC.
 
Old 06-24-2009, 11:04 AM   #15
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 7,281

Rep: Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381
Quote:
I have the installation CD of Windows, but after a reboot the setup blocks.
I'm not sure what that means? When you use your windows installation CD, you should have an option to go into recovery mode, or type 'R' and then enter the commands to 'fixmbr' or 'fixboot'.

From your recent posts, your Ubuntu installation was not successful and you won't be able to use Grub to boot.
 
  


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
Sendmail: eocket wedge , 504 error , dsn error, mail relay connection error djcs Debian 0 03-03-2009 12:41 AM
PHP Error Parse error: parse error, unexpected $ in /home/content/S/k/i/SkinCare4U/h CowanServices Programming 2 12-09-2008 08:26 PM
Inkscape compilation error: *** [extension/internal/pdfinput/pdf-parser.o] Error 1 w1k0 Slackware 12 10-25-2008 09:53 AM
Suse CUPS error: cups(File)DoRequest error:client-error-bad-request smdonelan Linux - Hardware 6 04-17-2007 06:46 PM
updating new installation of 9.3 ERROR...ERROR...ERROR Morbid SUSE / openSUSE 3 08-15-2005 11:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:22 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration