Ignore:
Timestamp:
Jan 13, 2013, 9:29:14 AM (13 years ago)
Author:
Ben Rietbroek
Message:

## RC1 ## -- Various Fixes and Enhancements [2012-01-25]

Fixes

o Fixed BootManager chaining

Chainloaing IBM BootManager would did now work because it was not
supplied with the correct information. It needs some special
signatures and data setup, especially when it is located above the
8 MiB boundary. In addidtion, when IBM BootManager is located on the
secon harddisk, a copy of the 1st harddisk MBR needs to be
at 0000:7E00 before relinguishing control to IBM-BM.

o Fixed Boot from Floppy

This did not work because Int13X was used to access the floppy
instead of the classic Int13 interface. On fresh installations the
booot from floppy menu-item is now enabled by default.

o Fixed drive-letter feature for when using JFS

The JFS boot-strap code does not use the boot-sector passed to it
in memory. Instead is uses the one that resides on disk. This made
the drive-letter feature disfunctional on JFS. Now, when using the
dl-feature on JFS, a modified PBR with the new drive-letter is
written to disk so the JFS boot-strap code uses the new
drive-letter.

o Fixed bug in LVM label editing

When editing an LVM-label, it was padded with spaces instead of
zero's. Labels in the PBR need to be space padded to 8 chars, LVM
labels need to be zero padded to 32-chars in the LVM-record.

o Fixed stuck Phase #1 indicator

When an eCS installation is taking place, and somehow this
installation passed a wrong volume-name or was aborted, the Phase #1
indicator would not be reset on next reboot, causing AiR-BOOT to
skip the menu and try to boot the partition that was being
installed, but has no system due to incorrect name or user abort.

Changes

o Show LVM Volume Label instead of LVM Partition Label

This makes the display of the labels more consistent with IBM-BM.
Since most systems will be partitioned with MiniLVM, which sets
both to the same name, this change will not be noted on the majority
of installations.

o Synchronize LVM-labels

When editing the LVM-lavel from AiR-BOOT SETUP, the LVM Partition
Label is synced with the new LVM Volume Label. This synchronization
only occurs when both were the same before the edit. It they were
different, only the LVM V-label is changed and the P-label remains
untouched.

o Protect type 0x35 partitions from label editing

These are spanned volumes and are not bootable anyway.
The normal eCS Volume Management tools should be used to change
the labels of these partition types.

Note

This commit and all following commits upto and including the RC3
commit [2012-09-09] are delayed commits from a local repository.
Also, the RC (Release Candidate) naming of the corresponding commits
is a bit misleading. One would label a revision with RC when near to
a final release. Since many things have changed between RC1,RC2 & RC3,
these RC's should be interpreted as mile-stones.

WARNING!!

All commits upto and including the commit of [2012-05-13] contain
a severe bug!! Building from these sources and then disabling
the 'force LBA' feature while also using the drive-letter feature or
editing the label can destroy the MBR on all attached disks!!
DO NOT DISABLE 'FORCE LBA USAGE' WHEN BUILT FROM THE ABOVE COMMITS!!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BOOTCODE/SETUP/PART_SET.ASM

    r31 r36  
    600600   pop     dx
    601601   jnc     PSCPN_LVMGotError             ; Not Found? -> display error and halt
     602
     603    ;
     604    ; While AiR-BOOT v1.0.8+ displays the LVM VolumeName, the LVM PartitionName
     605    ; is used here to compare to the IPT.
     606    ; The IPT has the LVM VolumeName, so if they differ the compare will fail
     607    ; and the user-entry will noy be written to the LVM-info sector.
     608    ;
    602609   add     si, LocLVM_PartitionName
     610
     611
    603612   xchg    si, di                        ; SI-IPTEntry, DI-LVM PartName
    604613   jmp     PSCPN_CheckPartName           ; Check, if match...
     
    606615  PSCPN_LVMGotError:
    607616   jmp     MBR_LoadError
     617
     618
    608619
    609620;   mov     si, di                        ; Restore SI and bootrecord fall-back
     
    619630      call    DriveIO_LoadPartition
    620631   pop     dx
     632
    621633   ; We seek to Partition Label within boot-record here
    622634   mov     di, offset PartitionSector
     635
    623636   push    si
    624637      mov     al, [si+LocIPT_SystemID]
     
    626639      ; Replies AH - FileSysFlags, AL - UnhiddenID, SI - FileSysNamePtr
    627640   pop     si
     641
    628642   test    ah, FileSysFlags_NoName       ; If NoName by FileSysFlag
    629643   jnz     PSCPN_LetUserEditPartName     ;  -> don't put it into BR at anytime
    630644   test    ah, FileSysFlags_FAT32        ; FAT32 specific name getting
    631645   jz      PSCPN_ResumeNormal
    632    add     di, 1Ch                       ; Fix fr FAT 32, shit
     646   add     di, 1Ch                       ; Fix for FAT 32, shit
    633647  PSCPN_ResumeNormal:
    634    add     di, 2Bh                       ; ES:DI - Name der Partition
     648   add     di, 2Bh                       ; ES:DI - Name of Partition
     649
     650
     651
     652
    635653
    636654   ; This code is used for BR and LVM checking
     655   ; Rousseau: Because AiR-BOOT v1.0.8 uses the LVM_VolumeName, which is copied
     656   ; to the IPT, this compare fails when the LVM_PartitionName is not
     657   ; the same as the LVM_VolumeName.
     658   ; This is a protection against editing the Label when these names differ.
     659   ; MiniLVM assigns the same value to both, so partitions created with MiniLVM
     660   ; can be edited.
    637661  PSCPN_CheckPartName:
     662
     663  ; SI = IPT_Enty
     664
     665        ; If the partition is an LVM partition then disable editing completely.
     666        cmp     byte ptr [si+LocIPT_SystemID], 035h
     667        jnz     no_type_35h
     668        jmp     PSCPN_AllDone
     669    no_type_35h:
     670
    638671   mov     cx, 11                        ; Partition-Name-Length = 11 Bytes
    639672   push    si di
     
    642675   pop     di si
    643676   jne     PSCPN_LetUserEditPartName     ; -> No BR/LVM Changing/Saving
     677
    644678   mov     ChangePartNameSave, 1         ; Remember, so we will save to BR
    645679
     
    662696   cmp     [PartitionVolumeLetters+bx], 0 ; ==0 means not supported by LVM
    663697   je      PSCPN_SaveBootRecord
    664    ; -------------------------------------------------------------[LVM SAVE]---
    665    ; Copy 11 bytes from IPT into LVM-Sector also fill 9 bytes with NUL
     698
     699
     700   ; Make DI point to LVM VolumeName in LVM-entry
     701   sub     di,20
     702
     703   ; -------------------------------------------------[LVM SAVE VOLUME NAME]---
     704   ; Copy 11 bytes from IPT into LVM VolumeName, back-padd with zero's
    666705   mov     cx, 11
    667706   push    si
     
    671710   mov     cx, 9
    672711   rep     stosb
     712
     713
     714        ;
     715        ; The AiR-BOOT Label Editor inserts spaces when a label is edited
     716        ; and characters are backspaced.
     717        ; This is fine for filesystem labels, which are space padded,
     718        ; but the LVM VolumeName and PartitionName need to be zero padded.
     719        ; So, below we replace all trailing spaces with zero's.
     720        ;
     721        ; Correct LVM VolumeName
     722        ;
     723        push    di
     724        mov     cx,20
     725    vn_padd_next:
     726        jcxz    vn_padded
     727        dec     di
     728        dec     cx
     729        mov     al,[di]
     730        test    al,al
     731        jz      vn_padd_next
     732        cmp     al,' '
     733        jnz     vn_padded
     734        mov     byte ptr [di],0
     735        jmp     vn_padd_next
     736    vn_padded:
     737        pop     di
     738
     739
     740
     741
     742   ; ----------------------------------------------[LVM SAVE PARTITION NAME]---
     743   ; Copy 11 bytes from IPT into LVM PartitonName, back-padd with zero's
     744   mov     cx, 11
     745   push    si
     746      rep     movsb
     747   pop     si
     748   xor     al, al
     749   mov     cx, 9
     750   rep     stosb
     751
     752
     753        ;
     754        ; The AiR-BOOT Label Editor inserts spaces when a label is edited
     755        ; and characters are backspaced.
     756        ; This is fine for filesystem labels, which are space padded,
     757        ; but the LVM VolumeName and PartitionName need to be zero padded.
     758        ; So, below we replace all trailing spaces with zero's.
     759        ;
     760        ; Correct LVM PartitionName
     761        ;
     762        push    di
     763        mov     cx,20
     764    pn_padd_next:
     765        jcxz    pn_padded
     766        dec     di
     767        dec     cx
     768        mov     al,[di]
     769        test    al,al
     770        jz      pn_padd_next
     771        cmp     al,' '
     772        jnz     pn_padded
     773        mov     byte ptr [di],0
     774        jmp     pn_padd_next
     775    pn_padded:
     776        pop     di
     777
     778
    673779   ; Update LVM-CRC now...
    674780   mov     si, offset LVMSector
Note: See TracChangeset for help on using the changeset viewer.