Coder Social home page Coder Social logo

bless's Introduction

bless

modified macOS bless command

Apple original code may be found at https://opensource.apple.com Specifically, for this project: https://opensource.apple.com/tarballs/bless/bless-204.40.27.tar.gz Note: not all original source code for bless is available, therefore not all functions will work.

In the original code, the bless command does not change or report bless information of APFS volumes that are not the Recovery or Preboot volumes.

The bless information we are interested in changing or reporting is the system folder and system file of the System volume.

The reason we want to change those is so that the Startup Manager (when holding the option key at boot) of old Macs such as the MacPro3,1 will use the .disk_label file instead of the default "EFI Boot" image.

In newer Macs, the .disk_label will get used even if there is no bless information. Also, I don't think newer Macs search System volumes - they only show the Preboot volume.

bless's People

Contributors

joevt avatar

Stargazers

 avatar tony eve avatar seludeft avatar Emilio P Egido avatar Matt Petty avatar Desra Firza Ghazfan avatar

Watchers

 avatar seludeft avatar

bless's Issues

Error during compillation

What compiles:
bless
limbless.a
setOFlabels
unbless
What does not compile:
minibless :
Undefined symbol: _BLAPFSCreatePhysicalStoreBSDsFromVolumeBSD
Undefined symbol: _isDVDWithElToritoWithUEFIBootableOS
Undefined symbol: _BLMountContainerVolume
Undefined symbol: _BLAPFSSnapshotToVolume
Undefined symbol: _BLUnmountContainerVolume
Undefined symbol: _BLCreateEFIXMLRepresentationForElToritoEntry

extractBootBlocks:

 ret = FSPathMakeRef((UInt8*)system, &ref, NULL);
    if(ret != noErr) {
	err(1, "Something bad happened with FSPathMakeRef");
    }

    resFile = FSOpenResFile(&ref, fsRdPerm);

    bbHandle = GetResource('boot', 1);

    if(!bbHandle || !*bbHandle) {
	CloseResFile(resFile);
	err(1, "Could not get 'boot' 1 resource");
    }

    DetachResource(bbHandle);

    size = GetHandleSize(bbHandle);
    outputsize = write(fileno(stdout), *bbHandle, size);

    if(outputsize != size) {
	DisposeHandle(bbHandle);
	CloseResFile(resFile);
	err(1, "Could not write all of boot blocks to stdout");
    }
    
    DisposeHandle(bbHandle);
    
    CloseResFile(resFile);
}
 ret = FSPathMakeRef((UInt8*)system, &ref, NULL);
    if(ret != noErr) {
	err(1, "Something bad happened with FSPathMakeRef");
    }

    resFile = FSOpenResFile(&ref, fsRdPerm);

    bbHandle = GetResource('boot', 1);

    if(!bbHandle || !*bbHandle) {
	CloseResFile(resFile);
	err(1, "Could not get 'boot' 1 resource");
    }

    DetachResource(bbHandle);

    size = GetHandleSize(bbHandle);
    outputsize = write(fileno(stdout), *bbHandle, size);

    if(outputsize != size) {
	DisposeHandle(bbHandle);
	CloseResFile(resFile);
	err(1, "Could not write all of boot blocks to stdout");
    }
    
    DisposeHandle(bbHandle);
    
    CloseResFile(resFile);

.........................................

firmwaresyncd:

/Users/g5/Downloads/bless-main/firmwaresyncd.c:50:10: 'DiskArbitration/DiskArbitrationPrivate.h' file not found

libbless2:

/Users/g5/Downloads/bless-main/libbless2/bless2_private.h: No such file or directory
/Users/g5/Downloads/bless-main/libbless2/bless2.h: No such file or directory

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.