Re: solved: pmbr: Boot loader too large

2013-01-23 Thread Daniel Braniss

  never underestimate the human stupidity (mine in this case) nor of the boot.
  pmbr will load the whole partition, which was 1M, instead of the size of
  gptboot :-(
  
  reducing the size of the slice/partition fixed the issue.
 
 pmbr doesn't have room to be but so smart.  It can't parse a filesystem, so 
 it 
 just loads a raw partition assuming that the partition is the boot loader.  
 The 545k bit has to do with where it is loaded.  The boot loader has to live 
 in the lower 640k, but it starts at 0x7c00 (the address that the BIOS always 
 loads boot loaders).  The 545k limit comes from 640k - 0x7c00.  This is a 
 fundamental limit of the x86 BIOS architecture.  Compared to the 15.5k that 
 UFS leaves for boot2 it is worlds of space.

thanks for the info.
If the error message was clearer might have saved
some time :-)
Partition size too big
instead of
Boot loader too large

btw, thanks to grep -r I was to find it came from pmbr.s


___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: solved: pmbr: Boot loader too large

2013-01-22 Thread Daniel Braniss
 hi,
 this is the output from gpart show:
 =   34  976773101  ada0  GPT  (465G)
  34   2048 1  freebsd-boot  (1.0M)
20824194304 2  freebsd-ufs  [bootme]  (2.0G)
 4196386   12582912 3  freebsd-swap  (6.0G)
16779298  959993837 4  freebsd-zfs  (457G)
 
 =   34  976773101  ada1  GPT  (465G)
  34   2048 1  freebsd-boot  (1.0M)
20824194304 2  freebsd-ufs  (2.0G)
 4196386   12582912 3  freebsd-swap  (6.0G)
16779298  959993837 4  freebsd-zfs  (457G)
 
 I also did:
   gpart bootcode -b /boot/pmbr ada0
 
 I'm trying to boot and get
   Boot loader too large
 
 not matter if I boot from disk or pxe.
 The pmbr is 512 bytes, so what causes it to overshoot? 
 I don't know x86 assembler (nor want to :-), but the comment says: 
   545k should be enough
 so what's going on?

never underestimate the human stupidity (mine in this case) nor of the boot.
pmbr will load the whole partition, which was 1M, instead of the size of
gptboot :-(

reducing the size of the slice/partition fixed the issue.



___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: solved: pmbr: Boot loader too large

2013-01-22 Thread John Baldwin
On Tuesday, January 22, 2013 6:42:22 am Daniel Braniss wrote:
  hi,
  this is the output from gpart show:
  =   34  976773101  ada0  GPT  (465G)
   34   2048 1  freebsd-boot  (1.0M)
 20824194304 2  freebsd-ufs  [bootme]  (2.0G)
  4196386   12582912 3  freebsd-swap  (6.0G)
 16779298  959993837 4  freebsd-zfs  (457G)
  
  =   34  976773101  ada1  GPT  (465G)
   34   2048 1  freebsd-boot  (1.0M)
 20824194304 2  freebsd-ufs  (2.0G)
  4196386   12582912 3  freebsd-swap  (6.0G)
 16779298  959993837 4  freebsd-zfs  (457G)
  
  I also did:
  gpart bootcode -b /boot/pmbr ada0
  
  I'm trying to boot and get
Boot loader too large
  
  not matter if I boot from disk or pxe.
  The pmbr is 512 bytes, so what causes it to overshoot? 
  I don't know x86 assembler (nor want to :-), but the comment says: 
  545k should be enough
  so what's going on?
 
 never underestimate the human stupidity (mine in this case) nor of the boot.
 pmbr will load the whole partition, which was 1M, instead of the size of
 gptboot :-(
 
 reducing the size of the slice/partition fixed the issue.

pmbr doesn't have room to be but so smart.  It can't parse a filesystem, so it 
just loads a raw partition assuming that the partition is the boot loader.  
The 545k bit has to do with where it is loaded.  The boot loader has to live 
in the lower 640k, but it starts at 0x7c00 (the address that the BIOS always 
loads boot loaders).  The 545k limit comes from 640k - 0x7c00.  This is a 
fundamental limit of the x86 BIOS architecture.  Compared to the 15.5k that 
UFS leaves for boot2 it is worlds of space.

-- 
John Baldwin
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org