Re: boot loader that can read from partition?
- From: phil-news-nospam@xxxxxxxx
- Date: 14 Oct 2006 22:04:29 GMT
On Sat, 14 Oct 2006 10:14:29 -0700 John Reiser <jreiser@xxxxxxxxxxxx> wrote:
| phil-news-nospam@xxxxxxxx wrote:
|> Is there a boot loader than can read a kernel in from a raw partition?
|
| Which architecture(s)? What environment (BIOS, OpenFirmware, etc.)
| for I/O? What disk layout for partitions (PC-DOS, Sun, BSD, Apple, ...)?
PC x86, DOS style partitions.
Other architectures would be interesting, too, such as Sun Sparc.
But for now, it is the commodity PC.
| For i386 with the usual BIOS and DOS-style ("basic") partitions:
|
| http://bitwagon.com/ftp/mbr03.tgz
| List partitions to console, select which partition using console
| (with user-defined labels, timeout, default), boot that partition.
| Fits in 446 bytes (512 - 2 - 16*4) of Master Boot Record (MBR).
|
| http://bitwagon.com/ftp/e2boot4c.tgz
| Boots named kernel and initrd and commandline from ext2 (also ext3)
| filesystem that uses 1KB blocksize [which is the default blocksize
| for "small" partitions; includes 100MB, for instance]. Fits in
| 1024 - 2*2 bytes boot block of ext2/3 filesystem; requires mbr03
| [above] to provide "read block" subroutine.
Is there any way to combine these? Since I don't need the ext2 code
at all, and loading from a partition is always purely sequential,
would it be possible to get the partition boot loader to load from
the partition directly? It should just be a matter of reading the
partition table to get the partition loadcation that mbr03 knows to
do, load the image sequentially from start to end of the partition
(it may be more sectors than needed) by simple sector increment by
one, and then pass control to the kernel? Would it fit? Since at
least sector 0 is never assigned to a partition, could additional
unassigned sector be used to cheat for space on the boot loader?
I don't have sufficient x86 assembly knowledge plus the spare machine
needed to experiment with coding x86 assembly at the boot loader level
to be able to put this together myself. So I was hoping there would
be something already out there for what I think is a very straight
forward way to boot load a kernel (if one is willing to chop up their
space in partitions to hold a kernel someone). The kernel I have has
a size of 4679831 right now. I figure an partition just shy of 8 MB
would be well more than enough to hold a future kernel, and not too
much for a boot loader to "over load" (e.g. it won't know anything
more about the image size unless there is a field in the image that
gives the size).
--
|---------------------------------------/----------------------------------|
| Phil Howard KA9WGN (ka9wgn.ham.org) / Do not send to the address below |
| first name lower case at ipal.net / spamtrap-2006-10-14-1651@xxxxxxxx |
|------------------------------------/-------------------------------------|
.
- Follow-Ups:
- Re: boot loader that can read from partition?
- From: John Reiser
- Re: boot loader that can read from partition?
- References:
- boot loader that can read from partition?
- From: phil-news-nospam
- Re: boot loader that can read from partition?
- From: John Reiser
- boot loader that can read from partition?
- Prev by Date: Re: Nobody should ever need to patch the kernel!!
- Next by Date: mouse problem I believe is in the kernel
- Previous by thread: Re: boot loader that can read from partition?
- Next by thread: Re: boot loader that can read from partition?
- Index(es):
Relevant Pages
|