Running Porteus on harddisk via GRUB ?!

Technical issues/questions of an intermediate or advanced nature.
Buurman
White ninja
White ninja
Posts: 25
Joined: 28 Oct 2019, 18:00
Distribution: ver5

Running Porteus on harddisk via GRUB ?!

Post#1 by Buurman » 07 Oct 2020, 20:12

I have a test-system which is basically just a harddrive with grub (1.99 iirc), on this drive there are several linux and android-x86 versions + HBCD, grub menu.lst is basically calling the kernel and initr from there, works fine ...
Now i wanted to just copy Porteus onto this disk too, made a map (this is an ext4 format drive), copied the files there .. now the problems arise:

I can't manage to get GRUB to start Porteus's own syslinux (would be nice to maintain its own menu etc, but not perse necessary ), but somehow to overly complicated and .. sigh .. so i thought to myself, fine 'fu** it, i'll just start Porteus (version 5 btw) by same way of loading kernel /vmlinuz and initrd /initrd.xz' directly, this initially seems to work, but stops at: "looking for porteus5_64bit_config" .. "drive not ready, wait 6 sec." and after that comes with the message porteus not found, enter to reboot.
Ok, try be POSIX sensitive/considerate here .. resized the ext4 partition, made a small NTSC/FAT32 partition and try again (now pointing (hopefully) to root hd(0,1)), same result ..

what gives ? doesn't it find the modules or the porteus_#@%#@%.cfg file ? (i have the from=/map/ thingie in there pointing to the files) .. even tried putting the porteus modules just in the same map/folder/directory as vmlinuz and initrd
i'm lost here ..
:unknown:

the weirdest thing is: when i have the USB stick in the computer with Porteus (where i copied from), it WILL start the modules .. from the stick :buhehe: :wall:

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

Running Porteus on harddisk via GRUB ?!

Post#2 by Ed_P » 07 Oct 2020, 21:14

In my GRUB menus I set the root to the drive I'm booting. Search for the porteus cfg file before loading the vmlinuz and initrd.xz.

search -f /porteus/porteus-v5.0-x86_64.cfg --set=root
Ed

Buurman
White ninja
White ninja
Posts: 25
Joined: 28 Oct 2019, 18:00
Distribution: ver5

Running Porteus on harddisk via GRUB ?!

Post#3 by Buurman » 07 Oct 2020, 22:07

already had that line in, as per an older threat on this board .. to no avail
the grub command line doesn't allow me to look (ls "error 27: Unrecognised command)" but i get the feeling it's not seeing the ntsc/fat32 partition ? but can't check
will see if i can update grub (install newer version)

--edit

more specific:

trying directly from grub commandline,
grub>root=(hd0,1) (set it)
grub>root
(hd0,1) (check, is correct)

grub>kernel /P2/vmlinuz

systems halts
*********
* booting stopped ..blabla (what an annoying statement .. how about letting me continue on the command line ..no ?
*
*********
so apparently .. it doesn't see the partition ?

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

Running Porteus on harddisk via GRUB ?!

Post#4 by Ed_P » 07 Oct 2020, 22:46

I run grub2. See if the find option works with your version of grub.

find --set=root /porteus/porteus-v5.0-x86_64.cfg

If that doesn't help try putting all of Porteus on the FAT32 partition. My USB drive is FAT32 and boots an installed Porteus.

Post your full grub Porteus menu maybe there is something else needs to be looked at. Here's one of my old ones.

Code: Select all

title 07. Porteus 4.0+\n\a Disregard the missing cfg warning.
find --set-root                     /Porteus/Porteus-CINNAMON-v4.0-i586.iso
map --heads=0 --sectors-per-track=0 /Porteus/Porteus-CINNAMON-v4.0-i586.iso (0xff)
map --hook
root (0xff)
kernel /boot/syslinux/vmlinuz  from=/Porteus/Porteus-CINNAMON-v4.0-i586.iso extramod=/Porteus/Modules volume=40   
initrd /boot/syslinux/initrd.xz
Ed

Buurman
White ninja
White ninja
Posts: 25
Joined: 28 Oct 2019, 18:00
Distribution: ver5

Running Porteus on harddisk via GRUB ?!

Post#5 by Buurman » 07 Oct 2020, 23:03

grub> find
(hd0,0)


hd0,1 nowhere to be found (i can see it fine in HBCD ..where i made it ..)
:unknown:

doing a:

grub>find (hd0
it now does see the partition .. i can go into the directory structure and see the files it's supposed to boot, but when i do i get the "file not found ..booting will be stopped"

not much to give for the menu.lst, really just the basic kernel /vmlinuz and initrd (nothing more, wants to start booting from partition 0 (ext4 so xzm modules not working? posix..) but not from partition 1 (fat32)

for some reason it now does boot from the second partition (vmlinuz and initrd) but then gives the "porteus data not found" AGAIN

roadie
Full of knowledge
Full of knowledge
Posts: 400
Joined: 02 Jan 2011, 18:41
Distribution: Porteus 5.0-RC1
Location: In a hayfield

Running Porteus on harddisk via GRUB ?!

Post#6 by roadie » 07 Oct 2020, 23:46

Buurman,
Is the folder on the HD named "porteus"?
I'm having problems booting anything with a different name, if it's named porteus, booting is automatic. I'm using Porteus-v5.0-rc2, though rc1 does the same thing.

Buurman
White ninja
White ninja
Posts: 25
Joined: 28 Oct 2019, 18:00
Distribution: ver5

Running Porteus on harddisk via GRUB ?!

Post#7 by Buurman » 08 Oct 2020, 00:12

yes, the original directiry structure "boot porteus syslinux base" is intact .. dumped the whole lot in one directory (have other os'es on here)
closing in ..

tried from the ext4 partition and just pointed from= to the ISO .. it works (apparently POSIX isn't so important after all, therefore the whole second partition fumbling was irrelevant) :shock:

BUT .. i need to run the individual base xzm (not running standard kernel)

so the culprit is and/or the from= switch (from grub command line or in the porteus..x64..cfg) ..or indeed something with directory name

-- edit

it now actually gives an error:

from= cheat is wrong ..search ..and find nothing

-- edit2

either grub is parsing wrong or something fishy with porteus itself (guessing grub)

kernel /porteus/vmlinuz from=/mnt/sda2/porteus

starting .. then gives from= cheatcode is incorrect, press enter..

it now finds porteus data ..at ... PAMPAMPAAAAAAA
/mnt/sda2/porteus

:buhehe: :fool:

.. it continues to ->
searching for additional modules in from
couldn't find from.

eh ...
Last edited by Buurman on 08 Oct 2020, 00:46, edited 2 times in total.

User avatar
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Running Porteus on harddisk via GRUB ?!

Post#8 by francois » 08 Oct 2020, 00:41

The answer should be in grub2 menu entry

Please provide:
/etc/grub.d/40_custom file
folder hoding porteus system and partition
blkid output

Thanks
Prendre son temps, profiter de celui qui passe.

Buurman
White ninja
White ninja
Posts: 25
Joined: 28 Oct 2019, 18:00
Distribution: ver5

Running Porteus on harddisk via GRUB ?!

Post#9 by Buurman » 08 Oct 2020, 01:10

answer not in there francois (..already sifted through the whole thread yesterday or day before that)

cannot provide /etc/grub... as i don't have that (as is kinda stated/implied in first post)
just a harddrive with grub
folders and partition is also in the posts
blkid .. same as /etc/grub.d
just a harddrive with grub
since it couldn't find the from= after vmlinuz
i tried binding the find --set=root ..
which then immediately locks the bootprocess again
so in console tried to manually "find --set=root /porteus/port ..." while typing i CAN tab it to complete, but when enter .."error 15: File not found" (if you can't find the file, why could you complete the name :fool: )

something really weird with this GRUB version i have here ..need to find a way to update it manually ..sigh

User avatar
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Running Porteus on harddisk via GRUB ?!

Post#10 by francois » 08 Oct 2020, 01:51

Please provide:

Code: Select all

fdisk -l
and
the syntax for the other oses

For grub legacy I had:

Code: Select all

title porteus  on sda5 64bit_v30  KDE 
root (hd0,4)
kernel /64bit_v30/boot/syslinux/vmlinuz from=/dev/sda5/64bit_v30 extramod=/mnt/sda5/64bit_v30/kde changes=EXIT:/64bit_v30/kde   login=root
initrd /64bit_v30/boot/syslinux/initrd.xz
boot
Prendre son temps, profiter de celui qui passe.

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

Running Porteus on harddisk via GRUB ?!

Post#11 by Ed_P » 08 Oct 2020, 03:45

Buurman wrote:
08 Oct 2020, 00:12
tried from the ext4 partition and just pointed from= to the ISO ..

This is what I use for booting ISOs with Grub2:

Code: Select all

     set linux_folder=/porteus5.0
     set iso="/ISOs/Porteus-CINNAMON-v5.0rc2-x86_64.iso"
#     set iso="/ISOs/Porteus-CINNAMON-v5.0rc1-x86_64.iso"


menuentry " Porteus 5.0rc2 ISO - AF+"  --class slackware   --class icon-porteus  {

     set bootparms="volume=33 reboot=cold extramod=$linux_folder/Modules;$linux_folder/rc2Modules noload=jinn;changes;menu2" 

     search -f $iso --set=root
     loopback loop $iso
     linux (loop)/boot/syslinux/vmlinuz from=$iso $bootparms
#     linux $linux_folder/BootModules/vmlinuz from=$iso $bootparms
     initrd (loop)/boot/syslinux/initrd.xz
#     initrd $linux_folder/rc2Modules/initrd.xz
     }
francois wrote:
08 Oct 2020, 01:51
For grub legacy I had:

Code: Select all

title porteus  on sda5 64bit_v30  KDE 
root (hd0,4)
kernel /64bit_v30/boot/syslinux/vmlinuz from=/dev/sda5/64bit_v30 extramod=/mnt/sda5/64bit_v30/kde changes=EXIT:/64bit_v30/kde   login=root
initrd /64bit_v30/boot/syslinux/initrd.xz
boot
Note Buurman francois's menu title, sda5 and his grub root (hd0,4) code. Grub doesn't count partitions like we do. Is that your problem?
Ed

Buurman
White ninja
White ninja
Posts: 25
Joined: 28 Oct 2019, 18:00
Distribution: ver5

Running Porteus on harddisk via GRUB ?!

Post#12 by Buurman » 08 Oct 2020, 04:42

no, my problem is as stated above:

grub does NOT parse the

Code: Select all

 from= 
argument .. so it tries to find the porteus-5-64..blabla.. cfg by itself, which it doesn't find .. UNLESS the directory (from root) is indeed called PORTEUS (as Roadie also noticed)
however i try to parse

Code: Select all

FROM=
differs in outcome ..either claiming to not finding files and therefore halting boot process (i thought it didn't recognize the partition at all ..but the error seems to lie in grub/parsing)
or at best it doesn't find the por*.cfg and stops after initrd claiming to not find porteus at all

so i need to "update" (replace) grub .. without internet, without a fully working linux .. :wall:

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

Running Porteus on harddisk via GRUB ?!

Post#13 by Ed_P » 08 Oct 2020, 05:32

If your pc runs Windows I recommend Grub2Win for a good grub2 system. If not I recommend Ubuntu, it's grub2 even runs on EFI systems without disabling Secure Boot.
Ed

roadie
Full of knowledge
Full of knowledge
Posts: 400
Joined: 02 Jan 2011, 18:41
Distribution: Porteus 5.0-RC1
Location: In a hayfield

Running Porteus on harddisk via GRUB ?!

Post#14 by roadie » 08 Oct 2020, 06:11

Buurman wrote:
08 Oct 2020, 04:42
grub does NOT parse the

Code: Select all

from=

argument .. so it tries to find the porteus-5-64..blabla.. cfg by itself, which it doesn't find .. UNLESS the directory (from root) is indeed called PORTEUS

The file "finit" in the initrd is responsible for locating the Porteus files, I don't think that Grub has anything to do with that, if it did, it would have to pass off that info to the initrd.

I use Syslinux, and get the same things you're getting, so I can't see that Grub is causing it on your end. If Grub2 has the ability to map the location of the folder, then it might be well worth having, otherwise, it may do nothing to help.

My current solution works well, but it's kinda burdensome if you have a lot of different installs. I rebuild the initrd..(linuxrc)... to reflect the name of the folder and cfg file of whatever install I want to boot......and, there has to be a better way. The initrd has worked well in the past, my problems came when I went to a 64bit machine and EFI, maybe that's figuring into things.

Buurman
White ninja
White ninja
Posts: 25
Joined: 28 Oct 2019, 18:00
Distribution: ver5

Running Porteus on harddisk via GRUB ?!

Post#15 by Buurman » 08 Oct 2020, 17:16

in the file "finit"
is code

Code: Select all

# Booting failed. Failed to find porteus files. 
fail() { echo -e $i"couldn't find $1. Correct your from= cheatcode.\n Documentation in /usr/doc/porteus. Press 'enter' to continue booting."; read -s; }
but that's not the error i am getting from parsing

Code: Select all

from=
via grub

Code: Select all

kernel /vmlinuz from=...
i'm getting:
from= cheatcode is incorrect, press enter to search through all devices

found that line in "linuxrc"

Code: Select all

else
    if [ $FROM ]; then
	locate -e $FROM/porteus/$CFG
	if [ $? -eq 0 ]; then
	    DIR=`echo $LPTH | rev | cut -d/ -f3- | rev`; [ $DIR ] && FOLDER=$DIR/porteus
	else
	    echo -e "${YELLOW}from= cheatcode is incorrect, press enter to search through all devices${RST}"
	    read -s; search -e porteus/$CFG
so if grub passes the command to porteus (it passes commands fine on those android images ..so ..), it means something in initrd isnt right at all

if i'm calling for the iso image it works (full directory structure intact), but when i do it with separate vmlinuz, initrd and modules (xzm) now all of the sudden it does NOT work ?
i point to the EXACT same directory/file with from= as it finds by itself (see post #7)

changing the setting WITHIN porteus-v5...cfg doesn't do a thing either, deleting or renaming porteus-v5...cfg without having a working

Code: Select all

from
path means unable to boot

in a nutshell:
the path HAS to be /porteus and has to contain the porteus-v5...cfg file .. and it's fine .. it then uses THAT map, disregarding whatever is in that cfg
simply put FROM= does not work at all
linuxrc:

Code: Select all

else
    if [ $FROM ]; then
	locate -e $FROM/porteus/$CFG
	if [ $? -eq 0 ]; then
	    DIR=`echo $LPTH | rev | cut -d/ -f3- | rev`; [ $DIR ] && FOLDER=$DIR/porteus
	else
	    echo -e "${YELLOW}from= cheatcode is incorrect, press enter to search through all devices${RST}"
	    read -s; search -e porteus/$CFG
whatever i try with

Code: Select all

from=
fails

---
getting pretty much sick of this now
just want to put the files where I want them (even if this means vmlinuz, initrd and the base..xzm in one directory) start vmlinuz and initrd and point to base..xzm's location
it works with all other os'es on this disk, so why not now ?

Post Reply