[HOWTO] Multiboot Windows and frugal Porteus/X

Post tutorials, HOWTO's and other useful resources here.
rych
Warlord
Warlord
Posts: 628
Joined: 04 Jan 2014, 04:27
Distribution: Porteus 5.0 x64 OpenBox
Location: NZ
Contact:

[HOWTO] Multiboot Windows and frugal Porteus/X

Post#1 by rych » 13 May 2024, 10:51

We will install both Porteus and PorteuX on the system hard disk that already contains Windows partitions.

Assuming you have Windows installed and boot it using UEFI. Partition table after Windows install is: gpt.

Boot to your current Porteus/X USB.

Step1. Partitions
--Resize the NTFS C: partition using GParted
--make a new ext4 partition labeled "PorteuSX"
--Optionally fine-tune it:

Code: Select all

tune2fs -m1 /dev/sda5
(Setting reserved blocks percentage to 1%)
tune2fs -o journal_data_ordered /dev/sda5
Step2. Download and copy
--download PorteuX iso and mount it
--copy from it the porteux folder onto the new ext4 partition
--copy from the iso/boot/syslinux 2 files: initrd.zst and vmlinuz onto /mnt/sda1/ appending X to their names
--get a grub2: we need grub's bootx64.efi, grubx64.efi, and grub.cfg
--copy those 3 files into a new subfolder /mnt/sda1/EFI/grub/

Step3. Make a grub.cfg to be like this:
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
set timeout=5
menuentry 'Porteus' {
linux /vmlinuz changes=/porteus login=root from=LABEL:PorteuSX fsck zram=33%
initrd /initrd.zst
}
menuentry 'PorteuX ' {
linux /vmlinuzX from=LABEL:PorteuSX changes=/porteux login=root fsck
initrd /initrdX.zst
}
(By the way, how does one make text of the grub menu larger?)

Step4. UEFI menu
--Reboot, press F2 etc. to get into your BIOS
--add a new UEFI boot menu entry e.g. "Grub" pointing to the /EFI/grub/bootx64.efi

Step5. Reboot to Windows to check if it's still working. Check its resized NTFS partition for errors

Step6. Reboot choosing the Grub menu, then choose PorteuX. That should boot into PorteuX off the hard disk

Step7. Do the same with Porteus
Then the hard disk ext4 partition will contain 2 folders: porteux and porteus. The first, EFI partition will have 4 files: initrdX.zst, vmlinuzX; and initrd.zst, vmlinuz

User avatar
Ed_P
Contributor
Contributor
Posts: 8396
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

[HOWTO] Multiboot Windows and frugal Porteus/X

Post#2 by Ed_P » 13 May 2024, 17:21

rych wrote:
13 May 2024, 10:51
We will install both Porteus and PorteuX on the system hard disk that already contains Windows partitions.

Assuming you have Windows installed and boot it using UEFI. Partition table after Windows install is: gpt.
Easier, IMHO, to download Porteus, Porteux and Grub2Win. Install Grub2Win and setup grub2 menus to boot each Porteu* iso, boot the different Porteu* systems and create save.dat files for each. No partitioning needed, no EFI tinkering needed, no USB drives needed.

Code: Select all

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

     set iso="/ISOs/Porteus/Porteus-CINNAMON-v5.01-x86_64-240429.iso"
     set Changes=50save.dat  # porteussave.dat 
     set bootparms="volume=33 reboot=cold extramod=$linux_folder/Modules \
       changes=EXIT:$linux_folder/changes/$Changes " 

     search -f $iso --set=root
     loopback loop $iso
     linux (loop)/boot/syslinux/vmlinuz      from=$iso $bootparms
     initrd (loop)/boot/syslinux/initrd.xz
     }  
     
     menuentry " PorteuX 1.3 ISO - Cinnamon"  --class slackware   --class user-icon-porteux  {
#    https://github.com/porteux/porteux/releases

     set linux_folder=/porteux
     set iso="/ISOs/PorteuX/porteux-v1.3-cinnamon-6.0.4-current-x86_64.iso"
     set bootparms="volume=33 reboot=cold extramod=$linux_folder/Modules;$linux_folder/modsavedat \
        kmap=us norootcopy"

     search -f $iso --set=root
     loopback loop $iso
     linux (loop)/boot/syslinux/vmlinuz      from=$iso $bootparms
     initrd (loop)/boot/syslinux/initrd.zst
     }
The menu boot parms are adjusted to fit the user's needs.
Ed

rych
Warlord
Warlord
Posts: 628
Joined: 04 Jan 2014, 04:27
Distribution: Porteus 5.0 x64 OpenBox
Location: NZ
Contact:

[HOWTO] Multiboot Windows and frugal Porteus/X

Post#3 by rych » 14 May 2024, 08:17

Thanks for the
Ed_P wrote:
13 May 2024, 17:21
Grub2Win
which is an interesting, GUI alternative for setting up grub and the EFI menu. It added an entry Grub2Win to BIOS EFI list absorbing the 'Windows Boot Manager' entry. It also adds a grub2win subfolder to /mnt/sda1/EFI. The Grub2Win bootloader is beautiful, themed etc. Whereas I wish I even knew how to successfully change gfxmode in my simple 3-file grub setup to make it larger at least :)
Ed_P wrote:
13 May 2024, 17:21
Install Grub2Win and setup grub2 menus to boot each Porteu* iso, boot the different Porteu* systems and create save.dat files for each. No partitioning needed
I guess my Tutorial is for people who want to and can make a separate ext4 partition to hold both PorteuS/X along with the /changes. My work Porteus is tens of GBs of Linux environment. I'm not going to encapsulate all that into save.dat controlled by NTFS or exFAT or aother foreign file system.

Also, isn't keeping your Porteus installations in the iso files a bit inflexible? There are sometimes base modules updates and kernel updates. Also, conceptually, once we start using grub we don't need the mentioning of 'syslinux', only the 2 files: vmlinuz and initrd.zst.

So thanks for the interesting Grub2Win GUI with added convenience (but also complexity of its own), but I'm holding on to my method above :)

User avatar
Ed_P
Contributor
Contributor
Posts: 8396
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

[HOWTO] Multiboot Windows and frugal Porteus/X

Post#4 by Ed_P » 14 May 2024, 16:32

rych wrote:
14 May 2024, 08:17
Whereas I wish I even knew how to successfully change gfxmode in my simple 3-file grub setup to make it larger at least :)
Grub2Win's /grub2/fonts/ folder has a bunch of .pf2 files you can use with the loadfont command.
rych wrote:
14 May 2024, 08:17
My work Porteus is tens of GBs of Linux environment.
My save.dat files are primarily for Porteu* settings, environment files like bookmarks, desktop files, scripts to invoke /porteus/optional/ modules and a game or 2, and are usually about 1/2 GB. Big files like downloads and alike I store on my harddrive directly which is NTFS or exFAT or a USB drive which is usually FAT32.
rych wrote:
14 May 2024, 08:17
Also, isn't keeping your Porteus installations in the iso files a bit inflexible? There are sometimes base modules updates and kernel updates.
For base updates I place the modules in my /proteu*/modules folder. For kernel updates I rebuild the iso.
rych wrote:
14 May 2024, 08:17
So thanks for the interesting Grub2Win GUI with added convenience (but also complexity of its own), but I'm holding on to my method above :)
And thank you :happy62: for posting the steps for your approach to maintaining multiboot systems. :good:
Ed

Post Reply