Running Porteus on harddisk via GRUB ?!

Technical issues/questions of an intermediate or advanced nature.
User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 3933
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
Location: australia
Contact:

Running Porteus on harddisk via GRUB ?!

Post#31 by ncmprhnsbl » 12 Nov 2020, 03:10

roadie wrote:
12 Nov 2020, 01:45
I think that the variable "FOLDER=$PORTEUS" on line 42 is doing that
that just sets the $FOLDER variable..
that it works for you means that $PORTEUS is being set somewhere.. though i know not where .. :) ..can't see it in standard linuxrc or finit..
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

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#32 by roadie » 12 Nov 2020, 04:01

Is it possible that setting the FOLDER=$PORTEUS causes it to parse the command line closer?

The whole problem I've had is that the command line seems to be almost ignored as far as from= or cfgfile= cheat codes, it never picks it up with the standard initrd.xz. With this initrd, it doesn't seem to matter what I name a folder to, it finds it right away.

I'm hoping that someone else tries it to see if it doesn't work on their machine. I don't see anything out of the ordinary with my setup, it's just the usual thing I've always used as far as partitioning and the like.


EDIT:

Started playing with this and taking a cue from finit and the code to parse the command line, I changed lines 42, 80, 82 in linuxrc from $PORTEUS to $FOLDER.......it still works.

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 3933
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
Location: australia
Contact:

Running Porteus on harddisk via GRUB ?!

Post#33 by ncmprhnsbl » 12 Nov 2020, 06:07

roadie wrote:
12 Nov 2020, 04:01
Started playing with this and taking a cue from finit and the code to parse the command line, I changed lines 42, 80, 82 in linuxrc from $PORTEUS to $FOLDER.......it still works.
that's still with FOLDER=$PORTEUS right?
can you try something for me?: put somewhere linuxrc: echo " the PORTEUS var is $PORTEUS ."
and see if what comes up in the output at boot..
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

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#34 by roadie » 12 Nov 2020, 07:02

ncmprhnsbl wrote:
12 Nov 2020, 06:07
roadie wrote:
12 Nov 2020, 04:01
Started playing with this and taking a cue from finit and the code to parse the command line, I changed lines 42, 80, 82 in linuxrc from $PORTEUS to $FOLDER.......it still works.
that's still with FOLDER=$PORTEUS right?
can you try something for me?: put somewhere linuxrc: echo " the PORTEUS var is $PORTEUS ."
and see if what comes up in the output at boot..
No, that was with changing line 42 to $FOLDER as well as 80 & 82.

I built one with the echo line right after the "using Porteus data from", it was impossible to see without putting in a sleep command too. But it comes up as " the PORTEUS var is ." The $PORTEUS isn't shown.

I also found that by not changing line 42 and leaving it as "porteus", I can boot the stock Porteus without a from=, and still boot all my other installs. This isn't the case when line 42 is changed to $PORTEUS, a from= has to be used or the stock Porteus won't boot.

raja
Shogun
Shogun
Posts: 434
Joined: 02 May 2017, 09:51
Distribution: v3.2.2-32 and Porteus-Artix-64
Location: Chennai,India

Running Porteus on harddisk via GRUB ?!

Post#35 by raja » 12 Nov 2020, 07:08

Dollar sign $ (Variable)

The dollar sign before the thing in parenthesis usually refers to a variable. This means that this command is either passing an argument to that variable from a bash script or is getting the value of that variable for something.
I think the Dollar sign and upper case are helping to search. Remove $ and you may fail.

Code: Select all

guest@porteus:~$ echo $BASH_VERSION
5.0.18(1)-release
guest@porteus:~$ echo $bash_version

guest@porteus:~$
bash command failed with lower case.


roadie, do you use capital letters in menu entry and folder name. ?
Linux Kernel-4.4.272 -32 bit; Linux Kernel-5.4.185 - 64 bit

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#36 by roadie » 12 Nov 2020, 14:49

raja,

I have only used lowercase in naming folders and the same on the command line. I never tested uppercase with the stock initrd, but I did test with the revised one and it found the folder with no problems. I used a mix of uppercase and lowercase for the name.

I have no doubt that without the dollar sign, it will fail to find the files. It's obviously helping to find things, I have no idea why, but the command line is parsed much better.

User avatar
Rava
Contributor
Contributor
Posts: 5401
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Running Porteus on harddisk via GRUB ?!

Post#37 by Rava » 09 Dec 2020, 13:13

roadie wrote:
12 Nov 2020, 14:49
I have no doubt that without the dollar sign, it will fail to find the files.
Without the dollar sign it is just text, with the dollar sign it refers to a variable the system or you created.

Code: Select all

root@porteus:~# echo $BASH_VERSION
5.0.18(1)-release
root@porteus:~# echo BASH_VERSION
BASH_VERSION
root@porteus:~# echo $blablubb

root@porteus:~# blablubb=true
root@porteus:~# echo $blablubb
true
root@porteus:~# 
Cheers!
Yours Rava

User avatar
cad
Black ninja
Black ninja
Posts: 69
Joined: 06 Nov 2020, 22:40
Distribution: XFCE 5.01 x86_64 + 4.0 i586

Running Porteus on harddisk via GRUB ?!

Post#38 by cad » 17 Dec 2020, 18:11

@Buurman

At one point I faced the exact symptoms you mentioned (and a similar profound frustration when not finding an easy solution):

from your post #1:
Buurman wrote:
07 Oct 2020, 20:12
[SNIP...]

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.

[SNIP...]

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:
from your post #3:
Buurman wrote:
07 Oct 2020, 22:07
[SNIP...]

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 ?

[SNIP...]

so apparently .. it doesn't see the partition ?
from your post #15:
Buurman wrote:
08 Oct 2020, 17:16
[SNIP...]

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

[SNIP...]
For me, after a lot of experimentation, the solution (or problem) was that my custom kernel did not support using the drive I was trying to boot Porteus from.

From your post #7, I gather you are also using a custom kernel:
Buurman wrote:
08 Oct 2020, 00:12
[SNIP...]

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

[SNIP...]
Make sure that "SCSI Disk Support" is compiled into the kernel and not as a module, and also that the other kernel features required to recognize and utilize your specific hard drive are also directly compiled into your custom kernel.

This is probably the reason why the 'from=' cheatcode does not work in your setup (the drive containing the Porteus files is not being recognized and used), while Porteus loads the modules from the Porteus stick when it is inserted in your computer's USB port.

Post Reply