• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

MakefileH A D03-May-20225.1 KiB188147

READMEH A D29-Oct-20136.2 KiB164115

bb_init1.sH A D29-Oct-2013284 2620

bb_init2.sH A D29-Oct-2013340 1816

bb_linux.sH A D29-Oct-2013278 2318

boot_fpy.sH A D29-Oct-20135.2 KiB259213

boot_win.cH A D29-Oct-20138.2 KiB321250

buffer.cH A D29-Oct-20133.4 KiB143116

bzimage.cH A D29-Oct-201316 KiB740598

commands.cH A D29-Oct-20134.9 KiB245208

freedos.hH A D29-Oct-20135.2 KiB7368

fs.cH A D29-Oct-20131.5 KiB8673

fs_dos.cH A D29-Oct-20138.5 KiB393327

fs_min.cH A D29-Oct-20135.2 KiB239180

fs_tar.cH A D29-Oct-20136.3 KiB309255

help.cH A D29-Oct-20132 KiB10378

i86_funcs.cH A D29-Oct-20134.1 KiB227198

i86_funcs.hH A D29-Oct-2013471 1811

killhd.sH A D29-Oct-20131.1 KiB6549

lsys.cH A D29-Oct-20132.8 KiB147121

makeboot.cH A D29-Oct-201329.6 KiB1,3411,146

mbr.sH A D29-Oct-201311.2 KiB609515

mbr_dm.sH A D29-Oct-20136.4 KiB314263

minix.cH A D29-Oct-201318.3 KiB944746

minix.hH A D29-Oct-20134.6 KiB10562

minix_elks.cH A D29-Oct-20132.1 KiB153122

monitor.cH A D29-Oct-20136 KiB278221

monitor.hH A D29-Oct-20131.1 KiB6247

msdos.sH A D29-Oct-20138.4 KiB404348

noboot.sH A D29-Oct-2013503 3527

nombr.sH A D29-Oct-2013358 2419

readfs.hH A D29-Oct-20131 KiB4533

relocate.cH A D29-Oct-20132.1 KiB10364

skip.sH A D29-Oct-20131.3 KiB8872

sysboot.sH A D29-Oct-20132.4 KiB8471

sysboot16.sH A D29-Oct-20132.3 KiB8370

sysmbr.sH A D29-Oct-20132.1 KiB7765

sysmbrtail.sH A D29-Oct-2013299 1411

tarboot.sH A D29-Oct-201310.3 KiB508419

unix.cH A D29-Oct-20134.6 KiB161122

zimage.sH A D29-Oct-20131 KiB7457

README

1
2Contents
3
41.0 ) Boot sectors
51.1 ) Master boot sector
61.2 ) Dosfs boot sector
71.3 ) Minixfs boot block
81.4 ) Tar boot sector
91.5 ) Skip boot sector
101.6 ) Panic boot sector
11
122.1 ) Booting i86 standalone executable
132.2 ) Booting Elks kernel
142.3 ) Booting Linux-i386 [b]zImage
15
16-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
17
181.0 ) Boot sectors
19
20   These boot sectors are mostly designed for floppy use, the exceptions
21   being the MinixFS and Master boot sectors.
22
23   The makeboot program makes them very easy to install just format the
24   disk add the correct filesystem then run a command like ...
25
26   $ makeboot minix /dev/fd0
27
28   As far as I know all boot sectors and programs are 8086 clean, with
29   the exception that, obviously, the Linux-i386 loader needs access to
30   extended memory.
31
321.1 ) Master boot sector
33
34   This MBR is a very simple one with no frills by default.
35
36   The actual code is less that 254 bytes long so it can be used as
37   an MBR for a disk with old style 'Disk manager' partitions.
38   The code now only boots one of the last four partitions.
39
40   Option 2 is a boot message that displayed as soon as the MBR loads.
41
42   Option 3 is code to accept a keypress from the user to select which
43   partition to boot (or the floppy).
44
451.2 ) Dosfs boot sector
46
47   Install with makeboot, there is also a version for 16 bit FAT
48   filesystems for big floppies (eg LS-120 disks) or hard disk
49   partitions. This boot sector loads and executes a binary BOOTFILE.SYS
50   from the root directory of the floppy.  The file can be any length
51   and is loaded at $07C00. Because of the load address this boot sector
52   can be configured to load another boot sector, for example LILO can
53   be succesfully used in this way.
54
55   Note this boot sector loads the executable 1 sector at a time, as far
56   as my testing has gone this is only significant on 8086 machines, all
57   others (286 8Mhz +) are fast enough to keep up at a 1-1 interleve.
58
59   But some versions of superformat can defeat this because they do
60   not correctly calculate intersector gaps. I suggest using fdformat
61   as this uses a 'safe' layout for standard 1440k disks.
62
631.3 ) Minixfs boot block
64
65   This boot block has varients for floppy and harddisk and works similarly
66   for both. For the hard disk it must be installed in the partition boot
67   block with a normal MBR in sector zero of the disk. This boot sector can
68   be installed with makeboot or simply by copying the 1k file to the start
69   of the partition (or floppy) to be booted.
70
71   The sector looks for a file or directory called 'boot' if it's a
72   directory it loads that and does the search again. When it finds a
73   file it loads it at location $10000 and executes it, note this
74   is limited to a file size of 519k.
75
76   There is also support for a helper boot which mean this is the only
77   boot sector able to load an ELKS image (almost) directly.
78
791.4 ) Tar boot sector
80
81   This boot sector converts a tar file with a GNU Volume label into a
82   bootable floppy image. The boot sector loads and executes the first
83   item in the tar file after the label:
84
85   $ tar cvfV the_file.tar ENIAC monitor.sys item2 item3
86   $ makeboot tar the_file.tar
87   $ cp the_file.tar /dev/fd0
88
89   This sequence makes a bootable floppy that tar sees as a normal labeled
90   tar file but when booted from will load and execute 'monitor.sys' at
91   location $00800  (Yes thats 2k!)
92
93   Warning: the tar boot sector moves the BPB to the location $666.
94
951.5 ) Skip boot sector
96
97   This bootsector displays a message then loads and executes the hard disk
98   MBR at location $07C00
99
1001.6 ) Panic boot sector
101
102   Displays the message 'PANIC! NO OS Found!' (or the message specified
103   on install) and freezes.
104
105-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
106
1072.1 ) Booting i86 standalone executable
108
109   All the boot sectors (dos, minix, tar) check for a ELKS-i86 magic number
110   at the start of the file they load and will correctly set the segment
111   registers before calling. The executable should be a 'standalone'
112   executable compiled with 'bcc -Ms ...' or similar.
113
1142.2 ) Booting Elks kernel
115
116   Only the minix boot sector can directly boot an elks kernel and even that
117   needs a helper function because of the complexity. The helper is called
118   'minix_elks.bin' and needs to be copied onto the disk as '/boot/boot'
119   with the ELKS image copied on as '/boot/linux'. This works, with the
120   correct boot block, on either floppy or harddisk.
121
1222.3 ) Booting Linux-i386 [b]zImage
123
124   None of the boot blocks can _directly_ boot a Linux-i386 kernel the
125   program 'monitor.sys' must loaded by the boot sector and this can
126   load a zimage or bzimage from an MSDOS, Minix or Tar floppy. It can
127   also load the image from a minix hard disk filesystem.
128
129   This example is for and MSDOS floppy, Tar is very similar except that
130   'monitor.sys' must be the first file in the tar and can have any name.
131
132   Note also for a tar file the 'ramdisk.gz' file must start on the first
133   disk but can extend across as many floppies as is needed.
134
135   $ mformat a:
136   $ makeboot dos /dev/fd0
137   $ mount -t msdos /dev/fd0 /mnt
138   $ cp monitor.sys /mnt/bootfile.sys
139
140   $ cp /usr/src/linux/arch/i386/boot/zImage /mnt/vmlinuz
141   $ echo 'root=/dev/ram ramdisk_file=ramdisk.gz mem=80M' > /mnt/vmlinuz.cfg
142   $ cp /archive/ramdisk.gz /mnt/ramdisk.gz
143   $ umount /dev/fd0
144
145   The stuff about ramdisk is only if you want an init ramdisk. If
146   the ramdisk isn't on this floppy monitor.sys will ask for the
147   right floppy. If you specify multiple ramdisk files then will be
148   concatenated and passed to the kernel as one ramdisk, each file
149   can be on a different floppy.
150
151   If the file isn't called 'vmlinuz' you can still boot it by typing "=linux"
152   at the prompt '>' where 'linux' is the name of the bzImage file.
153
154   Escape or ^C will interrupt the boot and drop you to the '>' prompt.
155   ^C at the '>' prompt will reboot
156
157   A file called 'help.txt' will be displayed upto the first line that starts
158   with a '%', chunks after that (seperated by '%'s) will be displayed when
159   the user presses a function key, home, page up or page down.
160
161-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
162
163Robert de Bath <robert$@debath.co.uk>
164