In that case it works fully with either mbr or a gpt drive. I just cant figure out how to manipulate grub2 from porteus complains about aufs. So my main grub2 on my system is installed from ubuntu and i manage it in ubuntu with grub-customizer. And for virtual box I used debian to install it to a .vdi then can use that .vdi (remove debian) to use grubEd_P wrote: ↑22 Feb 2025, 07:03Two grub2 menus for my Porteus 5.01 FAT32 USB drive.Not that hard to set up.Code: Select all
menuentry " Porteus 5.0 USB - EFI" --class slackware --class user-icon-porteus { set bootmgr=/EFI/boot/bootx64.efi set bootdrv=$root search -f $bootmgr --set=root echo USB: $root sleep -v -i 4 if [ $root != $bootdrv ]; then chainloader $bootmgr else echo "----------------------------------------" echo USB drive NOT found. echo sleep -v -i 10 fi set root=$bootdrv } menuentry " Porteus 5.0 USB - AF'" --class slackware --class user-icon-porteus { set bootparms="volume=33 reboot=cold extramod=/Modules" set bootdrv=$root search -f /boot/syslinux/vmlinuz --set=root if [ $root != $bootdrv ]; then linux /boot/syslinux/vmlinuz $bootparms initrd /boot/syslinux/initrd.xz else echo "----------------------------------------" echo USB drive NOT found. echo sleep -v -i 10 fi set root=$bootdrv }
The top menu brings up the porteus.cfg menu, the bottom menu boots directly to the Porteus DE.
The hardest part can be determining the value for root. IMO It is better to search for the drive being booted than assign a suspected drive letter, which may be wrong. Another option is using the drive's UUID code. A grub2 menu with something like this can help:Code: Select all
set USB_drv=/boot/syslinux/vmlinuz # Can be a unique user named file on the drve. "My1stPorteusUSB.txt" echo "Boot drive: "$root echo " " search -f $USB_drv --set=root if [ $? = 0 ]; then echo "USB drive: "$root probe -u $root --set=USBuuid echo "UUID: "$USBuuid echo " " echo " " sleep -i -v 30 ; echo else echo "----------------------------------------" echo " " echo "No USB drive found." echo " " ls ; echo sleep -i -v 10 ; echo fi
update I figured it out. With the grub2.06 module
edit custom 40 to what you want
sudo grub-install --boot-directory=/mnt/sda1/boot /dev/sda
will install grub to the drive