Commit 2fcfcf92 authored by Anton Midyukov's avatar Anton Midyukov

Initial feature live-install

This feature complements the live image of the second stage with installation image-specific settings and scripted hooks. It is recommended to connect using +live-installer to ensure that a typical set of installer-related features is included. Unlike the install2 feature, a separate image of the second stage of 'altinst' is not built, but the live image is supplemented with installer packages in order to reduce the total volume of the iso image. Installation consists of two stages: 1. The live image is unpacked, as in livecd-install 2. Install additional packages BASE_PACKAGES and package groups THE_GROUPS as in install2. Unlike install2, only those packages that are not in the live image are placed in the main repository. This is how the size of the iso image is reduced.
parent 4a421563
#!/bin/sh
# FIXME: there should be less brutal i18n tuning
# don't cripple the image to be copied over
[ -n "$GLOBAL_LIVE_INSTALL"] || \
[ -x /usr/sbin/live-install ] || \
[ -x /usr/sbin/livecd-install ] && exit 0
cd /usr/share/locale
rm -r *@*
for i in */; do
......
......@@ -3,6 +3,7 @@
# don't cripple the image to be copied over
[ -n "$GLOBAL_LIVE_NO_CLEANUP_DOCS" ] || \
[ -n "$GLOBAL_LIVE_INSTALL"] || \
[ -x /usr/sbin/live-install ] || \
[ -x /usr/sbin/livecd-install ] && exit 0
......
......@@ -3,6 +3,7 @@
# don't cripple the image to be copied over or explicitly requested
# not to do this
[ -n "$GLOBAL_LIVE_NO_CLEANUPDB" ] || \
[ -n "$GLOBAL_LIVE_INSTALL" ] || \
[ -x /usr/sbin/live-install ] || \
[ -x /usr/sbin/livecd-install ] && exit 0
......
menuentry $"Install "'@distro@' --hotkey 'i' --id 'linux' {
savedefault
echo $"Loading Linux vmlinuz$KFLAVOUR ..."
linux /boot/vmlinuz$KFLAVOUR fastboot live @initrd_bootargs@ @stagename@=live init=/usr/sbin/install2-init ramdisk_size=@live_size@ lowmem vga=@bootvga@ @bootargs@ $EFI_BOOTARGS lang=$lang
echo $"Loading initial ramdisk ..."
initrd /boot/@initrd@$KFLAVOUR.@initrd_ext@
}
menuentry $"VNC install "'@distro@'$" (edit to set server IP address)" --id 'vncconnect' {
savedefault
linux /boot/vmlinuz$KFLAVOUR fastboot @initrd_bootargs@ @stagename@=live init=/usr/sbin/install2-init ramdisk_size=@live_size@ nosplash @bootargs@ $EFI_BOOTARGS headless no_alt_virt_keyboard vncconnect=IP lang=$lang
initrd /boot/@initrd@$KFLAVOUR.@initrd_ext@
}
menuentry $"VNC install "'@distro@'$" (edit to set password and connect here)" --id 'vncpasswd' {
savedefault
linux /boot/vmlinuz$KFLAVOUR fastboot @initrd_bootargs@ @stagename@=live init=/usr/sbin/install2-init ramdisk_size=@live_size@ showopts nosplash @bootargs@ $EFI_BOOTARGS headless no_alt_virt_keyboard vncpassword=VNCPWD lang=$lang
initrd /boot/@initrd@$KFLAVOUR.@initrd_ext@
}
Эта фича дополняет live образ второй стадии специфическими
для инсталяционного образа настройками и скриптовыми хуками.
Рекомендуется подключать при помощи +live-installer, чтобы
обеспечить включение типового набора связанных с инсталятором
функций.
В отличие от фичи install2 не собирается отдельный образ
второй стадии altinst, а дополняется образ live пакетами
инсталятора с целью уменьшить общий объём iso-образа.
Установка состоит и двух этапов:
1. Распаковывается образ live, как в livecd-install
2. Устанавливаются дополнительные пакеты BASE_PACKAGES и
группы пакетов THE_GROUPS, как в install2.
В отличии от install2 в репозиторий main помещаются только те
пакеты, которых нет в live образе. Этим и достигается уменьшение
размера iso-образа.
# alterator-based installer, second (livecd) stage
+live-installer: use/live-install/full; @:
use/live-install: use/live use/metadata use/repo/main \
use/bootloader use/grub/live-install.cfg use/syslinux/live-install.cfg
@$(call add_feature)
@$(call add,LIVE_PACKAGES,installer-common-stage2)
@$(call add,BASE_PACKAGES,installer-common-stage3)
@$(call add,LIVE_PACKAGES,installer-livecd-install)
@$(call add,LIVE_PACKAGES,alterator-postinstall) # for auto install
@$(call try,INSTALLER,altlinux-generic) # might be replaced later
@$(call add,LIVE_PACKAGES,installer-distro-$$(INSTALLER)-stage2)
@$(call add,LIVE_PACKAGES,branding-$$(BRANDING)-alterator)
@$(call add,LIVE_PACKAGES,branding-$$(BRANDING)-release)
@$(call add,LIVE_PACKAGES,installer-distro-$$(INSTALLER)-stage3)
@$(call add,LIVE_PACKAGES,glibc-gconv-modules) # for guile22
@$(call add,LIVE_PACKAGES,curl) # for net install
@$(call set,GLOBAL_LIVE_INSTALL,1)
@$(call xport,BASE_BOOTLOADER)
use/live-install/full: use/live-install \
use/syslinux/localboot.cfg use/grub/localboot_bios.cfg \
use/syslinux/ui/menu; @:
# set up remote repositories within installed system out-of-box
use/live-install/repo: use/live-install; @:
ifneq (,$(filter-out e2k%,$(ARCH)))
@$(call add,BASE_PACKAGES,installer-feature-online-repo)
endif
use/live-install/vnc:
@$(call add,LIVE_PACKAGES,installer-feature-vnc-stage2)
# this one expects external vncviewer to come
use/live-install/vnc/listen: use/live-install/vnc \
use/syslinux/live-install-vnc-listen.cfg use/grub/live-install-vnc-listen.cfg; @:
# this one connects to a specified vncviewer --listen
use/live-install/vnc/connect: use/live-install/vnc \
use/syslinux/live-install-vnc-connect.cfg use/grub/live-install-vnc-connect.cfg; @:
# add both bootloader items to be *that* explicit ;-)
use/live-install/vnc/full: use/live-install/vnc/listen use/live-install/vnc/connect; @:
# prepare bootloader for software suspend (see also live)
use/live-install/suspend:
@$(call add,BASE_PACKAGES,installer-feature-desktop-suspend-stage2)
#!/bin/sh -efu
installer_steps=/usr/share/install2/installer-steps
[ -f "$installer_steps" ] || exit 1
grep -q installer-livecd-install "$installer_steps" ||
sed -i '/vm/a\installer-livecd-install' "$installer_steps"
#!/bin/sh
# NB: grub is currently the default in ALT
sed -ri "s/^(grub|lilo)$/$GLOBAL_BASE_BOOTLOADER/" \
/usr/share/install2/installer-steps
#!/bin/sh
echo -n "*** vm-profile.scm provided by: "
rpm -qf /var/cache/alterator/vm-profile.scm ||:
#!/bin/sh -efu
PREFIX=ALTLinux
RPM_LIVE_LIST="$WORKDIR/.disk/pkglists/live/image/rpm.txt"
[ -d "$WORKDIR/$PREFIX/RPMS.main" ] || exit 0
[ -f "$RPM_LIVE_LIST" ] || exit 1
cd "$WORKDIR/$PREFIX/RPMS.main"
cat "$RPM_LIVE_LIST" | grep -v kernel-image | grep -v kernel-modules | xargs rm -fv
#!/bin/sh -e
# don't cripple the image to be copied over
[ -n "$GLOBAL_LIVE_INSTALL"] || \
[ -x /usr/sbin/live-install ] || \
[ -x /usr/sbin/livecd-install ] && exit 0
if [ -n "$GLOBAL_LIVE_CLEANUP_KDRIVERS" ]; then
for i in $GLOBAL_LIVE_CLEANUP_KDRIVERS; do
rm -rf /lib/modules/*/"$i"
......
default linux
label linux
menu label ^Install @relname@
kernel /boot/vmlinuz
append initrd=/boot/@initrd@ fastboot @initrd_bootargs@ @stagename@=live init=/usr/sbin/install2-init ramdisk_size=@live_size@ showopts vga=@bootvga@ @bootargs@ lowmem
label vncconnect
menu label ^VNC install (edit to set server IP address)
kernel /boot/vmlinuz
append initrd=/boot/@initrd@ fastboot @initrd_bootargs@ @stagename@=live init=/usr/sbin/install2-init ramdisk_size=@live_size@ showopts nosplash @bootargs@ headless no_alt_virt_keyboard vncconnect=IP
label vncpasswd
menu label VNC install (<Tab>, set pass^word and connect here)
kernel /boot/vmlinuz
append initrd=/boot/@initrd@ fastboot @initrd_bootargs@ @stagename@=live init=/usr/sbin/install2-init ramdisk_size=@live_size@ showopts nosplash @bootargs@ headless no_alt_virt_keyboard vncpassword=VNCPWD
#!/bin/sh
# don't cripple the image to be copied over
[ -x /usr/sbin/live-install -o -x /usr/sbin/livecd-install ] && exit 0
[ -x /usr/sbin/live-install -o -x /usr/sbin/livecd-install -o -n "$GLOBAL_LIVE_INSTALL" ] &&
exit 0
# remove unused fonts
cd /usr/share/fonts/bitmap/misc/ &&
......
#!/bin/sh
# don't cripple the image to be copied over
[ -x /usr/sbin/live-install -o -x /usr/sbin/livecd-install ] && exit 0
[ -x /usr/sbin/live-install -o -x /usr/sbin/livecd-install -o -n "$GLOBAL_LIVE_INSTALL" ] &&
exit 0
# remove unused legacy/tiny fonts
#cd /usr/share/fonts/bitmap/misc/ && rm -f *ISO* *KOI* [1456]*
......
#!/bin/sh
# don't cripple the image to be copied over
[ -x /usr/sbin/live-install -o -x /usr/sbin/livecd-install ] && exit 0
[ -x /usr/sbin/live-install -o -x /usr/sbin/livecd-install -o -n "$GLOBAL_LIVE_INSTALL" ] &&
exit 0
# blacklisted kernel modules
sed -n 's/^blacklist[[:space:]]\+\([^[:space:]]\+\).*/\1/p' /etc/modprobe.d/* |
......
......@@ -4,7 +4,8 @@
# NB: livecd-install has 50-restore-kernel.sh
[ -x /usr/sbin/live-install -o \
-x /usr/sbin/homeros-install -o \
-x /usr/sbin/luwrain-install ] && exit 0
-x /usr/sbin/luwrain-install -o \
-n "$GLOBAL_LIVE_INSTALL" ] && exit 0
# no need for the kernel in live root otherwise: it's been booted already
# NB: installkernel run by that livecd-install hook needs System.map
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment