Limine Bare Bones: Difference between revisions
Jump to navigation
Jump to search
[unchecked revision] | [unchecked revision] |
Content added Content deleted
mNo edit summary |
(Change hdd creation instructions to allow for creation without sudo) |
||
Line 409: | Line 409: | ||
====Creating a hard disk/USB drive image==== |
====Creating a hard disk/USB drive image==== |
||
In this example we'll create a [[GPT]] partition table using ''' |
In this example, we'll create a [[GPT]] partition table using '''sgdisk''', containing a single FAT partition, also known as the ESP in EFI terminology, which will store our kernel, configs, and bootloader. |
||
This example is more involved and is made up of more steps than creating an ISO image. |
This example is more involved and is made up of more steps than creating an ISO image. |
||
Line 416: | Line 416: | ||
<source lang="bash"> |
<source lang="bash"> |
||
# Create an empty zeroed |
# Create an empty zeroed-out 64MiB image file. |
||
dd if=/dev/zero bs=1M count=0 seek=64 of=image.hdd |
dd if=/dev/zero bs=1M count=0 seek=64 of=image.hdd |
||
# Create a GPT partition table. |
# Create a GPT partition table. |
||
sgdisk image.hdd -n 1:2048 -t 1:ef00 |
|||
# Create an ESP partition that spans the whole disk. |
|||
parted -s image.hdd mkpart ESP fat32 2048s 100% |
|||
parted -s image.hdd set 1 esp on |
|||
# Download the latest Limine binary release. |
# Download the latest Limine binary release. |
||
Line 435: | Line 431: | ||
./limine/limine bios-install image.hdd |
./limine/limine bios-install image.hdd |
||
# |
# Format the image as fat32. |
||
mformat -i image.hdd@@1M |
|||
# Format the ESP partition as FAT32. |
|||
sudo mkfs.fat -F 32 ${USED_LOOPBACK}p1 |
|||
# Mount the partition itself. |
|||
mkdir -p img_mount |
|||
sudo mount ${USED_LOOPBACK}p1 img_mount |
|||
# Make /EFI and /EFI/BOOT an MSDOS subdirectory. |
|||
⚫ | |||
mmd -i image.hdd@@1M ::/EFI ::/EFI/BOOT |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
# Sync system cache and unmount partition and loopback device. |
|||
⚫ | |||
sync |
|||
⚫ | |||
sudo umount img_mount |
|||
⚫ | |||
sudo losetup -d ${USED_LOOPBACK} |
|||
</source> |
</source> |
||