Skip to contentSkip to conversation

GRUB2 hangs on boot from floppy

DISCUSSION Sergey Matveychuk 3 participants 9 messages Mar 18, 2004 – Mar 19, 2004

lore
Share & tools
lore
#0 lore raw

Hello!

I've made a floppy as described in README file.
It start booting with message:
PUPA loadind kernel

clears screen and hangs with three flashed color chars in random positions.

When I press a reset button I can't boot with BIOS beeping. I need to turn off my computer on a few seconds and turn on again for the normal operation.

I have Epox 8RDA3+ motherboad with nForce2 Ultra400 chipset. Builtin ATA133 controller and two Maxtor disks.

Need you more info about my hardware?

I've build GRUB2 on FreeBSD. But I've write core.img on my floppy I've got this message:

# dd if=core.img of=/dev/fd0 bs=512 seek=1
dd: /dev/fd0: Invalid argument
41+1 records in
41+0 records out
20992 bytes transferred in 1.038010 secs (20223 bytes/sec)

I've tried different floppy disks to be sure they are good. With all of them I've got that message.

# ls -la boot.img core.img
-rwxr-xr-x  1 root  wheel    512 Mar 16 10:10 boot.img
-rw-r--r--  1 root  wheel  21256 Mar 16 10:11 core.img

It looks like dd can't write full core.img? Why?
How can I fix it?

(GRUB1 boots well for me)

Signature · 1 line
Sem.
#1 lore raw
Quoted 13 lines · Sergey Matveychuk
# dd if=core.img of=/dev/fd0 bs=512 seek=1
dd: /dev/fd0: Invalid argument
41+1 records in
41+0 records out
20992 bytes transferred in 1.038010 secs (20223 bytes/sec)

I've tried different floppy disks to be sure they are good. With all of them I've got that message.

# ls -la boot.img core.img
(quoted diff) +0 -2
-rwxr-xr-x  1 root  wheel    512 Mar 16 10:10 boot.img
-rw-r--r--  1 root  wheel  21256 Mar 16 10:11 core.img
Quoted 2 lines

It looks like dd can't write full core.img? Why?
How can I fix it?

Apparently, dd fails in your environment. Doesn't your FreeBSD support seeking on a floppy device?

Okuji

#2 lore raw
Quoted 15 lines · Yoshinori K. Okuji
Quoted 13 lines · Sergey Matveychuk
# dd if=core.img of=/dev/fd0 bs=512 seek=1
dd: /dev/fd0: Invalid argument
41+1 records in
41+0 records out
20992 bytes transferred in 1.038010 secs (20223 bytes/sec)

I've tried different floppy disks to be sure they are good. With all of them I've got that message.

# ls -la boot.img core.img
(quoted diff) +0 -2
-rwxr-xr-x  1 root  wheel    512 Mar 16 10:10 boot.img
-rw-r--r--  1 root  wheel  21256 Mar 16 10:11 core.img
Quoted 5 lines
Quoted 2 lines

It looks like dd can't write full core.img? Why?
How can I fix it?

Apparently, dd fails in your environment. Doesn't your FreeBSD support seeking on a floppy device?

Hmmm. I'm not sure. But I wrote GRUB1 floppy this way and it works. May be we need something like sector align? I don't know dd deeply.

Signature · 1 line
Sem.
#3 lore raw
In reply to Yoshinori K. Okuji
Quoted 5 lines · Yoshinori K. Okuji
Quoted 2 lines

It looks like dd can't write full core.img? Why?
How can I fix it?

Apparently, dd fails in your environment. Doesn't your FreeBSD support seeking on a floppy device?

That would be weird, but it looks like it.

Sergey, can you write to a file first and write that file to disk?

--
Marco

#4 lore raw
Quoted 7 lines · Marco Gerards
Quoted 1 line · Yoshinori K. Okuji

Apparently, dd fails in your environment. Doesn't your FreeBSD support seeking on a floppy device?

That would be weird, but it looks like it.

Sergey, can you write to a file first and write that file to disk?

Magic? :)
Does not work. The same result.

Signature · 1 line
Sem.
#5 lore raw
Quoted 1 line · Sergey Matveychuk

Does not work. The same result.

Sergey, could you try your floppy image file with Bochs?

Okuji

#6 lore raw
Quoted 6 lines · Yoshinori K. Okuji
Quoted 1 line · Sergey Matveychuk

Does not work. The same result.

Sergey, could you try your floppy image file with Bochs?

I installed bochs about a half year ago. But I couldn't to learn how can I debug grub with it.

The problem was descided with:

# dd if=core.img of=/dev/fd0 seek=1 conv=osync
41+1 records in
42+0 records out
21504 bytes transferred in 1.839696 secs (11689 bytes/sec)

grub2 has loaded and looks works. But when I press the reset button I still can't boot. I need to power off and on to boot my computer again.

Signature · 1 line
Sem.
#7 lore raw
Quoted 2 lines · Sergey Matveychuk

I installed bochs about a half year ago. But I couldn't to learn how can I debug grub with it.

Bochs is very convenient for debugging GRUB, so please study how to use it. :)

Basically, you just need to make a config file for bochs, based on a sample config file, and run bochs. And, you will know if your problem is hardware-specific or not.

Regards,
Okuji

#8 lore raw
Quoted 3 lines · Yoshinori K. Okuji

Bochs is very convenient for debugging GRUB, so please study how to use it. :)

Basically, you just need to make a config file for bochs, based on a sample config file, and run bochs. And, you will know if your problem is hardware-specific or not.

I see. I've made bochs running. But I thought I can to debug grub with bochs with more profound way.

Signature · 1 line
Sem.