Draft of baremetal support pieces

This commit is contained in:
Stefan Reimer 2023-04-28 10:11:40 +00:00
parent b0b04f6d0a
commit 516ce6098c
3 changed files with 32 additions and 0 deletions

8
docs/ubuntu_ami.md Normal file
View File

@ -0,0 +1,8 @@
## EFI grub.cfg
```search.fs_uuid 114bf18b-d5bf-4a91-86ea-114248cc92a5 root
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg```
## BOOT grub.cfg
linux /boot/vmlinuz-5.4.0-1084-aws root=LABEL=cloudimg-rootfs ro console=tty1 console=ttyS0 nvme_core.io_timeout=4294967295

17
install/full_install.sh Executable file
View File

@ -0,0 +1,17 @@
#!/bin/bash
DEVICE="/dev/sda"
parted -a opt $DEVICE -s "$(cat parted.txt)"
partprobe
mkfs.fat -F 32 ${DEVICE}1
pvcreate ${DEVICE}4
vgcreate data ${DEVICE}4
lvcreate -l 100%FREE /dev/mapper/data -n var
# install uefi grub
mkdir -p /boot/efi
mount ${DEVICE}1 /boot/efi
grub-install --target=x86_64-efi --efi-directory=/boot/efi --removable --boot-directory=/boot/efi/EFI --bootloader-id=grub $DEVICE

7
install/parted.txt Normal file
View File

@ -0,0 +1,7 @@
u MiB
mklabel gpt
mkpart EFI 1 128
mkpart slotA 128 4224
mkpart slotB 4224 8320
mkpart data 8320 100%
set 1 esp on