forked from images/live-iso-gnome
revert 19f63f33a2
revert This is ridiclous but i saw it as a solution 5 times in stack overflow
This commit is contained in:
parent
19f63f33a2
commit
a6a8a96e86
2
.github/release-nest-v3-nvidia-iso
vendored
2
.github/release-nest-v3-nvidia-iso
vendored
@ -1 +1 @@
|
|||||||
6
|
5
|
61
build.sh
61
build.sh
@ -50,44 +50,47 @@ mksquashfs \
|
|||||||
-Xbcj x86
|
-Xbcj x86
|
||||||
|
|
||||||
# Copy Kernel to live (Disabled, Copy Kernels to refind instead)
|
# Copy Kernel to live (Disabled, Copy Kernels to refind instead)
|
||||||
cp "$ROOTFS_PATH/boot"/vmlinuz-* \
|
#cp "$ROOTFS_PATH/boot"/vmlinuz-* \
|
||||||
"$LIVE_BOOT_LIVE_PATH/vmlinuz" && \
|
# "$LIVE_BOOT_LIVE_PATH/vmlinuz" && \
|
||||||
cp "$ROOTFS_PATH/boot"/initrd.img-* \
|
#cp "$ROOTFS_PATH/boot"/initrd.img-* \
|
||||||
"$LIVE_BOOT_LIVE_PATH/initrd" && \
|
# "$LIVE_BOOT_LIVE_PATH/initrd" && \
|
||||||
cp ./data/refind/refind_linux.conf \
|
#cp ./data/refind/refind_linux.conf \
|
||||||
"$LIVE_BOOT_LIVE_PATH/refind_linux.conf"
|
# "$LIVE_BOOT_LIVE_PATH/refind_linux.conf"
|
||||||
|
|
||||||
REFIND_SIZE=$(du -s -B1 ./data/refind | cut -f1)
|
# Generate bootable EFI Image from refind
|
||||||
LIVE_SIZE=$(du -s -B1 $LIVE_BOOT_LIVE_PATH | cut -f1)
|
|
||||||
ISO_SIZE=$(($REFIND_SIZE + $LIVE_SIZE))
|
|
||||||
|
|
||||||
DD_BOOT_IMAGE="./efiboot.img"
|
# Copy kernel to refind
|
||||||
DD_LIVE_IMAGE="./live.img"
|
mkdir -p ./data/refind/EFI
|
||||||
|
cp -vf "$ROOTFS_PATH/boot"/vmlinuz-"$ISO_KERNEL"* "./data/refind/EFI/vmlinuz"
|
||||||
|
cp -vf "$ROOTFS_PATH/boot"/initrd.img-"$ISO_KERNEL"* "./data/refind/EFI/initrd"
|
||||||
|
|
||||||
# Create Refind Image
|
dd if=/dev/zero of="$LIVE_BOOT_PATH/efiboot.img" bs=1 count=$(du -s -B1 ./data/refind | cut -f1)
|
||||||
dd if=/dev/zero of="$DD_BOOT_IMAGE" bs=1 count=$REFIND_SIZE
|
mkfs.vfat -F 32 "$LIVE_BOOT_PATH/efiboot.img"
|
||||||
mkfs.vfat -F 16 "$DD_BOOT_IMAGE"
|
|
||||||
for directory in $(find ./data/refind/EFI/ -type d | cut -d'/' -f4-)
|
for directory in $(find ./data/refind/EFI/ -type d | cut -d'/' -f4-)
|
||||||
do
|
do
|
||||||
mmd -i "$DD_BOOT_IMAGE" ::"$(echo $directory | tr '[:lower:]' '[:upper:]' | sed 's:/*$::')"
|
mmd -i "$LIVE_BOOT_PATH/efiboot.img" ::"$(echo $directory | tr '[:lower:]' '[:upper:]' | sed 's:/*$::')"
|
||||||
done
|
done
|
||||||
|
|
||||||
for file in $(find ./data/refind/EFI/ -type f)
|
for file in $(find ./data/refind/EFI/ -type f)
|
||||||
do
|
do
|
||||||
mcopy -i "$DD_BOOT_IMAGE" $file ::"$(echo $file | cut -d'/' -f4- | tr '[:lower:]' '[:upper:]')"
|
mcopy -i "$LIVE_BOOT_PATH/efiboot.img" $file ::"$(echo $file | cut -d'/' -f4- | tr '[:lower:]' '[:upper:]')"
|
||||||
done
|
done
|
||||||
|
|
||||||
# Create Live medium image
|
# Create Bootable UEFI Full Image
|
||||||
dd if=/dev/zero of="$DD_LIVE_IMAGE" bs=1 count=$LIVE_SIZE
|
mkdir -p ./output
|
||||||
mkfs.ext4 "$DD_LIVE_IMAGE"
|
|
||||||
for directory in $(find $LIVE_BOOT_LIVE_PATH -type d | cut -d'/' -f4-)
|
|
||||||
do
|
|
||||||
mmd -i "$DD_LIVE_IMAGE" ::"$(echo $directory | tr '[:lower:]' '[:upper:]' | sed 's:/*$::')"
|
|
||||||
done
|
|
||||||
|
|
||||||
for file in $(find $LIVE_BOOT_LIVE_PATH -type f)
|
|
||||||
do
|
|
||||||
mcopy -i "$DD_LIVE_IMAGE" $file ::"$(echo $file | cut -d'/' -f4- | tr '[:lower:]' '[:upper:]')"
|
|
||||||
done
|
|
||||||
|
|
||||||
cat $DD_BOOT_IMAGE $DD_LIVE_IMAGE > "./output/$ISO_IMAGE".iso
|
xorriso \
|
||||||
|
-as mkisofs \
|
||||||
|
-iso-level 3 \
|
||||||
|
-V "PikaOS 4" \
|
||||||
|
-e --interval:appended_partition_2:all:: \
|
||||||
|
-append_partition 2 0xef "$LIVE_BOOT_PATH/efiboot.img" \
|
||||||
|
-J -joliet-long \
|
||||||
|
-no-emul-boot \
|
||||||
|
-isohybrid-gpt-basdat \
|
||||||
|
-o "./output/$ISO_IMAGE".iso \
|
||||||
|
"$LIVE_BOOT_DATA_PATH"
|
||||||
|
|
||||||
|
# Generate an integrity sum
|
||||||
|
touch "./output/$ISO_IMAGE".md5
|
||||||
|
md5sum "./output/$ISO_IMAGE".iso > "./output/$ISO_IMAGE".md5
|
||||||
|
@ -331,7 +331,7 @@ showtools install,bootorder,shell,memtest,gdisk,apple_recovery,csr_rotate,window
|
|||||||
# On UEFI PCs, default is internal,external,optical,manual
|
# On UEFI PCs, default is internal,external,optical,manual
|
||||||
# On Macs, default is internal,hdbios,external,biosexternal,optical,cd,manual
|
# On Macs, default is internal,hdbios,external,biosexternal,optical,cd,manual
|
||||||
#
|
#
|
||||||
#scanfor internal,external,optical,manual,firmware
|
scanfor manual
|
||||||
|
|
||||||
# By default, rEFInd relies on the UEFI firmware to detect BIOS-mode boot
|
# By default, rEFInd relies on the UEFI firmware to detect BIOS-mode boot
|
||||||
# devices. This sometimes doesn't detect all the available devices, though.
|
# devices. This sometimes doesn't detect all the available devices, though.
|
||||||
@ -647,9 +647,6 @@ csr_values 10,77
|
|||||||
# except when you must pass a forward slash to the loader, as when
|
# except when you must pass a forward slash to the loader, as when
|
||||||
# passing a root= option to a Linux kernel.
|
# passing a root= option to a Linux kernel.
|
||||||
|
|
||||||
# Below are several sample boot stanzas. All are disabled by default.
|
|
||||||
# Find one similar to what you need, copy it, remove the "disabled" line,
|
|
||||||
# and adjust the entries to suit your needs.
|
|
||||||
menuentry "PikaOS Live Image" {
|
menuentry "PikaOS Live Image" {
|
||||||
icon EFI/BOOT/REFIND-DARK/ICONS/OS_PIKAOS.PNG
|
icon EFI/BOOT/REFIND-DARK/ICONS/OS_PIKAOS.PNG
|
||||||
loader EFI/VMLINUZ
|
loader EFI/VMLINUZ
|
||||||
|
25
los.sh
25
los.sh
@ -1,25 +0,0 @@
|
|||||||
los() (
|
|
||||||
img="$1"
|
|
||||||
dev="$(sudo losetup --show -f -P "$img")"
|
|
||||||
echo "$dev"
|
|
||||||
for part in "$dev"?*; do
|
|
||||||
if [ "$part" = "${dev}p*" ]; then
|
|
||||||
part="${dev}"
|
|
||||||
fi
|
|
||||||
dst="/mnt/$(basename "$part")"
|
|
||||||
echo "$dst"
|
|
||||||
sudo mkdir -p "$dst"
|
|
||||||
sudo mount "$part" "$dst"
|
|
||||||
done
|
|
||||||
)
|
|
||||||
losd() (
|
|
||||||
dev="/dev/loop$1"
|
|
||||||
for part in "$dev"?*; do
|
|
||||||
if [ "$part" = "${dev}p*" ]; then
|
|
||||||
part="${dev}"
|
|
||||||
fi
|
|
||||||
dst="/mnt/$(basename "$part")"
|
|
||||||
sudo umount "$dst"
|
|
||||||
done
|
|
||||||
sudo losetup -d "$dev"
|
|
||||||
)
|
|
@ -331,7 +331,7 @@ showtools install,bootorder,shell,memtest,gdisk,apple_recovery,csr_rotate,window
|
|||||||
# On UEFI PCs, default is internal,external,optical,manual
|
# On UEFI PCs, default is internal,external,optical,manual
|
||||||
# On Macs, default is internal,hdbios,external,biosexternal,optical,cd,manual
|
# On Macs, default is internal,hdbios,external,biosexternal,optical,cd,manual
|
||||||
#
|
#
|
||||||
#scanfor internal,external,optical,manual,firmware
|
scanfor manual
|
||||||
|
|
||||||
# By default, rEFInd relies on the UEFI firmware to detect BIOS-mode boot
|
# By default, rEFInd relies on the UEFI firmware to detect BIOS-mode boot
|
||||||
# devices. This sometimes doesn't detect all the available devices, though.
|
# devices. This sometimes doesn't detect all the available devices, though.
|
||||||
@ -647,10 +647,6 @@ csr_values 10,77
|
|||||||
# except when you must pass a forward slash to the loader, as when
|
# except when you must pass a forward slash to the loader, as when
|
||||||
# passing a root= option to a Linux kernel.
|
# passing a root= option to a Linux kernel.
|
||||||
|
|
||||||
# Below are several sample boot stanzas. All are disabled by default.
|
|
||||||
# Find one similar to what you need, copy it, remove the "disabled" line,
|
|
||||||
# and adjust the entries to suit your needs.
|
|
||||||
|
|
||||||
menuentry "PikaOS Live Image" {
|
menuentry "PikaOS Live Image" {
|
||||||
icon EFI/BOOT/REFIND-DARK/ICONS/OS_PIKAOS.PNG
|
icon EFI/BOOT/REFIND-DARK/ICONS/OS_PIKAOS.PNG
|
||||||
loader EFI/VMLINUZ
|
loader EFI/VMLINUZ
|
||||||
|
15
nvidia-enablement/hooks/2-link-uname-to-kernel.chroot
Executable file
15
nvidia-enablement/hooks/2-link-uname-to-kernel.chroot
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
. /chroot_scripts/info.sh
|
||||||
|
|
||||||
|
if [ -z $ISO_KERNEL ]
|
||||||
|
then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Workaround: Link chroot kernel to host kernel..."
|
||||||
|
ln -sfv /boot/config-$ISO_KERNEL /boot/config-$(uname -r)
|
||||||
|
ln -sfv /boot/initrd.img-$ISO_KERNEL /boot/initrd.img-$(uname -r)
|
||||||
|
ln -sfv /usr/src/linux-headers-$ISO_KERNEL /usr/src/linux-headers-$(uname -r)
|
||||||
|
ln -sfv /boot/System.map-$ISO_KERNEL /boot/System.map-$(uname -r)
|
||||||
|
ln -sfv /boot/vmlinuz-$ISO_KERNEL /boot/vmlinuz-$(uname -r)
|
30
old.sh
30
old.sh
@ -1,30 +0,0 @@
|
|||||||
dd if=/dev/zero of="$LIVE_BOOT_PATH/efiboot.img" bs=1 count=$(du -s -B1 ./data/refind | cut -f1)
|
|
||||||
mkfs.vfat -F 32 "$LIVE_BOOT_PATH/efiboot.img"
|
|
||||||
for directory in $(find ./data/refind/EFI/ -type d | cut -d'/' -f4-)
|
|
||||||
do
|
|
||||||
mmd -i "$LIVE_BOOT_PATH/efiboot.img" ::"$(echo $directory | tr '[:lower:]' '[:upper:]' | sed 's:/*$::')"
|
|
||||||
done
|
|
||||||
|
|
||||||
for file in $(find ./data/refind/EFI/ -type f)
|
|
||||||
do
|
|
||||||
mcopy -i "$LIVE_BOOT_PATH/efiboot.img" $file ::"$(echo $file | cut -d'/' -f4- | tr '[:lower:]' '[:upper:]')"
|
|
||||||
done
|
|
||||||
|
|
||||||
# Create Bootable UEFI Full Image
|
|
||||||
mkdir -p ./output
|
|
||||||
|
|
||||||
xorriso \
|
|
||||||
-as mkisofs \
|
|
||||||
-iso-level 3 \
|
|
||||||
-V "PikaOS 4" \
|
|
||||||
-e --interval:appended_partition_2:all:: \
|
|
||||||
-append_partition 2 0xef "$LIVE_BOOT_PATH/efiboot.img" \
|
|
||||||
-J -joliet-long \
|
|
||||||
-no-emul-boot \
|
|
||||||
-isohybrid-gpt-basdat \
|
|
||||||
-o "./output/$ISO_IMAGE".iso \
|
|
||||||
"$LIVE_BOOT_DATA_PATH"
|
|
||||||
|
|
||||||
# Generate an integrity sum
|
|
||||||
touch "./output/$ISO_IMAGE".md5
|
|
||||||
md5sum "./output/$ISO_IMAGE".iso > "./output/$ISO_IMAGE".md5
|
|
Loading…
Reference in New Issue
Block a user