| [43] | 1 | ;
|
|---|
| 2 | ; AiR-BOOT (c) Copyright 1998-2008 M. Kiewitz
|
|---|
| 3 | ;
|
|---|
| 4 | ; This file is part of AiR-BOOT
|
|---|
| 5 | ;
|
|---|
| 6 | ; AiR-BOOT is free software: you can redistribute it and/or modify it under
|
|---|
| 7 | ; the terms of the GNU General Public License as published by the Free
|
|---|
| 8 | ; Software Foundation, either version 3 of the License, or (at your option)
|
|---|
| 9 | ; any later version.
|
|---|
| 10 | ;
|
|---|
| 11 | ; AiR-BOOT is distributed in the hope that it will be useful, but WITHOUT ANY
|
|---|
| 12 | ; WARRANTY: without even the implied warranty of MERCHANTABILITY or FITNESS
|
|---|
| 13 | ; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
|---|
| 14 | ; details.
|
|---|
| 15 | ;
|
|---|
| 16 | ; You should have received a copy of the GNU General Public License along with
|
|---|
| 17 | ; AiR-BOOT. If not, see <http://www.gnu.org/licenses/>.
|
|---|
| 18 | ;
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
|
|---|
| 22 | ; ---------------------------------
|
|---|
| 23 | ; Rousseau: Fixes and Enhancements
|
|---|
| 24 | ; ---------------------------------
|
|---|
| [47] | 25 | ;
|
|---|
| 26 | ; v1.0.8-rc2-bld2012042?
|
|---|
| 27 | ; ----------------------
|
|---|
| 28 | ; # Fixed Installer to handle packed hideparttable #
|
|---|
| 29 | ; Hide partition configuration is now preserved when upgrading
|
|---|
| 30 | ; Implemented upgrading from v1.06 to v1.0.8
|
|---|
| 31 | ; Implemented upgrading from v1.07 to v1.0.8
|
|---|
| 32 | ;
|
|---|
| 33 | ; # Implemented DOS code in C cross-platform installer
|
|---|
| 34 | ; There is now one C source for 4 platforms:
|
|---|
| 35 | ; DOS,WIN32,OS2 and LINUX (Linux portion not ready yet)
|
|---|
| 36 | ; This obsoletes AIRBOOT.ASM/AIRBOOT.COM.
|
|---|
| 37 | ; DOS Installer is now AIRBOOTD.EXE.
|
|---|
| 38 | ;
|
|---|
| [46] | 39 | ; v1.0.8-pre-rc2-bld20120330
|
|---|
| 40 | ; --------------------------
|
|---|
| 41 | ; # Merged 16-bit Assembler bitfield code to the Installer #
|
|---|
| 42 | ; The installer needs to handle the v1.0.8 configuration.
|
|---|
| 43 | ; This requires access to the 6-bit packed 'hideparttable'.
|
|---|
| 44 | ; To 'not-reinvent-the-wheel', by coding this in C, the Assembler
|
|---|
| 45 | ; bitfield functions are integrated using Open Watcom's '_asm' capability.
|
|---|
| 46 | ; It may not be pretty and the functions themselves are limited,
|
|---|
| 47 | ; but this method prevents maintaining seperate Asm and C implementations.
|
|---|
| 48 | ; Will be improved later.
|
|---|
| [43] | 49 | ;
|
|---|
| [46] | 50 | ; # Implemented BLDLEVEL support #
|
|---|
| 51 | ; AIRBOOT.BIN, the Installers and SET(A)BOOT now support OS/2 BLDLEVEL
|
|---|
| 52 | ; information. This enhances identification and problem tracking/solving.
|
|---|
| 53 | ; While BLDLEVEL is an OS/2 command, the BLDLEVEL information itself can
|
|---|
| 54 | ; be embedded in any binary. Invoking BLDLEVEL from within OS/2 on, let's
|
|---|
| 55 | ; say, the AIRBOOTL.ELF Linux executable, will also show the BLDLEVEL info.
|
|---|
| 56 | ; A slight deficiency of BLDLEVEL is that is forces a format on the version.
|
|---|
| 57 | ; So, AiR-BOOT v1.0.8 will be shown as v1.00.8.
|
|---|
| 58 | ;
|
|---|
| 59 | ; # Added support for Masm6 and Wasm v1.9 -- Experimental use only #
|
|---|
| 60 | ; Trying to assemble with Masm6 or Wasm v1.9 reveiled some interesting
|
|---|
| 61 | ; behavior aspects in general. While this version can now be assembled with
|
|---|
| 62 | ; Masm6 and Wasm too, this was only done to get a 'cross-feeling' for this
|
|---|
| 63 | ; project. Future versions will drop support for Tasm, Masm6 and Wasm since
|
|---|
| 64 | ; much conditional assembly is needed to support all of them. This was an
|
|---|
| 65 | ; experimental excercise only. JWasm is the assembler of choise for this
|
|---|
| 66 | ; project and any future versions.
|
|---|
| 67 | ;
|
|---|
| [45] | 68 | ; # Implemented stop scanning when max. partitions limit exceeded #
|
|---|
| 69 | ; Previous versions halted the system when the maximum number of partitions
|
|---|
| 70 | ; that can be handled (45) was exceeded.
|
|---|
| 71 | ; This required the user to boot from alternate media to correct the problem.
|
|---|
| 72 | ; Now, when the partition limit is exceeded, AiR-BOOT displays a pop-up
|
|---|
| 73 | ; and waits for a key-press. When the user presses a key, AiR-BOOT continues
|
|---|
| 74 | ; and the boot-menu is shown, enabling the user to boot a system to correct
|
|---|
| 75 | ; the problem. To indicate this situation, the color of the selection-bar
|
|---|
| 76 | ; is displayed in red.
|
|---|
| 77 | ;
|
|---|
| 78 | ; # Fixed hiding partitions above old max 30-partitions limit #
|
|---|
| 79 | ; Hiding partitions is a per partition setting and it is kept in a table
|
|---|
| 80 | ; in the AiR-BOOT image on disk. In previous versions, including v1.0.8-rc1,
|
|---|
| 81 | ; this table still held the old number of maximum partitions (30).
|
|---|
| 82 | ; So configuring a hide-setting for partitions >30 or hiding more than
|
|---|
| 83 | ; 30 partitions per partition would not work properly.
|
|---|
| 84 | ; Unfortunately, there was no room to expand this table, since it resides
|
|---|
| 85 | ; just below the MBR backup, at the end of the AiR-BOOT image.
|
|---|
| 86 | ; To work around this, the table now uses a 6-bits packed format and the
|
|---|
| 87 | ; drive-letter array, which followed this table has been moved elsewhere.
|
|---|
| 88 | ; This is a change in the configuration layout since the previous version,
|
|---|
| 89 | ; so the config-version has been bumped to v1.0.8.
|
|---|
| 90 | ; TODO: Add upgrade-code to the installer to cope with this.
|
|---|
| 91 | ;
|
|---|
| [43] | 92 | ; # Removed requirement for LVM P and V name to be the same to edit #
|
|---|
| 93 | ; However, when both are the same before the edit, the V name will be
|
|---|
| 94 | ; synved to the P name to have them both the same again after the edit.
|
|---|
| 95 | ; If they differ, only the V name is updated.
|
|---|
| 96 | ;
|
|---|
| 97 | ; # Trying to edit the label of a type 0x35 partition now shows a popup #
|
|---|
| 98 | ; The user is informed that type 0x35 labels cannot be edited.
|
|---|
| 99 | ;
|
|---|
| 100 | ; # Type 0x35 partitions cannot be added to the AB-menu anymore #
|
|---|
| 101 | ; They are not bootable anyway. The user is informed by a popup.
|
|---|
| 102 | ;
|
|---|
| 103 | ; # De-tasemized the Assembler sources for JWasm compatibility #
|
|---|
| [45] | 104 | ; AiR-BOOT can now be built using JWasm, which is the preferred
|
|---|
| 105 | ; assembler as of this release. Tasm support will be dropped in the future.
|
|---|
| [43] | 106 | ;
|
|---|
| 107 | ; # Completely reworked the build-system #
|
|---|
| 108 | ; Everything is now done with Makefiles using WMake, Wlink and the
|
|---|
| 109 | ; C/C++ Compilers from the Open Watcom development tools together with JWasm.
|
|---|
| 110 | ; This obsoletes tasm, tlink and exe2bin.
|
|---|
| 111 | ;
|
|---|
| 112 | ; # Cross-Platform support #
|
|---|
| 113 | ; AiR-BOOT and it's helpers can now be built on: DOS, Win32, OS/2 and Linux.
|
|---|
| 114 | ;
|
|---|
| [46] | 115 | ; # Rewrote FIXCODE.ASM in C so the tool-chain is not dependent on a DOS .COM #
|
|---|
| 116 | ; Now FIXCODE is built platform-specific and takes care of the embedding
|
|---|
| 117 | ; of MPR-protection image.
|
|---|
| [43] | 118 | ;
|
|---|
| [46] | 119 | ; # Created FIXCODE bash-script to accomplish embedding of MBR-protection #
|
|---|
| 120 | ; Building on Linux requires that no DOS-tools are used in the tool-chain.
|
|---|
| 121 | ; This script essentially performs the same functionality but does not check
|
|---|
| 122 | ; certain conditions, like image-too-big, etc.
|
|---|
| 123 | ; It is a 'quick-hack' until the Linux version of FIXCODE is operational.
|
|---|
| 124 | ;
|
|---|
| [43] | 125 | ; v1.0.8-rc1-bld20120124
|
|---|
| 126 | ; ----------------------
|
|---|
| 127 | ; # Changed version format to be more WarpIN compatible #
|
|---|
| 128 | ; This is a cosmetic change only, the internal format has not changed.
|
|---|
| 129 | ;
|
|---|
| 130 | ; # Show LVM VolumeName instead of LVM PartitionName #
|
|---|
| 131 | ; Previous versions of AiR-BOOT used the LVM PartitionName as the Label
|
|---|
| 132 | ; if LVM-info was present for the partition.
|
|---|
| 133 | ; This is inconsistent with MiniLVM which shows the LVM VolumeName.
|
|---|
| 134 | ; Starting with v1.0.8 the LVM VolumeName is displayed.
|
|---|
| 135 | ;
|
|---|
| 136 | ; # LVM Partition and Volume name Synchronization #
|
|---|
| 137 | ; Changing the Label of a partition with LVM-info now synchronizes
|
|---|
| 138 | ; the LVM Partition Name with the LVM Volume Name.
|
|---|
| 139 | ; This is the same behavior as MiniLVM.
|
|---|
| 140 | ; Note however that the Label can only be changed when both the
|
|---|
| 141 | ; LVM PartitionName and LVM VolumeName are the same.
|
|---|
| 142 | ; See protected editing below.
|
|---|
| 143 | ;
|
|---|
| 144 | ; # Protected editing of the Label when LVM-info is present #
|
|---|
| 145 | ; When the LVM VolumeName differs from the LVM PartitionName, the user can
|
|---|
| 146 | ; edit the label but it will not be saved to the LVM record on disk.
|
|---|
| 147 | ; This is to protect configurations created with the classic LVM tool.
|
|---|
| 148 | ; Since MiniLVM assigns the same name to both the Partition and the Volume,
|
|---|
| 149 | ; the Label can be edited and will be saved for such partitions.
|
|---|
| 150 | ; To further protect a given configuration, LVM volumes with type 0x35
|
|---|
| 151 | ; cannot be edited at all. This is to ensure that the LVM PartitionNames
|
|---|
| 152 | ; remain unique when Spanning Volumes are used.
|
|---|
| 153 | ;
|
|---|
| 154 | ; # Editing the Label appended spaces #
|
|---|
| 155 | ; When editing and changing the Label of a System using SETUP,
|
|---|
| 156 | ; trailing spaces were stored in the LVM Volume and Partition names.
|
|---|
| 157 | ; These labels need to be padded with zero's.
|
|---|
| 158 | ; This has been fixed.
|
|---|
| 159 | ; This bug is also present in v1.06.
|
|---|
| 160 | ;
|
|---|
| 161 | ; # Reworked Primary Partition <-> LVM-info association #
|
|---|
| 162 | ; The previous way was to use a 1:1 correspondence between the PT-index
|
|---|
| 163 | ; and the LVM-index. However, when the PT is cross-linked, lower entries
|
|---|
| 164 | ; pointing to higher locations on the disk, or vice-versa, incorrect
|
|---|
| 165 | ; LVM-info was associated. Such a cross-linked PT is sometimes generated
|
|---|
| 166 | ; by the LVM engine when creating or deleting multiple partitions at once.
|
|---|
| 167 | ; Best is to intermediately save after creating or deleting a partition
|
|---|
| 168 | ; with (Mini)LVM.
|
|---|
| 169 | ; The new way is to search the LVM-entries for the partition requested.
|
|---|
| 170 | ;
|
|---|
| 171 | ; # Reworked MBR-code to provide two I13X signatures #
|
|---|
| 172 | ; The normal LVM MBR-code uses a special setup to indicate Int13X capability.
|
|---|
| 173 | ; It contains the instruction, MOV EAX,'X31I', and some software checks
|
|---|
| 174 | ; for the presence of the 'I13X' string in the MBR.
|
|---|
| 175 | ; However, the location of this instruction differs between eCS 1.x and
|
|---|
| 176 | ; eCS 2.x LVM MBR-code.
|
|---|
| 177 | ; For compatibility, the v1.0.8 MBR has the 'I13X' string at both locations.
|
|---|
| 178 | ;
|
|---|
| 179 | ; # Fixed booting older eCS installations on HPFS #
|
|---|
| 180 | ; When restoring systems from archive or otherwise generated systems,
|
|---|
| 181 | ; the HPFS BPB sometimes lacked information that AiR-BOOT did not fill in.
|
|---|
| 182 | ; The result was that a wrong partition was booted or that booting
|
|---|
| 183 | ; stalled with the "unable to operate harddisk" message.
|
|---|
| 184 | ; This has been fixed.
|
|---|
| 185 | ;
|
|---|
| 186 | ; # Fixed booting Windows from a logical partition with loader on FAT32 #
|
|---|
| 187 | ; Depending on the configuration, sometimes the NTLDR could not be found.
|
|---|
| 188 | ; This has been fixed.
|
|---|
| 189 | ;
|
|---|
| 190 | ; # Fixed drive-letter feature which was broken in v1.07 #
|
|---|
| 191 | ; a) v1.07 did remember the drive-letter feature was active for a partition,
|
|---|
| 192 | ; but it failed to store the drive-letter because too few configuration
|
|---|
| 193 | ; sectors were saved. This resulted in arbitrary values to be assigned
|
|---|
| 194 | ; to the drive-letter for the partition.
|
|---|
| 195 | ; b) The JFS PBR-code does not use the in-memory BPB but uses the one
|
|---|
| 196 | ; that is on disk. This prevented AiR-BOOT from passing the user assigned
|
|---|
| 197 | ; drive-letter. AiR-BOOT now inserts the drive-letter in the BPB on disk,
|
|---|
| 198 | ; but only if the partition is JFS.
|
|---|
| 199 | ; AB v1.06 is also unable to use the drive-letter feature on JFS.
|
|---|
| 200 | ; As a convenience, a drive-letter in the dl-feature pop-up can now be set
|
|---|
| 201 | ; to "Disabled" by pressing backspace.
|
|---|
| 202 | ; (As opposed to arrowing up/down to get to the "Disabled" entry)
|
|---|
| 203 | ;
|
|---|
| 204 | ; # Fixed stuck phase1 indicator when wrong name entered #
|
|---|
| 205 | ; When using SET(A)BOOT /4:NAME with the MEMDRIVE env-var set,
|
|---|
| 206 | ; and NAME being a non-existing partition, the phase1 indicator
|
|---|
| 207 | ; would stay stuck between reboots.
|
|---|
| 208 | ; This has been fixed.
|
|---|
| 209 | ;
|
|---|
| 210 | ; # Fixed DOS installer (AIRBOOT.COM) #
|
|---|
| 211 | ; Behavior should now be the same as the eCS and WIN installers.
|
|---|
| 212 | ; This re-enables the use of a bootable floppy or usb-stick
|
|---|
| 213 | ; to install AiR-BOOT.
|
|---|
| 214 | ;
|
|---|
| 215 | ; # Fixed booting from FloppyDrive #
|
|---|
| 216 | ; This is actually also broken in v1.06 when Int13X is forced on.
|
|---|
| 217 | ; Now regular BIOS calls are used when booting from floppydrive.
|
|---|
| 218 | ; A fresh AiR-BOOT installation now includes the floppydrive menu entry.
|
|---|
| 219 | ;
|
|---|
| 220 | ; # Fixed chainloading IBM Boot Manager #
|
|---|
| 221 | ; AiR-BOOT v1.06 could chainload IBM-BM but only when it resided on
|
|---|
| 222 | ; the first disk and was located below the 1024 cylinder and forced Int13X
|
|---|
| 223 | ; extensions were disabled.
|
|---|
| 224 | ; AiR-BOOT v1.0.8 can now chainload IBM-BM with forced Int13X extensions
|
|---|
| 225 | ; enabled (the default) and if IBM-BM resides above the 1024 cylinder limit.
|
|---|
| 226 | ; Also, chainloading IBM-BM from the second disk is supported.
|
|---|
| 227 | ; Do not use chainloading IBM-BM unless you really have a need to.
|
|---|
| 228 | ; See the AiR-BOOT Manual for "gotcha's" when using both AiR-BOOT and IBM-BM.
|
|---|
| 229 | ;
|
|---|
| 230 | ; # Corrected contact links #
|
|---|
| 231 | ; Version 1.07 still presented the old contact links to the sourceforge
|
|---|
| 232 | ; repository and the original author.
|
|---|
| 233 | ; This caused confusion with regard to issues with v1.07.
|
|---|
| 234 | ; This has been corrected.
|
|---|
| 235 | ;
|
|---|
| 236 | ; NOTE:
|
|---|
| 237 | ; AB v1.07 had a bug with saving and loading the correct size of the
|
|---|
| 238 | ; configuration. This broke the drive-letter feature.
|
|---|
| 239 | ; As a result, the CRC over the config was also calculated wrongly.
|
|---|
| 240 | ; While AB v1.0.8 fixes this, it has to use the v1.07 way of CRC calculation.
|
|---|
| 241 | ; Otherwise SET(A)BOOT from the eCS v2.1 would break on AB v1.0.8 because it
|
|---|
| 242 | ; sees a corrupt AiR-BOOT configuration.
|
|---|
| 243 | ; This means that the CRC over the AB config is calculated over 5 sectors
|
|---|
| 244 | ; instead of 7, just like in v1.07.
|
|---|
| 245 | ;
|
|---|
| 246 | ; NOTE:
|
|---|
| 247 | ; Because of space constraints most of the debug code has been commented
|
|---|
| 248 | ; out in this version.
|
|---|
| 249 | ; Possibly it will be re-enabled after code cleanup and changing to JWasm.
|
|---|
| 250 | ;
|
|---|
| 251 | ;
|
|---|
| 252 | ; v1.07
|
|---|
| 253 | ; -----
|
|---|
| 254 | ; # Huge Drives and LVM #
|
|---|
| 255 | ; When using disks >512GB under eComStation, the drive geometry changes to
|
|---|
| 256 | ; 127 or 255 sectors per track. Since LVM-info is written at the last sector
|
|---|
| 257 | ; of a track, and AiR-BOOT uses the geometry of the MBR, it cannot find the
|
|---|
| 258 | ; LVM-info and the eCS partition / volume bootsector.
|
|---|
| 259 | ; This has been fixed.
|
|---|
| 260 | ; Now, when an eCS-partition is discovered and the drive is >512GB, AiR-BOOT
|
|---|
| 261 | ; will use the eCS geometry to locate the LVM-info and the bootsector.
|
|---|
| 262 | ;
|
|---|
| 263 | ; # Special loader handling #
|
|---|
| 264 | ; The special handling of partition boot-loaders has been enhanced to
|
|---|
| 265 | ; enable booting of legacy systems on huge drives with or without OS/2
|
|---|
| 266 | ; extended geometry.
|
|---|
| 267 | ;
|
|---|
| 268 | ; # eComStation boot-through after phase 1 #
|
|---|
| 269 | ; Special functionality is implemented to directly boot a newly
|
|---|
| 270 | ; installed eCS system after completing phase 1 of the installation.
|
|---|
| 271 | ; This works in conjuntion with the OS/2 specific SET(A)BOOT.EXE program,
|
|---|
| 272 | ; also part of the AiR-BOOT package.
|
|---|
| 273 | ;
|
|---|
| 274 | ; # Math, Debug, Conv and Aux modules #
|
|---|
| 275 | ; These are used for 32-bit arithmatic on 16-bit code,
|
|---|
| [45] | 276 | ; debug the boot process, converting between data-types
|
|---|
| [43] | 277 | ; and outputting log-data to the com-port.
|
|---|
| 278 | ;
|
|---|
| 279 | ;
|
|---|
| 280 | ; v1.06
|
|---|
| 281 | ; -----
|
|---|
| 282 | ; This is the last version developed by Martin Kiewitz.
|
|---|
| 283 | ; It serves as the base for the versions above.
|
|---|
| 284 | ; Please do not post your feedback on sourceforge or bother Martin with
|
|---|
| 285 | ; regard to issues with the above versions.
|
|---|
| 286 | ; Use the eCS bug-tracker or the Trac project-page at netlabs and see the
|
|---|
| 287 | ; documentation of this newer versions for the relevant contact information.
|
|---|
| 288 |
|
|---|