LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   GRUB Error 21 | can't start Debian or Vista from external harddrive (https://www.linuxquestions.org/questions/linux-newbie-8/grub-error-21-%7C-cant-start-debian-or-vista-from-external-harddrive-761348/)

Topsi 10-13-2009 06:03 PM

I chose the second option
I typed in the commands as you said ( the output [I think that's the word] was something with:
If exist... yes
same again
something with succeeded
some lines with succeed again
Done

quit did nothing so I stopped running the shell and did a restart.
I changed 2nd Boot device to Removable and 3rd to hard disk (1st was still CDROM)
-> Error 21
I tried it with 2nd=Hard Disk 3rd=Removable
->Error 21

:((((((

edit:
I have to sleep now ;-)

yancek 10-13-2009 08:00 PM

Quote:

quit did nothing so I stopped running the shell and did a restart.
typing quit and hitting the enter key should have exited Grub and brought you back to a root prompt. I'd try it again and suggest you put the Removable to first boot priority if you haven't tried that.

Enter the BIOS and find your hard drive, highlight it and click enter and you should have an option to set it to auto detect to make sure your BIOS is detecting the correct size since you have a one terabyte drive/

Topsi 10-14-2009 04:11 AM

grub> root (hd1,1)
Filesystem type is ext2fs, partition type 0x83

grub> setup (hd1)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/e2fs_stage1_5" exists... yes
Running "embed /boot/grub/e2fs_stage1_5 (hd1)"... 17 sectors are embedded.
succeeded
Running "install /boot/grub/stage1 (hd1) (hd1)1+17 p (hd1,1)/boot/grub stage2 /boot/grub/menu.lst"... succeeded
Done.

after I used the command "quit" there is "TOBIAS-PC:/#" in front of the line and not grub>
(I think that happened the first time too, but I didn't noticed that.

1st Boot Device Removable
2nd Boot Device CDROM
3rd Boot Device Hard Disk
->Boot from CD
Grub loading stage 1.5
error 21

1st Boot Device Hard Disk
2nd Boot Device CDROM
3rd Boot Device Removable
->GRUB Loading stage1.5... Error 21 (no Boot from CD)

1st Boot Device CDROM
2nd Boot Device Removable
3rd Boot Device Disabled
->Boot from CD
Grub loading stage 1.5
error 21

Quote:

you may need to repair the mbr in vista to boot it from the first drive.
Could that be the problem?

yancek 10-14-2009 09:23 AM

Enter the BIOS. Find where your hard drives are listed. You should arrow down to it to highlight the external drive, hit enter and get some options. You should be able to see what size it is detected as. If it is not recognized as one terabyte, that could be your problem. How old is your motherboard? If the drive is not recognized at one terabyte you won't be able to boot because Grub won't find the Debian partition as you chose to install it on the last 40GB of a one terabyte drive. If you had the partition at the beginning it would probably work.

aus9 10-14-2009 09:31 AM

oops

1) in my post 11...I talked about finding out which was the linux hard drive.
You have now confirmed its hd1. but you installed grub into mbr for hd1 and not hd0. thats my fault so lets move on.
If linux had been detected as hd0...you install grub into mbr of hd0 ...and then chainloader becomes ...hd1 to get to vista

Now I am not sure how many bios changes you have made. ok? There are options open to your but let me explain them.

OPTION ----BIOS ADVANCED

http://sidux.com/index.php?module=Wikula&tag=Grub2usbhd

The picture shows going into advanced setup and bios has an option to change NOT the device order...which is what you have done...BUT the actual order of hard drives.

I want you to consider using this option to change hd order to the other way.
It means hd1 is now hd0...bios will detect grub but grub will fail as its now /dev/sda for menu and maybe for fstab

So you boot a live cd and mount a partition like this

Code:

su
mkdir /z
mount /dev/sda2 /z

Now not sure what live cd you have but open a text editor with root powers.

/dev/sda2 was once sdb2 ok?

Now navigate to ~/menu.lst and change the settings for linux

title Debian GNU/Linux, kernel 2.6.26-2-686
root (hd0,1)
kernel /boot/vmlinuz-2.6.26-2-686 root=/dev/sda2 ro quiet
initrd /boot/initrd.img-2.6.2.6-2-686

Now add a ms entry or three

title chainload to mbr of second drive
root (hd1)
hide (hd0,0)
chainloader +1

title chainload to C partition of second drive
root (hd1,0)
hide (hd0,0)
map (hd1,0) (hd0,0)
map (hd0,0) (hd1,0)
chainloader +1

title chainload to C partition of first drive
root (hd0,0)
chainloader +1

-----that should cover all ms found--------

Now /etc/fstab

It could be using UUID or label or /dev/sdx structure

If it is using /dev/sdx...it needs fixing

so use root powers to edit to sda2


OPTION (2) bios has not option...swap the data leads

and follow above


OPTION (3)

Do not change any lead or bios setting

We now know linux is hd1 but now we change that command to

Code:

su
root (hd1,1)
setup (hd0)
quit

Now this is one of the options proposed by yancek.

but you need to be clear what option you are choosing and if problems tell us.

I can confirm that ....if you reverted to bios setting that was the one you used for installing grub...grub told you it found its files on hd1.

When you change device or hd order it gets messy...and then everyone gets confused.
Heck I am confused ...heh heh.

Maybe I should butt out and let one person suggest?

Option (3) is the least complicated but it means grub is on the main old drive.
And if that is vista/xp...when you do a re-install ...ms is a bitch and just over-writes mbr without asking your permission.

so

OPTION (4)

get rid of ms...do a clean install...create big partitions and install a virtual machine virtualbox or vmware etc...and run ms from that.

YOu will save space...you won't have to worry about those little presents ms leaves you when were doing windows update and for lark's sake...you save da money.

Topsi 10-14-2009 10:28 AM

Bios:
IDE Channel 0 Master [HL-DT-ST DVDRAM GSA-...can't read more
enter-> Capacity=0MB Cylinder=0 Head=0 Precomp=0 Landing Zone=0 Sector=0
IDE Channel 0 Slave [None]
IDE Channel 1 Master [None]
IDE Channel 1 Slave [None]
IDE Channel 2 Master [ST3320820AS]
enter-> Capacity=320GB Cylinder=65535 Head=16 Precomp=0 Landing Zone=65534 Sector=255
IDE Channel 3 Master [None]

After I set IDE Channel 0 Master to Manual and Acces Mode to CHS I was able to change the Cylinders Heads and so on...
I changed it to the data of my external->Error 21 After that i entered the Bios again:

IDE Channel 0 Master [None]
enter->IDE Channel 0 Master=[Manual] Access Mode=[CHS] capacity=0 cylinder and so on=my data
IDE Channel 0 Slave [None]
IDE Channel 1 Master [None]
IDE Channel 1 Slave [None]
IDE Channel 2 Master [ST3320820AS]
enter-> Capacity=320GB Cylinder=65535 Head=16 Precomp=0 Landing Zone=65534 Sector=255
IDE Channel 3 Master [None]

yancek 10-14-2009 12:02 PM

It doesn't seem your BIOS recognizes your external drive, correctly at least. Assuming the external is set IDE Channel 0 Master. If I understand correctly what you did, you changed the cylinder, head, sector info in your BIOS for the drive and still got the error 21?? Did this information for the drive change back to the original in the BIOS? What happens if you set the drive to "auto" in the BIOS? If you do this and it doesn't show the correct information, you will need to upgrade the BIOS so it recognizes the larger drive, hopefully.

If you need to upgrade the BIOS, you will need to go to the site of your motherboard manufacturer and look for the appropriate upgrade. You will need the BIOS version which you should see during boot.

I had a similar situation last week on a friends computer with a 160GB drive recognized as only 8GB. It would definitely be a good idea to read carefully any instructions on the site on how to and make sure you get the correct upgrade.

Topsi 10-14-2009 12:16 PM

The only thing which is listed under the Removable Device Priority is my printer.

I think it doesn't matter if Removables is the 1st 2nd 3rd or no Boot Device.


And my Bios doesn't detect the size cylinders, heads, and so on...
->that's the reason why GRUB on my external doesn't work (because my external won't be detected

Because of this I want to try yanceks first option (to install it in my internal)

Does this work now after I tried your second option?
Oh and my Bios Version is 2.00 (06/22/07)

@ aus9:
You suggested me that and now while I'm writing I understand why you suggested it me :D.
But by now I tried your first option (I modified the content of the menu.lst, but I don't understand the explaination of the link... what to do in the Bios or what?

edit:
Didn't see your post yancek^^
Okay good I will try to upgrade my Bios now.
I hope it works.

Topsi 10-14-2009 01:16 PM

I have a litle problem...
My Bios is a Phoenix - AwardBios so I went to http://www.phoenix.com/en/About+Phoe...es/Default.htm
but I still could download an .exe file for windows(http://biosagentplus.com/exe?&browser=Netscape), but I can't even boot it :(
What to do now?

yancek 10-14-2009 02:11 PM

Quote:

My Bios is a Phoenix - AwardBios
You need to go to the site of your motherboard manufacturer for the files to upgrade your BIOS as I indicated in my earlier post. I believe there are only three BIOS chip manufacturers and there are many more motherboard manufacturers. The people who make the motherboards usually modify the BIOS chip and what works on one motherboard will not work on another. So you need to find out the name of your motherboard and go to their site.

The upgrade I did last week was for an ASUS motherboard and they had specific, detailed instructions on steps to take to upgrade BIOS. I expect most sites will have this, just look for instructions.

Topsi 10-14-2009 04:43 PM

I found a site of the company where I bought my PC to download Bios V. 3.00 for my Mainboard MS-7255.

But I "have to extract the downloaded file into any directory of my last partition (for example FAT Partition D:)"

The file I downloaded is an .exe file and if I open it I just have to "click on Extract", but how shall I do this if I can't boot Windows?

yancek 10-14-2009 06:21 PM

Quote:

IDE Channel 0 Master [HL-DT-ST DVDRAM GSA-...can't read more
enter-> Capacity=0MB Cylinder=0 Head=0 Precomp=0 Landing Zone=0 Sector=0
That output surprises me, from your earlier post. Usually there is something there.

Quote:

Mainboard MS-7255
I assume you are referring to the MSI MS-7255 (Micro Star International)?

Post the link you are referring to in your last post.

You need to use your vista CD in Recovery or Rescue mode to fix the master boot record to boot vista. I've never used it so can't help but I think if you use the Search function here at LQ, you can find a solution.


I found the information posted below on a windows related site which should work to repair the mbr, assuming you have the vista DVD/CD??

Quote:

To FIX VISTA MBR: Boot up from Vista Installation DVD and select Repair Your Computer option (its below Install Icon). Select Windows Vista -- Command Prompt.
Execute this at command prompt:
Code:
bootrec.exe /fixmbr
bootrec.exe /fixboot
Here's a site with instructions on using EasyBCD to repair vista bootloader:

http://neosmart.net/wiki/display/EBC...r+with+EasyBCD

and here's a site where you can download (free download):

http://neosmart.net/dl.php?id=1

download link on lower left of page. Good Luck and let us know what happens.

aus9 10-14-2009 06:22 PM

hi

if you do not want to use live cd to fix chainloader in menu...use command mode?

can you type commands?

root (hd0,0)
...should return a non-linux parttion structure.
chainloader +1
...should jump to C partition root...where there should be a copy of ms bootloader called ntldr for ms
boot
....to execute previous actions

Topsi 10-15-2009 11:27 AM

Sorry I could't login the whole day.

Here is the site: http://www1.medion.de/site/service_~...reiber&lang=de

It's in german and it says after I have extracted the files I have to restart and boot the "Medion Application & Support-CD" (I have this CD but not the Vista installation CD because Vista was already installed when my parents bought my PC.

I can start (I don't know the word, but when I say cmd.exe I hope you know what I mean), but bootrec.exe /fixmbr and bootrec.exe /fixboot don't work.

Now I'll try the other option with EasyBCD.

@Aus9

What does Chainloader mean and where shall I type these commands in?
In a shell which I can start with the Debian Installation CD?

yancek 10-15-2009 03:59 PM

Quote:

but not the Vista installation CD
I think the commands I suggested will only work with the Vista installation CD/DVD as those files exist there. I doubt they are on the Medion CD. Easy BCD should restore your vista bootloader, be sure to read the instructions first.


All times are GMT -5. The time now is 03:12 AM.