Multiple versions of Porteus

Post here if you are a new Porteus member and you're looking for some help.
datruche
Black ninja
Black ninja
Posts: 95
Joined: 20 Sep 2015, 21:02
Distribution: Arch, Porteus-Nemesis 3.5
Location: London > . < Paris

Re: Multiple versions of Porteus

Post#46 by datruche » 16 Oct 2015, 00:49

So the Porteus nOOb can't boot Porteus.
Damned screen says

Code: Select all

Starting init script <http://www.porteus.org/>
^ searching for porteus-v3.1-i486.sgn file
^ from= cheatcode is incorrect, press enter to search through all devices
The USB STICK comes with a few distros. Structure:

Code: Select all

boot/
└── syslinux/syslinux.cfg    «-- just syslinux, chainloading distros' own syslinux bootloaders

porteus/
└── {32,64}/
    ├── {base,boot,modules,...,sgn_files}
    └── boot/   «-- {isolinux,syslinux}.cfg INCLUDE porteus.cfg; vmlinuz etc are all there.

slitaz4/
└── boot/isolinux/

slitaz5/
└── boot/isolinux/
I chainload porteus's syslinux and slitaz's isolinux fine from /boot/syslinux/syslinux.cfg.
Slitaz boots without issue.

porteus/32/boot/{extlinux.conf,isolinux.cfg,syslinux.cfg}

Code: Select all

INCLUDE porteus.cfg
porteus/32/boot/porteus.cfg

Code: Select all

...
LABEL fresh
        MENU LABEL Always Fresh
        KERNEL vmlinuz
        APPEND from=/porteus/32 initrd=initrd.xz nomagic base_only norootcopy timezone=Europe/Zurich utc volume=80% kmap=fr,us
            blabla
        ENDTEXT
...
Same result after changing USB STICK to that structure:

Code: Select all

/boot/syslinux/syslinux.cfg
porteus/
└── {32,64}/
    ├── boot
    ├── sgn_files
    └── porteus/{base,modules,...}
Also I used the two syntaxes for cheatcode 'from=' :
* "path" (eg "/porteus/32") on http://www.porteus.org/tutorials/26-gen ... -them.html and docs/cheatcodes.txt
* "root_folder_name" (eg porteus/32) on http://www.porteus.org/tutorials/10-ins ... ition.html

What can I do to help Porteus finds its babes?
Last edited by datruche on 24 Dec 2015, 22:45, edited 1 time 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.

Re: Multiple versions of Porteus

Post#47 by francois » 16 Oct 2015, 02:08

APPEND from=/porteus/32

How do you want to identify your usb key with that? You need the uuid.

You have an example here to identify your key and to use from= cheatcode with uuid for your usb key:
[url]porteuhttps://forum.porteus.org/viewtopic.php?f=62&t=946[/url]
There is an explanation for you to find and set your bootloader with from= cheatcode and uuid.

In that example look at the from cheatcode for menu.lst:
************************************************************
title porteus v2.1 my-architecture on sdcard sdxy Graphics mode (XFCE)
root (hd0,0)
kernel /boot/syslinux/vmlinuz from_dev=/dev/disk/by-uuid/UUID:cb81a316-66b7-4a04-9760-43357614fc06 changes=EXIT:/dev/disk/by-uuid/cb81a316-66b7-4a04-9760-43357614fc06/porteus/change.dat login=root
initrd /boot/syslinux/initrd.xz
boot
************************************************************
Thus with my usb key and syslinux:
************************************************************
APPEND from_dev=/dev/disk/by-uuid/UUID:cb81a316-66b7-4a04-9760-43357614fc06 initrd=initrd.xz nomagic base_only norootcopy timezone=Europe/Zurich utc < on the same line, no enter key.
************************************************************

So you have to find the uuid of your usb key to begin with:

Code: Select all

blkid
See above hyperlink.
Prendre son temps, profiter de celui qui passe.

User avatar
brokenman
Site Admin
Site Admin
Posts: 6105
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v4 all desktops
Location: Brazil

Re: Multiple versions of Porteus

Post#48 by brokenman » 16 Oct 2015, 02:12

from=/mnt/sdaX/porteus/32
from=/dev/sdaX/porteus/32
from=UUID:porteus/32

The instructions should probably be a little more specific.
How do i become super user?
Wear your underpants on the outside and put on a cape.

datruche
Black ninja
Black ninja
Posts: 95
Joined: 20 Sep 2015, 21:02
Distribution: Arch, Porteus-Nemesis 3.5
Location: London > . < Paris

Re: Multiple versions of Porteus

Post#49 by datruche » 16 Oct 2015, 09:57

How do I want to identify the usb key with that?

I dunno, maybe because I boot Slitaz, AlphaOS, OpenElec and half a dozen other distros that way.

Code: Select all

label manjaro
  kernel /lives/manjaro-lxqt-0.8.13.1-x86_64/manjaro/boot/x86_64/manjaro
  append initrd=/lives/manjaro-lxqt-0.8.13.1-x86_64/manjaro/boot/x86_64/manjaro.img ...

LABEL Slitaz64
        MENU LABEL SliTaz core Live - persistent
        KERNEL /lives/Slitaz-Rolling-Core64/boot/bzImage64
        append initrd=/lives/Slitaz-Rolling-Core64/boot/rootfs.gz ...

LABEL Openelec64 installer
  KERNEL /lives/openelec-64bit/KERNEL324
  APPEND boot=LABEL=OPENELEC installer quiet tty
And [HOWTO] run multiple versions of Porteus from one partition - Porteus - Portable Linux says to this way

Code: Select all

LABEL fresh
MENU LABEL 64-bit KDE, Fresh
KERNEL /64/boot/syslinux/vmlinuz
APPEND initrd=/64/boot/syslinux/initrd.xz from=64
TEXT HELP...
So do cheatcodes cheatcodes

Code: Select all

from=/dev/device
from=/path/folder
from=/path/porteus.iso
With I recognize, 'LABEL' AND 'UUID' but shown only in a "SPECIAL NOTE" at the end, making them poorly visible.
And that's how most collegues in this thread including you François use it/

So If one *need* to add the uuid (LABEL) then maybe make it clear, otherwise you're like kidding on nOObs.
I'll try again adding LABEL (and UUID). If that works, can I edit the doc?

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.

Re: Multiple versions of Porteus

Post#50 by francois » 16 Oct 2015, 11:08

Please try uuid solution. :) it should work flawlessly.

I think that rara was working a hdd install. Personally, for USB I use uuid.

There is no from cheatcode in the other distributions.

We will have to check the FAQ unless:

Did you try the following step:
5) If this drive is not already bootable from a previous porteus install, run the install script:

cd /mnt/sdXn/boot
./Porteus-installer-for-Linux.com

And follow the installation wizard's isntructions.
Prendre son temps, profiter de celui qui passe.

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

Re: Multiple versions of Porteus

Post#51 by Rava » 16 Oct 2015, 14:53

My lazy attempt in using USB pendrives, is to just rename the *.sgn file into a name that is uniq to the USB Flashdisk.
Like, I number all my internal and external drives, including all my USB Flashdisks / pendrives, by giving them name/number combination like so

intHDE
extHD10
extUSB_FlashDisc07

and rename the *.sgn accordingly, like currently, the PC I run ATM has the "E" or 5th internal hard disk, making it intHDE.

So, I rename the sgn into intHDE.sgn.


If I have a Porteus on my 8th USB Flashdisk (it's the 8th cause I got one small one later and called that 00 instead of the current number), I would rename the sgn into extUSB_FlashDisc07.sgn.

And of course use that very same .sgn name in porteus.cfg as well.


That's a lazier way of doing things, but the more robust, reliable and quicker way it how francois said, using UUID. (Especially quicker when at boot time lots of USB pendrives would be plugged in or lots of harddisk partitions exist, and Porteus would have to look at each and very one, if one has the .sgn it's told to use. Looking up and using by UUID is quicker thaqn looking for a certain .sgn .)
Cheers!
Yours Rava

datruche
Black ninja
Black ninja
Posts: 95
Joined: 20 Sep 2015, 21:02
Distribution: Arch, Porteus-Nemesis 3.5
Location: London > . < Paris

Re: Multiple versions of Porteus

Post#52 by datruche » 16 Oct 2015, 16:06

OMG, solved. I used YUMI (which uses syslinux to chainload OSes) to make a multiboot live USB with Porteus. Looking at the structure and syntax I could find out my misunderstanding.

1) With any of the folders' structure like in my previous attemps Porteus won't boot.
Whether with 'from=/path/to/porteus/version' or prepended by 'UUID:{path,/path}' or by 'LABEL:UUID:{path,/path}':

Code: Select all

Starting init script <http://www.porteus.org/>
^ searching for porteus-v3.1-i486.sgn file
^ from= cheatcode is incorrect, press enter to search through all devices
As Porteus looks for the sgn file and won't find it but if in: /path_to/porteus_version/porteus/sgn. And won't boot if not finding it.

2) Just edited the folders' structure:

Code: Select all

/boot/syslinux/syslinux.cfg    «-- just syslinux, chainloading distros' own syslinux bootloaders
porteus/
└── {32,64}/
    ├── boot/
    └── porteus/{base,modules,...,sgn_file}    «-- note the porteus/sgn file
other_distro_1/boot/isolinux/
other_distro_2/boot/isolinux/
That boots with 'from=/path/to/porteus/version' (and probably also with 'UUID:{path,/path}' or 'LABEL:UUID:{path,/path}')

@Rana thank you. Reading your post above I noticed i486 and x86_64 sgn files were identical. I find it silly to have them named by architecture if they're the same.

Now hopefuly I can dig in the distro's more interesting particularities eg packages and modules management (I noted USM, pman as a pacman wrapper for modules creation) ":-) See ya!
Last edited by datruche on 24 Dec 2015, 22:50, edited 1 time in total.

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

Re: Multiple versions of Porteus

Post#53 by Rava » 17 Oct 2015, 03:56

datruche wrote:@Rana thank you. Reading your post above I noticed i486 and x86_64 sgn files were identical. I find it silly to have them named by architecture if they're the same.
The post above is by me, and I am Rava, not Rana...

So... did you mean my post? The Rava post, reply http://forum.porteus.org/viewtopic.php? ... 742#p37739 one?

I mentioned renaming the sgn file so that it's a uniq name. Why should it make no sense to have the sgn file being technically the same, but named differently?
Me thinks you not got the idea behind my above post, then, at all... Image
Cheers!
Yours Rava

datruche
Black ninja
Black ninja
Posts: 95
Joined: 20 Sep 2015, 21:02
Distribution: Arch, Porteus-Nemesis 3.5
Location: London > . < Paris

Re: Multiple versions of Porteus

Post#54 by datruche » 17 Oct 2015, 09:31

Yes I was referring to your post on renaming the sgn file rava, sorry for the letter's typo. Until you posted it I was wrongly relying on porteus-version-arch.sgn names to get them.
Well because it's easier if a file name describes its content, and signature file commonly identify a unique content (download, ISO, person etc). Like Tails signing key. Multiple names added complexity when debugging non functioning multiple version booting. Like you're renaming it single for a reason, or am I mistaking?

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

Re: Multiple versions of Porteus

Post#55 by Rava » 17 Oct 2015, 12:11

datruche wrote:Like you're renaming it single for a reason, or am I mistaking?
I do the renaming way cause it's a quick and easy one. In my book, having all internal and external hard disks numbered, and all USB pendrives as well is a necessity, cause I have dozens of them combined, and I created me an indexing scripting solution that writes the find and ls -o into NAME.ls.gz and NAME.find.gz, where the NAME indicated both the device, and the partition, so that, when using zgrep to fine certain file, I get the results which file is to be found on which USB pendrives, or on which internal or external hard drive.


TL;DR:
What follows is some brief info about my (pen)drives indexing by scripting solution. From here on it gets off topic
, if you are not interested in reading about that, stop reading right here. Thanks. Image :D

By starting with that all that naming and scripting for indexing and finding file purposes, I also started numbering my (pen)drives, and this numbering is not only reflected by the scripts doing the indexing (the searching where the (pen)drive is mounted, if it's mounted at al, and sure also the ls, find and gzip itself) also reflected by an empty file that is kind of the signature what (pen)drive this is, my scripts use these empty files to "know" if the drive is mounted as sda1, or sdb1, or sdf1 or such...

Why do I use empty files for that? Cause they not use any disk space at all (unless on very rare conditions when one entry in the directory means the directory needs to have a new cluster to store this info, but that would have happened to any file; and it's usually not possible with most FS when it comes to the root directory, and these files are all to be found in the root directory of any (pen)drives...

...


Writing all that I realize that folks might be interested in using a similar system than mine. But the flipside is, when I started coding it I went for easy and quick solution, in the end I made it too complicated and now it is more bothersome to add more entries than it would have been if I thought through everything prior starting the coding for a few days; The only way this would make sense, is kinda releasing my current system to the public, stating what its negative aspects are and when other folks start to tweak what I started, then there could emerge a better, more slick and robust indexing system, which in its core still uses the empty names to describe and define the drives, and also uses the same ls and find and gz for creating the index files themselves, but still would differ in eliminating the bothersome details that my current system hold.

Long reply is, well, long. :D

If anyone is interested in more details about this indexing via scripting ls and find, or just in discussing is with the little details I wrote above, please PM me, not answer in here, cause: off topic.
I will then create a new thread in the best suited subforum, and we can discuss about this there. Thanks for your understanding and helping in keeping the thread on topic. <B
Cheers!
Yours Rava

datruche
Black ninja
Black ninja
Posts: 95
Joined: 20 Sep 2015, 21:02
Distribution: Arch, Porteus-Nemesis 3.5
Location: London > . < Paris

Re: Multiple versions of Porteus

Post#56 by datruche » 23 Dec 2015, 14:48

Rana your script interests me. Right now though I choose to go on with the more urgent « get a *running* multiboot ».
So, Qemu installed with a hand from Bogomips :) I was abble to advance my test on a big multiboot USB pen drive much faster.
francois wrote:porteus-v3.1-x86_64.sgn (this is a tag) is not needed in the syslinux syntax, except if you have many versions of the same architecture. What is important is that you have the file porteus-v3.1-x86_64.sgn file in the /porteus folder. The initrd.xz will look at it an find it automatically. In your example, you have only one copy of a 64 bit and only one copy of the 32 bit architecture. There is no need for the porteus sgnfile=blabla in your bootloader syntax.

However, if you want many 64 bit installations of the same porteus version, then you will need to rename the porteus-v3.1-x86_64.sgn in your folder tree with different tag names. For example, for three porteus identical versions: 1_porteus-v3.1-x86_64.sgn, 2_porteus-v3.1-x86_64.sgn and 3_porteus-v3.1-x86_64.sgn, in each of the needing /porteus folders of these three installation. Then in your bootloader syntax you will need the sgnfile=1_porteus-v3.1-x86_64.sgn for the first installation, the sgnfile=1_porteus-v3.1-x86_64.sgn for the second installation ...
I should say the first point is not fully true, after testing multibooting on a variety of devices.
Here's an exemple that made me scratch my head till I can make it boot.

It's on an USB pen drive:

Code: Select all

# blkid
/dev/sdc1: LABEL="MULTIBOOT" UUID="6B11-FBB0" TYPE="vfat" 
with one Porteus 3.1 i486 XFCE, two x86_64 (xfce4, KDE4) and multiple other separated distros.
Porteus x86_64 KDE4 is in /mnt/sdc1/multiboot/:

Code: Select all

porteus/
└── 64-kde4-full/
    ├── EFI/
    ├── boot/  
    │   ├── fr-pc.ktl*
    │   └── syslinux/
    │       └── porteus.cfg
    │	       APPEND from=/multiboot/porteus/64-kde4-full initrd=initrd.xz nomagic base_only norootcopy ...
    ├── porteus/
    │   ├── base/  modules/  optional/  rootcopy/
    │   └── porteus-v3.1-x86_64.sgn
    └── changes.dat*
no 'sgnfile', default or a renamed one and it boots just fine.

Porteus i486 is in /mnt/sdc1/multiboot/:

Code: Select all

porteus/
└── xfce/
    ├── fr-pc.ktl*
    ├── boot/
    │   └── porteus.cfg
    │        [1] APPEND from=/multiboot/porteus/xfce initrd=initrd.xz changes=/multiboot/porteus/xfce/changes...
    │        [2] [= 1 +] sgnfile=/mnt/sdc1/multiboot/porteus/xfce/porteus/porteus-v3.1-i486.sgn
    │        [3] [= 1 +] sgnfile=/multiboot/porteus/xfce/porteus/porteus-v3.1-i486.sgn
    │        [4] [= 1 +] sgnfile=porteus-v3.1-i486.sgn
    ├── porteus/
    │   ├── base/  modules/  optional/  rootcopy/
    │   └── porteus-v3.1-i486.sgn
    ├── changes.dat*
    └── [porteus-v3.1-i486.sgn]
[1] no sgnfile, no boot "searching for sgnfile ... Your 'from=' cheatcode is wrong..."
[2] and [3] with 'path/to/sgnfile' added, no boot
[4] with 'sgnfile' added, boot!
Last edited by datruche on 24 Dec 2015, 23:11, edited 1 time in total.

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

Re: Multiple versions of Porteus

Post#57 by Rava » 24 Dec 2015, 05:07

datruche wrote:no 'sgnfile', default or a renamed one and it boots just fine.
That means the sgnfile it finds is the right sgnfile to that very porteus, that's the reason it boots fine.
It could also be the sgnfile to another porteus, especially when you have several x86-64 or several i486 versions of porteus on the same boot partition.
When you have just one x86-64 and just one i486 then indeed, both should boot fine.
datruche wrote:[1] no sgnfile, no boot "searching for sgnfile ... Your 'from=' cheatcode is wrong..."
[2] and [3] with 'path/to/sgnfile' added, no boot
[4] with 'sgnfile' added, boot!
The above is the reason why I rename my sgnfiles, especially since I have Porteus on many USB sticks, and I sometimes forget an USB stick in a PC when rebooting, and then the wrong Porteus was started, cause the PC decides which is its sda1 or sdb1 and such. Therefore, especially on USB Thumbdrives, when you just use the sgnfile or no cheat code at all [especially when you are, like me, too lazy to use the boot from cheat code using UUID ) I really recommend renaming the sgnfile for each and every USB stick that ever got a Porteus on it.

Cause, when you have an old, maybe even broken Porteus on your internal harddrive, and you want to start a fresh working Porteus from a USB Pendrive, the kernel will always try to load Porteus from sda1, even when you booted the kernel from the USB Pendrive, and that was, say sdb1 or sdc1. And sure, when loading Porteus from the internal hard drive, best result is you just have an outdated but running system, and worse result is you try to load the broken Porteus you try to fix by starting a new one from an USB Pendrive...


Just my 2 cents on that...
Cheers!
Yours Rava

datruche
Black ninja
Black ninja
Posts: 95
Joined: 20 Sep 2015, 21:02
Distribution: Arch, Porteus-Nemesis 3.5
Location: London > . < Paris

Re: Multiple versions of Porteus

Post#58 by datruche » 24 Dec 2015, 12:31

Hey Rava,
Uh, just shared my multiboot testing results which contradict the following from françois - no offense man:
porteus-v3.1-x86_64.sgn (this is a tag) is not needed in the syslinux syntax, except if you have many versions of the same architecture. What is important is that you have the file porteus-v3.1-x86_64.sgn file in the /porteus folder. The initrd.xz will look at it an find it automatically. In your example, you have only one copy of a 64 bit and only one copy of the 32 bit architecture. There is no need for the porteus sgnfile=blabla in your bootloader syntax.
That made debuging the booting message error "Your 'from=' cheatcode is wrong..." rather confusing.
Rava wrote:
datruche wrote:with two porteus x86_64 and no 'sgnfile' cheatcode it boots just fine.
That means the sgnfile it finds is the right sgnfile to that very porteus, that's the reason it boots fine.
It could also be the sgnfile to another porteus, especially when you have several x86-64 or several i486 versions of porteus on the same boot partition.
When you have just one x86-64 and just one i486 then indeed, both should boot fine.
That's not the case here (and the reason for posting previous results) :)
Rava wrote:Cause, when you have an old, maybe even broken Porteus on your internal harddrive, and you want to start a fresh working Porteus from a USB Pendrive, the kernel will always try to load Porteus from sda1, even when you booted the kernel from the USB Pendrive, and that was, say sdb1 or sdc1. And sure, when loading Porteus from the internal hard drive, best result is you just have an outdated but running system, and worse result is you try to load the broken Porteus you try to fix by starting a new one from an USB Pendrive...
When I install Porteus on the internal storage I'll set the Bios to boot on the hard drive first. I believe it will makes help avoid some trouble.

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

Re: Multiple versions of Porteus

Post#59 by Rava » 24 Dec 2015, 13:28

datruche wrote:That made debuging the booting message error "Your 'from=' cheatcode is wrong..." rather confusing.
I was not the one who wrote that, I just quoted it.
datruche wrote:That's not the case here (and the reason for posting previous results) :)
Then I must have overseen it that you have indeed more than one x86-64 and / or more than one i486 Porteus on the same boot device. But that won't work since all would find the very same /porteus/base folder...
datruche wrote:When I install Porteus on the internal storage I'll set the Bios to boot on the hard drive first. I believe it will makes help avoid some trouble.
I do that as well, but I meant when you have reason to not but from sda1.
And then, when you have a x86-64 on your internal HD, that's sda1, and you want to boot from sdb1, an USB stick or external HD or even a CD/DVD without changed sgnfile and without and other from= cheatcode, the kernel and initrd would load indeed from sdb1, but still, the initrd would find as first partition sda1 and use the /porteus/boot.

And like I said, either when you want to try a new version, or are in need or repair of the internal harddisk one, then that is not what you want.


Just try it out, create a USB Pendrive Porteus, say, when your interel HD one used KDE, make one on a USB stick that uses XFCe, and then tell the PC to boot from the USB Pendrive.
Without renamed sgnfile or any use of from=UUID cheatcode, you still will get the KDE system loaded.

When both kernels are the same, when you boot device had a different kernel than the one for sda1 /porteus/boot, then you will get an kernel panic and the system won't boot at all.
Cheers!
Yours Rava

datruche
Black ninja
Black ninja
Posts: 95
Joined: 20 Sep 2015, 21:02
Distribution: Arch, Porteus-Nemesis 3.5
Location: London > . < Paris

Re: Multiple versions of Porteus

Post#60 by datruche » 24 Dec 2015, 14:00

Rava wrote:Then I must have overseen it that you have indeed more than one x86-64 and / or more than one i486 Porteus on the same boot device. But that won't work since all would find the very same /porteus/base folder...
No, I have one Porteus 3.1 i486 (XFCE), and two x86_64 (xfce4 & KDE4) on that USB pen drive (with the file structure shown four posts above). The i486 won't boot without the 'sgnfile=' while the x86_64 KDE4 boots fine without it.

Post Reply