Siduction Forum
Siduction Forum => Software - Support => Topic started by: michaa7 on 2015/09/06, 14:57:22
-
My default installation is on sdb1. That's the one for daily use and the one I am working on now.
I copied this installation while my system was booted from an Xorg installation on an usb-stick. I copied this installation using "cp -a /mnt/sdb1/. /mnt/sdc1" which worked as usual. Then I edited the entry for the new system partition in /mnt/sdc1/etc/fstab.
I am aware that I still have to configure (?) and update grub2, but I am still confused where from I have to do it with a copied partition.
So here is what happened:
While the system was booted from USB-stick I did neither reconfigure grub nor did I update grub.
I booted my default system (sdb1) and run "update-grub" which did find the system on /dev/sdc1 and created the respective entry.
But now, when I select this sdc1 entry during the boot process the mount command shows that acctually sdb1 has been booted.
So how do I tell grub to really boot from sdc1 using the sdc1 entry? I want to update/install grub2 while my default system on sdb1 is booted.
I really would like to give this experimental installation a better suited menuentry like "siduction_experimental". Is /etc/grub.d/40_custom on sdc1 usefull for this purpose?
Thanks.
-
hi michaa7,
never use 40_* or 41_* directly, copy it to another name - depending on where in the list the entry should appear - i would suggest 11_playground or so. another remark - you don't really want to use physical devices or partitions - use the UUID or a label. Last but not least, point to the links for image and initrd in target-root, doing so you are done with grub configurations after kernel upgrades.
-
never use 40_* or 41_* directly,
understood, will do.
copy it to another name - depending on where in the list the entry should appear - i would suggest 11_playground
sounds ok, will do.
or so. another remark - you don't really want to use physical devices or partitions
I do *not*, since years
- use the UUID or a label.
I do, since years. But unfortunatly LABEL doesn't seem to work reliably, UUID does.
Last but not least, point to the links for image and initrd in target-root,
Where? In which file on which partition? (sdb1 is default, sdc1 the copied partition which does not boot)
And how?
And afterwards, update-grub issued from sdb1 will read it?
doing so you are done with grub configurations after kernel upgrades.
Yes, I know.
A remark of which I don't know whether or not it is related. During boot of my default partition I allways get a warning telling me that the path to UUID=<x-x-x-x> is the wrong or unresolvable path (or something like this). Which is weird, because it is the UUID of the system partition which is booted without problems. This is nothing new but a many month old issue.
-
Not really sure if I am right at that, but when you copied "cp -a /mnt/sdb1/. /mnt/sdc1", then you copied the /boot/grub.grub.cfg as well. That has lines with entries for setting root, probably still pointing to your sdb. With update-grub, I think the updater sees a valid grub on sdc, makes an entry, but selecting that boots the .cfg that sets sdb as root. I think you need to chroot into that sdc1-system (explained in manual) and reinstall grub from within the chroot (or perhaps update-grub inside the chroot is enough ????)
-
Not really sure if I am right at that, but when you copied "cp -a /mnt/sdb1/. /mnt/sdc1", then you copied the /boot/grub.grub.cfg as well. That has lines with entries for setting root, probably still pointing to your sdb.
Yes, that's what I'm struggling with. With grub-legacy, we directly could edit grub to point to the right boot partition. This is what I don't get with grub2, how to change the boot device after copying a system.
With update-grub, I think the updater sees a valid grub on sdc, makes an entry, but selecting that boots the .cfg that sets sdb as root. I think you need to chroot into that sdc1-system (explained in manual) and reinstall grub from within the chroot (or perhaps update-grub inside the chroot is enough ????)
yeah, that sound reasonable, and I think that's how I did it in the past, but forgot about it. But I need to install grub to partiton, right? And if there is a reference to some boot device in the initrd, then melmaker is right too. Now I am really confused.
-
Just thinking if melmakers version with 40-custom would be the better solution than chrooting. To do so, first copy 40-custom to 11-playground (or whatever). Than copy a working menuentry from your current grub.cfg into it (starting from menuentry 'siduction... to the matching } ).
Edit that entry to have a descriptive menuentry and carefully seek for root=UUID or labels or devicenames to point to sdc1.
For the kernel-line, there should be links in your root / to /boot, I have
lrwxrwxrwx 1 root root 45 Aug 15 17:40 initrd.img -> /boot/initrd.img-4.1.5-towo.1-siduction-amd64
lrwxrwxrwx 1 root root 45 Jul 26 15:35 initrd.img.old -> /boot/initrd.img-4.1.3-towo.1-siduction-amd64
lrwxrwxrwx 1 root root 41 Aug 15 17:40 vmlinuz -> boot/vmlinuz-4.1.5-towo.1-siduction-amd64
lrwxrwxrwx 1 root root 41 Jul 26 15:35 vmlinuz.old -> boot/vmlinuz-4.1.3-towo.1-siduction-amd64
So instead the full /boot/$kernelname or $imagename you can change that to /initrd.img and /vmlinuz to always boot the latest kernel in that system (the .old entries are the kernel before)
A last update-grub will write the content from 11-playground to your grub...
-
erm - mal in deutsch, bevor ich Mist schreib - grub ist nur der eine Punkt:
image und vmlinz in root benutzen, das wird vom apt bei neuen images und initrds umgesetzt
38644 lrwxrwxrwx 1 root root 33 Jun 6 15:43 initrd.img -> /boot/initrd.img-4.0.5-5-ck-amd64
50549 lrwxrwxrwx 1 root root 29 Jun 6 15:43 vmlinuz -> boot/vmlinuz-4.0.5-5-ck-amd64
Dass sich die Datei im System befindet, dass Grub verwaltet, sollte klar sein. cp -a $foo $bar ist auch korrekt. Ein Grub-Eintrag in der 11_playground könnte dann so aussehen:
Orginaler Eintrag:
menuentry 'My System - current kernel (auf /dev/sdb2) (auf /dev/sda1) (auf /dev/sdb3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz--33439ad9-9337-4643-a5a2-ccb0e7b18ba9' {
insmod part_gpt
insmod ext2
set root='hd1,gpt3'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt3 --hint-efi=hd1,gpt3 --hint-baremetal=ahci1,gpt3 33439ad9-9337-4643-a5a2-ccb0e7b18ba9
else
search --no-floppy --fs-uuid --set=root 33439ad9-9337-4643-a5a2-ccb0e7b18ba9
fi
linux /vmlinuz root=LABEL=razor ro quiet nosplash
initrd /initrd.img
}
Wird zu:
menuentry 'Razor (auf Label razor)' --class gnu-linux --class {
insmod part_gpt
insmod ext2
linux /vmlinuz root=LABEL=razor ro quiet nosplash
initrd /initrd.img
}
Wichtig /vmlinux und /initrd.img sind relativ zu root - und wenn da root=UUID=$foo steht, dann halt dazu. Den search kann man sich ganz generös schenken. Alles was jetzt noch zu tun ist auf Playground - Anpassung der fstab, dass auch die richtigen beteiligten Partitionen angesprochen werden.
EDIT: Bevor Missverständnisse aufkommen - die benötigten Module müssen da natürlich drin stehen, das war nur ein willkürlicher Eintrag aus meinem System.
-
Thanks so far, but still something is going wrong:
default system on sdb1, currently booted:
experimental system to be booted on sdc1, currently mounted on /mnt/sdc1/:# ls -la /mnt/sdc1/
insgesamt 132
...
lrwxrwxrwx 1 root root 45 Aug 12 12:24 initrd.img -> /boot/initrd.img-4.1.5-towo.1-siduction-amd64
lrwxrwxrwx 1 root root 45 Aug 7 12:19 initrd.img.old -> /boot/initrd.img-4.1.4-towo.1-siduction-amd64
...
lrwxrwxrwx 1 root root 41 Aug 12 12:24 vmlinuz -> boot/vmlinuz-4.1.5-towo.1-siduction-amd64
lrwxrwxrwx 1 root root 41 Aug 7 12:19 vmlinuz.old -> boot/vmlinuz-4.1.4-towo.1-siduction-amd64
# nano /mnt/sdc1/etc/grub.d/11_playground
menuentry 'siduction_experimental (auf Label s64_exp)' --class gnu-linux --class {
insmod part_gpt
insmod ext2
linux /vmlinuz root=LABEL=s64_exp ro quiet nosplash
initrd /initrd.img
}
(I assume I do not need "part_gpt", but I guess it won't hurt, right?)
Is "--class gnu-linux --class" a remnant? I will now delete it and retry.
After creating 11_playground I run "update-grub", but on reboot there was no siduction_experimental entry.
-
Dass sich die Datei im System befindet, dass Grub verwaltet, sollte klar sein.
... That seems to be the not so obvious error. I expected grub2 to be able to look for /etc/grub.d/* on whichever partition it finds. But you claim I have to create and customize /etc/grub2.d/11_playground on sdb1 ?
Ok, also auf der gebooteten partition, das erǵibt folgende fehlermeldung bei "update grub" mir folgendeen einträgen in der 11_playground:
/etc/grub.d/11_playground
menuentry 'siduction_experimental (auf Label s64_exp)' --class debian --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
linux /vmlinuz root=UUID=0c3780d8-9178-49ce-9e0f-6badcec38ddc ro quiet nosplash
initrd /initrd.img
}
update-grub
/etc/grub.d/11_playground: 1: /etc/grub.d/11_playground: menuentry: not found
insmod: ERROR: could not load module part_msdos: No such file or directory
insmod: ERROR: could not load module ext2: No such file or directory
/etc/grub.d/11_playground: 4: /etc/grub.d/11_playground: linux: not found
/etc/grub.d/11_playground: 5: /etc/grub.d/11_playground: initrd: not found
/etc/grub.d/11_playground: 6: /etc/grub.d/11_playground: Syntax error: "}" unexpected
Which modules do I need? No UEFI, no gpt here. System is on ext4 partiton. Do I need some zip module, gzip or something else?
Could someone with a similar configuration post a working 40/41_custom or whatever customized grub_snippet? The info I found on the net is either outdated or incomplete.
-
My 40_custom, everything works well, some systems are installed, others are using fromiso, 40_custom is pretty easy to use.
#!/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 ext2
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 d214e821-0d19-45be-8770-dfdba028ba1f
else
search --no-floppy --fs-uuid --set=root d214e821-0d19-45be-8770-dfdba028ba1f
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' --class windows --class os $menuentry_id_option 'osprober-chain-4182AD3F3349D507' {
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=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2 4182AD3F3349D507
else
search --no-floppy --fs-uuid --set=root 4182AD3F3349D507
fi
parttool ${root} hidden-
chainloader +1
}
set linux_gfx_mode=
export linux_gfx_mode
menuentry 'Siduction-gnome' {
load_video
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos7'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos7 --hint-efi=hd0,msdos7 --hint-baremetal=ahci0,msdos7 0f242206-e2dc-4993-8c8e-f4e9cc3bef68
else
search --no-floppy --fs-uuid --set=root 0f242206-e2dc-4993-8c8e-f4e9cc3bef68
fi
echo 'Loading Linux 3.16-3.towo-siduction-amd64 ...'
linux /boot/vmlinuz-3.16-3.towo-siduction-amd64 root=UUID=0f242206-e2dc-4993-8c8e-f4e9cc3bef68 ro quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-3.16-3.towo-siduction-amd64
}
set linux_gfx_mode=
export linux_gfx_mode
menuentry 'Siduction-cinnamon' {
load_video
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos8'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos8 --hint-efi=hd0,msdos8 --hint-baremetal=ahci0,msdos8 804466e8-5bcc-47ff-82e7-9e042a4a4050
else
search --no-floppy --fs-uuid --set=root 804466e8-5bcc-47ff-82e7-9e042a4a4050
fi
echo 'Loading Linux 3.16-3.towo.2-siduction-amd64 ...'
linux /boot/vmlinuz-3.16-3.towo.2-siduction-amd64 root=UUID=804466e8-5bcc-47ff-82e7-9e042a4a4050 ro quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-3.16-3.towo.2-siduction-amd64
}
set linux_gfx_mode=
export linux_gfx_mode
menuentry 'Siduction-E17' {
load_video
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos6'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6 b4885921-86d7-4f8e-ae2c-d15bd2db48fe
else
search --no-floppy --fs-uuid --set=root b4885921-86d7-4f8e-ae2c-d15bd2db48fe
fi
echo 'Loading Linux 3.16-3.towo-siduction-amd64 ...'
linux /boot/vmlinuz-3.16-3.towo-siduction-amd64 root=UUID=b4885921-86d7-4f8e-ae2c-d15bd2db48fe ro quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-3.16-3.towo-siduction-amd64
}
menuentry "Siduction-Live-lxqt-Development" {
insmod iso9660
insmod part_gpt
insmod ext2
set root='hd1,gpt1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt1 --hint-efi=hd1,gpt1 --hint-baremetal=ahci1,gpt1 192108a8-601e-4868-882d-97ad3042b5ee
else
search --no-floppy --fs-uuid --set=root 192108a8-601e-4868-882d-97ad3042b5ee
fi
loopback loop /builds/siduction/siduction-15.1.0-whiteroom-lxqt-amd64-201506161121.iso
linux (loop)/boot/vmlinuz0.amd fromhd=UUID=192108a8-601e-4868-882d-97ad3042b5ee fromiso=/builds/siduction/siduction-15.1.0-whiteroom-lxqt-amd64-201506161121.iso boot=fll lang=en_US tz=America/New York quiet systemd.show_status=1 noeject toram
initrd (loop)/boot/initrd0.amd
}
menuentry "Siduction-Live-gnome-Development" {
insmod iso9660
insmod part_gpt
insmod ext2
set root='hd1,gpt1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt1 --hint-efi=hd1,gpt1 --hint-baremetal=ahci1,gpt1 192108a8-601e-4868-882d-97ad3042b5ee
else
search --no-floppy --fs-uuid --set=root 192108a8-601e-4868-882d-97ad3042b5ee
fi
loopback loop /builds/siduction/siduction-15.1.0-whiteroom-gnome-amd64-201506170024.iso
linux (loop)/boot/vmlinuz0.amd fromhd=UUID=192108a8-601e-4868-882d-97ad3042b5ee fromiso=/builds/siduction/siduction-15.1.0-whiteroom-gnome-amd64-201506170024.iso boot=fll lang=en_US tz=America/New York quiet systemd.show_status=1 noeject toram
initrd (loop)/boot/initrd0.amd
}
menuentry "Siduction-Live-kde-Development" {
insmod iso9660
insmod part_gpt
insmod ext2
set root='hd1,gpt1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt1 --hint-efi=hd1,gpt1 --hint-baremetal=ahci1,gpt1 192108a8-601e-4868-882d-97ad3042b5ee
else
search --no-floppy --fs-uuid --set=root 192108a8-601e-4868-882d-97ad3042b5ee
fi
loopback loop /builds/siduction/siduction-15.1.0-whiteroom-kde-amd64-201507082224.iso
linux (loop)/boot/vmlinuz0.amd fromhd=UUID=192108a8-601e-4868-882d-97ad3042b5ee fromiso=/builds/siduction/siduction-15.1.0-whiteroom-kde-amd64-201507082224.iso boot=fll lang=en_US tz=America/New York quiet systemd.show_status=1 noeject toram
initrd (loop)/boot/initrd0.amd
}
menuentry "Siduction-Live-kde-plasma5-Development" {
insmod iso9660
insmod part_gpt
insmod ext2
set root='hd1,gpt1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt1 --hint-efi=hd1,gpt1 --hint-baremetal=ahci1,gpt1 192108a8-601e-4868-882d-97ad3042b5ee
else
search --no-floppy --fs-uuid --set=root 192108a8-601e-4868-882d-97ad3042b5ee
fi
loopback loop /builds/siduction/siduction-15.1.0-whiteroom-kde5-amd64-201507181220.iso
linux (loop)/boot/vmlinuz0.amd fromhd=UUID=192108a8-601e-4868-882d-97ad3042b5ee fromiso=/builds/siduction/siduction-15.1.0-whiteroom-kde5-amd64-201507181220.iso boot=fll lang=en_US tz=America/New York quiet systemd.show_status=1 noeject toram
initrd (loop)/boot/initrd0.amd
}
menuentry "Siduction-Live-e17-Development" {
insmod iso9660
insmod part_gpt
insmod ext2
set root='hd1,gpt1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt1 --hint-efi=hd1,gpt1 --hint-baremetal=ahci1,gpt1 192108a8-601e-4868-882d-97ad3042b5ee
else
search --no-floppy --fs-uuid --set=root 192108a8-601e-4868-882d-97ad3042b5ee
fi
loopback loop /builds/siduction/siduction-14.1.0-indiansummer-xorg-amd64-201409251725.iso
linux (loop)/boot/vmlinuz0.amd fromhd=UUID=192108a8-601e-4868-882d-97ad3042b5ee fromiso=/builds/siduction/siduction-14.1.0-indiansummer-xorg-amd64-201409251725.iso boot=fll lang=en_US tz=America/New York quiet systemd.show_status=1 noeject toram
initrd (loop)/boot/initrd0.amd
}
menuentry "Siduction-Live-cinnamon-Development" --class siduction --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.0.5-towo.1-siduction-amd64-advanced-a85b1fd2-c48e-4c74-9c2e-481d02add362' {
insmod iso9660
insmod part_gpt
insmod ext2
set root='hd1,gpt1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt1 --hint-efi=hd1,gpt1 --hint-baremetal=ahci1,gpt1 192108a8-601e-4868-882d-97ad3042b5ee
else
search --no-floppy --fs-uuid --set=root 192108a8-601e-4868-882d-97ad3042b5ee
fi
loopback loop /builds/siduction/siduction-15.1.0-whiteroom-cinnamon-amd64-201506161121.iso
linux (loop)/boot/vmlinuz0.amd fromhd=UUID=192108a8-601e-4868-882d-97ad3042b5ee fromiso=/builds/siduction/siduction-15.1.0-whiteroom-cinnamon-amd64-201506161121.iso boot=fll lang=en_US tz=America/New York quiet systemd.show_status=1 noeject toram
initrd (loop)/boot/initrd0.amd
}
menuentry 'SIDUCTION-TEST' {
insmod iso9660
insmod part_gpt
insmod ext2
set root='hd1,gpt1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt1 --hint-efi=hd1,gpt1 --hint-baremetal=ahci1,gpt1 192108a8-601e-4868-882d-97ad3042b5ee
else
search --no-floppy --fs-uuid --set=root 192108a8-601e-4868-882d-97ad3042b5ee
fi
loopback loop /builds/siduction/siduction-15.1.0-thunderstruck-xorg-amd64-201509051137.iso
linux (loop)/boot/vmlinuz0.amd fromhd=UUID=192108a8-601e-4868-882d-97ad3042b5ee fromiso=/builds/siduction/siduction-15.1.0-thunderstruck-xorg-amd64-201509051137.iso boot=fll lang=en_US tz=America/New York quiet systemd.show_status=1 noeject toram
initrd (loop)/boot/initrd0.amd
}
set linux_gfx_mode=
export linux_gfx_mode
menuentry 'siduction 2015.1.0 whiteroom (kde) GNU/Linux, with Linux 4.1.2-towo.1-siduction-amd64' --class siduction --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.1.2-towo.1-siduction-amd64-advanced-7f0bf1dc-c498-444a-b88e-3df591a0370f' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,msdos9'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos9 --hint-efi=hd0,msdos9 --hint-baremetal=ahci0,msdos9 7f0bf1dc-c498-444a-b88e-3df591a0370f
else
search --no-floppy --fs-uuid --set=root 7f0bf1dc-c498-444a-b88e-3df591a0370f
fi
echo 'Loading Linux 4.1.2-towo.1-siduction-amd64 ...'
linux /boot/vmlinuz-4.1.2-towo.1-siduction-amd64 root=UUID=7f0bf1dc-c498-444a-b88e-3df591a0370f ro quiet systemd.show_status=1 splash
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-4.1.2-towo.1-siduction-amd64
}
set linux_gfx_mode=
export linux_gfx_mode
menuentry 'siduction 2015.1.0 whiteroom (kde) GNU/Linux, with Linux 4.1.2-towo.1-siduction-amd64' --class siduction --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.1.2-towo.1-siduction-amd64-advanced-326b003d-7aac-4bbf-9796-709cd9339e2d' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,msdos10'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos10 --hint-efi=hd0,msdos10 --hint-baremetal=ahci0,msdos10 326b003d-7aac-4bbf-9796-709cd9339e2d
else
search --no-floppy --fs-uuid --set=root 326b003d-7aac-4bbf-9796-709cd9339e2d
fi
echo 'Loading Linux 4.1.2-towo.1-siduction-amd64 ...'
linux /boot/vmlinuz-4.1.2-towo.1-siduction-amd64 root=UUID=326b003d-7aac-4bbf-9796-709cd9339e2d ro quiet systemd.show_status=1 splash
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-4.1.2-towo.1-siduction-amd64
}
-
My 40_custom, everything works well, some systems are installed, others are using fromiso, 40_custom is pretty easy to use.
#!/bin/sh
exec tail -n +3 $0
At least I now did understand that I had to add those two lines to the *script*. It wasn't very helpfull to omit these lines in the first example posted. If someone could explain the second line it would help me to understand why it needed to be there.
Now, with those two lines, there are no errors when "update-grub" is running, but the entry is created neither, no matter whether i use 11_playground or 40_custom.
This is how /etc/grub.d/40_custom now looks like:#!/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.
menuentry "experiment"{
insmod gzio
insmod part_msdos
set root='hd2,msdos1'
linux /vmlinuz root=UUID=0c3780d8-9178-49ce-9e0f-6badcec38ddc ro quiet nosplash
initrd /initrd.img
}
Still no clue which modules I need or where to find infos or why it still isn't creating the entry. Real help appreciated.
@ piper
Thanks for posting the file.
-
Just a quick check, the 40_custom has to reside in /etc/grub.d in your sdb1, and it has to be executable ( -rwxr-xr-x 1 root root ).
-
yes, it is executable and it is on sdb1 as /etc/grub.d/40_custom.
-
Hm, the thing is, the entry *has been created* different times, I can find it in /boot/grub/grub.cfg, which looks messed up (I did *not* edit it!)
...
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/11_playground ###
menuentry "experiment"{
insmod gzio
insmod part_msdos
set root='hd2,msdos1'
linux /vmlinuz root=UUID=0c3780d8-9178-49ce-9e0f-6badcec38ddc ro quiet nosplash
initrd /initrd.img
}
### END /etc/grub.d/11_playground ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/20_memtest86+ ###
...
### BEGIN /etc/grub.d/30_uefi-firmware ###
### END /etc/grub.d/30_uefi-firmware ###
### 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.
### BEGIN /etc/grub.d/10_linux ###
menuentry "experiment" --class siduction --class gnu-linux --class gnu --class os{
insmod gzio
insmod part_msdos
set root='hd2,msdos1'
linux /vmlinuz root=UUID=0c3780d8-9178-49ce-9e0f-6badcec38ddc ro quiet nosplash
initrd /initrd.img
}
### END /etc/grub.d/10_linux ###
### END /etc/grub.d/40_custom ###
### BEGIN /etc/grub.d/40_custom.save ###
# 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.
menuentry "experiment" --class siduction --class gnu-linux --class gnu --class os{
insmod gzio
insmod part_msdos
set root='hd2,msdos1'
linux /vmlinuz root=UUID=0c3780d8-9178-49ce-9e0f-6badcec38ddc ro quiet nosplash
initrd /initrd.img
}
### END /etc/grub.d/40_custom.save ###
### BEGIN /etc/grub.d/41_custom ###
...
May I delete /boot/grub/grub.cfg and recreate it using update-grub?
The confusing thing is: During "update-grub", what you see seems to be the os-prober output only, not the items that got created.
-
only a hint - the os_prober part often create strange results - if one know what installations are on the system a handcrafted solution might be the better idea - and it is faster too :)
rationale: os_prober mount all available file systems and try to create a valid grub entry for every finding - some times os-probe loops, create strange results and so on. so i would suggest to run os-probe one time (maybe for windows or any bsd) and then create the entrys by hand. The needed modules are a little bit difficult, it depends on several factors like mbr/gpt/lvm and so on and the compression method of the kernel, several graphics options and so on - but for standard systems the modules from 10_linux might be sufficient and a good idea.
-
Always delete os_prober when using 40 custom, I forgot to add that and also forgot to use code tags :( (now fixed)
os_prober when using 40 custom will sooner or later give you hemorrhoids
-
thanks.
But again, may I delete /boot/grub/grub.cfg and recreate a sane newone by issuing "update-grub"?
-
Natürlich kann man "alles" löschen. ;)
Üblicherweise ist der Weg jedoch, dass man mit
grub-mkconfig
erst mal schaut, wie denn das Menü aussieht. Wenn es einem passt, dann erst wird es mit
grub-mkconfig -o /boot/grub/grub.cfg
auf die Platte geschrieben (und damit, was du löschen willst, überschrieben).
Das update-grub macht das zwar auch, nur "sieht" man hier nicht alles.
-
...
Üblicherweise ist der Weg jedoch, dass man mit
grub-mkconfig
erst mal schaut, wie denn das Menü aussieht.
...
Ok, danke, alles klar, klappt jetzt.
Understood, working now. Thanks.