mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-28 11:43:25 +02:00
cdrom: Add grub.cfg that allows to install IPFire
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
@@ -1,2 +1,2 @@
|
|||||||
search --file --no-floppy --set=root /EFI/BOOT/grub.cfg
|
search.fs_label "NAME VERSION ARCH" root
|
||||||
set prefix=($root)/EFI/BOOT/
|
set prefix=($root)/EFI/BOOT
|
||||||
|
|||||||
34
config/cdrom/grub.cfg
Normal file
34
config/cdrom/grub.cfg
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
set default="1"
|
||||||
|
|
||||||
|
function load_video {
|
||||||
|
insmod efi_gop
|
||||||
|
insmod efi_uga
|
||||||
|
insmod video_bochs
|
||||||
|
insmod video_cirrus
|
||||||
|
insmod all_video
|
||||||
|
}
|
||||||
|
|
||||||
|
load_video
|
||||||
|
set gfxpayload=keep
|
||||||
|
insmod gzio
|
||||||
|
insmod part_gpt
|
||||||
|
insmod ext2
|
||||||
|
|
||||||
|
set timeout=60
|
||||||
|
|
||||||
|
menuentry 'Install NAME VERSION ARCH' --class ipfire --class gnu-linux --class gnu --class os {
|
||||||
|
linux /boot/isolinux/vmlinuz
|
||||||
|
initrd /boot/isolinux/instroot
|
||||||
|
}
|
||||||
|
|
||||||
|
submenu 'Other Installation Options -->' {
|
||||||
|
menuentry 'Install NAME VERSION (Text Mode)' --class ipfire --class gnu-linux --class gnu --class os {
|
||||||
|
linux /boot/isolinux/vmlinuz novga
|
||||||
|
initrd /boot/isolinux/instroot
|
||||||
|
}
|
||||||
|
|
||||||
|
menuentry 'Unattended installation' --class ipfire --class gnu-linux --class gnu --class os {
|
||||||
|
linux /boot/isolinux/vmlinuz installer.unattended
|
||||||
|
initrd /boot/isolinux/instroot
|
||||||
|
}
|
||||||
|
}
|
||||||
19
lfs/cdrom
19
lfs/cdrom
@@ -36,8 +36,8 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ISO_ARGS = -J -r -v \
|
ISO_ARGS = -J -r -v \
|
||||||
-A "$(NAME) $(VERSION)" \
|
-A "$(NAME) $(VERSION) $(BUILD_ARCH)" \
|
||||||
-V "$(NAME)_$(VERSION)" \
|
-V "$(NAME) $(VERSION) $(BUILD_ARCH)" \
|
||||||
-no-emul-boot \
|
-no-emul-boot \
|
||||||
-boot-load-size 4 \
|
-boot-load-size 4 \
|
||||||
-boot-info-table \
|
-boot-info-table \
|
||||||
@@ -46,7 +46,7 @@ ISO_ARGS = -J -r -v \
|
|||||||
|
|
||||||
# Only build a stub ISO for ARM
|
# Only build a stub ISO for ARM
|
||||||
ifeq "$(BUILD_PLATFORM)" "arm"
|
ifeq "$(BUILD_PLATFORM)" "arm"
|
||||||
ISO_ARGS = -J -r -V "$(NAME)_$(VERSION)"
|
ISO_ARGS = -J -r -V "$(NAME) $(VERSION) $(BUILD_ARCH)"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ISOHYBRID_ARGS =
|
ISOHYBRID_ARGS =
|
||||||
@@ -125,11 +125,15 @@ ifeq "$(EFI)" "1"
|
|||||||
dd if=/dev/zero of=/install/cdrom/boot/isolinux/efiboot.img bs=1k count=1440
|
dd if=/dev/zero of=/install/cdrom/boot/isolinux/efiboot.img bs=1k count=1440
|
||||||
mkdosfs -F 12 -n "IPFIRE_EFI" /install/cdrom/boot/isolinux/efiboot.img
|
mkdosfs -F 12 -n "IPFIRE_EFI" /install/cdrom/boot/isolinux/efiboot.img
|
||||||
|
|
||||||
|
# Generate embedded GRUB configuration
|
||||||
|
sed -e "s/NAME/$(NAME)/g" -e "s/VERSION/$(VERSION)/g" -e "s/ARCH/$(BUILD_ARCH)/g" \
|
||||||
|
$(DIR_SRC)/config/cdrom/grub-efi.cfg > /tmp/grub-efi.cfg
|
||||||
|
|
||||||
# Build a GRUB EFI image
|
# Build a GRUB EFI image
|
||||||
grub-mkimage \
|
grub-mkimage \
|
||||||
--format=$(BUILD_ARCH)-efi \
|
--format=$(BUILD_ARCH)-efi \
|
||||||
--output=/tmp/boot$(EFI_ARCH).efi \
|
--output=/tmp/boot$(EFI_ARCH).efi \
|
||||||
--config=$(DIR_SRC)/config/cdrom/grub-efi.cfg \
|
--config=/tmp/grub-efi.cfg \
|
||||||
--compression=xz \
|
--compression=xz \
|
||||||
--prefix=/EFI/BOOT \
|
--prefix=/EFI/BOOT \
|
||||||
$(GRUB_EFI_MODULES)
|
$(GRUB_EFI_MODULES)
|
||||||
@@ -144,7 +148,12 @@ ifeq "$(EFI)" "1"
|
|||||||
|
|
||||||
# Cleanup
|
# Cleanup
|
||||||
umount /install/efiboot.img
|
umount /install/efiboot.img
|
||||||
rm -rf /install/efiboot.img /tmp/boot$(EFI_ARCH).efi
|
rm -rf /install/efiboot.img /tmp/boot$(EFI_ARCH).efi /tmp/grub-efi.cfg
|
||||||
|
|
||||||
|
# Install GRUB configuration
|
||||||
|
mkdir -pv /install/cdrom/EFI/BOOT
|
||||||
|
sed -e "s/NAME/$(NAME)/g" -e "s/VERSION/$(VERSION)/g" -e "s/ARCH/$(BUILD_ARCH)/g" \
|
||||||
|
< $(DIR_SRC)/config/cdrom/grub.cfg > /install/cdrom/EFI/BOOT/grub.cfg
|
||||||
endif
|
endif
|
||||||
|
|
||||||
cp /usr/share/hwdata/pci.ids /install/cdrom/boot/isolinux/pci.ids
|
cp /usr/share/hwdata/pci.ids /install/cdrom/boot/isolinux/pci.ids
|
||||||
|
|||||||
Reference in New Issue
Block a user