Page 1 of 1

Porteus added to Grub menu, not so "easy"

Posted: 04 Apr 2025, 06:44
by SEMERENDO.cr
💿 To begin with, identifying the correct disk nomenclature is not that simple, even if you check the "/boot/grub/grub.cfg" file.
Re: Porteus install and GRUB (Post by brokenman #18826)


brokenman, says > set root=(hd1,7), but I prefer > set root='hd1,msdos8'

Code: Select all

### BEGIN /etc/grub.d/10_linux ###
menuentry 'ALT p11 starter kit' --class gnu-linux --class gnu --class os --class altlinux --unrestricted $menuentry_id_option 'gnulinux-simple-f5429808-2e62-40fb-b767-1be68dbc0b57' {
	savedefault
	load_video
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='hd1,msdos1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1  f5429808-2e62-40fb-b767-1be68dbc0b57
	else
	  search --no-floppy --fs-uuid --set=root f5429808-2e62-40fb-b767-1be68dbc0b57
	fi
	linux	/boot/vmlinuz root=UUID=f5429808-2e62-40fb-b767-1be68dbc0b57 ro  panic=30 quiet loglevel=3 splash
	initrd	/boot/initrd.img
}
In my case, contrary to what is obvious(hd0), I had to put the same disk "hd1"👀

Code: Select all

menuentry 'Porteus' {
	set root='hd1,msdos4'
	linux /boot/syslinux/vmlinuz
	initrd /boot/syslinux/initrd.xz
}
💿 Porteus starts without reading the "changes" folder
or it starts few stuck when adding from=/porteus changes=/porteus

Regardless of the suggested parameters I set, it still ends up being "Always Fresh."
It's funny, because when you look at the Lilo bootloader, it's basically the same. What could be wrong?

Code: Select all

LABEL GRAPHICAL
MENU LABEL Graphics mode
KERNEL /boot/syslinux/vmlinuz
INITRD /boot/syslinux/initrd.xz
APPEND changes=/porteus
TEXT HELP
    Run Porteus the best way we can.
    Try to autoconfigure graphics
    card and use the maximum allowed
    resolution. If booting from a
    non-posix (FAT/NTFS) drive,
    see the Saving Changes Help
    below for how to save changes.
ENDTEXT
Image

Porteus added to Grub menu, not so "easy"

Posted: 04 Apr 2025, 09:25
by rych
Why do people have to set root= ? My whole grub.cfg is "simply":

Code: Select all

set PorteusLabel=PortInt
set PorteuXLabel=PortInt

set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
set timeout=5
loadfont /boot/grub/unicode32.pf2
terminal_output gfxterm

menuentry 'Porteus 1920x1080' {
	linux   /boot/porteus/vmlinuz from=LABEL:$PorteusLabel changes=EXIT:/porteus nodesktop login=root load=1920x1080 fsck zram=33%
	initrd /boot/porteus/initrd.zst
}
menuentry 'PorteuX 1920x1080' {
	linux   /boot/porteux/vmlinuz from=LABEL:$PorteuXLabel changes=EXIT:/porteux load=1920x1080
	initrd /boot/porteux/initrd.zst
}
... and I'm not even sure I actually need PorteusLabel and PorteuXLabel when I only have one disk and unique copy of each: I think Porteus will find /porteus, and PorteuX -- /porteux folder by default on one of the partitions.

Porteus added to Grub menu, not so "easy"

Posted: 04 Apr 2025, 12:28
by Otto
You can put the iso file in any partition you want and boot directly from iso. Using UUID is most accurate.

menuentry " porteus/x " {
set isofile="/*.iso"
search --no-floppy --file --set=root UUID
loopback loop $isofile
linux (loop)/boot/syslinux/vmlinuz from=$isofile changes=/
initrd (loop)/boot/syslinux/initrd.*
}

Porteus added to Grub menu, not so "easy"

Posted: 04 Apr 2025, 15:54
by Ed_P
I boot Porteus 3 different ways with Grub2, the majority of the time from ISO files on my harddrive (which means a save.dat file is required to save changes).

Code: Select all

     set linux_folder=/porteus5.0

     set iso="/ISOs/Porteus/Porteus-CINNAMON-v5.01-x86_64-240923.iso"
     set iso="/ISOs/Porteus/Porteus-CINNAMON-v5.01-x86_64-241211.iso"
     set iso="/ISOs/Porteus/Porteus-CINNAMON-v5.01-x86_64-250130.iso"
     set SaveDat=50save.dat

     if [ ! -z "${loop}" ]; then
        loopback -d loop
     fi     

menuentry " Porteus 5.01 ISO - changes="  --class slackware   --class user-icon-porteus  {

     set Changes=$SaveDat   # porteussave.dat 
     set bootparms="volume=33 reboot=cold extramod=$linux_folder/Modules login=guest \
       changes=EXIT:$linux_folder/changes/$Changes \
       noload=kde;jinn;lxqt;xfce;lxde;mate;open;dat.xzm;mychanges;autonet;pipe;menu1" # ;mychanges"

     search -f $iso --set=root
     loopback loop $iso
     linux (loop)/boot/syslinux/vmlinuz      from=$iso $bootparms
     initrd (loop)/boot/syslinux/initrd.xz
     }  
     
     
menuentry " Porteus 5.0 USB - EFI" --class slackware   --class user-icon-porteus  {

     set bootmgr=/EFI/boot/bootx64.efi          #grubx64.efi    # 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"  #;cinnamon" # changes=EXIT:/changes/porteussave.dat"

     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
     } 
     

Porteus added to Grub menu, not so "easy"

Posted: 05 Apr 2025, 03:22
by rych
Otto wrote: ↑
04 Apr 2025, 12:28
can put the iso file in any partition you want and boot directly from iso
Ed_P wrote: ↑
04 Apr 2025, 15:54
from ISO files on my harddrive (which means a save.dat file is required to save changes).
Those who boot from .iso, is it because you can't have an ext4 partition? But then, where do you put extra xzm modules? Into the iso, rebuilding the iso each time. That iso is an extra encapsulation living on top of NTFS or some FAT in your case, with an overhead?

Porteus added to Grub menu, not so "easy"

Posted: 05 Apr 2025, 03:30
by SEMERENDO.cr
In the end, I can't find a solution. The only thing left to do is to boot it by default or append the line from the changes folder. Waiting for the 10-second delay isn't that bad!
Common sense tells me that unzipping the .iso image would be slower.
The moral I take away is how essential the bootloader is; you have to install it.
Thanks!

Otto wrote: ↑
04 Apr 2025, 12:28
You can put the iso file in any partition you want and boot directly from iso. Using UUID is most accurate.

menuentry " porteus/x " {
set isofile="/*.iso"
search --no-floppy --file --set=root UUID
loopback loop $isofile
linux (loop)/boot/syslinux/vmlinuz from=$isofile changes=/
initrd (loop)/boot/syslinux/initrd.*
}

Porteus added to Grub menu, not so "easy"

Posted: 05 Apr 2025, 16:17
by Otto
@ rych, Those who boot from .iso, is it because you can't have an ext4 partition?
In my case, I use only grub2 in EXT4 to boot all ISOs(1st part.) and frugal installations(2nd part.).
You dont need any vFat or NTFS in legacy bios machine(I dont use windows anymore).
If you have uefi machine, you need absolute FAt boot-partition.
Image
But then, where do you put extra xzm modules? Into the iso, rebuilding the iso each time.
Mount the iso and read *.iso/boot/docs/cheatcodes.txt
You can use "Extramod" stanza and point the module(s) anywhere you want.
That iso is an extra encapsulation living on top of NTFS or some FAT in your case, with an overhead?
I did put all ISOs in NTFS/FAT windows partition(so long not encrypted). ISO is ISO, never change.

Porteus added to Grub menu, not so "easy"

Posted: 05 Apr 2025, 19:08
by Ed_P
Otto wrote: ↑
04 Apr 2025, 12:28
search --no-floppy --file --set=root UUID
?? Where do you set the UUID? Wouldn't "search --file $isofile --set=root" work?
rych wrote: ↑
05 Apr 2025, 03:22
Those who boot from .iso, is it because you can't have an ext4 partition?
No. Less work, no need to create a drive, find a drive, use a drive format not sharable with other systems, easier to boot what I've downloaded.
rych wrote: ↑
05 Apr 2025, 03:22
But then, where do you put extra xzm modules? Into the iso, rebuilding the iso each time.
Possible but no. I put them in a folder on a drive sharable with the system I'm running and the system I will be booting, usually with the name Modules. :) Easy to add to, easy to update, while keeping the ISO system intact. One of my grub menu bootparms, the extramod= one points to it. B)

And yes, some system updates may require the ISO to rebuilt, if the system update resolves a problem you are experiencing. If not, you wait. If needed, you rebuild the ISO, which I do with a script I use.

Porteus added to Grub menu, not so "easy"

Posted: 07 Apr 2025, 09:08
by rych
Ed_P wrote: ↑
05 Apr 2025, 19:08
Those who boot from .iso, is it because you can't have an ext4 partition?
No. Less work, no need to create a drive, find a drive, use a drive format not sharable with other systems, easier to boot what I've downloaded.
That's because your main OS is Windows I guess? I get your (and many users') reasons. But I work primarily on Linux, the "normal" FS in Linux is ext4. I install huge software environments on Linux, so I won't be encapsulating all that into xzms and savedat living on NTFS -- that'd just be too awkward and unwieldy. I have an NTFS partition too of course on my drive, but not as the main system partition when I boot into Porteus.

Porteus added to Grub menu, not so "easy"

Posted: 07 Apr 2025, 19:01
by Ed_P
rych wrote: ↑
07 Apr 2025, 09:08
That's because your main OS is Windows I guess?
Yes.
rych wrote: ↑
07 Apr 2025, 09:08
But I work primarily on Linux, the "normal" FS in Linux is ext4. I install huge software environments on Linux
Wow! Definitely a different perspective. Hopefully I/we can learn more from it :happy62: but I'm not sure the average user here is.