Added instructions for creating a linux UEFI boot stick
This commit is contained in:
parent
3be4375d6d
commit
497ca664da
BIN
uefi-usb-boot-stick/EFI/BOOT/.grub.cfg.swp
Normal file
BIN
uefi-usb-boot-stick/EFI/BOOT/.grub.cfg.swp
Normal file
Binary file not shown.
BIN
uefi-usb-boot-stick/EFI/BOOT/BOOTX64.EFI
Normal file
BIN
uefi-usb-boot-stick/EFI/BOOT/BOOTX64.EFI
Normal file
Binary file not shown.
50
uefi-usb-boot-stick/EFI/BOOT/grub.cfg
Normal file
50
uefi-usb-boot-stick/EFI/BOOT/grub.cfg
Normal file
@ -0,0 +1,50 @@
|
||||
set default="1"
|
||||
|
||||
function load_video {
|
||||
insmod efi_gop
|
||||
insmod efi_uga
|
||||
insmod video_bochs
|
||||
insmod video_cirrus
|
||||
#
|
||||
insmod ieee1275_fb
|
||||
insmod vbe
|
||||
insmod vga
|
||||
insmod video_bochs
|
||||
insmod video_cirrus
|
||||
#
|
||||
insmod all_video
|
||||
}
|
||||
|
||||
load_video
|
||||
set gfxpayload=keep
|
||||
insmod gzio
|
||||
#
|
||||
insmod increment
|
||||
insmod xfs
|
||||
insmod part_gpt
|
||||
insmod fat
|
||||
insmod blscfg
|
||||
#
|
||||
insmod part_gpt
|
||||
insmod ext2
|
||||
|
||||
set timeout=-1
|
||||
|
||||
search --no-floppy --set=root -l 'RESCUE'
|
||||
|
||||
menuentry 'Colibri' {
|
||||
linuxefi /images/colibri/vmlinuz root=/dev/mapper/centos-root ro crashkernel=auto resume=/dev/mapper/centos-swap rd.lvm.lv=centos/root rd.luks.uuid=luks-0dd30579-2c04-422c-b6c6-3ab35d4c783f rd.lvm.lv=centos/swap rhgb quiet intel_iommu=on
|
||||
initrdefi /images/colibri/initrd.img
|
||||
}
|
||||
|
||||
menuentry 'Rocky' {
|
||||
linuxefi /images/rocky/vmlinuz root=/dev/mapper/centos-rockyroot ro crashkernel=auto resume=/dev/mapper/centos-swap rd.lvm.lv=centos/rockyroot rd.luks.uuid=luks-0dd30579-2c04-422c-b6c6-3ab35d4c783f rd.lvm.lv=centos/swap rhgb quiet intel_iommu=on
|
||||
initrdefi /images/rocky/initrd.img
|
||||
}
|
||||
|
||||
menuentry 'buzzard' {
|
||||
linuxefi /images/buzzard/vmlinuz root=/dev/mapper/centos-root ro rd.lvm.lv=centos/root rd.luks.uuid=luks-7a701398-14f8-428c-93c6-09e340beb118 rd.luks.options=discard rd.lvm.lv=centos/swap rhgb quiet LANG=en_US.UTF-8 nouveau.modeset=0 rd.driver.blacklist=nouveau
|
||||
initrdefi /images/buzzard/initrd.img
|
||||
}
|
||||
|
||||
|
44
uefi-usb-boot-stick/EFI/BOOT/grub.cfg.orig
Normal file
44
uefi-usb-boot-stick/EFI/BOOT/grub.cfg.orig
Normal file
@ -0,0 +1,44 @@
|
||||
set default="1"
|
||||
|
||||
function load_video {
|
||||
insmod efi_gop
|
||||
insmod efi_uga
|
||||
insmod video_bochs
|
||||
insmod video_cirrus
|
||||
#
|
||||
insmod ieee1275_fb
|
||||
insmod vbe
|
||||
insmod vga
|
||||
insmod video_bochs
|
||||
insmod video_cirrus
|
||||
#
|
||||
insmod all_video
|
||||
}
|
||||
|
||||
load_video
|
||||
set gfxpayload=keep
|
||||
insmod gzio
|
||||
#
|
||||
insmod increment
|
||||
insmod xfs
|
||||
insmod part_gpt
|
||||
insmod fat
|
||||
insmod blscfg
|
||||
#
|
||||
insmod part_gpt
|
||||
insmod ext2
|
||||
|
||||
set timeout=-1
|
||||
|
||||
search --no-floppy --set=root -l 'RESCUE'
|
||||
|
||||
menuentry 'Colibri' {
|
||||
linuxefi /images/colibri/vmlinuz root=/dev/mapper/centos-root ro crashkernel=auto resume=/dev/mapper/centos-swap rd.lvm.lv=centos/root rd.luks.uuid=luks-0dd30579-2c04-422c-b6c6-3ab35d4c783f rd.lvm.lv=centos/swap rhgb quiet intel_iommu=on
|
||||
initrdefi /images/colibri/initrd.img
|
||||
}
|
||||
|
||||
menuentry 'Rocky' {
|
||||
linuxefi /images/rocky/vmlinuz root=/dev/mapper/centos-rockyroot ro crashkernel=auto resume=/dev/mapper/centos-swap rd.lvm.lv=centos/rockyroot rd.luks.uuid=luks-0dd30579-2c04-422c-b6c6-3ab35d4c783f rd.lvm.lv=centos/swap rhgb quiet intel_iommu=on
|
||||
initrdefi /images/rocky/initrd.img
|
||||
}
|
||||
|
BIN
uefi-usb-boot-stick/EFI/BOOT/grubx64.efi
Normal file
BIN
uefi-usb-boot-stick/EFI/BOOT/grubx64.efi
Normal file
Binary file not shown.
68
uefi-usb-boot-stick/createboot.md
Normal file
68
uefi-usb-boot-stick/createboot.md
Normal file
@ -0,0 +1,68 @@
|
||||
# Creating a bootable USB UEFI stick
|
||||
|
||||
## Identify the drive
|
||||
|
||||
Insert your USB stick and tail /var/log/message to find out the device name.
|
||||
Then set the device name in a variable
|
||||
|
||||
|
||||
```
|
||||
DRIVE=/dev/sdc
|
||||
```
|
||||
|
||||
|
||||
## Initial formatting of the USB stick
|
||||
|
||||
This is a one-time operation. When updating the USB stick
|
||||
this step can be skipped.
|
||||
|
||||
|
||||
Formatting:
|
||||
* gpt partition table
|
||||
* primary partition of type ext2
|
||||
* primary partition of type EFI (EF)
|
||||
* label /dev/sdc1 as RESCUE
|
||||
|
||||
```
|
||||
parted ${DRIVE}
|
||||
```
|
||||
|
||||
Create partitions in parted:
|
||||
```
|
||||
mktable gpt
|
||||
mkpart primary ext2 1 512MB
|
||||
mkpart primary fat32 512MB 1024MB
|
||||
set 2 boot on
|
||||
```
|
||||
|
||||
|
||||
Format the partitions:
|
||||
```
|
||||
mkfs.ext2 ${DRIVE}1 # this will contain the images.
|
||||
mkfs.vfat ${DRIVE}2 # this will contain the UEFI bootloader and grub.cfg
|
||||
e2label ${DRIVE}1 RESCUE
|
||||
```
|
||||
|
||||
## Synchronize file to the USB stick
|
||||
|
||||
|
||||
Sync images:
|
||||
```
|
||||
mount ${DRIVE}1 /mnt/tmp
|
||||
mkdir -p /mnt/tmp/images
|
||||
rsync -av images/ /mnt/tmp/images/
|
||||
umount /mnt/tmp
|
||||
```
|
||||
|
||||
Sync the grub configuration:
|
||||
```
|
||||
mount ${DRIVE}2 /mnt/tmp
|
||||
mkdir -p /mnt/tmp/EFI
|
||||
rsync -av EFI/ /mnt/tmp/EFI/
|
||||
umount /mnt/tmp
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
3
uefi-usb-boot-stick/images/README.md
Normal file
3
uefi-usb-boot-stick/images/README.md
Normal file
@ -0,0 +1,3 @@
|
||||
|
||||
* initramdisks are dummies since they can be large and may be a security risk
|
||||
* * * * * * * * kernel images are also dummies to reduce the size
|
4
uefi-usb-boot-stick/images/buzzard/README.md
Normal file
4
uefi-usb-boot-stick/images/buzzard/README.md
Normal file
@ -0,0 +1,4 @@
|
||||
|
||||
Symbolic links work too. This reduces maintenance since this allows you to use
|
||||
initrd.img and vmlinuz as names in the grub.cfg, and only requires updating of
|
||||
symlinks to move to another version.
|
1
uefi-usb-boot-stick/images/buzzard/initrd.img
Symbolic link
1
uefi-usb-boot-stick/images/buzzard/initrd.img
Symbolic link
@ -0,0 +1 @@
|
||||
initramfs-3.10.0-1160.80.1.el7.x86_64.img
|
1
uefi-usb-boot-stick/images/buzzard/vmlinuz
Symbolic link
1
uefi-usb-boot-stick/images/buzzard/vmlinuz
Symbolic link
@ -0,0 +1 @@
|
||||
vmlinuz-3.10.0-1160.80.1.el7.x86_64
|
0
uefi-usb-boot-stick/images/colibri/initrd.img
Normal file
0
uefi-usb-boot-stick/images/colibri/initrd.img
Normal file
0
uefi-usb-boot-stick/images/colibri/vmlinuz
Normal file
0
uefi-usb-boot-stick/images/colibri/vmlinuz
Normal file
0
uefi-usb-boot-stick/images/rocky/initrd.img
Normal file
0
uefi-usb-boot-stick/images/rocky/initrd.img
Normal file
0
uefi-usb-boot-stick/images/rocky/vmlinuz
Normal file
0
uefi-usb-boot-stick/images/rocky/vmlinuz
Normal file
Loading…
Reference in New Issue
Block a user