Grub mess everething....

Hi,
I having some issues with Grub (0.97-162.2.i586) , the kind of problem where on the boot it give me the error “Loading Stage2. Read Error” .

The environment:

  • Old machine, CPU Athlon XP 2400+ Ghz
  • 1 Disk IDE 80 GB.
    The history
  • This box have only WinXP working very well…
  • I resize the partitions to install OpenSuse 11.2
  • After the resize , everything still ok.
  • I Install OpenSuse 11.2 (using ext4) and execute the online update…
  • Everything still ok.
  • I Install the XEN Kernel , and all OK
  • After few days, I decide change de default boot system, from Windows to Xen-Suse, after do what I need to do, I changed back he default to Windows and booom! stop works…
    All changes I made is using the Yast Bootloader. Just changing the default valuse
  • I try 1 zillion of configuration on grub reconfiguring by the repair option on the original suse dvd. Nothing work…
  • So, after reinstall at least 5 times with a lot of differ configuration (including changing the FS to raiser), remaking the mbr, and other things I discovery a way to make it work.
    I need to enter on my BIOS , set to ENABLE on the Chipset parameters “Enable ide DMA”, and they Works! but when I restart, stop again. When I enter on my BIOS they back de ide DMA to Disabled… f**k!
  • My BIOS appear be OK, they don’t loose any other configuration, only this option.

So… the solution what I looking for is make the grub work with this option in disable mode.
Any advice or tips are welcome.

I don’t know if help, here is the biosdecode and dmidecode output, fdisk -l (the suse root is the sda2) and the grub config


# biosdecode
# biosdecode 2.10
SMBIOS 2.2 present.
        Structure Table Length: 1179 bytes
        Structure Table Address: 0x000F0000
        Number Of Structures: 43
        Maximum Structure Size: 82 bytes
ACPI 1.0 present.
        OEM Identifier: KM400A
        RSD Table 32-bit Address: 0x3DFF3000
BIOS32 Service Directory present.
        Revision: 0
        Calling Interface Address: 0x000FB980
PNP BIOS 1.0 present.
        Event Notification: Not Supported
        Real Mode 16-bit Code Address: F000:C468
        Real Mode 16-bit Data Address: F000:0000
        16-bit Protected Mode Code Address: 0x000FC440
        16-bit Protected Mode Data Address: 0x000F0000
PCI Interrupt Routing 1.0 present.
        Router ID: 00:11.0
        Exclusive IRQs: 3 5 11
        Compatible Router: 1106:0596
        Slot Entry 1: ID 00:08, slot number 1
        Slot Entry 2: ID 00:09, slot number 2
        Slot Entry 3: ID 00:0a, slot number 3
        Slot Entry 4: ID 00:0b, slot number 4
        Slot Entry 5: ID 00:11, on-board
        Slot Entry 6: ID 00:01, on-board
        Slot Entry 7: ID 00:10, on-board


# dmidecode
# dmidecode 2.10
SMBIOS 2.2 present.
43 structures occupying 1179 bytes.
Table at 0x000F0000.

Handle 0x0000, DMI type 0, 19 bytes
BIOS Information
        Vendor: Phoenix Technologies, LTD
        Version: 1002
        Release Date: 12/04/2003
        Address: 0xE0000
        Runtime Size: 128 kB
        ROM Size: 256 kB
        Characteristics:
                ISA is supported
                PCI is supported
                PNP is supported
                APM is supported
                BIOS is upgradeable
                BIOS shadowing is allowed
                Boot from CD is supported
                Selectable boot is supported
                BIOS ROM is socketed
                EDD is supported
                5.25"/360 kB floppy services are supported (int 13h)
                5.25"/1.2 MB floppy services are supported (int 13h)
                3.5"/720 kB floppy services are supported (int 13h)
                3.5"/2.88 MB floppy services are supported (int 13h)
                Print screen service is supported (int 5h)
                8042 keyboard services are supported (int 9h)
                Serial services are supported (int 14h)
                Printer services are supported (int 17h)
                CGA/mono video services are supported (int 10h)
                ACPI is supported
                USB legacy is supported
                AGP is supported
                LS-120 boot is supported
                ATAPI Zip drive boot is supported

Handle 0x0001, DMI type 1, 25 bytes
System Information
        Manufacturer: ASUS
        Product Name: A7V8X-MX SE
        Version: 1.03
        Serial Number: 123456789000
        UUID: 11111111-1111-1111-1111-111111111111
        Wake-up Type: Power Switch

Handle 0x0002, DMI type 177, 69 bytes
OEM-specific Type
        Header and Data:
                B1 45 02 00 00 0E A6 84 BE 50 01 00 FF 80 43 10
                65 30 06 11 1F 10 00 00 00 00 03 08 09 0E 03 00
                40 82 73 B2 00 00 00 00 00 00 00 00 00 00 00 00
                00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
                00 00 00 00 01
        Strings:
                VIA3177-MAC

Handle 0x0003, DMI type 2, 8 bytes
Base Board Information
        Manufacturer: ASUS
        Product Name: A7V8X-MX SE
        Version: 1.03
        Serial Number: 123456789000

Handle 0x0004, DMI type 3, 13 bytes
Chassis Information
        Manufacturer: ASUS
        Type: Desktop
        Lock: Present
        Version: Chassis Version
        Serial Number: EVAL
        Asset Tag: 123456789000
        Boot-up State: Unknown
        Power Supply State: Unknown
        Thermal State: Unknown
        Security Status: Unknown

Handle 0x0005, DMI type 4, 32 bytes
Processor Information
        Socket Designation: Socket A
        Type: Central Processor
        Family: Duron
        Manufacturer: AMD
        ID: 81 06 00 00 FF FB 83 03
        Signature: Family 6, Model 8, Stepping 1
        Flags:
                FPU (Floating-point unit on-chip)
                VME (Virtual mode extension)
                DE (Debugging extension)
                PSE (Page size extension)
                TSC (Time stamp counter)
                MSR (Model specific registers)
                PAE (Physical address extension)
                MCE (Machine check exception)
                CX8 (CMPXCHG8 instruction supported)
                APIC (On-chip APIC hardware supported)
                SEP (Fast system call)
                MTRR (Memory type range registers)
                PGE (Page global enable)
                MCA (Machine check architecture)
                CMOV (Conditional move instruction supported)
                PAT (Page attribute table)
                PSE-36 (36-bit page size extension)
                MMX (MMX technology supported)
                FXSR (Fast floating-point save and restore)
                SSE (Streaming SIMD extensions)
        Version: AMD Athlon(tm) XP
        Voltage: 1.7 V
        External Clock: 133 MHz
        Max Speed: 3000 MHz
        Current Speed: 2000 MHz
        Status: Populated, Enabled
        Upgrade: ZIF Socket
        L1 Cache Handle: 0x0009
        L2 Cache Handle: 0x000A
        L3 Cache Handle: No L3 Cache

Handle 0x0006, DMI type 5, 20 bytes
Memory Controller Information
        Error Detecting Method: None
        Error Correcting Capabilities:
                None
        Supported Interleave: One-way Interleave
        Current Interleave: Four-way Interleave
        Maximum Memory Module Size: 32 MB
        Maximum Total Memory Size: 64 MB
        Supported Speeds:
                70 ns
                60 ns
        Supported Memory Types:
                Standard
                EDO
        Memory Module Voltage: 5.0 V
        Associated Memory Slots: 2
                0x0007
                0x0008
        Enabled Error Correcting Capabilities: None

Handle 0x0007, DMI type 6, 12 bytes
Memory Module Information
        Socket Designation: A0
        Bank Connections: 0 1
        Current Speed: 60 ns
        Type: Other SDRAM
        Installed Size: 1024 MB (Double-bank Connection)
        Enabled Size: 1024 MB (Double-bank Connection)
        Error Status: OK

Handle 0x0008, DMI type 6, 12 bytes
Memory Module Information
        Socket Designation: A1
        Bank Connections: None
        Current Speed: 60 ns
        Type: Unknown
        Installed Size: Not Installed
        Enabled Size: Not Installed
        Error Status: OK

Handle 0x0009, DMI type 7, 19 bytes
Cache Information
        Socket Designation: L1 Cache
        Configuration: Enabled, Not Socketed, Level 1
        Operational Mode: Write Back
        Location: Internal
        Installed Size: 128 kB
        Maximum Size: 128 kB
        Supported SRAM Types:
                Synchronous
        Installed SRAM Type: Synchronous
        Speed: Unknown
        Error Correction Type: Unknown
        System Type: Unknown
        Associativity: Unknown

Handle 0x000A, DMI type 7, 19 bytes
Cache Information
        Socket Designation: L2 Cache
        Configuration: Enabled, Not Socketed, Level 2
        Operational Mode: Write Back
        Location: External
        Installed Size: 256 kB
        Maximum Size: 256 kB
        Supported SRAM Types:
                Synchronous
        Installed SRAM Type: Synchronous
        Speed: Unknown
        Error Correction Type: Unknown
        System Type: Unknown
        Associativity: Unknown

Handle 0x000B, DMI type 8, 9 bytes
Port Connector Information
        Internal Reference Designator: PRIMARY IDE
        Internal Connector Type: On Board IDE
        External Reference Designator: Not Specified
        External Connector Type: None
        Port Type: Other

Handle 0x000C, DMI type 8, 9 bytes
Port Connector Information
        Internal Reference Designator: SECONDARY IDE
        Internal Connector Type: On Board IDE
        External Reference Designator: Not Specified
        External Connector Type: None
        Port Type: Other
.........
.........

Handle 0x0022, DMI type 13, 22 bytes
BIOS Language Information
        Installable Languages: 3
                n|US|iso8859-1
                n|US|iso8859-1
                r|CA|iso8859-1
        Currently Installed Language: n|US|iso8859-1

.........
.........

Handle 0x0029, DMI type 32, 11 bytes
System Boot Information
        Status: No errors detected

Handle 0x002A, DMI type 127, 4 bytes
End Of Table

Fdisk


# fdisk -l

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xec41d25c

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        2314    18587173+   7  HPFS/NTFS
/dev/sda2            2315        4076    14153265   83  Linux
/dev/sda3            4077        4249     1389622+  82  Linux swap / Solaris
/dev/sda4            4250        9729    44018100    5  Extended
/dev/sda5            4865        7414    20481300    7  HPFS/NTFS
/dev/sda6            4287        4864     4642753+  8e  Linux LVM
/dev/sda7            7415        9729    18595237+   7  HPFS/NTFS

Grub config


# cat /etc/grub.conf
setup --stage2=/boot/grub/stage2 (hd0,1) (hd0,1)
quit


# cat /boot/grub/menu.lst     
# Modified by YaST2. Last modification on Wed May 26 14:04:35 BRT 2010
# THIS FILE WILL BE PARTIALLY OVERWRITTEN by perl-Bootloader          
# Configure custom boot parameters for updated kernels in /etc/sysconfig/bootloader

default 1
timeout 8
##YaST - generic_mbr
gfxmenu (hd0,1)/boot/message
##YaST - activate           

###Don't change this comment - YaST2 identifier: Original name: xen###
title Xen -- openSUSE 11.2 - 2.6.31.12-0.2                            
    root (hd0,1)                                                      
    kernel /boot/xen.gz                                               
    module /boot/vmlinuz-2.6.31.12-0.2-xen root=/dev/disk/by-id/ata-ST380011A_5JV2M5Y7-part2 resume=/dev/disk/by-id/ata-ST380011A_5JV2M5Y7-part3 splash=silent quiet showopts vga=0x31a                                                                   
    module /boot/initrd-2.6.31.12-0.2-xen                                                                                    

###Don't change this comment - YaST2 identifier: Original name: linux###
title openSUSE 11.2 - 2.6.31.12-0.2
    root (hd0,1)
    kernel /boot/vmlinuz-2.6.31.12-0.2-default root=/dev/disk/by-id/ata-ST380011A_5JV2M5Y7-part2 resume=/dev/disk/by-id/ata-ST380011A_5JV2M5Y7-part3 splash=silent quiet showopts vga=0x31a
    initrd /boot/initrd-2.6.31.12-0.2-default

###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe -- openSUSE 11.2 - 2.6.31.12-0.2
    root (hd0,1)
    kernel /boot/vmlinuz-2.6.31.12-0.2-default root=/dev/disk/by-id/ata-ST380011A_5JV2M5Y7-part2 showopts apm=off noresume nosmp maxcpus=0 edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 x11failsafe vga=0x31a
    initrd /boot/initrd-2.6.31.12-0.2-default

###Don't change this comment - YaST2 identifier: Original name: windows###
title Windows
    map (hd0) (hd0)
    map (hd0) (hd0)
    rootnoverify (hd0,0)
    makeactive
    chainloader +1

###Don't change this comment - YaST2 identifier: Original name: floppy###
title Floppy
    rootnoverify (fd0)
    chainloader +1
root@srvimartins:~#


Can you explain that partitioning from fdisk -l
Because it’s messy to say the least.

" booom! stop works…". Is this booom! hapening on al boot entries, or only on Windows, or only on Zen, or what?

Edit: the only srange thing I see is the two map statements in the Windows entry. Mappingg from a to a seems not a usefull thing and it beecomes not more usefull to do it twice.

And yes, there are some strange things in the partitioning, but only sda1 (hd0,0) (Windows) and sda2 (hd0,1) (Linux) seem too be really interesting here.

About the fdisk:


/dev/sda1  HPFS/NTFS - Windows
/dev/sda2  Linux - Linux ROOT mount (/)
/dev/sda3  Linux swap / Solaris 
/dev/sda4  Extended
/dev/sda5  HPFS/NTFS - Drive D: to windows
/dev/sda6  Linux LVM - A LVM what I create to XEN VM....
/dev/sda7  HPFS/NTFS - Drive E: to Windows

Just a note, this is my home machine… for test proposes, this is the reason for the “mess” in the partitions.

About the “boom! stop works” :slight_smile:
Occur when I restart the machine. When I change the default option the Yast Bootloader it run without error, everything appear OK.
When I restart the machine, the grub menu don’t appear and show only the message “Loading Stage2. Read Error”…

About the two maps in the Windows statement, this appear after a test I made (checking in the Yast Bootloader all options : Active this partition… Map Section to the first disk…)

Do you have a backup of menu.lst before you started all sorts of tests?

Then you can compare. In any case the map statements are bogus, I would remove them. I am also not sure of the makeactive, but you can read

info grub

as good as I.

Unfortunately I don’t have any backup…

And just a note.
If I remove all entries in the grub, and keep only the kernel-default, the error keep occur…

If I force the Yast Bootloader to make a new propose of the menu, the eror keep occur …

Remember… IF I enter in the bios during the reboot and reactivate the IDS DMA, the grub works!

Oh man… why lilo must to die!?? grub is so evil… and annoying… and stupid…

Only if you poke it with a stick…:open_mouth:

I am still trying to understand what is happening from the rather confusing and contradictory information given. Just to review the situation:

  1. From the fdisk -l listing, the boot flag is set on sda1 [for grub (hd0,0)], the Windows partition. Thus on start/restart, it will attempt to boot Windows directly.

  2. From the /etc/boot.conf listing, grub was installed to sda2 [for grub (hd0,1)] the Linux root partition. So the intention is to boot either Linux or Windows from grub.

  3. Within the Windows XP entry in menu.lst, there is the ‘makeactive’ command, which shifts the boot flag to sda1 (hd0,0). Hence even if you forcibly changed the boot flag to sda2 so that grub can start, if you then chose to boot Windows, then on the next start/ restart you would be back to 1) above.

Recommendation: remove ‘makeactive’ from the Windows entry of ‘menu.lst’. Then forcibly change the boot flag from sda1 to sda2 using cfdisk under the Live CD or Partedmagic etc. Then try booting the machine. Do you now see grub and can you boot Linux?

  1. Again for Windows XP entry in menu.lst, the ‘map (hd0) (hd0)’ commands do not do anything apart from mapping sda to itself twice. You only have to use this command when you have an old OS such as Windows 95 on the second HDD and you have to convince the OS that it is, in fact, on the first. You would then do

map (hd0) (hd1)
map (hd1) (hd0)

to swap them over.

Recommendation: delete these commands from the Windows entry of menu.lst. They just cause confusion to the people trying to help you.

  1. When Windows boots, you get the grub message about trying to load stage 2 with a read error. I am just wondering if grub might have been installed twice: once on the boot sector of sda2 [grub (hd0,1)] and once on either the MBR or sda1 [grub (hd0,0)]. Otherwise you should be able to boot Windows directly without a problem, although you would never see grub and linux.

We could see if this was the case if you supply the output of (from a root console on the Live CD or PartedMagic):

dd if=/dev/sda bs=512 count=1|hexdump -C

and

dd if=/dev/sda1 bs=512 count=1|hexdump -C

  1. I am not sure what the problem with or the relevance of the IDE DMA flag is. I did download the manual for the ASUS A7V8X-MX SE Motherboard and gave it a quick look. I think the OP is referring to ‘IDE DMA Transfer Access’ which is set to Enable by default. However, it may be called something else in other languages. It could be in conflict with another parameter elsewhere set for the IDE devices.

Suggestion: On the Exit section of the BIOS, there is a ‘Load Optimized Defaults’ option. You could use it to ensure you have sensible values throughout the BIOS. You may then have to make a couple of modifactions regarding boot order etc. Then Save the changes and see if the setting of the IDE DMA value is retained between boots.

Hope that helps

Hi All,

After long stress … I was solved the problem… .updating my BIOS to a version not so OLD = 2005 … the original BIOS is from 2003 .

Thanks all for the help , for the attention and to hear my complains about grub
But I’m still not like it… but I have some hope when the Grub2 become…

Thanks again!