Siduction Forum

Siduction Forum => Software - Support => Topic started by: michaa7 on 2013/11/28, 22:23:21

Title: how to chainload a experimental sid install
Post by: michaa7 on 2013/11/28, 22:23:21
I am experimenting with different sid installations, so far only pure Debian (mini.iso, netinstall-cd, netinstall-current).


I don't want siduction to loose the control over Grub(2), that's why I let install the experimental installation Grub2 to partition. Now I don't want run siduction os-proper each time. My idea was to make an chainload entry in the siduction
/etc/grub.d/40_custom
to afterward be able to boot whatever I may install to this experimental partition.


The entry looks as follows:
Quotemenuentry "testsid" {
insmod ext2
set root=(hd0,msdos2)
chainloader +1
}
but is not working.
The partition it should find the next Grub is /dev/sda2 , but I would like to use chainload together with LABEL=testsid (UUID may change each time).


Any ideas?

Title: Re: how to chainload a experimental sid install
Post by: melmarker on 2013/11/28, 22:57:35
make the entry by hand without chainloading - its just that simple
Title: Re: how to chainload a experimental sid install
Post by: michaa7 on 2013/11/28, 23:30:20
no, that's not the solution, because I have to boot siduction to make this entry (and reedit the same entry again and agin isnt fun). But i want to boot the new installed sid right after it is finished. that's only possible if chainlod finds the newly installed grub.


BTW: how could i verify Grub got installed to sda2 (and not to sdb2)?
Title: Re: how to chainload a experimental sid install
Post by: unklarer on 2013/11/28, 23:56:34
Use instead of "chainload"

...
configfile  /boot/grub/grub.cfg
...


should call the grub.cfg the desired loader.
Title: Re: how to chainload a experimental sid install
Post by: melmarker on 2013/11/29, 00:07:28
michaa7: Genau das ist die Lösung - und das funktioniert eigentlich immer. Aber ich will mich da nicht streiten, grub kann fies sein
Title: Re: how to chainload a experimental sid install
Post by: michaa7 on 2013/11/29, 00:30:37
Quote from: unklarer on 2013/11/28, 23:56:34
Use instead of "chainload"

...
configfile  /boot/grub/grub.cfg
...




like this?
Quotemenuentry "testsid" {

insmod ext2
set root=(hd0,msdos2)
configfile /boot/grub.cfg
}


@ melmarker
falls du das meintest mußt du das sagen, "händisch eintagen" ist bissl wenig, das hat mit streiten nichts zu tun sondern mit hellsehen vs. klarer ausdrucksweise.
Title: Re: how to chainload a experimental sid install
Post by: melmarker on 2013/11/29, 00:38:55
nö - das ist sei jahren im Gespräch - da gibt es die Dateien 40 und 41$foo in /etc/grub.d/  - die wurden genau zu diesem Zweck erschaffen. Die kopiert man an die Stelle, an der man sie haben will und füllt sie mit dem, was man für richtig hält. Bearbeitung dieser Dateien ist verboten ohne Umbenennung, ansonsten würde sich dpkg bedanken.

Und was man da reinschreibt - einen chainload, einen Grubeintrag frei Schnauze - aktueller Kernel, letzter kernel z.b. mit direkter Verlinkung und search auf das Zieldevice der eigenen Wahl - das bleibt nun wirklich jedem selbst überlassen. Wenn man allerdings zu kreativ wird und wirklich die Möglichkeiten von Grub voll ausschöpft, dann wird mit diesem Tun fast zwangsläufit der os-prober ausgehebelt. Der ist typisch debian, der ist auf eigenständiges Denken und Handeln nicht ausgerichtet.
Title: Re: how to chainload a experimental sid install
Post by: michaa7 on 2013/11/29, 02:41:35
Quote from: melmarker on 2013/11/29, 00:38:55
nö - das ist sei jahren im Gespräch ...


Wie nö, wenn du meinst dass deine kargen worte hilfreich gewesen sein sollten weil *du* das schon seit jahren weißt dann können wir hier das forum dicht machen. Kannste dann vorher noch gelb anstreichen ... voranstrich is ja schon ....
Title: Re: how to chainload a experimental sid install
Post by: melmarker on 2013/11/29, 11:00:29
Handlungsanweisung: ls  /etc/grub.d/ - Und das Vorgehen ist seit Jahren gut dokumentiert. Linux heisst manchmal auch, sich selbst bemühen - vor allem, wenn es um Userkonfigurationen geht, die distributionsseitig nicht sinnvoll getan werden können. Für solche Zwecke findet man dann im Idealfall vorbereitete Templates - wie in genau diesem Fall.
Title: Re: how to chainload a experimental sid install
Post by: unklarer on 2013/11/29, 11:38:42
Quote from: michaa7like this?
Wenn die grub.cfg in /boot/ liegt, ja.
Normalerweise liegt sie jedoch in /boot/grub/grub.cfg   ;)
Ein chainload ruft einen anderen Loader auf z.B. Grub2 <> Grub1
configfile benutzt die andere grub.cfg des gleichen Loader-Typ Grub2<>Grub2
Bei Dir müßte also funktionieren:menuentry 'testsid' {
        search --no-floppy --label --set=root /dev/sda2
        configfile /boot/grub/grub.cfg
}
update-grub nicht vergessen!

Title: Re: how to chainload a experimental sid install
Post by: michaa7 on 2013/11/29, 15:41:14
Quote from: unklarer on 2013/11/29, 11:38:42
Normalerweise liegt sie jedoch in /boot/grub/grub.cfg   ;)
Yep, mein fehler, danke!
Quote--set=root /dev/sda2

Das muß doch wohl --set=root (hd1,msdos2) lauten?

Quote from: melmarker on 2013/11/29, 11:00:29
Handlungsanweisung: ls  /etc/grub.d/ - Und das Vorgehen ist seit Jahren gut dokumentiert. Linux heisst manchmal auch, sich selbst bemühen - vor allem, wenn es um Userkonfigurationen geht, die distributionsseitig nicht sinnvoll getan werden können. Für solche Zwecke findet man dann im Idealfall vorbereitete Templates - wie in genau diesem Fall.
Du magst ein guter forenpinsler sein, deine quali als moderator spreche ich dir auf grund deines gequatsches ab. Lern erstmal die leute kennen bevor du hier klugscheisserst. Hätte ich deine haltung könnte ich bequem 3/4 meiner antworten auf hilfsanfragen anderer user streichen ...
Title: Re: how to chainload a experimental sid install
Post by: DeKa on 2013/11/29, 16:59:27
Jetzt bleibt mal schön friedlich  :o
Toleranz ist eine tugend, vertragt euch bitte wieder.
Title: Re: how to chainload a experimental sid install
Post by: musca on 2013/11/29, 20:03:17
Thanks DeKa, for your calm words.

Hey michaa7,

Interesting how diffrent the opinions are for managing several Linuces in one grub menu.

Grub as a true GNU tool holds most of its documentation as GNU info docs ( i like to use info:/grub in konqueror) and sadly there lies a lot of outdated documentation around in the net. I can understand both that it is not useful to copy the same docs over and over again and that it is difficult to quickly find the right idea in the net.

Obviously both micha and melmarker seem to be very engaged in their ideas about booting siduction.
Now, please calm down and put the fun back into the technical matter.

greetings
musca
Title: Re: how to chainload a experimental sid install
Post by: unklarer on 2013/11/30, 20:21:01
@michaa7,

sorry, I was traveling ...

you wrote to make "over LABEL" the
/dev/sda2 for me was the label

Standard in Grub is UUID
menuentry 'testsid' {
        search --no-floppy --fs-uuid --set=root xxxxxx-xxxx-xxxxx-...
        configfile /boot/grub/grub.cfg
}

your LABEL
menuentry 'testsid' {
        search --no-floppy --label --set=root ***label***
        configfile /boot/grub/grub.cfg
}


Remember, Grub is sensitive ..

QuoteDas muß doch wohl --set=root (hd1,msdos2) lauten?
Can I insert.

menuentry 'testsid' {
        insmod ext2
        set root='hd1,msdos2'
        search --no-floppy --label --set=root ***label***
        configfile /boot/grub/grub.cfg
}

counting begins
Grub1  HD > 0  Partition 0
Grub2  HD > 0  Partition 1    ;)
Title: Re: how to chainload a experimental sid install
Post by: melmarker on 2013/12/01, 01:02:00

set root='hd1,msdos2'
search --no-floppy --label --set=root ***label***


make only sense. if the resolution of label fail - thats happend in the past. The strength of search for uuid or a label is that you are not bound to the order of the pyhsical devices aka "WTF is /dev/sda1 or hd1" etc.  Its a simple and clean solution. I like labels more than uuids, but unfortunally os-prober show strange results, loops and a lot of crap, if you use labels.

One sentence to the point "How to keep a configuration up to date": In debian there are four links in /: vmlinuz, vmlinuz.old, initrd.img, initrd.img.old - if one use these links in his configurations there is no need to ever rebuild or touch the file in /etc/grub.d again. $foo and $bar will point to the current files, $foo.old and $bar.old will point to the current -1.
Title: Re: how to chainload a experimental sid install
Post by: piper on 2013/12/01, 17:05:40
This is what my 40_custom looks like (i have more distro's that are non-siduction related so not posted) and is probably the best route to take.

I have also edited grub.cfg in the past, it's easy for me, but, 40_custom is still the best route (and probably easier for most people).

#!/bin/sh
exec tail -n +3 $0
# 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.

### BEGIN /etc/grub.d/05_debian_theme ###
insmod part_msdos
insmod reiserfs
set root='hd0,msdos3'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3  f27ee75a-918d-456a-bc29-56424c5256c8
else
  search --no-floppy --fs-uuid --set=root f27ee75a-918d-456a-bc29-56424c5256c8
fi
insmod png
if background_image /usr/share/images/desktop-base/joy-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 ###
menuentry 'Windows 7' {
    insmod part_msdos
    insmod ntfs
    set root='hd0,msdos2'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos2 --hint-efi=hd1,msdos2 --hint-baremetal=ahci1,msdos2 --hint='hd0,msdos2'  82B4B4FAB4B4F1B1
    else
      search --no-floppy --fs-uuid --set=root 82B4B4FAB4B4F1B1
    fi
    chainloader +1
}
menuentry "Aptosid-Live-i386 development" {
    insmod iso9660
    insmod part_msdos
    insmod reiserfs
    set root='hd1,msdos5'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd2,msdos5 --hint-efi=hd2,msdos5 --hint-baremetal=ahci2,msdos5 --hint='hd1,msdos5'  9a9cc1d1-6870-4002-ad0a-bebef0c2409d
    else
      search --no-floppy --fs-uuid --set=root 9a9cc1d1-6870-4002-ad0a-bebef0c2409d
    fi
    loopback loop /siduction/aptosid-2012-01-thanatos-kde-full-i386-amd64-201212010120.iso
    linux (loop)/boot/vmlinuz0.686 fromhd=UUID=9a9cc1d1-6870-4002-ad0a-bebef0c2409d fromiso=/siduction/aptosid-2012-01-thanatos-kde-full-i386-amd64-201212010120.iso boot=fll lang=en_US tz=America/New York quiet noeject toram
    initrd (loop)/boot/initrd0.686
}
menuentry "Aptosid-Live-amd64-development" {
    insmod iso9660
    insmod part_msdos
    insmod reiserfs
    set root='hd1,msdos5'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd2,msdos5 --hint-efi=hd2,msdos5 --hint-baremetal=ahci2,msdos5 --hint='hd1,msdos5'  9a9cc1d1-6870-4002-ad0a-bebef0c2409d
    else
      search --no-floppy --fs-uuid --set=root 9a9cc1d1-6870-4002-ad0a-bebef0c2409d
    fi
    loopback loop /siduction/aptosid-2012-01-thanatos-kde-full-i386-amd64-201212010120.iso
    linux (loop)/boot/vmlinuz0.amd fromhd=UUID=9a9cc1d1-6870-4002-ad0a-bebef0c2409d fromiso=/siduction/aptosid-2012-01-thanatos-kde-full-i386-amd64-201212010120.iso boot=fll lang=en_US tz=America/New York quiet noeject toram
    initrd (loop)/boot/initrd0.amd
}
menuentry "Siduction-Live-lxde-development" {
    insmod iso9660
    insmod part_msdos
    insmod reiserfs
    set root='hd1,msdos5'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd2,msdos5 --hint-efi=hd2,msdos5 --hint-baremetal=ahci2,msdos5 --hint='hd1,msdos5'  9a9cc1d1-6870-4002-ad0a-bebef0c2409d
    else
      search --no-floppy --fs-uuid --set=root 9a9cc1d1-6870-4002-ad0a-bebef0c2409d
    fi
    loopback loop /siduction/siduction-12.2.0-ridersonthestorm-lxde-amd64-201212092122.iso
    linux (loop)/boot/vmlinuz0.amd fromhd=UUID=9a9cc1d1-6870-4002-ad0a-bebef0c2409d fromiso=/siduction/siduction-12.2.0-ridersonthestorm-lxde-amd64-201212092122.iso boot=fll lang=en_US tz=America/New York quiet noeject toram
    initrd (loop)/boot/initrd0.amd
}
menuentry "Siduction-Live-xfce-development" {
    insmod iso9660
    insmod part_msdos
    insmod reiserfs
    set root='hd1,msdos5'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd2,msdos5 --hint-efi=hd2,msdos5 --hint-baremetal=ahci2,msdos5 --hint='hd1,msdos5'  9a9cc1d1-6870-4002-ad0a-bebef0c2409d
    else
      search --no-floppy --fs-uuid --set=root 9a9cc1d1-6870-4002-ad0a-bebef0c2409d
    fi
    loopback loop /siduction/siduction-12.2.0-ridersonthestorm-xfce-amd64-201212092126.iso
    linux (loop)/boot/vmlinuz0.amd fromhd=UUID=9a9cc1d1-6870-4002-ad0a-bebef0c2409d fromiso=/siduction/siduction-12.2.0-ridersonthestorm-xfce-amd64-201212092126.iso boot=fll lang=en_US tz=America/New York quiet noeject toram
    initrd (loop)/boot/initrd0.amd
}
menuentry "Siduction-Live-rqt-development" {
    insmod iso9660
    insmod part_msdos
    insmod reiserfs
    set root='hd1,msdos5'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd2,msdos5 --hint-efi=hd2,msdos5 --hint-baremetal=ahci2,msdos5 --hint='hd1,msdos5'  9a9cc1d1-6870-4002-ad0a-bebef0c2409d
    else
      search --no-floppy --fs-uuid --set=root 9a9cc1d1-6870-4002-ad0a-bebef0c2409d
    fi
    loopback loop /siduction/siduction-13.1.1-paintitblack-rqt-amd64-201309290351.iso
    linux (loop)/boot/vmlinuz0.amd fromhd=UUID=9a9cc1d1-6870-4002-ad0a-bebef0c2409d fromiso=/siduction/siduction-13.1.1-paintitblack-rqt-amd64-201309290351.iso boot=fll lang=en_US tz=America/New York quiet noeject toram
    initrd (loop)/boot/initrd0.amd
}
menuentry "Siduction-Live-kde-development" {
    insmod iso9660
    insmod part_msdos
    insmod reiserfs
    set root='hd1,msdos5'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd2,msdos5 --hint-efi=hd2,msdos5 --hint-baremetal=ahci2,msdos5 --hint='hd1,msdos5'  9a9cc1d1-6870-4002-ad0a-bebef0c2409d
    else
      search --no-floppy --fs-uuid --set=root 9a9cc1d1-6870-4002-ad0a-bebef0c2409d
    fi
    loopback loop /siduction/siduction-13.1.1-thunderstruck-kde-amd64-201310171237.iso
    linux (loop)/boot/vmlinuz0.amd fromhd=UUID=9a9cc1d1-6870-4002-ad0a-bebef0c2409d fromiso=/siduction/siduction-13.1.1-thunderstruck-kde-amd64-201310171237.iso boot=fll lang=en_US tz=America/New York quiet noeject toram
    initrd (loop)/boot/initrd0.amd
}
menuentry "Siduction-Live-e17-development" {
    insmod iso9660
    insmod part_msdos
    insmod reiserfs
    set root='hd1,msdos5'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd2,msdos5 --hint-efi=hd2,msdos5 --hint-baremetal=ahci2,msdos5 --hint='hd1,msdos5'  9a9cc1d1-6870-4002-ad0a-bebef0c2409d
    else
      search --no-floppy --fs-uuid --set=root 9a9cc1d1-6870-4002-ad0a-bebef0c2409d
    fi
    loopback loop /siduction/siduction-13.0.5-paintitblack-nox-amd64-201306191627.iso
    linux (loop)/boot/vmlinuz0.amd fromhd=UUID=9a9cc1d1-6870-4002-ad0a-bebef0c2409d fromiso=/siduction/siduction-13.0.5-paintitblack-nox-amd64-201306191627.iso boot=fll lang=en_US tz=America/New York quiet noeject toram
    initrd (loop)/boot/initrd0.amd
}
menuentry "Siduction-Live-nvidia-development" {
    insmod iso9660
    insmod part_msdos
    insmod reiserfs
    set root='hd1,msdos5'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd2,msdos5 --hint-efi=hd2,msdos5 --hint-baremetal=ahci2,msdos5 --hint='hd1,msdos5'  9a9cc1d1-6870-4002-ad0a-bebef0c2409d
    else
      search --no-floppy --fs-uuid --set=root 9a9cc1d1-6870-4002-ad0a-bebef0c2409d
    fi
    loopback loop /siduction/siduction-13.0.5-paintitblack-kde-amd64-201306231802.iso
    linux (loop)/boot/vmlinuz0.amd fromhd=UUID=9a9cc1d1-6870-4002-ad0a-bebef0c2409d fromiso=/siduction/siduction-13.0.5-paintitblack-kde-amd64-201306231802.iso boot=fll lang=en_US tz=America/New York quiet noeject toram
    initrd (loop)/boot/initrd0.amd
}   
menuentry "Siduction-Live-gnome-development" {
    insmod iso9660
    insmod part_msdos
    insmod reiserfs
    set root='hd1,msdos5'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd2,msdos5 --hint-efi=hd2,msdos5 --hint-baremetal=ahci2,msdos5 --hint='hd1,msdos5'  9a9cc1d1-6870-4002-ad0a-bebef0c2409d
    else
      search --no-floppy --fs-uuid --set=root 9a9cc1d1-6870-4002-ad0a-bebef0c2409d
    fi
    loopback loop /siduction/siduction-13.1.1-paintitblack-gnome-dev-amd64-201309290353.iso
    linux (loop)/boot/vmlinuz0.amd fromhd=UUID=9a9cc1d1-6870-4002-ad0a-bebef0c2409d fromiso=/siduction/siduction-13.1.1-paintitblack-gnome-dev-amd64-201309290353.iso boot=fll lang=en_US tz=America/New York quiet noeject toram
    initrd (loop)/boot/initrd0.amd
}   
menuentry "Snowlinux 4 ideas for e17" {
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='(/dev/sdb,msdos6)'
    search --no-floppy --fs-uuid --set=root 9ba1bfe2-f975-4c6d-a897-656513731a76
    echo    'Loading Linux 3.5.0-10-generic ...'
    linux    /boot/vmlinuz-3.5.0-10-generic root=UUID=9ba1bfe2-f975-4c6d-a897-656513731a76 ro  quiet splash
    echo    'Loading initial ramdisk ...'
    initrd    /boot/initrd.img-3.5.0-10-generic
}