Hi Thomas,

to update this old thread while stretch is knocking on the door I found
out that the "device.map" is making the trouble for me.

Attached you find a diff of two grub.cfg files one was created with a
"device.map" present (the ".broken" one) and the other without.

Unfortunately something different happens as well for "grub-install".
Only fixing the grub.conf does not result in a bootable system. I also
have to run "grub-install /dev/sda" again for the system disk.

All in all the automagic FAI installation works when I comment out the
"grub-mkdevicemap" line in GRUB_PC/10-setup.
Then I get a working grub.conf and the "grub-install" works a well.


And no, "/boot" on a separate device is no option for me. We are in 2017
and I even got a complete laptop disk encrypted including partition
table and LVM stuff and grub is able to boot it from the MBR only.
So I will never ever accept workaround partitions for my systems any more.

Kind Regards,
Markus

Am 13.09.2016 um 22:29 schrieb Thomas Lange:
>>>>>> On Wed, 10 Aug 2016 18:33:31 +0200, Markus Wigge <mar...@cultcom.de> 
>>>>>> said:
> 
>     > I'm trying to install a stretch VM with more or less the same settings I
>     > have for jessie (same config directory).
> You say, that this disk_config works on jessie but not on stretch?
> 
>     > #disk_config:
>     >> disk_config disk1 disklabel:msdos bootable:1
>     >> primary -              100%    -       -
>     >> 
>     >> disk_config lvm
>     >> vg     vg1     disk1.1
>     >> vg1-root       /       1G-10G  ext4    errors=remount-ro       
> createopts="-m 2 -L root"
>     >> vg1-swap       swap    2G      swap    sw
> In the FAI example disk_config/LVM we use a seperate /boot
> partition. Is this a workaround for you?
> 


--- grub.cfg.broken	2017-06-06 18:29:22.807682548 +0200
+++ grub.cfg	2017-06-06 19:10:17.739659136 +0200
@@ -58,10 +58,12 @@
 if [ x$feature_default_font_path = xy ] ; then
    font=unicode
 else
+insmod part_msdos
+insmod lvm
 insmod ext2
-set root='hd0'
+set root='lvmid/C8Q36v-Rz7t-Y8dq-3EW7-N5Iw-v2mQ-iKm9CY/2b04OH-1KHN-lnaJ-BkhI-JWZi-CKnT-f0WU1M'
 if [ x$feature_platform_search_hint = xy ]; then
-  search --no-floppy --fs-uuid --set=root --hint='hd0'  87e1f0f2-6ef5-4c87-9349-f7a5aa32cd80
+  search --no-floppy --fs-uuid --set=root --hint='lvmid/C8Q36v-Rz7t-Y8dq-3EW7-N5Iw-v2mQ-iKm9CY/2b04OH-1KHN-lnaJ-BkhI-JWZi-CKnT-f0WU1M'  87e1f0f2-6ef5-4c87-9349-f7a5aa32cd80
 else
   search --no-floppy --fs-uuid --set=root 87e1f0f2-6ef5-4c87-9349-f7a5aa32cd80
 fi
@@ -103,15 +105,17 @@
 	load_video
 	insmod gzio
 	if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
+	insmod part_msdos
+	insmod lvm
 	insmod ext2
-	set root='hd0'
+	set root='lvmid/C8Q36v-Rz7t-Y8dq-3EW7-N5Iw-v2mQ-iKm9CY/2b04OH-1KHN-lnaJ-BkhI-JWZi-CKnT-f0WU1M'
 	if [ x$feature_platform_search_hint = xy ]; then
-	  search --no-floppy --fs-uuid --set=root --hint='hd0'  87e1f0f2-6ef5-4c87-9349-f7a5aa32cd80
+	  search --no-floppy --fs-uuid --set=root --hint='lvmid/C8Q36v-Rz7t-Y8dq-3EW7-N5Iw-v2mQ-iKm9CY/2b04OH-1KHN-lnaJ-BkhI-JWZi-CKnT-f0WU1M'  87e1f0f2-6ef5-4c87-9349-f7a5aa32cd80
 	else
 	  search --no-floppy --fs-uuid --set=root 87e1f0f2-6ef5-4c87-9349-f7a5aa32cd80
 	fi
 	echo	'Loading Linux 4.9.0-3-amd64 ...'
-	linux	/boot/vmlinuz-4.9.0-3-amd64 root=UUID=87e1f0f2-6ef5-4c87-9349-f7a5aa32cd80 ro  quiet
+	linux	/boot/vmlinuz-4.9.0-3-amd64 root=/dev/mapper/vg1-root ro  quiet
 	echo	'Loading initial ramdisk ...'
 	initrd	/boot/initrd.img-4.9.0-3-amd64
 }
@@ -120,15 +124,17 @@
 		load_video
 		insmod gzio
 		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
+		insmod part_msdos
+		insmod lvm
 		insmod ext2
-		set root='hd0'
+		set root='lvmid/C8Q36v-Rz7t-Y8dq-3EW7-N5Iw-v2mQ-iKm9CY/2b04OH-1KHN-lnaJ-BkhI-JWZi-CKnT-f0WU1M'
 		if [ x$feature_platform_search_hint = xy ]; then
-		  search --no-floppy --fs-uuid --set=root --hint='hd0'  87e1f0f2-6ef5-4c87-9349-f7a5aa32cd80
+		  search --no-floppy --fs-uuid --set=root --hint='lvmid/C8Q36v-Rz7t-Y8dq-3EW7-N5Iw-v2mQ-iKm9CY/2b04OH-1KHN-lnaJ-BkhI-JWZi-CKnT-f0WU1M'  87e1f0f2-6ef5-4c87-9349-f7a5aa32cd80
 		else
 		  search --no-floppy --fs-uuid --set=root 87e1f0f2-6ef5-4c87-9349-f7a5aa32cd80
 		fi
 		echo	'Loading Linux 4.9.0-3-amd64 ...'
-		linux	/boot/vmlinuz-4.9.0-3-amd64 root=UUID=87e1f0f2-6ef5-4c87-9349-f7a5aa32cd80 ro  quiet
+		linux	/boot/vmlinuz-4.9.0-3-amd64 root=/dev/mapper/vg1-root ro  quiet
 		echo	'Loading initial ramdisk ...'
 		initrd	/boot/initrd.img-4.9.0-3-amd64
 	}
@@ -136,15 +142,17 @@
 		load_video
 		insmod gzio
 		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
+		insmod part_msdos
+		insmod lvm
 		insmod ext2
-		set root='hd0'
+		set root='lvmid/C8Q36v-Rz7t-Y8dq-3EW7-N5Iw-v2mQ-iKm9CY/2b04OH-1KHN-lnaJ-BkhI-JWZi-CKnT-f0WU1M'
 		if [ x$feature_platform_search_hint = xy ]; then
-		  search --no-floppy --fs-uuid --set=root --hint='hd0'  87e1f0f2-6ef5-4c87-9349-f7a5aa32cd80
+		  search --no-floppy --fs-uuid --set=root --hint='lvmid/C8Q36v-Rz7t-Y8dq-3EW7-N5Iw-v2mQ-iKm9CY/2b04OH-1KHN-lnaJ-BkhI-JWZi-CKnT-f0WU1M'  87e1f0f2-6ef5-4c87-9349-f7a5aa32cd80
 		else
 		  search --no-floppy --fs-uuid --set=root 87e1f0f2-6ef5-4c87-9349-f7a5aa32cd80
 		fi
 		echo	'Loading Linux 4.9.0-3-amd64 ...'
-		linux	/boot/vmlinuz-4.9.0-3-amd64 root=UUID=87e1f0f2-6ef5-4c87-9349-f7a5aa32cd80 ro  quiet init=/lib/systemd/systemd
+		linux	/boot/vmlinuz-4.9.0-3-amd64 root=/dev/mapper/vg1-root ro  quiet init=/lib/systemd/systemd
 		echo	'Loading initial ramdisk ...'
 		initrd	/boot/initrd.img-4.9.0-3-amd64
 	}
@@ -152,15 +160,17 @@
 		load_video
 		insmod gzio
 		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
+		insmod part_msdos
+		insmod lvm
 		insmod ext2
-		set root='hd0'
+		set root='lvmid/C8Q36v-Rz7t-Y8dq-3EW7-N5Iw-v2mQ-iKm9CY/2b04OH-1KHN-lnaJ-BkhI-JWZi-CKnT-f0WU1M'
 		if [ x$feature_platform_search_hint = xy ]; then
-		  search --no-floppy --fs-uuid --set=root --hint='hd0'  87e1f0f2-6ef5-4c87-9349-f7a5aa32cd80
+		  search --no-floppy --fs-uuid --set=root --hint='lvmid/C8Q36v-Rz7t-Y8dq-3EW7-N5Iw-v2mQ-iKm9CY/2b04OH-1KHN-lnaJ-BkhI-JWZi-CKnT-f0WU1M'  87e1f0f2-6ef5-4c87-9349-f7a5aa32cd80
 		else
 		  search --no-floppy --fs-uuid --set=root 87e1f0f2-6ef5-4c87-9349-f7a5aa32cd80
 		fi
 		echo	'Loading Linux 4.9.0-3-amd64 ...'
-		linux	/boot/vmlinuz-4.9.0-3-amd64 root=UUID=87e1f0f2-6ef5-4c87-9349-f7a5aa32cd80 ro single 
+		linux	/boot/vmlinuz-4.9.0-3-amd64 root=/dev/mapper/vg1-root ro single 
 		echo	'Loading initial ramdisk ...'
 		initrd	/boot/initrd.img-4.9.0-3-amd64
 	}
@@ -174,40 +184,48 @@
 
 ### BEGIN /etc/grub.d/20_memtest86+ ###
 menuentry "Memory test (memtest86+)" {
+	insmod part_msdos
+	insmod lvm
 	insmod ext2
-	set root='hd0'
+	set root='lvmid/C8Q36v-Rz7t-Y8dq-3EW7-N5Iw-v2mQ-iKm9CY/2b04OH-1KHN-lnaJ-BkhI-JWZi-CKnT-f0WU1M'
 	if [ x$feature_platform_search_hint = xy ]; then
-	  search --no-floppy --fs-uuid --set=root --hint='hd0'  87e1f0f2-6ef5-4c87-9349-f7a5aa32cd80
+	  search --no-floppy --fs-uuid --set=root --hint='lvmid/C8Q36v-Rz7t-Y8dq-3EW7-N5Iw-v2mQ-iKm9CY/2b04OH-1KHN-lnaJ-BkhI-JWZi-CKnT-f0WU1M'  87e1f0f2-6ef5-4c87-9349-f7a5aa32cd80
 	else
 	  search --no-floppy --fs-uuid --set=root 87e1f0f2-6ef5-4c87-9349-f7a5aa32cd80
 	fi
 	linux16	/boot/memtest86+.bin
 }
 menuentry "Memory test (memtest86+, serial console 115200)" {
+	insmod part_msdos
+	insmod lvm
 	insmod ext2
-	set root='hd0'
+	set root='lvmid/C8Q36v-Rz7t-Y8dq-3EW7-N5Iw-v2mQ-iKm9CY/2b04OH-1KHN-lnaJ-BkhI-JWZi-CKnT-f0WU1M'
 	if [ x$feature_platform_search_hint = xy ]; then
-	  search --no-floppy --fs-uuid --set=root --hint='hd0'  87e1f0f2-6ef5-4c87-9349-f7a5aa32cd80
+	  search --no-floppy --fs-uuid --set=root --hint='lvmid/C8Q36v-Rz7t-Y8dq-3EW7-N5Iw-v2mQ-iKm9CY/2b04OH-1KHN-lnaJ-BkhI-JWZi-CKnT-f0WU1M'  87e1f0f2-6ef5-4c87-9349-f7a5aa32cd80
 	else
 	  search --no-floppy --fs-uuid --set=root 87e1f0f2-6ef5-4c87-9349-f7a5aa32cd80
 	fi
 	linux16	/boot/memtest86+.bin console=ttyS0,115200n8
 }
 menuentry "Memory test (memtest86+, experimental multiboot)" {
+	insmod part_msdos
+	insmod lvm
 	insmod ext2
-	set root='hd0'
+	set root='lvmid/C8Q36v-Rz7t-Y8dq-3EW7-N5Iw-v2mQ-iKm9CY/2b04OH-1KHN-lnaJ-BkhI-JWZi-CKnT-f0WU1M'
 	if [ x$feature_platform_search_hint = xy ]; then
-	  search --no-floppy --fs-uuid --set=root --hint='hd0'  87e1f0f2-6ef5-4c87-9349-f7a5aa32cd80
+	  search --no-floppy --fs-uuid --set=root --hint='lvmid/C8Q36v-Rz7t-Y8dq-3EW7-N5Iw-v2mQ-iKm9CY/2b04OH-1KHN-lnaJ-BkhI-JWZi-CKnT-f0WU1M'  87e1f0f2-6ef5-4c87-9349-f7a5aa32cd80
 	else
 	  search --no-floppy --fs-uuid --set=root 87e1f0f2-6ef5-4c87-9349-f7a5aa32cd80
 	fi
 	multiboot	/boot/memtest86+_multiboot.bin
 }
 menuentry "Memory test (memtest86+, serial console 115200, experimental multiboot)" {
+	insmod part_msdos
+	insmod lvm
 	insmod ext2
-	set root='hd0'
+	set root='lvmid/C8Q36v-Rz7t-Y8dq-3EW7-N5Iw-v2mQ-iKm9CY/2b04OH-1KHN-lnaJ-BkhI-JWZi-CKnT-f0WU1M'
 	if [ x$feature_platform_search_hint = xy ]; then
-	  search --no-floppy --fs-uuid --set=root --hint='hd0'  87e1f0f2-6ef5-4c87-9349-f7a5aa32cd80
+	  search --no-floppy --fs-uuid --set=root --hint='lvmid/C8Q36v-Rz7t-Y8dq-3EW7-N5Iw-v2mQ-iKm9CY/2b04OH-1KHN-lnaJ-BkhI-JWZi-CKnT-f0WU1M'  87e1f0f2-6ef5-4c87-9349-f7a5aa32cd80
 	else
 	  search --no-floppy --fs-uuid --set=root 87e1f0f2-6ef5-4c87-9349-f7a5aa32cd80
 	fi

Antwort per Email an