From 429ce586086553c5ad652a6694b7beea8c2c547e Mon Sep 17 00:00:00 2001 From: Michael Shigorin Date: Wed, 20 Mar 2013 00:01:43 +0400 Subject: [PATCH] added live_rw support There's a need for a separate boot target since persistent storage is way slower than tmpfs indeed; usbflash has a tendency for huge performance drops given simultaneous writes in addition to reads which are the bottleneck already. make-initrd-propagator 0.18 introduced ext4 rw slice, so the corresponding kernel module needs to be included into stage1; see also #28289. NB: not available on x86_64-efi (or hybrid GPT to be strict) due to fragility of the hack being made: parted(8) panics upon seeing that, and good ol' fdisk is unable to treat it. NB: use/live/rw use/rescue/rx use/syslinux/ui/gfxboot are unlikely to play very nice together due to the latter's magic l10n: "session" label is taken by live_rw config snippet and *is* translated in design-bootloader-source; OTOH "rescue_session" is *not*. --- features.in/live/config.mk | 8 ++++++++ features.in/rescue/README | 6 ++++++ features.in/rescue/config.mk | 8 ++++++++ features.in/syslinux/cfg.in/32live_rw.cfg | 5 +++++ features.in/syslinux/cfg.in/82rescue_rw.cfg | 6 ++++++ sub.in/stage1/modules | 1 + 6 files changed, 34 insertions(+) create mode 100644 features.in/syslinux/cfg.in/32live_rw.cfg create mode 100644 features.in/syslinux/cfg.in/82rescue_rw.cfg diff --git a/features.in/live/config.mk b/features.in/live/config.mk index 997a49d3..b14cb8f0 100644 --- a/features.in/live/config.mk +++ b/features.in/live/config.mk @@ -9,6 +9,14 @@ use/live: use/stage2 sub/stage2@live use/live/base: use/live use/syslinux/ui/menu @$(call add,LIVE_LISTS,$(call tags,base && (live || network))) +# rw slice, see http://www.altlinux.org/make-initrd-propagator and #28289 +ifeq (,$(EFI_BOOTLOADER)) +use/live/rw: use/live use/syslinux + @$(call add,SYSLINUX_CFG,live_rw) +else +use/live/rw: use/live; @: +endif + # a very simplistic one use/live/x11: use/live use/firmware use/x11/xorg @$(call add,LIVE_PACKAGES,xinit) diff --git a/features.in/rescue/README b/features.in/rescue/README index c9648e21..5fe51502 100644 --- a/features.in/rescue/README +++ b/features.in/rescue/README @@ -1,3 +1,9 @@ Эта фича дополняет базовый "живой" образ второй стадии специфическими для спасательного образа настройками и скриптовыми хуками. + +Цель use/rescue/rw добавляет предварительно настроенный +пункт загрузки, который в случае "просто гибридного" +(не GPT) ISO, записанного на USB Flash, обеспечит создание +и монтирование дополнительного раздела для сохранения данных +между сессиями. diff --git a/features.in/rescue/config.mk b/features.in/rescue/config.mk index dab3ec69..eb077186 100644 --- a/features.in/rescue/config.mk +++ b/features.in/rescue/config.mk @@ -4,3 +4,11 @@ use/rescue: use/stage2 sub/stage2@rescue use/syslinux/sdab.cfg \ @$(call add,RESCUE_LISTS, openssh \ $(call tags,(base || extra || server || misc) && \ (rescue || network || security))) + +# rw slice, see also use/live/rw (don't use simultaneously) +ifeq (,$(EFI_BOOTLOADER)) +use/rescue/rw: use/rescue use/syslinux + @$(call add,SYSLINUX_CFG,rescue_rw) +else +use/rescue/rw: use/rescue; @: +endif diff --git a/features.in/syslinux/cfg.in/32live_rw.cfg b/features.in/syslinux/cfg.in/32live_rw.cfg new file mode 100644 index 00000000..f48fa3b3 --- /dev/null +++ b/features.in/syslinux/cfg.in/32live_rw.cfg @@ -0,0 +1,5 @@ +label session + menu label LiveCD with ^sessions support + kernel alt0/vmlinuz + append initrd=alt0/full.cz fastboot live showopts automatic=method:cdrom ramdisk_size=@live_size@ stagename=live live_rw vga=0x314 @bootargs@ + diff --git a/features.in/syslinux/cfg.in/82rescue_rw.cfg b/features.in/syslinux/cfg.in/82rescue_rw.cfg new file mode 100644 index 00000000..4d037c7e --- /dev/null +++ b/features.in/syslinux/cfg.in/82rescue_rw.cfg @@ -0,0 +1,6 @@ +label rescue_session + menu label Rescue with sess^ions support + kernel alt0/vmlinuz + append initrd=alt0/full.cz fastboot live showopts automatic=method:cdrom ramdisk_size=@rescue_size@ stagename=rescue live_rw + + diff --git a/sub.in/stage1/modules b/sub.in/stage1/modules index 8eb7a899..dce54042 100644 --- a/sub.in/stage1/modules +++ b/sub.in/stage1/modules @@ -87,6 +87,7 @@ eth16i.ko ewrk3.ko ext2 ext3.ko +ext4.ko fat.ko fdomain_cs.ko fdomain.ko