Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
boot loader problem
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
dhammer
n00b
n00b


Joined: 03 Nov 2003
Posts: 11
Location: Mostly Europe

PostPosted: Thu Jan 01, 2004 4:12 pm    Post subject: boot loader problem Reply with quote

Hi folks,

after installing Gentoo, I activated grub on my /dev/hda -- with this partition table:

/dev/hda1 * 1 13 104422 83 Linux
/dev/hda2 14 138 1004062+ 82 Linux Swap
/dev/hda3 139 10011 79304872+ 83 Linux

no errors were shown, everything looks normal. After rebooting though, the BIOS ignores the boot record and skips the hard disk in the boot process.

The same issue occurs with lilo. Both lilo and grub config was done by the installation document, nothing fancy, nothing customized. I still do not get the BIOS to start from my disk...

Any help would be greatly appreciated.

Cheers.
Dennis
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 55186
Location: 56N 3W

PostPosted: Thu Jan 01, 2004 4:24 pm    Post subject: Reply with quote

dhammer,

Boot with the CD, mount your partitions and post the results of the following commands.

Code:
ls /mnt/gentoo/boot
less /mnt/gentoo/boot/grub/grub.conf


Also, which filesystems have you used on /boot and /

You did take the CD out of the drive ?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
FreeFly42
l33t
l33t


Joined: 03 Nov 2003
Posts: 848
Location: Houston, TX

PostPosted: Thu Jan 01, 2004 5:50 pm    Post subject: Reply with quote

Do you remember what commands you typed to install GRUB? I've seen many people who mistakenly typed:
Code:
# grub
grub> root (hd0,0)
grub> install (hd0,0)

When they should have typed:
Code:
# grub
grub> root (hd0,0)
grub> install (hd0)


The first case will not modify your MBR, and GRUB would not be installed as the primary boot loader, so your BIOS wouldn't be able to boot it.
_________________
Kent

Planes are dangerous, get out of 'em quick
Back to top
View user's profile Send private message
dhammer
n00b
n00b


Joined: 03 Nov 2003
Posts: 11
Location: Mostly Europe

PostPosted: Thu Jan 01, 2004 8:51 pm    Post subject: Reply with quote

Hi,

yes, I have used "setup (hd0)" in grub and removed the CD from the tray.

As filesystems I use ext2 for /boot and reiserfs for /

my grub.conf:
Code:

default 0
timeout 30
splashimage=(hd0,0)/boot/grub/splash.xpm.gz

title=Gentoo 2.4.20-gentoo-r8
root=(hd0,0)
kernel=(hd0,0)/boot/kernel-2.4.20-gentoo-r8 root=/dev/hda3 vga=795
initrd=(hd0,0)/boot/initrd-2.4.20-gentoo-r8


cheers,
D.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 55186
Location: 56N 3W

PostPosted: Thu Jan 01, 2004 8:55 pm    Post subject: Reply with quote

dhammer,

What do you mean by "skips the HDD"?

You didn't post the result of
Code:
less /boot

_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
dhammer
n00b
n00b


Joined: 03 Nov 2003
Posts: 11
Location: Mostly Europe

PostPosted: Thu Jan 01, 2004 9:34 pm    Post subject: Reply with quote

Sorry --

Code:

drwxr-xr-x    4 root     root         1024 2004-01-01 21:44 .
drwxr-xr-x   11 root     root         1024 2004-01-01 22:04 ..
lrwxrwxrwx    1 root     root            1 2003-11-29 19:08 boot -> .
-rw-r--r--    1 root     root          512 2003-12-31 19:02 boot.0300
lrwxrwxrwx    1 root     root           11 2003-12-31 18:46 boot.b -> boot-menu.b
-rw-r--r--    1 root     root         9728 2003-12-31 18:46 boot-bmp.b
-rw-r--r--    1 root     root         9216 2003-12-31 18:46 boot-menu.b
-rw-r--r--    1 root     root         7680 2003-12-31 18:46 boot-text.b
-rw-r--r--    1 root     root          908 2003-12-31 18:46 chain.b
drwxr-xr-x    2 root     root         1024 2003-11-29 21:42 grub
-rw-r--r--    1 root     root          220 2004-01-01 21:43 grub.conf
-rw-r--r--    1 root     root      1444509 2003-11-29 21:13 initrd-2.4.20-gentoo-r8
-rw-r--r--    1 root     root            0 2003-09-11 08:19 .keep
-rw-r--r--    1 root     root      1099917 2003-11-29 21:12 kernel-2.4.20-gentoo-r8
drwx------    2 root     root        12288 2003-11-29 18:32 lost+found
-rw-------    1 root     root        38912 2003-12-31 19:02 .map
-rw-r--r--    1 root     root          512 2003-12-31 18:46 mbr.b
-rw-r--r--    1 root     root          840 2003-12-31 18:46 os2_d.b
lrwxrwxrwx    1 root     root           27 2003-11-29 21:12 System.map -> System.map-2.4.20-gentoo-r8
-rw-r--r--    1 root     root       565458 2003-11-29 21:12 System.map-2.4.20-gentoo-r8


By skip I mean that during boot the BIOS cycles through all configured disks / devices trying to find a bootable device. My boot order is: hd0, cdrom. CDRom is always booted and in case I take out the CD, the booting procedure stops while complaining that there is no valid device in my system.

D.
Back to top
View user's profile Send private message
dhammer
n00b
n00b


Joined: 03 Nov 2003
Posts: 11
Location: Mostly Europe

PostPosted: Thu Jan 01, 2004 9:35 pm    Post subject: Reply with quote

to clarify that last posting, by no valid device I mean nothing to boot can be found by the system. just so that it doesn't get more complicated ;-)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 55186
Location: 56N 3W

PostPosted: Thu Jan 01, 2004 9:52 pm    Post subject: Reply with quote

dhammer,

Has your BIOS got boot sector virus protection?
Is it turned off?

If not, the MBR write may have been silently dropped.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
dhammer
n00b
n00b


Joined: 03 Nov 2003
Posts: 11
Location: Mostly Europe

PostPosted: Thu Jan 01, 2004 10:03 pm    Post subject: Reply with quote

I just checked again. There is no virus protection active on the system. A while ago, I installed Win XP on this hard disk -- without any problems. Then I erased (= formatted) the disk again, and had no luck with linux again (same behavior as in the tries before the XP installation).

The error message is that there is no boot sector to be found on IDE-0.

Is there maybe some way to check what exactly is written in the MBR (not just the octal dump, but maybe something someone can decypher?)

D.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 55186
Location: 56N 3W

PostPosted: Thu Jan 01, 2004 10:14 pm    Post subject: Reply with quote

dhammer,

Octal ???

Get the dump with dd

Code:
dd if=/dev/hda of=/mbr.hex bs=512 count=1

Then open it with hexedit. This will write a 512 byte file in /, so you better be root when you do it

Post it if you wish - I'd like to see it too. I can decode the hex. Its normal mode x86 opcodes with the enrty point at byte 00.

Something wrote to your MBR because your partition table starts at the end of it.


If your windows MBR is still there you will know from some text close to the start of the file
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
FreeFly42
l33t
l33t


Joined: 03 Nov 2003
Posts: 848
Location: Houston, TX

PostPosted: Thu Jan 01, 2004 10:21 pm    Post subject: Reply with quote

When you created the partition did you flag it as "bootable" in fdisk?

You can check by typing
Code:
fdisk -l /dev/hda

You will get a listing of the partitions something like this
Code:
/dev/hda1   *         1      1558  11778448+   c  Win95 FAT32 (LBA)
/dev/hda2          1559      3876  17524080    5  Extended
/dev/hda5          1559      2247   5208808+   7  HPFS/NTFS
...

The '*' after /dev/hda1 means it was tagged as bootable.
_________________
Kent

Planes are dangerous, get out of 'em quick
Back to top
View user's profile Send private message
dhammer
n00b
n00b


Joined: 03 Nov 2003
Posts: 11
Location: Mostly Europe

PostPosted: Thu Jan 01, 2004 10:23 pm    Post subject: Reply with quote

Code:

0000000 48eb 0190 01b2 494c 4f4c 0516 0f3f 3ff3
0000010 0000 0000 0000 0000 49bd 0b78 5101 e01a
0000020 0000 c0b8 8e07 bcd0 0800 52fb 0653 8056
0000030 fefa 0275 f288 8efc 31d8 52ed 0fb4 0203
0000040 00ff 8000 824d 0000 0800 80fa 80ca 53ea
0000050 007c 3100 8ec0 8ed8 bcd0 2000 a0fb 7c40
0000060 ff3c 0274 c288 be52 7d79 34e8 f601 80c2
0000070 5474 41b4 aabb cd55 5a13 7252 8149 55fb
0000080 75aa a043 7c41 c084 0575 e183 7401 6637
0000090 4c8b be10 7c05 44c6 01ff 8b66 441e c77c
00000a0 1004 c700 0244 0001 8966 085c 44c7 0006
00000b0 6670 c031 4489 6604 4489 b40c cd42 7213
00000c0 bb05 7000 7deb 08b4 13cd 0a73 c2f6 0f80
00000d0 f084 e900 008d 05be c67c ff44 6600 c031
00000e0 f088 6640 4489 3104 88d2 c1ca 02e2 e888
00000f0 f488 8940 0844 c031 d088 e8c0 6602 0489
0000100 a166 7c44 3166 66d2 34f7 5488 660a d231
0000110 f766 0474 5488 890b 0c44 443b 7d08 8a3c
0000120 0d54 e2c0 8a06 0a4c c1fe d108 6c8a 5a0c
0000130 748a bb0b 7000 c38e db31 01b8 cd02 7213
0000140 8c2a 8ec3 4806 607c b91e 0100 db8e f631
0000150 ff31 f3fc 1fa5 ff61 4226 be7c 7d7f 40e8
0000160 eb00 be0e 7d84 38e8 eb00 be06 7d8e 30e8
0000170 be00 7d93 2ae8 eb00 47fe 5552 2042 4700
0000180 6f65 006d 6148 6472 4420 7369 006b 6552
0000190 6461 2000 7245 6f72 0072 01bb b400 cd0e
00001a0 ac10 003c f475 00c3 0000 0000 0000 0000
00001b0 0000 0000 0000 0000 49bd 0b78 c9cf 0080
00001c0 0002 fe83 0c3f 0001 0000 2fcc 0003 0000
00001d0 0d01 fe82 893f 2fcd 0003 a43d 001e 0000
00001e0 8a01 fe83 1aff d40a 0021 3151 0974 0000
00001f0 0000 0000 0000 0000 0000 0000 0000 aa55
0000200
Back to top
View user's profile Send private message
dhammer
n00b
n00b


Joined: 03 Nov 2003
Posts: 11
Location: Mostly Europe

PostPosted: Thu Jan 01, 2004 10:25 pm    Post subject: Reply with quote

freefly42:

Code:

/dev/hda1   *           1          13      104422   83  Linux
/dev/hda2              14         138     1004062+  82  Linux Swap
/dev/hda3             139       10011    79304872+  83  Linux


Cheers,
D
Back to top
View user's profile Send private message
FreeFly42
l33t
l33t


Joined: 03 Nov 2003
Posts: 848
Location: Houston, TX

PostPosted: Thu Jan 01, 2004 10:28 pm    Post subject: Reply with quote

NeddySeagoon wrote:
I can decode the hex. Its normal mode x86 opcodes with the enrty point at byte 00.


Neddy you are so cool! I'm interested in what this means too!
_________________
Kent

Planes are dangerous, get out of 'em quick
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 55186
Location: 56N 3W

PostPosted: Fri Jan 02, 2004 2:59 pm    Post subject: Reply with quote

dhammer,

I've had a look at your MBR and compared it to mine. Your GRUB code is identical to mine. If I post everything here it will be a huge post so I'll just post a few snipets.
Code:
First, everything is in hex.
The left column of numbers are the starting bytes of each line, just a counter
The original post was in words rather than bytes Intel puts the low byte of a word in the memory address
nearest 0, so all the code is byte swapped. However, it makes aligned words easier to read.   

0000000 48eb 0190 01b2 494c 4f4c 0516 0f3f 3ff3
        JMP 004a This is the first instruction
                       4c 49 4c 4f = LILO


Its clear that LILO has been installed here then overwritten by GRUB. Since GRUB has to read the MBR, change it, then write it back to preserve the partition table, it looks like it does that everywhere - only changing what it needs.
Code:


At the end of the partition MBR:-
--------------GRUB Strings Start Here----------
They are null 0x00 terminated, as C produces
0x20 is the ASCII space character

    179                       47 5552 2042 4700
                              47 52 55 42 20 00 47
                               G  R  U  B        G
0000180 6f65 006d 6148 6472 4420 7369 006b 6552
        65 6f 6d 00 48 61 72 64 20 44 69 73 6b 00 52 65
         e  o  m     H  a  r  d     D  i  s  k     R  e
0000190 6461 2000 7245 6f72 0072 01bb b400 cd0e
        61 64 00 20 45 72 72 6f 72 00
         a  d        E  r  r  o  r


    19a                          01bb b400 cd0e
00001a0 ac10 003c f475 00c3 0000 0000 0000 0000
00001b0 0000 0000 0000 0000 49bd 0b78 c9cf

--------------Partition Table Start ----------------------------
/dev/hda1
    1be 0080
        80 00 = Active Starts on Head 0
00001c0 0002  = Starting Cyinder and Sector Cyl=0 Sector=2
    1c2 fe83 83 fe Sysem Indicator 83=Linux and ending head 0xfe
    (heads are 0-254 here 1-255 other places)
    1c4 0c3f  = Ending Cylinder and Head
    (The cyninder/head words are split 10 bits 6 bits)
    1c6 0001 0000 (DWord so its Hi Lo reversed)
        00000001 Relative sector offset of Partition
    1ca 2fcc 0003 (DWord so its Hi Lo reversed)
        00022fcc Total number of secores

/dev/hda2
    1ce 0000 = Not active Starts on Head 0
00001d0 0d01 fe82 893f 2fcd 0003 a43d 001e
        Partition Type 82 = Linux Swap

/dev/hda3
    1de 0000 = Not active Starts on Head 0
00001e0 8a01 fe83 1aff d40a 0021 3151 0974

/dev/hda4
    1ee 0000 = Not active Starts on Head 0
00001f0 0000 0000 0000 0000 0000 0000 0000
    1fe aa55


I've decoded on of the entries in the partition table - it shows that /dev/hda1 is active. Also the MBR signature at 1fe is correct.

If anyone wants the disassembly I can provide a link but we all have the source code don't we?
I would encorage you to read that instead.

Now what?

Its clear that your MBR is OK and /boot is a real partition because you have lost+found, so you have not forgotten to mount /boot. (Its easy done)

Since the BIOS complains it can't find a system disc and you don't get a GRUB prompt, its not reading the MBR for some reason.

Have you got the BIOS set up to use Logicial Block Adddressing (LBA) and not Cylinder/Head/Sectors (CHS) and not Large?

Do you auto detect the HDD on every startup or have you got its settings fixed in the BIOS?
Its possible that the auto detect is broken. There is often a manual detect drives option in the BIOS, so that you can give it some help to get it right. It will boot faster too, since it skips the auto detect during boot.

What motherboard and disk drive do you have?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
dhammer
n00b
n00b


Joined: 03 Nov 2003
Posts: 11
Location: Mostly Europe

PostPosted: Fri Jan 02, 2004 11:18 pm    Post subject: Reply with quote

So -- I took a more detailed look on my BIOS settings, removed the AUTO entry (set to USER with the correct settings now). Settings for the Drive are: Block Transfer ON, LBA ON, PIO Mode 4 and 32-Bit Mode ON. LARGE is not an option in my BIOS.

As to my Hardware, it is a EliteGroup K7S5A Pro Board with a 1 GHz Duron processor. The firmware revision is 02/06/2002 S. I will try to get an update in case there is one available.
The disk drive is a IBM Deskstar 180GXP with 80 GB capacity (Product No. IC35090AVV207-0).

Cheers
Dennis
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 55186
Location: 56N 3W

PostPosted: Fri Jan 02, 2004 11:44 pm    Post subject: Reply with quote

dhammer,

A BIOS update is a last resort.

When the drive was set to be auto detected did it work properly?
I had a motherboard at one time that would not see drives above 33Gb as it didn't do big hard drives. It had a 40 Mb drive jumpered down to the old limit. It needed a BIOS update to get the other 7GB back.

Has this drive and motherboard combination ever worked with any OS?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
dhammer
n00b
n00b


Joined: 03 Nov 2003
Posts: 11
Location: Mostly Europe

PostPosted: Sat Jan 03, 2004 4:17 pm    Post subject: Reply with quote

NeddySeagoon,

no, unfortunately the change to non-auto did not make it work. I think the combination has worked before with Windows XP, but all of a sudden I am not completely sure anymore. I think I will upgrade my BIOS on monday when I am physically at my machine again, just to make sure that there is no known issue with this combination.

And I will also try to install another OS.

Thanks
Dennis

PS: I'll keep you posted on my progress. The final resort would probably be a new motherboard... ;-)
Back to top
View user's profile Send private message
lamplighter
n00b
n00b


Joined: 09 Jun 2003
Posts: 5

PostPosted: Sun Jan 04, 2004 5:56 am    Post subject: Reply with quote

I believe I have the same problem and I also have a K7S5A motherboard. I will try upgrading the BIOS now. Question though, I just got a new 160 GB Western Digital which is giving me the problems, did your IBM drive also come with a UltraATA controller card? Mine did but I don't think I need it, my BIOS is recognizing the drive when it is plugged into the mobo but not to the card (the controller card BIOS can't find it).

I'm also thinking, is a possible solution to get GRUB on a floppy and always use that to boot? Certainly not the best solution, but I would like to know if it is a possibility.

Lets make sure to keep each other updated. :)
Back to top
View user's profile Send private message
lamplighter
n00b
n00b


Joined: 09 Jun 2003
Posts: 5

PostPosted: Sun Jan 04, 2004 7:48 am    Post subject: Reply with quote

Alright it is the BIOS. I upgraded from 02/06/2002 to 08/11/2003 and I can now boot of it (I had to reinstall GRUB, I am not sure if I messed it up at some point or if it is necessary). If you need a refresher on how to flash, I used http://forum.ocworkbench.com/ocwbcgi/ultimatebb.cgi?ubb=get_topic&f=4&t=002019 FAQ #6. As for the downloads, I used the www.ecs.com.tw site. Let me know if you have any questions. Cheers.
Back to top
View user's profile Send private message
lamplighter
n00b
n00b


Joined: 09 Jun 2003
Posts: 5

PostPosted: Mon Jan 05, 2004 1:19 am    Post subject: Reply with quote

dhammer, I have been experiencing some BIOS problems since the upgrade. It sometimes takes a good 10-20 seconds from turning on the computer (fans spin, hard drive light on, cd-roms on) to the monitor to actually get anything. And sometimes it won't at all until I turn it off and clear the CMOS (using the jumpers). Disabling Quick Boot in the BIOS seems to help, but this still shouldn't be. Can you please let me know if you experience the same problem or not? Either way it would be helpful to know if it is the BIOS version or something I am doing wrong.
Back to top
View user's profile Send private message
dhammer
n00b
n00b


Joined: 03 Nov 2003
Posts: 11
Location: Mostly Europe

PostPosted: Tue Jan 06, 2004 2:34 pm    Post subject: Reply with quote

lamplighter,

this sounds promising. Unfortunately I am currently physically away from my home computer, so I will try to flash the bios as soon as I am home again (will be next weekend, so only a couple of days left...)

I'll keep you posted.

Cheers
Dennis
Back to top
View user's profile Send private message
ehteam
n00b
n00b


Joined: 04 Jan 2004
Posts: 3

PostPosted: Tue Jan 06, 2004 4:48 pm    Post subject: Reply with quote

Your grub.config differs from the installation example (if you're following the setup with a separate boot partition).

(hd0,0)/boot/ ...

hd(0,0) is /boot, have you tried

(hd0,0)/
Back to top
View user's profile Send private message
FreeFly42
l33t
l33t


Joined: 03 Nov 2003
Posts: 848
Location: Houston, TX

PostPosted: Tue Jan 06, 2004 10:15 pm    Post subject: Reply with quote

ehteam wrote:
Your grub.config differs from the installation example (if you're following the setup with a separate boot partition).

(hd0,0)/boot/ ...

hd(0,0) is /boot, have you tried

(hd0,0)/

Inside /boot there is a link to "." which means (hd0,0)/boot/ will work exactly the same as (hd0,0)/

Unless he's deleted the symlink... :wink:
_________________
Kent

Planes are dangerous, get out of 'em quick
Back to top
View user's profile Send private message
dhammer
n00b
n00b


Joined: 03 Nov 2003
Posts: 11
Location: Mostly Europe

PostPosted: Sun Jan 11, 2004 1:49 pm    Post subject: Reply with quote

Quote:
Inside /boot there is a link to "." which means (hd0,0)/boot/ will work exactly the same as (hd0,0)/

Unless he's deleted the symlink...


No, he did not... anyway, I upgraded the bios and all seems to be well. Except for the SCSI driver, but that is another issue.

Thanks to all for the helpful postings.

@lamplighter: I cannot reproduce the 10-20seconds... when I power on, the mb reacts instantly.

Regards,
Dennis
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum