uEFI

How is data stored on disk? - EFI GUID

北城余情 提交于 2019-12-02 01:02:37
I posted this question earlier on SuperUser but I feel it is more suited for programmers. If I understand correctly, according to GPT, the first 16 bytes of LBA 2 is the partition type GUID for the first partition on disk. In Windows Disk Management the first partition is designated as an EFI System Partition. However upon further investigation an EFI System Partition's GUID is: C12A7328-F81F-11D2-BA4B-00A0C93EC93B And yet the first 16 bytes tell me otherwise: 28732AC1-1FF8-D211-BA4B-00A0C93EC93B Interestingly the first 3 sections act as little endian while the other 2 are big endian. Why is

Windows和Ubuntu双系统,修复UEFI引导的两种办法

Deadly 提交于 2019-12-01 22:09:24
Windows和Ubuntu双系统,修复UEFI引导的两种办法 可以按照以下几个步骤将GRUB2设置为默认的引导程序: 1.登录Windows 8 2.转到桌面 3.右击开始按钮,选择管理员命令行 4.输入 mountvol g: /s (这将你的EFI目录结构映射到G盘) 5.输入 cd g:\EFI 6.当你输入 dir 列出文件夹内容时,你可以看到一个Ubuntu的文件夹 7.这里的参数可以是grubx64.efi或者shimx64.efi 8.运行下列命令将grub64.efi设置为启动引导程序: bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi 9.重启你的电脑 10.你将会看到一个包含Ubuntu和Windows选项的GRUB菜单 11.如果你的电脑仍然直接启动到Windows,重复步骤1到7,但是这次输入: bcdedit /set {bootmgr} path \EFI\ubuntu\shimx64.efi 12.重启你的电脑 这里你做的事情就是登录Windows管理员命令行,将EFI引导区映射到磁盘上,来查看Ubuntu的引导程序是否安装成功,然后选择grubx64.efi或者shimx64.efi作为引导程序。 那么grubx64.efi和shimx64.efi有什么区别呢?在安全启动(serureboot

Boot Mode Legacy/UEFI from HTA in WinPE

我是研究僧i 提交于 2019-12-01 13:49:49
Trying to see if I am in UEFI or BIOS from WinPE running from an HTA. My starting point below: <script type='text/vbscript'> Sub RegBOOT If oReg.EnumValues(HKEY_LOCAL_MACHINE, "System\CurrentControlSet\Control", "PEFirmwareType", "") = 1 Then BOOT.innerText = "Legacy BIOS" If oReg.EnumValues(HKEY_LOCAL_MACHINE, "System\CurrentControlSet\Control", "PEFirmwareType", "") = 2 Then BOOT.innerText = "UEFI" End If End Sub </Script> <BODY> <p>You are in <span id="BOOT"></span> mode</p> </BODY> Found the below as my solution that works :) <script type='text/vbscript'> Set objShell = CreateObject(

MBR和GPT分区

佐手、 提交于 2019-12-01 12:35:58
MBR是传统的分区表类型,最大缺点是不支持容量大于2T的硬盘。GPT则弥补了MBR这个缺点,最大支持18EB的硬盘,是基于UEFI使用的磁盘分区架构。 其中,目前所有的Windows系统均支持MBR,但GPT却只有64位系统才能支持。 此外,BIOS只支持MBR引导系统,而 GPT仅支持UEFI引导系统 。所以,现在电脑的主板大多采用BIOS集成UEFI,或UEFI集成BIOS的方式达到同时兼容MBR和GPT引导系统的目的。 由于GPT引导系统的方式与MBR不同,所以我们在安装系统时,才面临需要手动开启UEFI,或是将其设置成Legacy模式等方式加以解决。 至于BIOS+MBR和UEFI+GPT两个组合可以直接无损转换,可以用DiskGenius这款软件就能实现。 来源: https://www.cnblogs.com/emanlee/p/11685971.html

Boot Mode Legacy/UEFI from HTA in WinPE

不羁的心 提交于 2019-12-01 12:16:26
问题 Trying to see if I am in UEFI or BIOS from WinPE running from an HTA. My starting point below: <script type='text/vbscript'> Sub RegBOOT If oReg.EnumValues(HKEY_LOCAL_MACHINE, "System\CurrentControlSet\Control", "PEFirmwareType", "") = 1 Then BOOT.innerText = "Legacy BIOS" If oReg.EnumValues(HKEY_LOCAL_MACHINE, "System\CurrentControlSet\Control", "PEFirmwareType", "") = 2 Then BOOT.innerText = "UEFI" End If End Sub </Script> <BODY> <p>You are in <span id="BOOT"></span> mode</p> </BODY> 回答1:

9=3 磁盘存储与分区

陌路散爱 提交于 2019-12-01 09:49:53
磁盘存储与分区 设备文件 一切皆文件:open(), read(), write(), close() 设备类型: 块设备:block,存取单位“块”,磁盘 字符设备:char,存取单位“字符”,键盘 设备文件:关联至一个设备驱动程序,进而能够跟与之对应硬件设备进行通信 设备号码: 主设备号:major number, 标识设备类型 次设备号:minor number, 标识同一类型下的不同设备 磁盘设备的设备文件命名:/dev/DEV_FILE SCSI, SATA, SAS, IDE,USB: /dev/sd 虚拟磁盘:/dev/vd 、/dev/xvd 不同磁盘标识:a-z,aa,ab… /dev/sda, /dev/sdb, ... 同一设备上的不同分区:1,2, ... /dev/sda1, /dev/sda5 硬盘存储术语 head:磁头 track:磁道 sector:扇区,512bytes cylinder:柱面 并行: IDE:133MB/s SCSI:640MB/s 串口: SATA:6Gbps SAS:6Gbps USB:480MB/s 机械硬盘和固态硬盘 机械硬盘(HDD):Hard Disk Drive,即是传统普通硬盘,主要由:盘片,磁头,盘片转轴及控制电机,磁头控制器,数据转换器,接口,缓存等几个部分组成。机械硬盘中所有的盘片都装在一个旋转轴上

Run a UEFI shell command from inside UEFI application

£可爱£侵袭症+ 提交于 2019-12-01 04:12:11
I'm new to UEFI application development. My requirement is that, I need to run an UEFI shell command from my UEFI application ( app.efi ) source code. Need guidance on how I can do this. Example, cp command in UEFI shell is used to copy a file from one path to another. I want to do this programmatically inside my application ( app.efi ) source code. EDIT: I'm looking for something similar to system("command"); function in Linux . How to achieve this? Calling a UEFI shell command from a UEFI application can be done using the EFI_SHELL_EXECUTE function of EFI_SHELL_PROTOCOL , defined under

Run a UEFI shell command from inside UEFI application

雨燕双飞 提交于 2019-12-01 01:35:06
问题 I'm new to UEFI application development. My requirement is that, I need to run an UEFI shell command from my UEFI application ( app.efi ) source code. Need guidance on how I can do this. Example, cp command in UEFI shell is used to copy a file from one path to another. I want to do this programmatically inside my application ( app.efi ) source code. EDIT: I'm looking for something similar to system("command"); function in Linux. How to achieve this? 回答1: Calling a UEFI shell command from a

Can I write on my local filesystem using EFI

倾然丶 夕夏残阳落幕 提交于 2019-11-30 14:17:41
I am working on this project to write files to local filesystem as soon as the OS starts through an EFI application. I need to know if it is possible. And if yes then kindly guide me a little. Thanks Ok, I'll give you a good heads up... First you enumerate all FS protocols in the system. EFI_BOOT_SERVICES* bs = ...; EFI_GUID sfspGuid = EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_GUID; EFI_HANDLE* handles = NULL; UINTN handleCount = 0; efiStatus = bs->LocateHandleBuffer(ByProtocol, &sfspGuid, NULL, &handleCount, &handles); Then you go through all of them and open the EFI_SIMPLE_FILE_SYSTEM_PROTOCOL for

Ubuntu-18.04 LTS UEFI 安装U盘制作

允我心安 提交于 2019-11-30 06:33:15
要把U盘作为UEFI启动盘,第一个分区要为FAT32分区,EFI程序放在/EFI/Boot/bootx64.efi。为了制作Ubuntu-18.04 LTS安装U盘,可以把一个U盘格式化为FAT32格式,然后创建如下目录结构: . ├── boot │ └── grub │ └── grub.cfg ├── EFI │ └── BOOT │ ├── BOOTx64.EFI │ └── grubx64.efi └── Ubuntu └── Ubuntu-18.04.iso 其中Ubuntu目录下存放Ubuntu-18.04官方镜像,EFI整个目录来自Ubuntu-18.04.iso根目录,创建/boot/grub/grub.cfg文本文件,内容为: set timeout=10 menuentry "Ubuntu" {   set isofile=/Ubuntu/Ubuntu-18.04.iso   loopback loop $isofile   linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile quiet splash   initrd (loop)/casper/initrd   boot } menuentry "Reboot" {   reboot } 重启电脑从刚做好的U盘启动