how to chainload a experimental sid install

Started by michaa7, 2013/11/28, 22:23:21

Previous topic - Next topic

michaa7

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?

Ok, you can't code, but you still might be able to write a bug report for Debian's sake

melmarker

make the entry by hand without chainloading - its just that simple
Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety. (Benjamin Franklin, November 11, 1755)
Never attribute to malice that which can be adequately explained by stupidity. (Hanlons razor)

michaa7

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)?
Ok, you can't code, but you still might be able to write a bug report for Debian's sake

unklarer

Use instead of "chainload"

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


should call the grub.cfg the desired loader.

melmarker

michaa7: Genau das ist die Lösung - und das funktioniert eigentlich immer. Aber ich will mich da nicht streiten, grub kann fies sein
Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety. (Benjamin Franklin, November 11, 1755)
Never attribute to malice that which can be adequately explained by stupidity. (Hanlons razor)

michaa7

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.
Ok, you can't code, but you still might be able to write a bug report for Debian's sake

melmarker

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.
Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety. (Benjamin Franklin, November 11, 1755)
Never attribute to malice that which can be adequately explained by stupidity. (Hanlons razor)

michaa7

#7
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 ....
Ok, you can't code, but you still might be able to write a bug report for Debian's sake

melmarker

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.
Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety. (Benjamin Franklin, November 11, 1755)
Never attribute to malice that which can be adequately explained by stupidity. (Hanlons razor)

unklarer

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!


michaa7

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 ...
Ok, you can't code, but you still might be able to write a bug report for Debian's sake

DeKa

Jetzt bleibt mal schön friedlich  :o
Toleranz ist eine tugend, vertragt euch bitte wieder.

musca

#12
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
,,Es irrt der Mensch, solang er strebt."  (Goethe, Faust)

unklarer

@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    ;)

melmarker


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.
Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety. (Benjamin Franklin, November 11, 1755)
Never attribute to malice that which can be adequately explained by stupidity. (Hanlons razor)