Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions defaults/initrd.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,8 @@ HWOPTS="keymap cache modules virtio hyperv ${HWOPTS_BLK} bcache lvm dmraid multi
# This is the set of default HWOPTS, in the order that they are loaded.
# This is whitespace aligned with HWOPTS above.
MY_HWOPTS=" modules virtio hyperv ${HWOPTS_BLK} lvm dmraid mdadm fs crypto"

# Defaults for HTTPBOOT option to allow mounting the iso locally
ISO_PATH="/iso"
ISO_NAME="/gentoo.iso"
ISO_TEMP="${ISO_PATH}/temp"
13 changes: 13 additions & 0 deletions defaults/linuxrc
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ do
cdroot_marker=*)
CDROOT_MARKER=${x#*=}
;;
httpboot=*)
HTTPBOOT=1
HTTPBOOT_URL=${x#*=}
;;
# Start livecd loop, looptype options
loop=*)
LOOP=${x#*=}
Expand Down Expand Up @@ -732,6 +736,15 @@ then
# Setup the root filesystem
bootstrapFS

if [ "${HTTPBOOT}" = '1' ]; then
[ ! -d "${ISO_TEMP}" ] && mkdir -p "${ISO_TEMP}"
good_msg "Fetching ISO from ${HTTPBOOT_URL}"
run wget "${HTTPBOOT_URL}" -O "${ISO_PATH}${ISO_NAME}" -q && good_msg "Written to ${ISO_PATH}${ISO_NAME}"
good_msg "Mounting ${ISO_PATH}${ISO_NAME} in ${CDROOT_PATH}"
run mount -o ro,loop "${ISO_PATH}${ISO_NAME}" "${CDROOT_PATH}" && good_msg "Mounted ${ISO_PATH}${ISO_NAME} in ${CDROOT_PATH}"
got_good_root=1
fi

if [ "${aufs}" = '1' ]
then
setup_aufs
Expand Down