dual boot gone wrong, error 21, can't boot from either Hard drive

Asked by P. Russell Straddler

Hiya

Newbie here.

What I'm trying to achieve: A dual boot scenario where I am asked if I want to use windows or Ubuntu upon starting the computer up

What steps I took: I attempted a "dual boot" (XP and Ubuntu.)

Ubuntu chose my other hard drive (WD My book ES with 298.1 GB free space) and Ubuntu made a partition on that hard drive. No change was made to the internal hard drive where Window's XP lives.

What happens: I restarted the computer and got "Error 21."

I tried changed things in the BIOS so that the computer would boot from the external hard drive with Ubuntu on it. No luck. Then I tried to get the computer to boot Windows XP from the internal hard drive and still no luck.

Then, like a fool, I installed Ubuntu again on my external hard drive--now there are two large partitions (about 140GB each) on that hard drive that apparently have Ubuntu on them.

On the second install, I changed the "boot loader" from (hd0) to /dev/sdb5 Ubuntu 8.10, thinking that might make a difference. It did not.

Now I have to boot from the Ubuntu CD-r.

What I think should happen instead: So far I like Ubuntu, and ideally Ubuntu would live on my external hard drive while Windows XP continues to live on my internal hard drive. Ideally I would have that choice upon start up.

I've read a number of the questions and answers thus far, and none have been of much help to me (as a newbie). For that I apologize.

Any help would be tremendously appreciated. Thanks!

P. Russell Straddler

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu grub Edit question
Assignee:
No assignee Edit question
Solved by:
P. Russell Straddler
Solved:
Last query:
Last reply:
Revision history for this message
Nikolas Poniros (nponiros) said :
#1

i assume that ur pc can boot from usb (and that u have actually tested this because sometimes the bios says that it boots usb but it actually doesnt work..)

could u pls give as the output of the command sudo fdisk -l (this is SUDO FDISK -L) and the contents of /boot/grub/menu.lst (the one on ur ubuntu partition not the live cd)

do u know if grub is on the internal disk the external or both ? (from what u said i assume that atleast the internal drive has grub installed)

Revision history for this message
P. Russell Straddler (pleaseandthankingyou) said :
#2

Hi Nikolas

Thanks for writing.

You know, I'm not sure my PC can boot from the usb. I have not tested this...or have I? In the bios I have put USB HDD and IDE 3 and just about everything else in the first position in hopes that it would start up the software on the USB hard disc.

How do I test if my PC can boot from the USB?

I am also so new to all of this that unfortunately I don't know how to give you the output of the command...where do I type that? (Ha! I feel like a 5 year old!)

I don't know which drive the grub is on. I think it is on the external USB hard drive--I don't remember the internal hard drive ever getting involved during the installation. I would be shocked and confused if the grub was on the internal drive.

I found this

http://www.pendrivelinux.com/2007/08/11/grub-error-21-after-full-install-to-usb-hard-drive/

as well as this

http://ubuntuforums.org/showthread.php?t=224351&highlight=grub

not that I totally understand either of them...

so how do I get a command line again?

thank you for your help

PRS.

Revision history for this message
P. Russell Straddler (pleaseandthankingyou) said :
#3

Hi again.

Found the command line.

here's what I got:

Disk /dev/sda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks ID System
/dev/sda1 * 1 4862 39053983+ C w95 FAT 32 (LBA)

Disk /dev/sdb: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks ID System
/dev/sdb1 1 5093 40949653+ C w95 FAT32 (LBA)
/dev/sdb2 5099 38913 271618987+ 5 Extended
/dev/sdb5 * 5099 23087 14496611 83 Linux
/dev/sdb6 38726 38913 1510078+ 82 Linux swap / Solaris
/dev/sdb7 23088 38537 124102093+ 83 Linux
/dev/sdb8 38538 38725 1510078+ 82 Linux swap / Solaris

Partition table entries are not in disk order

ubuntu@ubuntu:~$

hopefully that answers some questions.

Thanks again!

Revision history for this message
P. Russell Straddler (pleaseandthankingyou) said :
#4

...and this

grub> find /boot/grub/stage1
  (hd1, 4)
  (hd1, 6)

thanks!

Revision history for this message
Nikolas Poniros (nponiros) said :
#5

to check if u can boot from usb u need a usb hard disk or stick which has an operating system on it which u know works.

to make sure that the mbr of the internal hard drive does not have grub on it, disconnect the external harddrive and tell bios to boot from the internal drive. if everything goes right u should be able to boot into windows. if grub actually is on the internal drive then use the cd of winXP to restore the windows "boot loader"

to do that follow these instructions: "Boot from the windows XP CD, press the "R" key in the setup in order to start the restoration console. Select your windows XP installation from the list, and enter the administrator password.
Enter the command: "FIXMBR" (without the quotes) at the input prompt and confirm the next question with a "Y" (without the quotes). Use exit to restore the computer."

after u have fixed the mbr of the internal drive (in case it doesnt work) u will have to reinstall grub onto the mbr of the external drive

to do that boot the live cd (please set the harddisks in the bios as u have them now so that the numbers stay the same). before u so anything run again the command sudo fdisk -l to make sure that the external harddisk is /dev/sdb and that ur ubuntu partition is /dev/sda5 . after u have checked the numbers and they are correct again in the terminal run the following commands

sudo grub
root (hd1,4)
setup (hd1)
exit

this should install grub in the mbr of the external harddrive and after u reboot u should be able to boot into ubuntu from grub!

good luck and if u need anything just ask

cheers
Nikolas

Revision history for this message
P. Russell Straddler (pleaseandthankingyou) said :
#6

Thanks for writing.

Unfortunately I don't have USB or STICK with an operating system which I know works, so I don't know if I can do that test that way...is there perhaps there is another way to conduct this test?

As for restoring the boot loader from a windows CD, I'm not entirely sure that will be possible either, as that entails finding the windows CD, which may or may not be possible...(which is why I'm hoping I can boot from the *untested* USB drive)

Lastly, there is setting the hard disk in the bios...I now understand that hd1,4 means hard drive 2, partition 5. I will try to point the bios to hard drive two. Hopefully you won't get another panic note in a few minutes.

Lastly, when I put in the sudo grub, root (hd1,4), setup (hd1), exit, commands, will I be able to log into windows XP, even if the there is a problem with the boot loader on the internal hard drive? Or do I really really need that windows XP disc before I can get to any of my windows XP stuff?

thanks in advance,

PRS

Revision history for this message
P. Russell Straddler (pleaseandthankingyou) said :
#7

1. The Windows XP disk is found. I attempted the "FIXMBR" and that did not work. Perhaps it is because the disk might not be "genuine." Either way, upon re-booting with the Windows XP CD, I was never given any prompts. Nothing happened at all.

2. I entered the code into the terminal window. Ubuntu said that everything worked. When I re-boot, I did NOT get the grub 21 error...I got nothing. No Ubuntu boot, no windows XP boot. Also, I could NOT get into the BIOS with the USB Hard drive plugged in.

3. When I removed the USB Hard drive, I was able get into bios, change the boot order to CDRom first, and from there, I could get into Ubuntu from the live CD.
  --USB Hard drive plugged in, nothing
  --USB hard drive removed, CD loads

4. I'm not entirely sure if the computer is "finding" my USB hard drive. In the Bios I have used IDE 1, USB FDD, USB HDD, and no sign that the USB hard drive is being accessed. When I have IDE 1 as the FIRST boot option, the external hard drive did light up (indicating that something was happening) but then those lights went dim, and nothing further happened. But in the BIOS, shouldn't the USB hard drive have "USB" in front of it, or is my USB hard drive be IDE 1? (as indicated by find/boot/grub/stage1)

Lastly, while nothing was happening, this was on the screen. perhaps it is helpful

Auto Detecting pri master ... IDE Hard disk
Auto Detecting pri slave ... not detected
Auto Detecting sec master ... ATAPI CDROM
Auto Detecting sec slave ... ATAPI CDROM

pri master: 05.03E05 WDC WD400bb-75DEA0
Ultra DMA Mode-5. S.M.A.R.T. capable but disabled
sec master: 1.08 plextor CD-r PX-WIZIOA

In sum, I am still booting from the live CD and still unable to dual boot, still unable to boot Ubuntu from the USB hard drive.

:(

any help would be even more greatly appreciated!

Thanks

PRS

Revision history for this message
Nikolas Poniros (nponiros) said :
#8

this is a lot of information :p

1) when u boot the winXP cd (assuming that it is bootable and it should be) u should see a msg "to boot from cd" and after press enter u should get a bluescreen and on the bottom it should say press R to repair (if i remember correctly) and a bunch of other things (they will change). if R is not there then u will see it when the cd loaded up and it will ask u if u want to format the drive or repair (unfortunatelly i havent done that in quite some time so i dont really remember the procedure)

2) it is really strange that u cant see the bios when the external disk is connected which in my opinion isnt a good sign..

3) since u dont have a USB disk to test if the pc actually boots from USB maybe u got a friend which could test ur disk to see if it actually boots and to see if grub is actually there.

4) if grub is on the internal drive u should remove it before u chainload winXP from the grub on the external but lets cross that bridge when we get to it..

5) It would be nice if u could give us a couple of bios screenshots just to see the boot sequence the hard disk sequence and see if it recognises the usb hard disk (if this option exists)

to tell u the truth im starting to run out of ideas.. the USB not booting is not so strange but u should be able to get the internal hard disk to work and boot windows.. maybe u should concentrate on that first so we eliminate one problem at a time..

cheers
Nikolas

Revision history for this message
P. Russell Straddler (pleaseandthankingyou) said :
#9

wow...what a super frustrating nightmare! I knew there was going to be problems, but, wow.

1) OK, I will try booting the winXP disk again. When I tried the last time, the CD drive spun and spun and nothing happened.

2) it is really strange to me also that I cannot see the bios when the external dis is connected. When I am running Ubuntu from the live CD and I plug the hard drive into the computer, all of a sudden the two partitions with Ubuntu on them (remember I downloaded Ubuntu twice) appear on the desk top--this leads me to believe that the computer can infact read the hard drive and recognize the Ubuntu program. I know reading the drive is different from booting from the drive...

3) I don't have a friend with a USB disk to test if my pc actually boots from USB. As mentioned in "2" the grub and all the ubuntu what not is on the USB hard drive. It's on there twice, actually.

4) ok

5) I don't know how to take a bios screen shot, but I will write down all the settings. Again, when I had the bios set to read IDE1 first, the little light in the USB hard drive lit up, spun around once, and then shut off. Same for when I have the bios set to read USB HDD first. Then nothing happens.

As time continues and I am unable to use my computer and all the files on it, being able to boot from windows or boot windows at all is decreasing in importance.

In reading about (and trying to understand) grub error 21 and the dual boot reality, I've come across the "super grub disk" which is purported to solve these very problems. Do you think the super grub disk would work in this situation?

Thank you for all your help.

PRS

Revision history for this message
Nikolas Poniros (nponiros) said :
#10

1) maybe the cd is damaged..

5) by bios screenshot i actually meant take a picture with a camera or a phone..

super grub disk will just fix ur grub. it is a bootable cd which will just do that but since ubuntu can also do it i dont know if it will make a difference.

just try and get me the bios info and maybe we can do something but things dont really look good..

i dont know if u did this already but please test the internal harddisk's ability to boot into win..

y dont u install both operating systems on ur internal hard disk and use the external for data? if u got a 40giga harddisk this shouldnt be a problem..

cheers
Nikolas

PS: yes ur problem is frustrating and i hate this kind of problems but hopefully we will find a solution soon! :)

Revision history for this message
P. Russell Straddler (pleaseandthankingyou) said :
#11

Nikolas--

sorry for that little tantrum outburst. from what I've seen of ubuntu (and what little I know about linux) I really am excited to get deeper in that world.

Here's a funny thing that made me think your initial thoughts on the BIOS being the problem.

Once Ubuntu is up and running, I can plug in the USB HD and all three partitions appear on the hard drive. When the 41.9 GB partition came up, so did a screen saying

"This medium contains software intended to be automatically started. Would you like to run it?"

I say YES!

then: Error starting autorun program: Permission denied.

later, when I double click on the desk top GUI folder icon for the 41.9GB partition, there is a message at the top of the folder screen that says

"the media contains software"

now...when I double click on the *internal* hard drive icon, I can see all my old files (and can access them using "open office") but I don't get any similar message about the internal hard drive containing any software.

lastly, my computer is ancient...from 1998! It got a new cpu some time in the 21 century... 1.3mhz? Something like that.

Is there a way to update the bios?

speaking of bios, here is now mine is set right at this very moment:

first bood device: CD ROM
2nd boot device: IDE-O
3rd boot device USB HDD
try other boot devices Yes
S.M.A.R.T. for Hard Disks Disabled
Boot Up Num-Lock ON
Floppy drive swap Disabled
floppy drive seek disabled
boot to os/2>64mb NO
L1 cache enabled
L2 cache enabled
system bios cacheable enabled
CLK GEN spread spectrum disabled
DOS flat mode disabled
Dram Driver Slew Rating normal
S2K 1/0 compensation disabled
memory termination disabled

In "PCI/PLUG & PLAY Sector" the PCI IDE bus master is disabled.

let me again reiterate, if the USB HDD is plugged in, no matter how the BIOS is set, nothing will happen--not even a grub error 21 message.

It would be fine with me if (somehow) the computer booted up the USB first and the GRUB (installed from Ubuntu) gave me the option to open windows. I plan to be using Ubuntu for most things.

OK. Thank you for your time and your support.

PRS

Revision history for this message
Nikolas Poniros (nponiros) said :
#12

in theory u can update the bios but u will have to know the brand and model of the motherboard and hope that there actually is an update in the manufacturers website.

the way ur bios is setup now u should be able to boot the internal disk if u dont have a cdrom in the drive and the USB HDD should be unbootable since it is the last in line. try booting windows and lets hope that the mbr of the internal drive is ok!

got one question: what usb do u have? is it a usb 1.1 or a usb 2.0. if it is a 1.1 this might explain y u cant boot because usb 1.1 is really slow..

in any case if the laptop cant boot the external then i see no way for u to use ubuntu on the external drive..

for ur last comment: this is actually the idea, that u boot the external and that grub will give u the option to boot the internal..

cheers
Nikolas

Revision history for this message
P. Russell Straddler (pleaseandthankingyou) said :
#13

"in theory u can update the bios but u will have to know the brand and model of the motherboard and hope that there actually is an update in the manufacturers website."

Hopes shattered, as there is no bios update (that I could find) for my ancient PCCHIPS http://www.pcchips.com.tw/PCCWebSite/pcc_index.aspx?MenuID=0&LanID=2 motherboard...or maybe there is, and I just couldn't tell which one to use...

"the way ur bios is setup now u should be able to boot the internal disk if u dont have a cdrom in the drive and the USB HDD should be unbootable since it is the last in line. try booting windows and lets hope that the mbr of the internal drive is ok!"

I don't know...I think I've tried that a few times and I don't think I'm able to boot from the internal hard drive with no CDRom, which makes me think that the internal drive of the MBR is NOT ok--which is one of the central components to this ongoing problem. I'll write back if this works, though...

"got one question: what usb do u have? is it a usb 1.1 or a usb 2.0. if it is a 1.1 this might explain y u cant boot because usb 1.1 is really slow.."

how do I find out what kind of USB I have? Do you mean USB HD, or just "USB" in general?

"in any case if the laptop cant boot the external then i see no way for u to use ubuntu on the external drive"

I'm not using a lap top...though I don't think that matters. Are you saying there no way I can *ever* use ubuntu on the external drive? Will this not work forever? I kind of feel like part of the charm of ubuntu and linux was it's ability to surmount these problems and work with older machines. Maybe I'm wrong about that too...but where would I have gotten such an idea?

ok...more soon. Thank you for your continued thought-put on this.

PRS

Revision history for this message
Nikolas Poniros (nponiros) said :
#14

i mean in general what kind of usb hub (1.1 or 2.0). i guess u could check in the manufacturer's website if the mobo is still available there.. i guess ur usb hd is a USB 2.0

it doesnt matter if it is a laptop or not and i actually dont know y i said laptop, probably because this is what i use :p

linux in general can work with old hardware but in ur case linux cant do anything if ur bios is not able to boot the usb.. i mean it doesnt even get the chance to run.. if u would install it on an internal drive then it would work without problems but i guess it's hard to find a disk for an old machine like this..

test the internal drive and get back to me so we can see where we stand..

cheers
Nikolas

Revision history for this message
P. Russell Straddler (pleaseandthankingyou) said :
#15

Hello again.

I now have Super Grub Disk.

It was able to restore my windows situation, so now when I turn on the computer, I return to good ol' windows land.

:|

While this is comforting, it isn't what I had hoped for.

When I was running Ubuntu from the live CD, I was able to "look at" my hard drive and see all the partitions--all my windows files on the one partition, and the other two partitions, each with their own Ubuntu installation.

What I would like to do is, upon boot, be given the choice of which operating system I would like to use: Windows (which lives on the hard drive inside my computer) or Ubuntu, which lives on my hard drive.

One thing that is troubling is that I cannot boot my computer with the USB HD plugged in--even with the Window's MBR repaired. This is new since installing Ubuntu on the USB HD.

Does anyone out there have any idea how I can run Ubuntu from my USB HD? If it is IMPOSSIBLE, feel free to say so, you won't hurt my feelings!

thank you for your help and support,

Pierre Russell Straddler

Revision history for this message
P. Russell Straddler (pleaseandthankingyou) said :
#16

Hello everyone!

Ubuntu Installed!

(not on the external hard drive, but on the internal.)

Installation was a snap. Ubuntu rocks!

Thanks to everyone for all your help!

Yaaaay!