如何更改 BIOS 啟動畫面?

如何更改 BIOS 啟動畫面?

我有一台戴爾電腦,每次啟動時都有非常醜陋且運氣不好的外星人臉。我想更改它或永遠禁用它,但在 Bios 中他們沒有任何選項。

我如何從現在運行的 Linux Fedora 或 ArchLinux 更改此設定?

嘗試以下不起作用。 (http://www.pixelbeat.org/docs/bios/

./flashrom -r  firmware.old   #save current flash ROM just in case
./flashrom -wv firmware.new   #write and verify new flash ROM image

還嘗試過:

$ 貓副本

#include <stdio.h>
#include <inttypes.h>
#include <netinet/in.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>

#define lengthof(x) (sizeof(x)/sizeof(x[0]))

uint16_t checksum(const uint8_t* data, int len)
{
    uint16_t sum = 0;

    int i;
    for (i=0; i<len; i++)
        sum+=*(data+i);

    return htons(sum);
}

void usage(void)
{
    fprintf(stderr,"Usage: therm_limit [0,50,53,56,60,63,66,70]\n");
    fprintf(stderr,"Report therm limit of terminal in BIOS\n");
    fprintf(stderr,"If temp specifed, it is changed if required.\n");
    exit(EXIT_FAILURE);
}

#define CHKSUM_START 51
#define CHKSUM_END 109

#define THERM_OFFSET 67
#define THERM_SHIFT 0
#define THERM_MASK (0x7 << THERM_SHIFT)
#define THERM_OFF 0
uint8_t thermal_limits[]={0,50,53,56,60,63,66,70};
#define THERM_MAX (lengthof(thermal_limits)-1)

#define DEV_NVRAM "/dev/nvram"
#define NVRAM_MAX 114
uint8_t nvram[NVRAM_MAX];

int main(int argc, char* argv[])
{
    int therm_request = -1;

    if (argc>2) usage();
    if (argc==2) {
        if (*argv[1]=='-') usage();
        therm_request=atoi(argv[1]);
        int i;
        for (i=0; i<lengthof(thermal_limits); i++)
            if (thermal_limits[i]==therm_request)
                break;
        if (i==lengthof(thermal_limits))
            usage();
        else
            therm_request=i;
    }

    int fd_nvram=open(DEV_NVRAM, O_RDWR);
    if (fd_nvram < 0) {
        fprintf(stderr,"Error opening %s [%m]\n", DEV_NVRAM);
        exit(EXIT_FAILURE);
    }
    if (read(fd_nvram, nvram, sizeof(nvram))==-1) {
        fprintf(stderr,"Error reading %s [%m]\n", DEV_NVRAM);
        close(fd_nvram);
        exit(EXIT_FAILURE);
    }

    uint16_t chksum = *(uint16_t*)(nvram+CHKSUM_END);
    printf("%04X\n",chksum); exit(0);
    if (chksum == checksum(nvram+CHKSUM_START, CHKSUM_END-CHKSUM_START)) {

        uint8_t therm_byte = *(uint16_t*)(nvram+THERM_OFFSET);
        uint8_t therm_status=(therm_byte & THERM_MASK) >> THERM_SHIFT;

        printf("Current thermal limit: %d°C\n", thermal_limits[therm_status]);

        if (
            (therm_status == therm_request)
           ) therm_request=-1;

        if (therm_request != -1) {

            if (therm_status != therm_request)
                printf("Setting thermal limit to %d°C\n", thermal_limits[therm_request]);

            uint8_t new_therm_byte = (therm_byte & ~THERM_MASK) | (therm_request << THERM_SHIFT);
            *(uint8_t*)(nvram+THERM_OFFSET) = new_therm_byte;

            *(uint16_t*)(nvram+CHKSUM_END) = checksum(nvram+CHKSUM_START, CHKSUM_END-CHKSUM_START);
            (void) lseek(fd_nvram,0,SEEK_SET);
            if (write(fd_nvram, nvram, sizeof(nvram))!=sizeof(nvram)) {
                fprintf(stderr,"Error writing %s [%m]\n", DEV_NVRAM);
                close(fd_nvram);
                exit(EXIT_FAILURE);
            }
        }
    } else {
        fprintf(stderr,"checksum failed. Aborting\n");
        close(fd_nvram);
        exit(EXIT_FAILURE);
    }
    return EXIT_SUCCESS;
}

$ gcc c.c -o bios
# ./bios 
16DB

答案1

您發布的程式碼與更改 BIOS 啟動完全無關(它用於更改特定 BIOS 中的熱重啟設定)。事實上,除了它所針對的特定 BIOS 之外的任何東西,都會為您帶來一台非常不愉快的機器。

通常,只有當您的硬體提供者為您提供了一種方法時,您才可以變更 BIOS 初始映像。我知道我購買的許多主機板都附帶一個實用程序,該實用程式會取得 BIOS 映像檔和您選擇的映像,並產生新的 BIOS 映像,然後您可以正常刷新該映像。但這一般是OEM提供的東西。

答案2

您也許可以使用 Dell 的 Command|Configure 實用程式來完成此操作,但我不確定。每次我嘗試使用它時,它都會在我的系統上崩潰。 http://en.community.dell.com/techcenter/enterprise-client/w/wiki/7532.dell-command-configure/

曾經有一個實用程式可以幫助您為戴爾系統執行此操作(不確定是戴爾發布的還是其他人發布的),但我再也找不到任何好的連結了。

相關內容