siduction-test und fromiso mit Grub2

Started by michaa7, 2011/12/21, 01:35:38

Previous topic - Next topic

hsp

Das ganze geht auch ohne grub2-fll-fromiso. Hier mal meine /etc/grub.d/95_isoboot-siduction.
An die eigene Umgebung angepasst und fertig. Ich nutzt das zu regelmässigen Backupzwecken.

#! /bin/sh
#
cat << EOF_
menuentry "siduction-amd64 from ISO-Image" {
insmod part_msdos
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root b0671ffd-f179-4cf6-921e-215a86f15b26
set isofile='/siduction/siduction.iso'
loopback loop \$isofile
linux (loop)/boot/vmlinuz0.amd boot=fll quiet fromhd=UUID=b0671ffd-f179-4cf6-921e-215a86f15b26 fromiso=/siduction/siduction.iso nointro lang=de hostname=hsp1
initrd (loop)/boot/initrd0.amd
}
EOF_


...

agaida

@michaa7 - Chili Issues sind bevorzugt, wenn man Fehler klar zuordnen kann. Zum rausfinden, was eigentlich hängt und zum Eingrenzen der Fehler kann man auch das Forum und oder IRC benutzen, bis sich jemand erbarmt, und ein Issue draus macht. Das gilt auch dann, wenn man sich nicht sicher ist, den Bugtracker bedienen zu können, obwohl man sich den ruhig anschauen kann. Ist keinerlei Teufelswerk und im Laufe der Zeit werden sich da interessante Sachen drin sammeln.

@hsp: Klar geht das, aber ich habe ersthafte Zweifel, ob das bei mehreren Isos so bequem ist auf Dauer.
There's this special biologist word we use for "stable". It's "dead". ~ Jack Cohen

hsp

Quote from: "agaida"@hsp: Klar geht das, aber ich habe ersthafte Zweifel, ob das bei mehreren Isos so bequem ist auf Dauer.
Wer es bequem will und nyx selber machen möchte soll Windows nehmen.

...

agaida

oder kompiliert und installiert schon vorbereitete und vergessene Pakete.
There's this special biologist word we use for "stable". It's "dead". ~ Jack Cohen

devil

Quote
btw, sollen dafür nach wie vor extra seiten im wiki angelegt werden (falls man bugs findet) oder soll das nun hier ins forum?
in der Release Note stünde was dazu. Bugs gehen nach http://chili.siduction.org/projects/newsid-verwaltung/issues .

greetz
devil

michaa7

Quote from: "agaida"...

@hsp: Klar geht das, aber ich habe ersthafte Zweifel, ob das bei mehreren Isos so bequem ist auf Dauer.

Das heißt aber, mit der grub2-fll-fromiso ist eine verzeichnisangabe ala root=LABEL=<label>hinz/kunz oder so ähnlich *nicht* möglich.

Ich frag das jetzt ehr aus neugierde denn aus notwendigkeit, denn da es eingerichtet ist und auch für mehrere isos funktioniert besteht keine notwendigkeit das zu änderen (es sei denn neuere kernel geruhen eines tages ihre meinung darüber zu ändern, was unter diskX.... zu verstehen wäre).
Ok, you can't code, but you still might be able to write a bug report for Debian's sake

agaida

Das heisst im allgemeinen und ganz speziellen, dass ich nicht mal das Problem oder Deinen Ansatz verstehe. ;) Ist nicht so hart gemeint, wie es eventuell rüber kommt. Zur Erklärung;


# Defaults for grub2-fll-fromiso update-grub helper
# sourced by grub2's update-grub
# installed at /etc/default/grub2-fll-fromiso by the maintainer scripts

#
# This is a POSIX shell fragment
#

# specify where to look for the ISO
# default: /srv/ISO
FLL_GRUB2_ISO_LOCATION="/opt/isos"

# array for defining ISO prefices --> siduction-*.iso, non-recursive
# default: "siduction- fullstory-"
FLL_GRUB2_ISO_PREFIX="siduction-"

# set default language
# default: en_US
FLL_GRUB2_LANG="de_DE"

# override the default timezone.
# default: UTC
FLL_GRUB2_TZ="Europe/Berlin"

# additional cheatcodes
# default: quiet noeject
#FLL_GRUB2_CHEATCODE="quiet nolapic_timer radeon.modeset=1 noeject"


Ich werfe alle meine Isos in die spezifizierte Location, sag ihm noch wie die heissen dürfen und das wars. (ok, Sprache und options setze ich auch noch, weil mir mein Rechner sonst ins Gesicht springt. Da die Buben die schlauen Bücher gelesen haben wird jetzt ein wenig Magie angewandt und per script werden im Pfad die definierten isos gesucht und menüeinträge erstellt und loopdevices gebastelt.

Kernel suchen:

kernels="$( ( ${ISOINFO} -J -l -i ${iso_image} 2>/dev/null || ${ISOINFO} -l -i ${iso_image} ) | tr A-Z a-z | sed -n 's/.*\(vmlinuz.*\)/\1/p')"
if ( ${ISOINFO} -J -l -i ${iso_image} 2> /dev/null|| ${ISOINFO} -l -i ${iso_image}) | tr A-Z a-z | grep -q initrd\\.img; then
  initrd_suffix=".img"
fi


Die Kernel abarbeiten:


for kernel in ${kernels}; do
   printf "menuentry \"$(basename ${iso_image} .iso) (${kernel#vmlinuz\-})\" {\n"
   printf "\tinsmod iso9660\n"
   prepare_boot_cache="$(prepare_grub_to_access_device ${cur_device} | sed -e "s/^/\t/")"
   printf '%s\n' "${prepare_boot_cache}"


Schwups, noch die Laufwerke erstellt und weggeschrieben


loopback loop ${stripped_path}
linux (loop)/boot/${kernel} fromhd=${cur_fromhd} fromiso=${stripped_path} $CMDLINE
initrd (loop)/boot/initrd${initrd_suffix}${kernel#vmlinuz}


Das hat erstmal mit der von die angesprochenen Syntax nichts zu tun. Solange die unteren 3 Zeilen in Grub2 so funken wird da der Pfad zum Kernel im loop-Device gelegt und gefunden werden. Wenn das mal nicht mehr so sein sollte, weil grub auf einmal eine andere Meinung hat, wird man in diesen 3 Zeilen entsprechend reagieren müssen. Ich bin aber verdammt froh darüber, dass da in absehbarer Zeit keinerlei Notwendigkeit für eine Änderung besteht.
There's this special biologist word we use for "stable". It's "dead". ~ Jack Cohen

piper

# Defaults for grub2-fll-fromiso update-grub helper
# sourced by grub2's update-grub
# installed at /etc/default/grub2-fll-fromiso by the maintainer scripts

#
# This is a POSIX shell fragment
#

# specify where to look for the ISO
# default: /srv/ISO
FLL_GRUB2_ISO_LOCATION="/media/disk1part7/aptosid"

# array for defining ISO prefices --> aptosid-*.iso, non-recursive
# default: "aptosid- fullstory-"
FLL_GRUB2_ISO_PREFIX="siduction-11.1-rc-OneStepBeyond-kde-lite-amd64-201112212148 aptosid-snapshot-kde-lite-amd64-201112251404"

# set default language
# default: en_US
#FLL_GRUB2_LANG="de_DE"

# override the default timezone.
# default: UTC
#FLL_GRUB2_TZ="Europe/Berlin"

# additional cheatcodes
# default: quiet noeject
FLL_GRUB2_CHEATCODE="quiet noeject toram"

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
 load_env
fi
set default="0"
if [ "${prev_saved_entry}" ]; then
 set saved_entry="${prev_saved_entry}"
 save_env saved_entry
 set prev_saved_entry=
 save_env prev_saved_entry
 set boot_once=true
fi

function savedefault {
 if [ -z "${boot_once}" ]; then
   saved_entry="${chosen}"
   save_env saved_entry
 fi
}

function load_video {
 insmod vbe
 insmod vga
 insmod video_bochs
 insmod video_cirrus
}

insmod part_msdos
insmod reiserfs
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set=root 5125fd7e-218f-4508-9795-0468591a9ec9
if loadfont /usr/share/grub/unicode.pf2 ; then
 set gfxmode=640x480
 load_video
 insmod gfxterm
 insmod part_msdos
 insmod reiserfs
 set root='(hd0,msdos6)'
 search --no-floppy --fs-uuid --set=root 5125fd7e-218f-4508-9795-0468591a9ec9
 set locale_dir=($root)/boot/grub/locale
 set lang=en_US
 insmod gettext
fi
terminal_output gfxterm
set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
insmod part_msdos
insmod reiserfs
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set=root 5125fd7e-218f-4508-9795-0468591a9ec9
insmod png
if background_image /usr/share/images/desktop-base/desktop-grub.png; then
 set color_normal=magenta/black
 set color_highlight=green/black
else
 set menu_color_normal=magenta/black
 set menu_color_highlight=green/black
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Aptosid' --class debian --class gnu-linux --class gnu --class os {
insmod gzio
insmod part_msdos
insmod reiserfs
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set=root 5125fd7e-218f-4508-9795-0468591a9ec9
echo 'Loading Linux 3.1-6.slh.1-aptosid-amd64 ...'
linux /boot/vmlinuz-3.1-6.slh.1-aptosid-amd64 root=UUID=5125fd7e-218f-4508-9795-0468591a9ec9 ro  quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-3.1-6.slh.1-aptosid-amd64
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows 7" --class windows --class os {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root 78710D782AD1A7D3
chainloader +1
}
menuentry "Siduction" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod reiserfs
set root='(hd0,msdos8)'
search --no-floppy --fs-uuid --set=root ca456070-3643-43a7-8ac1-dadcab0cc403
linux /boot/vmlinuz-3.1-6.towo.2-siduction-amd64 root=UUID=ca456070-3643-43a7-8ac1-dadcab0cc403 ro quiet
initrd /boot/initrd.img-3.1-6.towo.2-siduction-amd64
}
menuentry "Siduction old" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod reiserfs
set root='(hd0,msdos8)'
search --no-floppy --fs-uuid --set=root ca456070-3643-43a7-8ac1-dadcab0cc403
linux /boot/vmlinuz-3.1-5.towo.3-siduction-amd64 root=UUID=ca456070-3643-43a7-8ac1-dadcab0cc403 ro quiet
initrd /boot/initrd.img-3.1-5.towo.3-siduction-amd64
}
menuentry "Debian" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd0,msdos9)'
search --no-floppy --fs-uuid --set=root 218bc597-6b3e-4db9-9e78-429face0d2e2
linux /boot/vmlinuz-2.6.32-5-amd64 root=UUID=218bc597-6b3e-4db9-9e78-429face0d2e2 ro quiet nomodeset nouveau.modeset=0
initrd /boot/initrd.img-2.6.32-5-amd64
}
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  $prefix/custom.cfg ]; then
 source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

### BEGIN /etc/grub.d/60_fll-fromiso ###
menuentry "Siduction-Live" {
insmod iso9660
insmod part_msdos
insmod reiserfs
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set=root 2815de12-8b41-4d98-9b3e-9c9aa067ec33
loopback loop /aptosid/siduction-11.1-rc-OneStepBeyond-kde-lite-amd64-201112212148.iso
linux (loop)/boot/vmlinuz0.amd fromhd=UUID=2815de12-8b41-4d98-9b3e-9c9aa067ec33 fromiso=/aptosid/siduction-11.1-rc-OneStepBeyond-kde-lite-amd64-201112212148.iso boot=fll lang=en_EN tz=UTC quiet noeject toram
initrd (loop)/boot/initrd0.amd
}
menuentry "Aptosid-Live" {
insmod iso9660
insmod part_msdos
insmod reiserfs
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set=root 2815de12-8b41-4d98-9b3e-9c9aa067ec33
loopback loop /aptosid/aptosid-snapshot-kde-lite-amd64-201112251404.iso
linux (loop)/boot/vmlinuz0.amd fromhd=UUID=2815de12-8b41-4d98-9b3e-9c9aa067ec33 fromiso=/aptosid/aptosid-snapshot-kde-lite-amd64-201112251404.iso boot=fll lang=en_EN tz=UTC quiet noeject toram
initrd (loop)/boot/initrd0.amd
}
### END /etc/grub.d/60_fll-fromiso ###
I have a Lucky Rabbit:    "Svoot" ..... (It's Swedish)

I am MAGA