Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 08 Feb 1998 13:32:20 -0800
From:      Mike Smith <mike@smith.net.au>
To:        Luigi Rizzo <luigi@labinfo.iet.unipi.it>
Cc:        mike@smith.net.au (Mike Smith), hackers@FreeBSD.ORG
Subject:   Re: Bootblock sizes (was bad144 ravings) 
Message-ID:  <199802082132.NAA00992@dingo.cdrom.com>
In-Reply-To: Your message of "Sun, 08 Feb 1998 20:51:05 %2B0100." <199802081951.UAA13052@labinfo.iet.unipi.it> 

next in thread | previous in thread | raw e-mail | index | archive | help
> > Let us look at some sizes (in bytes).  The 'Bare' bootblock has serial 
> > console support, but nothing else fancy.  
> > 
> > Config			Size		Feature bulk
> > ------			----		------------
> > Bare			6560		0 (room for 608 bytes)
> 
> is this /usr/mdec/boot2 ? In which case, why (on 2.2.1 at least) the
> first 512 bytes are all zero ?

So that the bootblock can live in the same area of the disk as a disklabel.

> (for the records, I was playing these days with simple compression
> algorithms, like the "pred.c" in iijppp, or some other simple things
> (so that the code to uncompress is reasonably small) but the savings
> are not big (perhaps 100 bytes, including the extractor overhead). This
> excludes the first 512 zeros, which probably can be easily ripped off ?

In my case at least, that part of the disk is not actually empty:

00000200  57 45 56 82 05 00 00 00  77 64 30 73 32 00 00 00  |WEV.....wd0s2...|
00000210  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000220  00 00 00 00 00 00 00 00  00 02 00 00 3f 00 00 00  |............?...|
00000230  40 00 00 00 bd 01 00 00  c0 0f 00 00 c0 60 1b 00  |@............`..|
00000240  00 00 00 00 00 00 00 00  10 0e 01 00 00 00 00 00  |................|
00000250  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000280  00 00 00 00 57 45 56 82  a9 95 08 00 00 20 00 00  |....WEV...... ..|
00000290  00 20 00 00 00 f0 00 00  00 00 00 00 00 00 00 00  |. ..............|
000002a0  07 00 00 00 00 20 03 00  00 f0 00 00 00 00 00 00  |..... ..........|
000002b0  01 00 00 00 c0 60 1b 00  00 00 00 00 00 00 00 00  |.....`..........|
000002c0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000002d0  00 00 00 00 00 d0 07 00  00 10 04 00 00 00 00 00  |................|
000002e0  07 00 00 00 c0 80 0f 00  00 e0 0b 00 00 00 00 00  |................|
000002f0  07 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000300  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*

The first four bytes there are DISKMAGIC (see /sys/sys/disklabel.h).
-- 
\\  Sometimes you're ahead,       \\  Mike Smith
\\  sometimes you're behind.      \\  mike@smith.net.au
\\  The race is long, and in the  \\  msmith@freebsd.org
\\  end it's only with yourself.  \\  msmith@cdrom.com



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199802082132.NAA00992>