Running Porteus on harddisk via GRUB ?!

Technical issues/questions of an intermediate or advanced nature.
User avatar
Ed_P
Moderator
Moderator
Posts: 5706
Joined: 06 Feb 2013, 22:12
Distribution: 4.0 & 5.0rc2 Cinnamon 64 ISOs
Location: Western NY, USA

Running Porteus on harddisk via GRUB ?!

Post#16 by Ed_P » 09 Oct 2020, 04:17

If you set root to the partition you're booting and don't use the from= cheatcode does it boot?

If you set root to the grub partition you're booting and set the from= cheatcode to the name of the folder name you want to use does it boot? No /mnt or /dev just the folder name your using.

Added in 10 hours 52 minutes 52 seconds:
This is a grub menu I use for an installed version of Porteus. No from= cheatcode used.

Code: Select all

menuentry "Porteus 3.2.2 - installed" --class slackware   --class icon-porteus  {
     echo "Boot disk address is: "$root
     echo "Prefix is:            "$prefix
     echo "The boot mode is:     "$grub2win_bootmode

     search -f /boot/syslinux/vmlinuz --set=root

     echo "Porteus root is:      "$root
     echo "ISO is:               n/a"
     echo "Porteus folders:      /"

     set porteus_parms="extramod=/Modules;/Modsavedat changes=EXIT:/porteus/porteussave.dat volume=33 reboot=cold"  # acpi=off"

     echo "Porteus parms are:    "$porteus_parms
     echo
     sleep -v -i 5

     linux /boot/syslinux/vmlinuz $porteus_parms
     initrd /boot/syslinux/initrd.xz
     echo "Booting Porteus"
}
Ed

User avatar
francois
Contributor
Contributor
Posts: 5856
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#17 by francois » 11 Oct 2020, 02:29

If he is able to boot with some grub menu entry to the usb, this is already a result. He just needs to specify the uuid as in grubconfig to install easily grub legacy (0.97) on porteus

He has not grub legacy, he has grub2.
https://askubuntu.com/questions/413479/ ... on-of-grub
GRUB 2 is version 1.98 or later.

Why can't he show is syntax?
Prendre son temps, profiter de celui qui passe.

User avatar
Ed_P
Moderator
Moderator
Posts: 5706
Joined: 06 Feb 2013, 22:12
Distribution: 4.0 & 5.0rc2 Cinnamon 64 ISOs
Location: Western NY, USA

Running Porteus on harddisk via GRUB ?!

Post#18 by Ed_P » 11 Oct 2020, 03:20

When booting from an install with grub2 I don't need the from= cheatcode, I don't understand why he thinks he does.
Ed

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

Running Porteus on harddisk via GRUB ?!

Post#19 by roadie » 11 Oct 2020, 18:26

Ed_P wrote:
11 Oct 2020, 03:20
When booting from an install with grub2 I don't need the from= cheatcode, I don't understand why he thinks he does.
Ed_P,

Not to speak for Buurman here, but this is my view on things.

From the OP's posts, it's clear that Buurman has much the same issue that I'm having, though worse because Buurman is using a "porteus" folder where I'm renaming folders. I imagine Buurman thinks he needs the "from=" cheatcode cause nothing else works. And it's not like his setup is anything exotic or out of the ordinary. It appears to be a "normal" setup, same as mine. There's no issue in finding the kernel and initrd, then booting it. Any kernel or initrd by any name is found without a problem. The Porteus files are a different story.

Buurman and I should be able to boot with no problems whatsoever, but something prevents the files being found. No cheatcodes have any effect, apart from displaying one version of error message or the other.

It's good that you don't need the from= cheatcode to boot Porteus, be happy for that. I haven't posted about my problems because I don't believe the issue is necessarily with Porteus.....and I like fixing stuff myself. I'm looking at partitions, GPT, UEFI, that kinda stuff. I don't think the answer lays in Grub, or any bootloader. Otherwise there would be lots of posts from users not being able to boot Porteus.

And, it's not like renaming folders is something new in Porteus, I, and I'm sure many others, have been doing it since Porteus first came out. Simply by using the from= cheatcode......that doesn't work now. I can get around it with a rebuilt initrd, Buurman cannot......well, Buurman might be able to boot with a rebuilt initrd that looks for a different folder, rather than porteus.....but it shouldn't be needed.

As far as showing syntax used for booting, what's the point? I've been using Porteus long enough to have an idea what a boot line should look like, Buurman can boot other installs, and really, the Porteus files should be easy to find in Buurman's case since they're in a "porteus" folder and USB and ISO boots easily.

I can well understand the frustration Buurman is having with this.

User avatar
Ed_P
Moderator
Moderator
Posts: 5706
Joined: 06 Feb 2013, 22:12
Distribution: 4.0 & 5.0rc2 Cinnamon 64 ISOs
Location: Western NY, USA

Running Porteus on harddisk via GRUB ?!

Post#20 by Ed_P » 12 Oct 2020, 03:49

Thank you roadie. :) My USB installs are on FAT32 drives which I'm sure plays a part in their working for me.

Maybe if Buurman keeps the "porteus" name for his Porteus install it will still be separate from his other installs and work without the from= cheatcode.

Just trying to be helpful.
Ed

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

Running Porteus on harddisk via GRUB ?!

Post#21 by Buurman » 12 Oct 2020, 04:58

"socially distanced" myself from the matter for a few days , even though i already figured out what is wrong.
there is no more syntax to be given than i already said (albeit not in a < / > code form)
there are (were) basically 2 things going wrong here, flipflopping back and forth

anyway here are my findings:

Code: Select all

elif [ $ISO ]; then CFGDEV=/mnt/isoloop
    locate -e $FROM && { BOOTDEV=/mnt/$DEV; mkdir /mnt/isoloop; mount -o loop /mnt/$DEV/$LPTH /mnt/isoloop; ISOSRC=/mnt/$DEV/$LPTH; }
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
	fi
    else
	search -e porteus/$CFG || lazy -e porteus/$CFG
    fi
    CFGDEV=/mnt/$DEV
fi
.. when using an ISO the string from FROM= is just that and boots from there (Ed_P)

but when using separate base files (exported/unzipped/etc), there HAS TO BE the config file
AND the linuxrc automatically ADDS "porteus" to the path ! (Roadie and I)

so FROM=/mnt/sda1/porteus can never work .. since it gets passed on internally as /mnt/sda1/porteus/porteus
the cheatcode manual DOES NOT state to omit the porteus directory
renaming porteus to something else also does NOT work because of this (also case sensitive)
and if there is NO cfg file (within a directory called ../porteus) it halts the bootproces alltogether regardless of whether or not the path is correct in regards to FROM= (even though the cfg is empty anyway)

the extramod cheatcode does NOT add directory name /modules (in other words extramod= is absolute)

Code: Select all

else
    if [ "$EXTRAMOD" ]; then
	for folder in $EXTRAMOD; do
	    echo $i"searching for additional modules in $folder"
	    locate -d $folder && { find /mnt/$DEV/$LPTH -name "*.xzm" 2>/dev/null | egrep -ve "$NOLOAD" | sort >>/tmp/modules; } || fail $folder
	done
    fi
fi
BUT, if FROM= is succesfully used AND EXTRAMOD= is given it will try to load the modules TWICE (first from the subdirectory of /porteus and then from the EXTRAMOD= command, giving erros on /images/memory/blabla)

yet in changes= directoryname has to be omitted again or you'll end up with /mnt/sda1/porteus/changes/changes

my command line now looks like:

from=/mnt/sda1 extramod=/mnt/sda1/porteus/modules changes=/mnt/sda1/porteus

which internally gets treated as:

from=/mnt/sda1/PORTEUS extramod=/mnt/sda1/porteus/modules changes=/mnt/sda1/porteus/CHANGES

note the inconsistency ?


-> so linuxrc is inconsistent on directory-structure and manual needs to be clearer on the subject

But imo the whole 'PORTEUS' (incl BASE) and CHANGES paths should be omitted from the linuxrc altogether in order to give users true, full freedom of where to put what, also why the need to look for a cfg that is empty ? Don't 'search' just use or don't use the path given from command line. (so yeah, problems like these most probably only occur on very few occasions of stubborn users who rename their files and directories :cry: instead of doing and using what and how they are told / how they are supposed to)

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

Running Porteus on harddisk via GRUB ?!

Post#22 by roadie » 12 Oct 2020, 18:27

Ed_P wrote:
12 Oct 2020, 03:49
Thank you roadie. :) My USB installs are on FAT32 drives which I'm sure plays a part in their working for me.

Maybe if Buurman keeps the "porteus" name for his Porteus install it will still be separate from his other installs and work without the from= cheatcode.

Just trying to be helpful.
I expect that would be the case as it's always worked well in the past.....and there are no other posts saying otherwise. It looks like Buurman has found a solution, so all is good. I'm still on the hunt for my solution.

I tried a ISO boot this morning, no problems at all. It's strange that an ISO is found and booted easily, but a renamed folder is not. Anyway, the quest continues. I think up next is a good look into the HD, partitions, GPT, that kinda thing.

User avatar
francois
Contributor
Contributor
Posts: 5856
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#23 by francois » 17 Oct 2020, 18:19

If it is a question of finding the right porteus installation, did you thought about specifying a different folder target with custom-name.sgn file?

Code: Select all

sgnfile=some_name.sgn

... This cheatcode specifies the *.sgn file which Porteus will
search for. This is useful when you want to store several
Porteus editions on one disk/disc.
Example: 'sgnfile=porteus-usb.sgn'
Prendre son temps, profiter de celui qui passe.

Post Reply