All of lore.kernel.org
 help / color / mirror / Atom feed
* RE: Out of Memory Error
@ 2011-03-28 19:56 Gus Zernial
  2011-03-29  1:05 ` Vladimir 'φ-coder/phcoder' Serbinenko
  2011-03-29 21:48 ` richardvoigt
  0 siblings, 2 replies; 14+ messages in thread
From: Gus Zernial @ 2011-03-28 19:56 UTC (permalink / raw)
  To: grub-devel

I've posted my problem to this list before without getting a 
solution - also to grub-help and Ubuntu forum(s), no answer - I'm
stumped and would really appreciate help.

I have Kubuntu 10.10, a custom 2.6.37.1 kernel, and GRUB2. I was on 
v1.98 when the problem started, I'm now on 1.99~rc1 which I downloaded 
and compiled, the upgrade didn't help.

My system has three disks - / is on an SSD, and /home is on the other 
two disks which are in software RAID. Each of the three disks has a 
Windows 7 partition - the SSD has the Windows C: disk and the other 
two have partitions for Windows data disks.

All this worked fine for some time, and then something (was?) changed,
I don't know what. Now, If I boot from a power off state, I get GRUB
"Out of Memory" error, and it goes to grub-rescue>, no boot. I can
thereafter boot from the Kubuntu install disk, do repair system, do
update-grub, and reboot successfully thereafter. But if I power off,
I'm back to the GRUB "Out of Memory" error.

In repair system mode I've tried zeroing the boot sectors on all three
disks, then grub-install to all three disks, then update-grub, same
result(s). I've tried changing the bios to boot from one of the /home
disks, same result.

Results of the boot_info_script.sh are below. The only other thing I've
noticed is that linux periodically changes the sdX identifiers when it
identifies my three disks - but as indicated by the script output, I'm using UUIDs to identify the disks, not the sdX identifiers.

Apart from help in solving the problem, I'd appreciate instructions how 
further trace/log/diagnose the problem.

Thanks, Gus

$ cat RESULTS.txt 
                Boot Info Script 0.56    from 8 February 2011


============================= Boot Info Summary: ===============================

 => Grub2 (v1.99) is installed in the MBR of /dev/sda and looks at sector 1 of 
    the same hard drive for core.img. core.img is at this location on BIOS 
    drive 1 (0x80) and looks for (,msdos1)/boot/grub on this drive.
 => Grub2 (v1.99) is installed in the MBR of /dev/sdb and looks at sector 1 of 
    the same hard drive for core.img. core.img is at this location on BIOS 
    drive 1 (0x80) and uses an embedded config file:
    
    ---------------------------------------------------------------------------
    -----
    search.fs_uuid 7fd38d40-ed45-4d44-ab14-5cf7dc2020b3 root 
    set 
    prefix=($root)/boot/grub---------------------------------------------------
    -----------------------------.
 => Grub2 (v1.99) is installed in the MBR of /dev/sdc and looks at sector 1 of 
    the same hard drive for core.img. core.img is at this location on BIOS 
    drive 1 (0x80) and uses an embedded config file:
    
    ---------------------------------------------------------------------------
    -----
    search.fs_uuid 7fd38d40-ed45-4d44-ab14-5cf7dc2020b3 root 
    set 
    prefix=($root)/boot/grub---------------------------------------------------
    -----------------------------.

sda1: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  Grub2 (v1.97-1.98)
    Boot sector info:  Grub2 (v1.97-1.98) is installed in the boot sector of 
                       sda1 and looks at sector 71572671 of the same hard 
                       drive for core.img, but core.img can not be found at 
                       this location.
    Operating System:  Ubuntu 10.10
    Boot files:        /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

sda2: __________________________________________________________________________

    File system:       swap
    Boot sector type:  -
    Boot sector info:  

sda3: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  Windows 7
    Boot files:        /bootmgr /Boot/BCD /Windows/System32/winload.exe

sdb1: __________________________________________________________________________

    File system:       linux_raid_member
    Boot sector type:  -
    Boot sector info:  

sdb2: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        

sdc1: __________________________________________________________________________

    File system:       linux_raid_member
    Boot sector type:  Unknown
    Boot sector info:  

sdc2: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        

md0: ___________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info:  
    Operating System:  
    Boot files:        

============================ Drive/Partition Info: =============================

Drive: sda _____________________________________________________________________

Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders, total 234441648 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition  Boot  Start Sector    End Sector  # of Sectors  Id System

/dev/sda1                  63   122,849,054   122,848,992  83 Linux
/dev/sda2         122,849,055   143,331,929    20,482,875  82 Linux swap / Solaris
/dev/sda3    *    143,331,930   234,436,544    91,104,615   7 NTFS / exFAT / HPFS


Drive: sdb _____________________________________________________________________

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition  Boot  Start Sector    End Sector  # of Sectors  Id System

/dev/sdb1                  63   838,882,169   838,882,107  fd Linux raid autodetect
/dev/sdb2         838,882,170   976,768,064   137,885,895   7 NTFS / exFAT / HPFS


Drive: sdc _____________________________________________________________________

Disk /dev/sdc: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition  Boot  Start Sector    End Sector  # of Sectors  Id System

/dev/sdc1                  63   838,882,169   838,882,107  fd Linux raid autodetect
/dev/sdc2         838,882,170   976,768,064   137,885,895   7 NTFS / exFAT / HPFS


"blkid" output: ________________________________________________________________

Device           UUID                                   TYPE       LABEL

/dev/md0         46a79a27-b4a7-484b-bab3-23776b846cfe   ext4       
/dev/sda1        7fd38d40-ed45-4d44-ab14-5cf7dc2020b3   ext4       
/dev/sda2        46ecc0c4-ead4-4b8a-a455-5232ff1e2a99   swap       
/dev/sda3        2C2B442124EDF860                       ntfs       
/dev/sdb1        7da7d435-e3c9-6dd7-a977-e92bf3733aeb   linux_raid_member 
/dev/sdb2        D2BA5A8FBA5A6FC9                       ntfs       
/dev/sdc1        7da7d435-e3c9-6dd7-a977-e92bf3733aeb   linux_raid_member 
/dev/sdc2        4E2A654B2A6530DF                       ntfs       

================================ Mount points: =================================

Device           Mount_Point              Type       Options

/dev/md0         /home                    ext4       (rw,errors=remount-ro,commit=0)
/dev/sda1        /                        ext4       (rw,errors=remount-ro,commit=0)
/dev/sda3        /media/Win7boot          fuseblk    (rw,nosuid,nodev,allow_other,blksize=4096)
/dev/sdb2        /media/Win7diskE         fuseblk    (rw,nosuid,nodev,allow_other,blksize=4096)
/dev/sdc2        /media/Win7diskF         fuseblk    (rw,nosuid,nodev,allow_other,blksize=4096)


=========================== sda1/boot/grub/grub.cfg: ===========================

--------------------------------------------------------------------------------
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /usr/local/etc/grub.d and settings from /usr/local/etc/default/grub
#

### BEGIN /usr/local/etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  load_env
fi
set default="0"
if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function load_video {
  insmod vbe
  insmod vga
  insmod video_bochs
  insmod video_cirrus
}

insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root 7fd38d40-ed45-4d44-ab14-5cf7dc2020b3
if loadfont /usr/local/share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  load_video
  insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root 7fd38d40-ed45-4d44-ab14-5cf7dc2020b3
set locale_dir=($root)/boot/grub/locale
set lang=C
insmod gettext
set timeout=5
### END /usr/local/etc/grub.d/00_header ###

### BEGIN /usr/local/etc/grub.d/10_linux ###
menuentry 'GNU/Linux, with Linux 2.6.37.1c' --class gnu-linux --class gnu --class os {
        load_video
        set gfxpayload=keep
        insmod part_msdos
        insmod ext2
        set root='(hd0,msdos1)'
        search --no-floppy --fs-uuid --set=root 7fd38d40-ed45-4d44-ab14-5cf7dc2020b3
        echo    'Loading Linux 2.6.37.1c ...'
        linux   /boot/vmlinuz-2.6.37.1c root=UUID=7fd38d40-ed45-4d44-ab14-5cf7dc2020b3 ro  
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.img-2.6.37.1c
}
menuentry 'GNU/Linux, with Linux 2.6.37.1c (recovery mode)' --class gnu-linux --class gnu --class os {
        load_video
        set gfxpayload=keep
        insmod part_msdos
        insmod ext2
        set root='(hd0,msdos1)'
        search --no-floppy --fs-uuid --set=root 7fd38d40-ed45-4d44-ab14-5cf7dc2020b3
        echo    'Loading Linux 2.6.37.1c ...'
        linux   /boot/vmlinuz-2.6.37.1c root=UUID=7fd38d40-ed45-4d44-ab14-5cf7dc2020b3 ro single 
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.img-2.6.37.1c
}
menuentry 'GNU/Linux, with Linux 2.6.35-27-generic' --class gnu-linux --class gnu --class os {
        load_video
        set gfxpayload=keep
        insmod part_msdos
        insmod ext2
        set root='(hd0,msdos1)'
        search --no-floppy --fs-uuid --set=root 7fd38d40-ed45-4d44-ab14-5cf7dc2020b3
        echo    'Loading Linux 2.6.35-27-generic ...'
        linux   /boot/vmlinuz-2.6.35-27-generic root=UUID=7fd38d40-ed45-4d44-ab14-5cf7dc2020b3 ro  
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.img-2.6.35-27-generic
}
menuentry 'GNU/Linux, with Linux 2.6.35-27-generic (recovery mode)' --class gnu-linux --class gnu --class os {
        load_video
        set gfxpayload=keep
        insmod part_msdos
        insmod ext2
        set root='(hd0,msdos1)'
        search --no-floppy --fs-uuid --set=root 7fd38d40-ed45-4d44-ab14-5cf7dc2020b3
        echo    'Loading Linux 2.6.35-27-generic ...'
        linux   /boot/vmlinuz-2.6.35-27-generic root=UUID=7fd38d40-ed45-4d44-ab14-5cf7dc2020b3 ro single 
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.img-2.6.35-27-generic
}
menuentry 'GNU/Linux, with Linux 2.6.35-25-generic' --class gnu-linux --class gnu --class os {
        load_video
        set gfxpayload=keep
        insmod part_msdos
        insmod ext2
        set root='(hd0,msdos1)'
        search --no-floppy --fs-uuid --set=root 7fd38d40-ed45-4d44-ab14-5cf7dc2020b3
        echo    'Loading Linux 2.6.35-25-generic ...'
        linux   /boot/vmlinuz-2.6.35-25-generic root=UUID=7fd38d40-ed45-4d44-ab14-5cf7dc2020b3 ro  
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.img-2.6.35-25-generic
}
menuentry 'GNU/Linux, with Linux 2.6.35-25-generic (recovery mode)' --class gnu-linux --class gnu --class os {
        load_video
        set gfxpayload=keep
        insmod part_msdos
        insmod ext2
        set root='(hd0,msdos1)'
        search --no-floppy --fs-uuid --set=root 7fd38d40-ed45-4d44-ab14-5cf7dc2020b3
        echo    'Loading Linux 2.6.35-25-generic ...'
        linux   /boot/vmlinuz-2.6.35-25-generic root=UUID=7fd38d40-ed45-4d44-ab14-5cf7dc2020b3 ro single 
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.img-2.6.35-25-generic
}
### END /usr/local/etc/grub.d/10_linux ###

### BEGIN /usr/local/etc/grub.d/20_linux_xen ###
### END /usr/local/etc/grub.d/20_linux_xen ###

### BEGIN /usr/local/etc/grub.d/30_os-prober ###
menuentry "Windows 7 (loader) (on /dev/sde3)" --class windows --class os {
        insmod part_msdos
        insmod ntfs
        set root='(hd0,msdos3)'
        search --no-floppy --fs-uuid --set=root 2C2B442124EDF860
        chainloader +1
}
### END /usr/local/etc/grub.d/30_os-prober ###

### BEGIN /usr/local/etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /usr/local/etc/grub.d/40_custom ###

### BEGIN /usr/local/etc/grub.d/41_custom ###
if [ -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /usr/local/etc/grub.d/41_custom ###
--------------------------------------------------------------------------------

=============================== sda1/etc/fstab: ================================

--------------------------------------------------------------------------------
# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
# / was on /dev/sda1 during installation
UUID=7fd38d40-ed45-4d44-ab14-5cf7dc2020b3 /  ext4    errors=remount-ro 0       1
# swap was on /dev/sda2 during installation
UUID=46ecc0c4-ead4-4b8a-a455-5232ff1e2a99 none swap    sw         0       0
# Mount /home on /dev/md0
UUID=46a79a27-b4a7-484b-bab3-23776b846cfe /home ext4 errors=remount-ro 0       1

UUID=2C2B442124EDF860     /media/Win7boot   ntfs-3g   defaults,locale=en_US.utf8   0    2

UUID=D2BA5A8FBA5A6FC9     /media/Win7diskE  ntfs-3g   defaults,locale=en_US.utf8   0    2

UUID=4E2A654B2A6530DF     /media/Win7diskF  ntfs-3g   defaults,locale=en_US.utf8   0    2

# 192.168.1.17:/        /mnt    nfs4    _netdev,auto  0  2

# /dev/md1       /mnt/LinuxBackup    ext3 atime,rw,exec,auto,dev  0 3
# /dev/md2       /mnt/WinBackup      ntfs-3g atime,rw,exec,auto,dev  0 4
--------------------------------------------------------------------------------

=================== sda1: Location of files loaded by Grub: ====================

           GiB - GB             File                                 Fragment(s)

  34.129695415 = 36.646481408   boot/grub/core.img                             1
  34.210975170 = 36.733754880   boot/grub/grub.cfg                             1
   6.100455761 = 6.550314496    boot/initrd.img-2.6.35-25-generic              2
   4.426833630 = 4.753276416    boot/initrd.img-2.6.35-25-server               2
   3.553847790 = 3.815915008    boot/initrd.img-2.6.35-27-generic              2
   3.654582500 = 3.924078080    boot/initrd.img-2.6.37.1c                      4
  34.258113384 = 36.784369152   boot/vmlinuz-2.6.35-25-generic                 1
  34.273276806 = 36.800650752   boot/vmlinuz-2.6.35-27-generic                 1
  34.269229412 = 36.796304896   boot/vmlinuz-2.6.37.1c                         1
   3.553847790 = 3.815915008    initrd.img                                     2
   4.426833630 = 4.753276416    initrd.img.old                                 2
  34.273276806 = 36.800650752   vmlinuz                                        1

======================== Unknown MBRs/Boot Sectors/etc: ========================

Unknown BootLoader on sdc1

00000000  00 00 c0 03 10 00 c0 03  20 00 c0 03 e0 5f 00 20  |........ ...._. |
00000010  00 00 05 00 00 00 00 00  00 00 00 00 00 20 ec 82  |............. ..|
00000020  01 00 c0 03 11 00 c0 03  20 02 c0 03 f1 07 00 20  |........ ...... |
00000030  00 00 05 00 00 00 00 00  00 00 00 00 00 20 d9 c8  |............. ..|
00000040  02 00 c0 03 12 00 c0 03  20 04 c0 03 9c 07 00 20  |........ ...... |
00000050  00 00 05 00 00 00 00 00  00 00 00 00 00 20 3b d8  |............. ;.|
00000060  03 00 c0 03 13 00 c0 03  20 06 c0 03 fd 07 00 20  |........ ...... |
00000070  00 00 05 00 00 00 00 00  00 00 00 00 00 20 af 9a  |............. ..|
00000080  04 00 c0 03 14 00 c0 03  20 08 c0 03 00 00 00 20  |........ ...... |
00000090  00 00 05 00 00 00 00 00  00 00 00 00 00 20 b8 95  |............. ..|
000000a0  05 00 c0 03 15 00 c0 03  20 0a c0 03 00 00 00 20  |........ ...... |
000000b0  00 00 05 00 00 00 00 00  00 00 00 00 00 20 63 35  |............. c5|
000000c0  06 00 c0 03 16 00 c0 03  20 0c c0 03 00 00 00 20  |........ ...... |
000000d0  00 00 05 00 00 00 00 00  00 00 00 00 00 20 0d 94  |............. ..|
000000e0  07 00 c0 03 17 00 c0 03  20 0e c0 03 00 00 00 20  |........ ...... |
000000f0  00 00 05 00 00 00 00 00  00 00 00 00 00 20 d6 34  |............. .4|
00000100  08 00 c0 03 18 00 c0 03  20 10 c0 03 00 00 00 20  |........ ...... |
00000110  00 00 05 00 00 00 00 00  00 00 00 00 00 20 06 90  |............. ..|
00000120  09 00 c0 03 19 00 c0 03  20 12 c0 03 00 00 00 20  |........ ...... |
00000130  00 00 05 00 00 00 00 00  00 00 00 00 00 20 dd 30  |............. .0|
00000140  0a 00 c0 03 1a 00 c0 03  20 14 c0 03 00 00 00 20  |........ ...... |
00000150  00 00 05 00 00 00 00 00  00 00 00 00 00 20 b3 91  |............. ..|
00000160  0b 00 c0 03 1b 00 c0 03  20 16 c0 03 ff 07 00 20  |........ ...... |
00000170  00 00 05 00 00 00 00 00  00 00 00 00 00 20 da 24  |............. .$|
00000180  0c 00 c0 03 1c 00 c0 03  20 18 c0 03 e6 07 00 20  |........ ...... |
00000190  00 00 05 00 00 00 00 00  00 00 00 00 00 20 09 dd  |............. ..|
000001a0  0d 00 c0 03 1d 00 c0 03  20 1a c0 03 00 00 00 20  |........ ...... |
000001b0  00 00 05 00 00 00 00 00  00 00 00 00 00 20 b7 33  |............. .3|
000001c0  0e 00 c0 03 1e 00 c0 03  20 1c c0 03 00 00 00 20  |........ ...... |
000001d0  00 00 05 00 00 00 00 00  00 00 00 00 00 20 d9 92  |............. ..|
000001e0  0f 00 c0 03 1f 00 c0 03  20 1e c0 03 00 00 00 20  |........ ...... |
000001f0  00 00 05 00 00 00 00 00  00 00 00 00 00 20 02 32  |............. .2|
00000200


========= Devices which don't seem to have a corresponding hard drive: =========

sdd sde sdf sdg 

=============================== StdErr Messages: ===============================

unlzma: Decoder error
unlzma: Decoder error
unlzma: Decoder error
mdadm: metadata format 00.90 unknown, ignored.
mdadm: metadata format 00.90 unknown, ignored.
mdadm: metadata format 00.90 unknown, ignored.
mdadm: metadata format 00.90 unknown, ignored.
mdadm: metadata format 00.90 unknown, ignored.
mdadm: metadata format 00.90 unknown, ignored.
mdadm: no devices found for /dev/md1
mdadm: no devices found for /dev/md2
mdadm: metadata format 00.90 unknown, ignored.
mdadm: metadata format 00.90 unknown, ignored.
mdadm: metadata format 00.90 unknown, ignored.



   


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Out of Memory Error
  2011-03-28 19:56 Out of Memory Error Gus Zernial
@ 2011-03-29  1:05 ` Vladimir 'φ-coder/phcoder' Serbinenko
  2011-03-29 21:38   ` Gus Zernial
  2011-03-29 21:48 ` richardvoigt
  1 sibling, 1 reply; 14+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2011-03-29  1:05 UTC (permalink / raw)
  To: The development of GNU GRUB; +Cc: Gus Zernial

[-- Attachment #1: Type: text/plain, Size: 1312 bytes --]

On 28.03.2011 21:56, Gus Zernial wrote:
> I've posted my problem to this list before without getting a 
> solution - also to grub-help and Ubuntu forum(s), no answer - I'm
> stumped and would really appreciate help.
>
> I have Kubuntu 10.10, a custom 2.6.37.1 kernel, and GRUB2. I was on 
> v1.98 when the problem started, I'm now on 1.99~rc1 which I downloaded 
> and compiled, the upgrade didn't help.
>
> My system has three disks - / is on an SSD, and /home is on the other 
> two disks which are in software RAID. Each of the three disks has a 
> Windows 7 partition - the SSD has the Windows C: disk and the other 
> two have partitions for Windows data disks.
>
> All this worked fine for some time, and then something (was?) changed,
> I don't know what. Now, If I boot from a power off state, I get GRUB
> "Out of Memory" error, and it goes to grub-rescue>, 
Are you able to see the devices needed for boot if you type "ls" ?
Also adding --debug-image=all to grub-install would enable extra debug
messages
> no boot. I can
> thereafter boot from the Kubuntu install disk, do repair system, do
> update-grub, and reboot successfully thereafter. But if I power off,
> I'm back to the GRUB "Out of Memory" error.
>
>   

-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Out of Memory Error
  2011-03-29  1:05 ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2011-03-29 21:38   ` Gus Zernial
  2011-03-30  1:00     ` Jordan Uggla
  0 siblings, 1 reply; 14+ messages in thread
From: Gus Zernial @ 2011-03-29 21:38 UTC (permalink / raw)
  To: grub-devel; +Cc: Vladimir 'φ-coder/phcoder' Serbinenko

Thanks for your reply. First of all, the error is "Out of disk", not 
"Out of memory", my bad

> Are you able to see the devices needed for boot if you type
> "ls" ?
> Also adding --debug-image=all to grub-install would enable
> extra debug messages
> Regards Vladimir 'φ-coder/phcoder' Serbinenko

Yes I can see the devices needed to boot, when typing ls.

After adding --debug-image=all here's what I get

kern/disk.c: 245: Opening 'hd0,msdos1' ...
partmap/msdos.c: 101: partition 0: flag 0x0, type 0x83, start 0x3f, len 0x75286e0  
kern/fs.c: 54: Detecting ext2 ...
kern/disk.c: 397: Read out of range: sector 0x440013f (out of disk).
kern/disk.c: 330: Closing 'hd0'
error: out of disk
Entering rescue mode ...
grub rescue>


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Out of Memory Error
  2011-03-28 19:56 Out of Memory Error Gus Zernial
  2011-03-29  1:05 ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2011-03-29 21:48 ` richardvoigt
  2011-03-30  0:50   ` Phillip Susi
  1 sibling, 1 reply; 14+ messages in thread
From: richardvoigt @ 2011-03-29 21:48 UTC (permalink / raw)
  To: The development of GNU GRUB; +Cc: Gus Zernial

On Mon, Mar 28, 2011 at 2:56 PM, Gus Zernial <gus_zernial@yahoo.com> wrote:
> I've posted my problem to this list before without getting a
> solution - also to grub-help and Ubuntu forum(s), no answer - I'm
> stumped and would really appreciate help.
>
> I have Kubuntu 10.10, a custom 2.6.37.1 kernel, and GRUB2. I was on
> v1.98 when the problem started, I'm now on 1.99~rc1 which I downloaded
> and compiled, the upgrade didn't help.
>
> My system has three disks - / is on an SSD, and /home is on the other

Which SSD?  This sounds rather like the infamous OCZ time warp.  Are
other changes made to the SSD lost, or only the boot sector?


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Out of Memory Error
  2011-03-29 21:48 ` richardvoigt
@ 2011-03-30  0:50   ` Phillip Susi
  2011-03-30  1:13     ` richardvoigt
  0 siblings, 1 reply; 14+ messages in thread
From: Phillip Susi @ 2011-03-30  0:50 UTC (permalink / raw)
  To: The development of GNU GRUB; +Cc: richardvoigt, Gus Zernial

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 03/29/2011 05:48 PM, richardvoigt@gmail.com wrote:
> Which SSD?  This sounds rather like the infamous OCZ time warp.  Are
> other changes made to the SSD lost, or only the boot sector?

What OCZ time warp?  I have an OCZ SSD and don't have any trouble with
it.  Hadn't noticed anything about this on their forums either.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk2SfjsACgkQJ4UciIs+XuJiSgCfQGMZYEPxOd/+j/eXhT0WMWQo
LLgAnidmNarKjR2k+kqzu+/SYknul/np
=PIV/
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Out of Memory Error
  2011-03-29 21:38   ` Gus Zernial
@ 2011-03-30  1:00     ` Jordan Uggla
  2011-03-30 13:27       ` Gus Zernial
  0 siblings, 1 reply; 14+ messages in thread
From: Jordan Uggla @ 2011-03-30  1:00 UTC (permalink / raw)
  To: The development of GNU GRUB; +Cc: Gus Zernial

2011/3/29 Gus Zernial <gus_zernial@yahoo.com>:
> Thanks for your reply. First of all, the error is "Out of disk", not
> "Out of memory", my bad

"Out of disk" is a very different error from "Out of memory". "Out of
disk" means that you have a buggy BIOS which can't handle large drives
properly. To work around this create a small /boot/ partition near the
beginning of the drive.

-- 
Jordan Uggla (Jordan_U on irc.freenode.net)


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Out of Memory Error
  2011-03-30  0:50   ` Phillip Susi
@ 2011-03-30  1:13     ` richardvoigt
  0 siblings, 0 replies; 14+ messages in thread
From: richardvoigt @ 2011-03-30  1:13 UTC (permalink / raw)
  To: Phillip Susi; +Cc: The development of GNU GRUB, Gus Zernial

> On 03/29/2011 05:48 PM, richardvoigt@gmail.com wrote:
>> Which SSD?  This sounds rather like the infamous OCZ time warp.  Are
>> other changes made to the SSD lost, or only the boot sector?

On Tue, Mar 29, 2011 at 7:50 PM, Phillip Susi <psusi@cfl.rr.com> wrote:
> What OCZ time warp?  I have an OCZ SSD and don't have any trouble with
> it.  Hadn't noticed anything about this on their forums either.

I don't have any trouble with mine either, but it seems to plague
certain systems.  It was discussed extensively during the most recent
firmware release cycle, which is how I learned about it.

http://www.ocztechnologyforum.com/forum/search.php?securitytoken=guest&do=process&query=%22time%20warp%22


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Out of Memory Error
  2011-03-30  1:00     ` Jordan Uggla
@ 2011-03-30 13:27       ` Gus Zernial
  2011-03-30 21:15         ` Lennart Sorensen
                           ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Gus Zernial @ 2011-03-30 13:27 UTC (permalink / raw)
  To: grub-devel

I can believe it's a BIOS problem, but ... 120 GB is a "large drive"?


--- On Tue, 3/29/11, Jordan Uggla <jordan.uggla@gmail.com> wrote:

> From: Jordan Uggla <jordan.uggla@gmail.com>
> Subject: Re: Out of Memory Error
> To: "The development of GNU GRUB" <grub-devel@gnu.org>
> Cc: "Gus Zernial" <gus_zernial@yahoo.com>
> Date: Tuesday, March 29, 2011, 6:00 PM
> 2011/3/29 Gus Zernial <gus_zernial@yahoo.com>:
> > Thanks for your reply. First of all, the error is "Out
> of disk", not
> > "Out of memory", my bad
> 
> "Out of disk" is a very different error from "Out of
> memory". "Out of
> disk" means that you have a buggy BIOS which can't handle
> large drives
> properly. To work around this create a small /boot/
> partition near the
> beginning of the drive.
> 
> -- 
> Jordan Uggla (Jordan_U on irc.freenode.net)
> 


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Out of Memory Error
  2011-03-30 13:27       ` Gus Zernial
@ 2011-03-30 21:15         ` Lennart Sorensen
  2011-03-31  6:35         ` Vladimir 'φ-coder/phcoder' Serbinenko
  2011-04-07  0:29         ` Vladimir 'φ-coder/phcoder' Serbinenko
  2 siblings, 0 replies; 14+ messages in thread
From: Lennart Sorensen @ 2011-03-30 21:15 UTC (permalink / raw)
  To: The development of GNU GRUB

On Wed, Mar 30, 2011 at 06:27:43AM -0700, Gus Zernial wrote:
> I can believe it's a BIOS problem, but ... 120 GB is a "large drive"?

I am currently dealing with 'out of disk' on a CM-iTC using a phoenix
bios and the brand new atom chip.  Works fine up to 8GB, but at 40GB
or other higher places on an 80GB SATA drive the BIOS returns error and
hence grub says 'out of disk'.

I am amazed how many long solved problems BIOS makers can keep causing.

-- 
Len Sorensen


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Out of Memory Error
  2011-03-30 13:27       ` Gus Zernial
  2011-03-30 21:15         ` Lennart Sorensen
@ 2011-03-31  6:35         ` Vladimir 'φ-coder/phcoder' Serbinenko
  2011-04-07  0:29         ` Vladimir 'φ-coder/phcoder' Serbinenko
  2 siblings, 0 replies; 14+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2011-03-31  6:35 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 1571 bytes --]

On 30.03.2011 15:27, Gus Zernial wrote:
> I can believe it's a BIOS problem, but ... 120 GB is a "large drive"?
>
>
>   
Could you try booting from external media and execute
"ls -l"
It should give you the total size in blocks as seen through BIOS.
Also how is this disk accessed? PATA or AHCI? If first you can install
GRUB with --disk-module=ata. If second, then you can do the same with
--disk-module=ahci but only in experimental. Beware that AHCI in GRUB is
alpha-quality right now.
> --- On Tue, 3/29/11, Jordan Uggla <jordan.uggla@gmail.com> wrote:
>
>   
>> From: Jordan Uggla <jordan.uggla@gmail.com>
>> Subject: Re: Out of Memory Error
>> To: "The development of GNU GRUB" <grub-devel@gnu.org>
>> Cc: "Gus Zernial" <gus_zernial@yahoo.com>
>> Date: Tuesday, March 29, 2011, 6:00 PM
>> 2011/3/29 Gus Zernial <gus_zernial@yahoo.com>:
>>     
>>> Thanks for your reply. First of all, the error is "Out
>>>       
>> of disk", not
>>     
>>> "Out of memory", my bad
>>>       
>> "Out of disk" is a very different error from "Out of
>> memory". "Out of
>> disk" means that you have a buggy BIOS which can't handle
>> large drives
>> properly. To work around this create a small /boot/
>> partition near the
>> beginning of the drive.
>>
>> -- 
>> Jordan Uggla (Jordan_U on irc.freenode.net)
>>
>>     
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
>
>   


-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Out of Memory Error
  2011-03-30 13:27       ` Gus Zernial
  2011-03-30 21:15         ` Lennart Sorensen
  2011-03-31  6:35         ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2011-04-07  0:29         ` Vladimir 'φ-coder/phcoder' Serbinenko
  2 siblings, 0 replies; 14+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2011-04-07  0:29 UTC (permalink / raw)
  To: The development of GNU GRUB; +Cc: Gus Zernial

[-- Attachment #1: Type: text/plain, Size: 256 bytes --]

On 30.03.2011 15:27, Gus Zernial wrote:
> I can believe it's a BIOS problem, but ... 120 GB is a "large drive"?
>
>
Are you able to list your files with
ls (hdX,1)/
(iterate X over digits)

-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Out of memory error
       [not found]               ` <49846071.1020809@ii.net>
@ 2009-01-31 13:48                 ` Peter Zijlstra
  0 siblings, 0 replies; 14+ messages in thread
From: Peter Zijlstra @ 2009-01-31 13:48 UTC (permalink / raw)
  To: Cliffe; +Cc: linux-kernel

On Sat, 2009-01-31 at 22:30 +0800, Cliffe wrote:

> > Its simply a case of you using kmalloc(GFP_ATOMIC) and that's failing.
> >   
> 
> So it has nothing to do with stack size because we are talking heap?
> What could be causing the problem?

Right, heap. The thing is, Linux has a greedy memory usage, and tries to
keep as much as possible in memory, this means that we're basically in a
constant state of low memory.

Regular allocations (GFP_KERNEL) can sleep, and can therefore reclaim
memory (write out stuff dirty to disk, swap a little, etc..).

Your allocation (GFP_ATOMIC) isn't allowed to sleep, and can therefore
not reclaim memory -- if it really hits rock bottom, not uncommon, it
just fails to provide memory.

Any code using GFP_ATOMIC (or for that matter, any kernel allocation,
GFP_KERNEL can fail too, just not as easy) must be able to deal with
allocation failures.

How to do that is very domain specific.

> How limited is the stack?

Depends on the arch and build details, 4k is a reasonable assumption.

> > Furthermore, it appears to me you're not using frame pointers for your
> > kernel builds, please ammend that, it gives far more readable output.
> >   
> 
> I'll look into that. Is that a kernel compile config option?

CONFIG_FRAME_POINTER=y


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Out of memory error
       [not found]         ` <m2ocxpzhs2.fsf@ssh.synack.fr>
@ 2009-01-31 13:17           ` Cliffe
  2009-01-31 12:58             ` Peter Zijlstra
  0 siblings, 1 reply; 14+ messages in thread
From: Cliffe @ 2009-01-31 13:17 UTC (permalink / raw)
  To: linux-kernel

Hello,

I get the following error messages from code I am working on. It works 
fine in userspace.

I suspect it may be due to the kernel's limited stack size as it uses a 
recursive algorithm. If this is the cause, how can I provide the (lsm) 
module with more memory? This is for a research project so it is ok if 
the solution is not quite kosher.

Thank you, any help will be appreciated. Please CC me in on any replies.

Cliffe.

The message:

The following is only an harmless informational message.
Unless you get a _continuous_flood_ of these messages it means
everything is working fine. Allocations from irqs cannot be
perfectly reliable and the kernel is designed to handle that.
bash: page allocation failure. order:0, mode:0x20
 [<c015846a>] __alloc_pages+0x2c5/0x2d6
 [<c016de72>] cache_alloc_refill+0x2ae/0x4c1
 [<c0129640>] irq_exit+0x53/0x6b
 [<c016e0fc>] __kmalloc+0x77/0x8f
 [<e1060c01>] mem_alloc+0x19/0x5f [fbac_lsm]
 [<e1069b14>] copy_to_new_to_send_recursive+0x22/0x91 [fbac_lsm]
 [<e1069cf3>] copy_to_new_func_recursive+0xde/0x11d [fbac_lsm]
 [<e1069ce3>] copy_to_new_func_recursive+0xce/0x11d [fbac_lsm]
 [<e1069ce3>] copy_to_new_func_recursive+0xce/0x11d [fbac_lsm]
 [<e1069ce3>] copy_to_new_func_recursive+0xce/0x11d [fbac_lsm]
 [<e10633fc>] build_task_tree_found_application+0x82/0x144 [fbac_lsm]
 [<e10635d7>] build_task_tree_find_application+0x9d/0x1a5 [fbac_lsm]
 [<e106381c>] build_task_tree+0x13d/0x1a1 [fbac_lsm]
 [<e1064ca9>] start_task+0x32/0x175 [fbac_lsm]
 [<e1060a6a>] fbac_lsm_bprm_set_security+0x124/0x1f1 [fbac_lsm]
 [<c017449f>] prepare_binprm+0xa7/0xd0
 [<c0173f27>] count+0x14/0x3f
 [<c017597f>] do_execve+0xef/0x1e1
 [<c01036fe>] sys_execve+0x2f/0x78
 [<c0104e22>] sysenter_past_esp+0x6b/0xa9
 =======================
Mem-info:
DMA per-cpu:
CPU    0: Hot: hi:    0, btch:   1 usd:   0   Cold: hi:    0, btch:   1 
usd:   0
Normal per-cpu:
CPU    0: Hot: hi:  186, btch:  31 usd:  22   Cold: hi:   62, btch:  15 
usd:  12
Active:50484 inactive:64525 dirty:108 writeback:0 unstable:0
 free:761 slab:10659 mapped:10607 pagetables:421 bounce:0
DMA free:2000kB min:88kB low:108kB high:132kB active:392kB 
inactive:8332kB present:16256kB pages_scanned:0 all_unreclaimable? no
lowmem_reserve[]: 0 492 492
Normal free:1044kB min:2792kB low:3488kB high:4188kB active:201544kB 
inactive:249768kB present:503936kB pages_scanned:0 all_unreclaimable? no
lowmem_reserve[]: 0 0 0
DMA: 0*4kB 0*8kB 1*16kB 0*32kB 1*64kB 1*128kB 1*256kB 1*512kB 1*1024kB 
0*2048kB 0*4096kB = 2000kB
Normal: 1*4kB 0*8kB 1*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 
1*1024kB 0*2048kB 0*4096kB = 1044kB
Swap cache: add 0, delete 0, find 0/0, race 0+0
Free swap  = 0kB
Total swap = 0kB
Free swap:            0kB
131072 pages of RAM
0 pages of HIGHMEM
2092 reserved pages
92964 pages shared
0 pages swap cached
108 pages dirty
0 pages writeback
10607 pages mapped
10659 pages slab
421 pages pagetables


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Out of memory error
  2009-01-31 13:17           ` Out of memory error Cliffe
@ 2009-01-31 12:58             ` Peter Zijlstra
       [not found]               ` <49846071.1020809@ii.net>
  0 siblings, 1 reply; 14+ messages in thread
From: Peter Zijlstra @ 2009-01-31 12:58 UTC (permalink / raw)
  To: Cliffe; +Cc: linux-kernel

On Sat, 2009-01-31 at 21:17 +0800, Cliffe wrote:
> Hello,
> 
> I get the following error messages from code I am working on. It works 
> fine in userspace.

its very very unlikely you'll ever experience malloc() failing in
userspace.

> I suspect it may be due to the kernel's limited stack size as it uses a 
> recursive algorithm. If this is the cause, how can I provide the (lsm) 
> module with more memory?

You cannot, you'll have to rewrite your code to be iterative and use an
allocated traversal stack.

>  This is for a research project so it is ok if 
> the solution is not quite kosher.

And here you shatter my illusion that science is careful work ;-)

> Thank you, any help will be appreciated. Please CC me in on any replies.

Its simply a case of you using kmalloc(GFP_ATOMIC) and that's failing.
Furthermore, it appears to me you're not using frame pointers for your
kernel builds, please ammend that, it gives far more readable output.

> The following is only an harmless informational message.
> Unless you get a _continuous_flood_ of these messages it means
> everything is working fine. Allocations from irqs cannot be
> perfectly reliable and the kernel is designed to handle that.
> bash: page allocation failure. order:0, mode:0x20
>  [<c015846a>] __alloc_pages+0x2c5/0x2d6
>  [<c016de72>] cache_alloc_refill+0x2ae/0x4c1
>  [<c0129640>] irq_exit+0x53/0x6b
>  [<c016e0fc>] __kmalloc+0x77/0x8f
>  [<e1060c01>] mem_alloc+0x19/0x5f [fbac_lsm]
>  [<e1069b14>] copy_to_new_to_send_recursive+0x22/0x91 [fbac_lsm]
>  [<e1069cf3>] copy_to_new_func_recursive+0xde/0x11d [fbac_lsm]
>  [<e1069ce3>] copy_to_new_func_recursive+0xce/0x11d [fbac_lsm]
>  [<e1069ce3>] copy_to_new_func_recursive+0xce/0x11d [fbac_lsm]
>  [<e1069ce3>] copy_to_new_func_recursive+0xce/0x11d [fbac_lsm]
>  [<e10633fc>] build_task_tree_found_application+0x82/0x144 [fbac_lsm]
>  [<e10635d7>] build_task_tree_find_application+0x9d/0x1a5 [fbac_lsm]
>  [<e106381c>] build_task_tree+0x13d/0x1a1 [fbac_lsm]
>  [<e1064ca9>] start_task+0x32/0x175 [fbac_lsm]
>  [<e1060a6a>] fbac_lsm_bprm_set_security+0x124/0x1f1 [fbac_lsm]
>  [<c017449f>] prepare_binprm+0xa7/0xd0
>  [<c0173f27>] count+0x14/0x3f
>  [<c017597f>] do_execve+0xef/0x1e1
>  [<c01036fe>] sys_execve+0x2f/0x78
>  [<c0104e22>] sysenter_past_esp+0x6b/0xa9
>  =======================
> Mem-info:
> DMA per-cpu:
> CPU    0: Hot: hi:    0, btch:   1 usd:   0   Cold: hi:    0, btch:   1 
> usd:   0
> Normal per-cpu:
> CPU    0: Hot: hi:  186, btch:  31 usd:  22   Cold: hi:   62, btch:  15 
> usd:  12
> Active:50484 inactive:64525 dirty:108 writeback:0 unstable:0
>  free:761 slab:10659 mapped:10607 pagetables:421 bounce:0
> DMA free:2000kB min:88kB low:108kB high:132kB active:392kB 
> inactive:8332kB present:16256kB pages_scanned:0 all_unreclaimable? no
> lowmem_reserve[]: 0 492 492
> Normal free:1044kB min:2792kB low:3488kB high:4188kB active:201544kB 
> inactive:249768kB present:503936kB pages_scanned:0 all_unreclaimable? no
> lowmem_reserve[]: 0 0 0
> DMA: 0*4kB 0*8kB 1*16kB 0*32kB 1*64kB 1*128kB 1*256kB 1*512kB 1*1024kB 
> 0*2048kB 0*4096kB = 2000kB
> Normal: 1*4kB 0*8kB 1*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 
> 1*1024kB 0*2048kB 0*4096kB = 1044kB
> Swap cache: add 0, delete 0, find 0/0, race 0+0
> Free swap  = 0kB
> Total swap = 0kB
> Free swap:            0kB
> 131072 pages of RAM
> 0 pages of HIGHMEM
> 2092 reserved pages
> 92964 pages shared
> 0 pages swap cached
> 108 pages dirty
> 0 pages writeback
> 10607 pages mapped
> 10659 pages slab
> 421 pages pagetables
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2011-04-07  0:29 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-28 19:56 Out of Memory Error Gus Zernial
2011-03-29  1:05 ` Vladimir 'φ-coder/phcoder' Serbinenko
2011-03-29 21:38   ` Gus Zernial
2011-03-30  1:00     ` Jordan Uggla
2011-03-30 13:27       ` Gus Zernial
2011-03-30 21:15         ` Lennart Sorensen
2011-03-31  6:35         ` Vladimir 'φ-coder/phcoder' Serbinenko
2011-04-07  0:29         ` Vladimir 'φ-coder/phcoder' Serbinenko
2011-03-29 21:48 ` richardvoigt
2011-03-30  0:50   ` Phillip Susi
2011-03-30  1:13     ` richardvoigt
     [not found] <m2eiz06iav.fsf@ssh.synack.fr>
     [not found] ` <200901291025.36076.paul.moore@hp.com>
     [not found]   ` <1233267347.13812.22.camel@sp-laptop3.sp-local>
     [not found]     ` <200901291738.36148.paul.moore@hp.com>
     [not found]       ` <1233275267.13812.31.camel@sp-laptop3.sp-local>
     [not found]         ` <m2ocxpzhs2.fsf@ssh.synack.fr>
2009-01-31 13:17           ` Out of memory error Cliffe
2009-01-31 12:58             ` Peter Zijlstra
     [not found]               ` <49846071.1020809@ii.net>
2009-01-31 13:48                 ` Peter Zijlstra

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.