fix: minor best practices

Signed-off-by: TheOneWithTheBraid <the-one@with-the-braid.cf>
This commit is contained in:
TheOneWithTheBraid 2022-10-22 17:28:45 +02:00
parent 2661db5458
commit f2010b6d44

View file

@ -13,7 +13,7 @@ The basic concept of this script and all required software is supported on mos L
## Dependencies
Some investigation shows the installer provided by Lenovo is nothing but an Inno Setup archive. Of course, our holy open source operating system of choise is also capable of extracting them.
Some investigation shows the installer provided by Lenovo is nothing but an Inno Setup archive. Of course, our holy open source operating system of choise is also capable of extracting it.
Therefore install:
@ -31,8 +31,11 @@ Using the partitioning tool of your choise, format a USB drive in GPT and create
Probably, other partition options will work too, but about those it's sure they work at the time of writing these instructions.
```shell
# specify the USB drive to use
export X13S_USB="/dev/sdX"
# run gdisk on your pen drive of choise. Attention: All data on it will get lost
gdisk /dev/sdX
gdisk "${X13S_USB}"
p # check you are really using the drive you want to
o # create new GPT layout
y # confirm wiping disk
@ -40,11 +43,11 @@ n # create new partition
1 # set partition number to 1
# confirm preset
# confirm preset
0700 # the partition's hex code of a Microsoft basic data
ef00 # the partition's hex code of an EFI system partition
w # write changes to drive
# format the partition in fat32
mkfs.msdos /dev/sdaX1
mkfs.msdos "${X13S_USB}1"
```
## Copy firmware update efistub to flash drive
@ -57,7 +60,7 @@ Assuming we are still in our working directory, the required files are:
- `setup-extract/Rfs/Fw/*` -> `$MOUNTPOINT/Flash/`
```shell
mount --mkdir /dev/sdX1 /mnt/x13s-firmware
mount --mkdir "${X13S_USB}1" /mnt/x13s-firmware
mkdir -p /mnt/x13s-firmware/{EFI/Boot,Flash}
cd setup-extract/code\$GetExtractPath\$ # yes, the directory name contains "$" ...
cp Rfs/Usb/Bootaa64.efi /mnt/x13s-firmware/EFI/Boot/Bootaa64.efi