Subject: Re: Can't boot new kernel built with toolchain in 2.0 ISO (sparc64)
To: FatBoy <fatboy@homesys.org>
From: FatBoy <fatboy@homesys.org>
List: port-sparc64
Date: 02/08/2005 07:28:03
Heres some more information...

I found that the kernel that wouldn't boot had a really large inode 
number.  Witness:
  # ls -i netbsd.new
  2335669 netbsd.new
  #

Thinking the 2GB issue that Eduardo mentioned may be at play, I deleted 
a couple of unnecessary files in / that had low inode numbers and cp'ed 
netbsd.new to netbsd.test.  The inode number of the resulting file ended 
up being 7.  Low and behold, that kernel image booted.

So, it seems that there is some limit to where the inode for the image 
can be located on the disk.

Any thoughts about how to "fix" this problem?  It seems that what I've 
done is an ok workaround for me for now...

Jonathan Sadler

FatBoy wrote:

> Hi Eduardo -
>
> Eduardo Horvath wrote:
>
>> On Mon, Feb 07, 2005 at 03:49:27PM -0600, FatBoy wrote:
>>  
>>
>>> Eduardo Horvath wrote:
>>>   
>>>
>>>> On Mon, Feb 07, 2005 at 11:15:36AM -0600, FatBoy wrote:
>>>>     
>>>>
>>>>> Rebooting with command: boot netbsd.new -s
>>>>> Boot device: /pci@1f,0/pci@1,1/ide@3/disk@0,0:a  File and args: 
>>>>> netbsd.new -s
>>>>> NetBSD IEEE 1275 Bootblock
>>>>> ..>> NetBSD/sparc64 OpenFirmware Boot, Revision 1.7
>>>>>       
>>>>>
>>>>>>> (builds@build, Thu Dec  2 02:33:41 UTC 2004)
>>>>>>>           
>>>>>>
>>>>> loadfile: reading header
>>>>> read header: Unknown error: code 0
>>>>> Program terminated
>>>>> ok
>>>>>       
>>>>
>>>> It's managed to load both the boot block and ofwboot.  However,
>>>> ofwboot is unable to read in the ELF header.  It's definitely
>>>> a filesystem issue.  You should check that there's a /netbsd file 
>>>> and it's not zero length or a symlink.
>>>>     
>>>
>>> The file is there of appropriate length, and is not a symlink.  When 
>>> I run file on it, it reports:
>>> # file netbsd.new
>>> netbsd.new: ELF 64-bit MSB executable, SPARC V9, version 1 (SYSV), 
>>> statically linked, not stripped
>>> #
>>>   
>>
>> I find that very strange.  Obviously, the bootblock, which I would
>> expect to fail, worked fine, and ofwboot was able to read the directory,
>> but unable to read the file itself.  Hm.
>>
>> What sort of machine is this?  Does the root partition extend beyond
>> 2GB?  ISTR some versions of OBP had problems reading beyond a certain
>> point on the disk.
>>  
>>
> The machine is an Ultra 10 with two 80G IDE drives.  wd0a and wd1a 
> from a RAID1 set (raid0) and span approx. the first 36G of the 
> drives.  raid0a is my root partition.
>
> So, it is quite possible that netbsd.new is outside of the first 2GB.  
> However, would this be the problem since it is ofwboot that is having 
> problems, not OBP?
>
> Thanks for your help,
>
> Jonathan Sadler
>
>> Try adding the -d bootflag and see if you get more info.
>>  
>>
> Didn't get much more -- just more info on loadfile being called.  Here 
> it is:
>
> ok boot netbsd.new -sd
> Resetting ...
>
> Sun Ultra 5/10 UPA/PCI (UltraSPARC-IIi 300MHz), No Keyboard
> OpenBoot 3.31, 384 MB (60 ns) memory installed, Serial #10413086.
> Ethernet address 8:0:20:9e:e4:1e, Host ID: 809ee41e.
>
>
>
> Rebooting with command: boot netbsd.new -sd                           
> Boot device: /pci@1f,0/pci@1,1/ide@3/disk@0,0:a  File and args: 
> netbsd.new -sd
> NetBSD IEEE 1275 Bootblock
> ..>> NetBSD/sparc64 OpenFirmware Boot, Revision 1.7
>
>>> (builds@build, Thu Dec  2 02:33:41 UTC 2004)
>>
> main: Calling loadfile(fd, 
> /pci@1f,0/pci@1,1/ide@3/disk@0,0:a/netbsd.new -sd)
> loadfile: reading header
> read header: Unknown error: code 0
> Program terminated
> ok
>
>> Eduardo
>>  
>>
>