sebanc / linuxloops

Adaptable / declarative linux distribution installer
GNU General Public License v3.0
107 stars 6 forks source link

Wrong custom code for grub2win - installation with wsl2 #2

Closed Lucaacer closed 1 year ago

Lucaacer commented 2 years ago

First of all, congrats for this brilliant solution., which allows me to istall debian on a MS surface go 2 without using an usb adapter and messing with partitions.

Anyway, please note that your script in wsl2 generates a wrong custom code for grub2win, which does not point to the right partition.

The right one is the following

img_part=/dev/nvme0n1p3
img_path=/Users/Utente/Downloads/debian.img
img_uuid=47b95074-87b0-4626-9d19-e758c95dc017
search --no-floppy --set=root --file $img_path
loopback loop $img_path
disk_type=loop
root_device=/dev/loop0p3
source ($disk_type,2)/linuxloops/config
kernel=$default_kernel
linux $kernel_prefix$kernel$kernel_suffix img_uuid=$img_uuid img_path=$img_path root=$root_device  rw quiet
initrd $initramfs_prefix$kernel$initramfs_suffix

Please note that /dev/nvme0n1p3 is the "normal" windows data partition (at least for my Surface go 2) because I placed the .img file in the Downloads folder without creating any special partition and /Users/Utente/Downloads/debian.img is the path to such file.

Now I will test chrome OS in the same way and eventually report the custom code that suits to my device.

Thanks as usual.

sebanc commented 1 year ago

Closing the issue as it is old, the config was ok but the problem was that your windows was installed in MBR mode which is not supported.