booting not working.
This commit is contained in:
parent
8234e06861
commit
dd614142a6
@ -171,14 +171,19 @@ function make_chroot {
|
|||||||
|
|
||||||
jexec "$jid" apk add --no-cache mkinitfs docker linux-virt
|
jexec "$jid" apk add --no-cache mkinitfs docker linux-virt
|
||||||
jexec "$jid" apk add --no-cache --repository 'http://dl-cdn.alpinelinux.org/alpine/edge/testing' refind
|
jexec "$jid" apk add --no-cache --repository 'http://dl-cdn.alpinelinux.org/alpine/edge/testing' refind
|
||||||
jexec "$jid" mkinitfs -c /etc/mkinitfs/mkinitfs.conf -b / 5.15.16-0-virt
|
module_name=$(jexec "$jid" ls /lib/modules/)
|
||||||
|
jexec "$jid" mkinitfs -c /etc/mkinitfs/mkinitfs.conf -b / "$module_name"
|
||||||
jexec "$jid" mkdir /boot/efi
|
jexec "$jid" mkdir /boot/efi
|
||||||
jexec "$jid" cp -r /usr/share/refind /boot/efi/boot
|
jexec "$jid" cp -r /usr/share/refind /boot/efi/boot
|
||||||
jexec "$jid" cp /boot/efi/boot/refind_x64.efi /boot/efi/boot/bootx64.efi
|
jexec "$jid" cp /boot/efi/boot/refind_x64.efi /boot/efi/boot/bootx64.efi
|
||||||
(umask 022 && tee "${chroot}/boot/refind_linux.conf" <<EOF
|
(umask 022 && tee "${chroot}/boot/refind_linux.conf" <<EOF
|
||||||
"Boot normal" "rw root=PARTLABEL=DIB console=ttyS0,115200"
|
"Boot normal" "rw root=vda2 console=ttyS0,115200"
|
||||||
EOF
|
EOF
|
||||||
)
|
)
|
||||||
|
# (umask 022 && tee "${chroot}/boot/refind_linux.conf" <<EOF
|
||||||
|
# "Boot normal" "rw root=PARTLABEL=DIB console=ttyS0,115200"
|
||||||
|
# EOF
|
||||||
|
# )
|
||||||
# Open shell to look/experiment
|
# Open shell to look/experiment
|
||||||
# jexec "$jid" /bin/sh
|
# jexec "$jid" /bin/sh
|
||||||
|
|
||||||
@ -215,7 +220,7 @@ function kill_gpg_agent {
|
|||||||
log "Killing gpg-agent $f"
|
log "Killing gpg-agent $f"
|
||||||
GNUPGHOME="$f" gpgconf --kill gpg-agent
|
GNUPGHOME="$f" gpgconf --kill gpg-agent
|
||||||
done
|
done
|
||||||
unset gpgagents
|
gpgagents=()
|
||||||
}
|
}
|
||||||
|
|
||||||
function stop_jails {
|
function stop_jails {
|
||||||
@ -223,15 +228,15 @@ function stop_jails {
|
|||||||
log "Stopping jail $f"
|
log "Stopping jail $f"
|
||||||
jail -r "$f"
|
jail -r "$f"
|
||||||
done
|
done
|
||||||
unset jails
|
jails=()
|
||||||
}
|
}
|
||||||
|
|
||||||
function unmount_folders {
|
function unmount_folders {
|
||||||
for (( idx=${#mountedfolders[@]}-1 ; idx>=0 ; idx-- )) ; do
|
for (( idx=${#mountedfolders[@]}-1 ; idx>=0 ; idx-- )) ; do
|
||||||
log "Unmounting folder ${mountedfolders[idx]}"
|
log "Unmounting folder ${mountedfolders[idx]}"
|
||||||
umount "${mountedfolders[idx]}"
|
umount -f "${mountedfolders[idx]}"
|
||||||
done
|
done
|
||||||
unset mountedfolders
|
mountedfolders=()
|
||||||
}
|
}
|
||||||
|
|
||||||
function remove_memory_devices {
|
function remove_memory_devices {
|
||||||
@ -239,13 +244,15 @@ function remove_memory_devices {
|
|||||||
log "Removing memory device $f"
|
log "Removing memory device $f"
|
||||||
mdconfig -d -u "$f"
|
mdconfig -d -u "$f"
|
||||||
done
|
done
|
||||||
unset memorydevices
|
memorydevices=()
|
||||||
}
|
}
|
||||||
|
|
||||||
function main {
|
function main {
|
||||||
precheck
|
precheck
|
||||||
|
|
||||||
work_directory=$(mktemp -d -t dib)
|
mkdir "$DIR/work_directory"
|
||||||
|
work_directory="$DIR/work_directory"
|
||||||
|
# work_directory=$(mktemp -d -t dib)
|
||||||
folders+=("$work_directory")
|
folders+=("$work_directory")
|
||||||
|
|
||||||
download_directory="${work_directory}/downloads"
|
download_directory="${work_directory}/downloads"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user