bootloaders and menu entries: your way to install porteus

Non release banter
User avatar
francois
Contributor
Contributor
Posts: 4902
Joined: 28 Dec 2010, 14:25
Distribution: kde xfce porteus manjaro kubun
Location: Enfin l'été, le changement climatique attendu: le soleil.

bootloaders and menu entries: your way to install porteus

Post#1 by francois » 22 Mar 2015, 14:23

There is an official porteus installation method which uses syslinux as bootloader. You can find it packed in the porteus iso as /boot/docs/install.txt.

However, porteus could be installed in a lot of different ways given the possibilities in term of bootloaders (grub legcy, grub2dos,lilo) and in terms of the porteus or linux cheatcodes involved:
http://www.porteus.org/tutorials/26-gen ... -them.html

It would be interesting that you describe how you install porteus on your hard disk drive. Give us at least two ways that you use to install porteus: a) a very simple one for newcomers in guest mode and b) a more complicated one.

In type b installation, you make judicious use of the possibilities provided by the porteus cheatcodes: extramod, login, etc..

The use of a bootloader other than porteus syslinux are really welcome.

Please put an emphasis on the description of your menu entries. Need are a few examples of simplified entries for newcomers which boot in guest mode with login manager:

EXAMPLE 1 (type a, simple installation): guest access thru login manager.
Grub legacy method using grubconfig for a multiboot porteus-windows installation:
viewtopic.php?f=62&t=946

Mount porteus iso:
http://www.cyberciti.biz/tips/how-to-mo ... linux.html
and copy /boot and /porteus to a subfolder (in my example /64bit_v31rc1) on one of your partitions (in my example sda5).

The menu.lst entries:

Code: Select all

# GRUB configuration file '/boot/grub/menu.lst'.
# generated by 'grubconfig'.  Wed Jul 31 00:39:45 2013
#
# The backup copy of the MBR for drive '/dev/sda' is
# here '/boot/grub/mbr.sda.4431'.  You can restore it like this.
# dd if=mbr.sda.4431 of=/dev/sda bs=512 count=1
#
# Start GRUB global section
timeout 3

#color light-gray/blue black/light-gray
# End GRUB global section

title porteus  on sda5 64bit_v31 KDE 
root (hd0,4)
kernel /64bit_v31/boot/syslinux/vmlinuz from=/dev/sda5/64bit_v31 changes=EXIT:/64bit_v31/kde login=guest
initrd /64bit_v31/boot/syslinux/initrd.xz
boot

title Win Vista/7 (loader) at sda1
rootnoverify (hd0,0)
chainloader +1
EXAMPLE 2 (type a installation): root access thru login manager.
Grub2 method for a multiboot on an already existing installation of ubuntu:

Grub2 pertinent information is in section B of the following thread. The chroot procedure:
viewtopic.php?f=48&t=1790

Here is my menu entry in /etc/grub.d/40_custom for two of my porteus installations;

Code: Select all

#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry "porteus 3.0 on sda5 32 BIT v30  KDE" {
set root=(hd0,5)
linux /32bit_v30/boot/syslinux/vmlinuz from=/dev/sda5/32bit_v30 changes=EXIT:/32bit_v30/kde login=root
initrd /32bit_v30/boot/syslinux/initrd.xz
}
Then from the chroot procedure*:

Code: Select all

root@porteus:~# update-grub
I boot automatic login in root mode. If you prefer guest mode (our dedicated normal user) replace root by guest as in login=guest. If you prefer to stop at login manager leave login= empty.

Any suggestion to make this thread better would be appreciated.

*Note: the chroot procedure seems to be different from one major distribution to another. Thus there is a specific one for archlinux.
Voltaire: Le mieux est l'ennemi du bien.

KnallKopf
Samurai
Samurai
Posts: 134
Joined: 18 Sep 2012, 20:56
Distribution: Porteus 64bit KDE4
Location: Absurdistan

Re: bootloaders and menu entries: your way to install porteu

Post#2 by KnallKopf » 12 Jun 2015, 22:23

Sorry francois my english are not the best.
Have i right understand that we should post 2 boot methodes that we use (simple and complex) ?

But i use only one simple method with grub2.
grub.cfg:

Code: Select all

set default=0
set timeout=20
set color_normal=white/black
set color_highlight=light-cyan/dark-gray
set menu_color_normal=blue/light-gray
set menu_color_highlight=yellow/light-blue

insmod ext3
# insmod fat
set root=(hd0,3)
set SYSDIR=linux

menuentry "Porteus v3.1 KDE4 x86_64 / normal" {
	set CDFILE=Porteus-KDE4-v3.1-x86_64.iso
	set CDPATH=/${SYSDIR}/livecds/p64-v3.1
	
	insmod loopback
	loopback loop ${CDPATH}/${CDFILE}
	linux (loop)/boot/syslinux/vmlinuz noswap nomagic noauto from=${CDPATH}/${CDFILE} "extramod=${CDPATH}/modules;${CDPATH}/scrmod;${CDPATH}/drivers" volume=0% kmap=de ramsize=60% copy2ram
	initrd (loop)/boot/syslinux/initrd.xz
	boot
}

install it with:

Code: Select all

grub-install --boot-directory=/mnt/sda3/linux --recheck /dev/sda
but im not sure that i have right understand you.

User avatar
francois
Contributor
Contributor
Posts: 4902
Joined: 28 Dec 2010, 14:25
Distribution: kde xfce porteus manjaro kubun
Location: Enfin l'été, le changement climatique attendu: le soleil.

Re: bootloaders and menu entries: your way to install porteu

Post#3 by francois » 13 Jun 2015, 05:33

In fact, you are doing better than me as there were many typos in this first post of mine. No wonder that nobody has proposed something yet. :(

I have done some corrections to this first post of mine. But maybe this text was simply too complex.

This setiso example with grub 2 does the job with simplicity, thus being easy to use by a newcomer, this is what I meant as a type 1 example.
Voltaire: Le mieux est l'ennemi du bien.

User avatar
Ed_P
Contributor
Contributor
Posts: 3058
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 3.2.2 64-bit ISO
Location: Western NY, USA

Re: bootloaders and menu entries: your way to install porteu

Post#4 by Ed_P » 19 Jun 2015, 22:39

The best USB way, imo, is this one:

viewtopic.php?f=81&t=4632&p=33898#p33898

Boots everywhere, files accessible everywhere.


For non-UEFI systems this approach works well, especially for dual booting with Windows and other systems, hdd or USB:

viewtopic.php?f=81&t=4283&p=30909&hilit=grub4dos#p30909

viewtopic.php?f=48&t=3425&p=24373&hilit=grub4dos#p24373

viewtopic.php?f=75&t=3384&p=24074&hilit=grub4dos#p24074

viewtopic.php?f=81&t=1899&p=12838&hilit=grub4dos#p12838

-update-
francois wrote:show an example of your boot arameters.
Oh, ok.

This is a grub4dos menu for Porteus 3.0.1. Do note I boot ISO files not installs and with grub4dos menus I can boot multiple systems on the same flash drive or same hard drive.

Code: Select all

splashimage=/ISOs/porteus30.bmp
color white/blue black/light-gray yellow/blue blue/yellow
# ****ground rrggbb   000000=black  ffffff=white  8-f = bright
foreground ffffff
background 000077
        
# Grub4DOS kernel parms - translated from Porteus RazorQT 3.0 iso V:\boot\syslinux\porteus.cfg file.

default 0
set ISOx=Porteus-RazorQT-v3.0.1-x86_64.iso

title  |   Porteus-v3.0 64bit       |\n Porteus main menu\n\n\n %ISOx%  
root ()

title  |                            |\n 
root ()

title  | Graphics mode (Razor)      |\n\n Run Porteus the best way we can.\n Try to autoconfigure graphics card and use the maximum allowed resolution
find --set-root                       /ISOs/%ISOx%
map --heads=0 --sectors-per-track=0   /ISOs/%ISOx% (0xff) 
map --hook
root (0xff)
kernel /boot/syslinux/vmlinuz    from=/ISOs/%ISOx% changes=/porteus3.0/changes/porteussave.dat extramod=/porteus/Modules 
initrd /boot/syslinux/initrd.xz

title  | Always Fresh               |\n\n Normally Porteus saves all changes to the /porteus/changes/ directory on the\n boot media (if writable) and restores them next boot.  Use this option to\n start a fresh system, changes are not read from or written to any device
find --set-root                       /ISOs/%ISOx%
map --heads=0 --sectors-per-track=0   /ISOs/%ISOx% (0xff)
map --hook
root (0xff)
kernel /boot/syslinux/vmlinuz    from=/ISOs/%ISOx% nomagic base_only norootcopy
initrd /boot/syslinux/initrd.xz

title  | Copy To RAM                |\n\n Run Porteus the same as above, but first copy all data to RAM\n to get a huge speed increase (needs >512MB)
find --set-root                       /ISOs/%ISOx%
map --heads=0 --sectors-per-track=0   /ISOs/%ISOx% (0xff) 
map --hook
root (0xff)
kernel /boot/syslinux/vmlinuz    from=/ISOs/%ISOx% copy2ram
initrd /boot/syslinux/initrd.xz

title  | Text mode                  |\n\n Run Porteus in text mode and start the command prompt only
find --set-root                       /ISOs/%ISOx%
map --heads=0 --sectors-per-track=0   /ISOs/%ISOx% (0xff) 
map --hook
root (0xff)
kernel /boot/syslinux/vmlinuz    from=/ISOs/%ISOx% 3
initrd /boot/syslinux/initrd.xz

title  | Porteus as PXE server      |\n\n Run Porteus as usual, but also initialize a PXE server.\n This will allow you to boot Porteus on other computers over a network
find --set-root                       /ISOs/%ISOx%
map --heads=0 --sectors-per-track=0   /ISOs/%ISOx% (0xff) 
map --hook
root (0xff)
kernel /boot/syslinux/vmlinuz    from=/ISOs/%ISOx% pxe
initrd /boot/syslinux/initrd.xz

title  |                            |\n 
root ()

title  | PLoP BootManager           |\n\n Run the plop boot manager.\n This utility provides handy boot-USB options for machines with\n vintage/defective BIOS
find --set-root                       /ISOs/%ISOx%
map --heads=0 --sectors-per-track=0   /ISOs/%ISOx% (0xff) 
map --hook
root (0xff)
kernel /boot/syslinux/plpbt

title  | Boot from the first hd     |\n\n Don't start Porteus at all, rather run the operating system installed on the\n first partition of the hard drive
COM32 chain.c32
APPEND hd0 1
chainloader (hd0)+1

title  |                            |\n 
root ()

title  | ..return                   |\n\n Exit Porteus menu
configfile (hd0,2)/menu.lst

title  |----------------------------|\n 
root ()
Last edited by Ed_P on 25 Jun 2015, 16:45, edited 1 time in total.
Ed

User avatar
francois
Contributor
Contributor
Posts: 4902
Joined: 28 Dec 2010, 14:25
Distribution: kde xfce porteus manjaro kubun
Location: Enfin l'été, le changement climatique attendu: le soleil.

Re: bootloaders and menu entries: your way to install porteu

Post#5 by francois » 23 Sep 2015, 17:52

We need bootloaders examples for syslinux here.

Thanks.
Voltaire: Le mieux est l'ennemi du bien.

jano
White ninja
White ninja
Posts: 6
Joined: 04 Oct 2015, 11:33
Distribution: Porteus !!
Location: Madrid - Spain

Re: bootloaders and menu entries: your way to install porteu

Post#6 by jano » 04 Oct 2015, 11:53

For Grub 2 with Porteus in sda2, I have in /etc/grub.d/40_custom:

Code: Select all

#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry 'Porteus always fresh' --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='hd0,msdos2'
   linux /boot/syslinux/vmlinuz zram=10% noauto noswap timezone=Europe/Madrid kmap=es login=guest 
   initrd /boot/syslinux/initrd.xz
}
menuentry 'Porteus keep changes'  --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='hd0,msdos2'
   linux /boot/syslinux/vmlinuz zram=10% noauto noswap timezone=Europe/Madrid kmap=es login=guest changes=/porteus
   initrd /boot/syslinux/initrd.xz
}
which seems to be working fine so far.

EDIT: updated removing unnecessary items as per Ed_P and francois comments
Last edited by jano on 08 Oct 2015, 13:03, edited 1 time in total.

User avatar
Ed_P
Contributor
Contributor
Posts: 3058
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 3.2.2 64-bit ISO
Location: Western NY, USA

Re: bootloaders and menu entries: your way to install porteu

Post#7 by Ed_P » 04 Oct 2015, 16:35

jano, in that you don't specify /mnt/sda2 for the vmlinuz and .sgn files do you need it for the changes= file? Have you tried just changes=/porteus?
Ed

User avatar
brokenman
Site Admin
Site Admin
Posts: 5436
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: bootloaders and menu entries: your way to install porteu

Post#8 by brokenman » 04 Oct 2015, 17:49

Just for something different, a super simple way to install from linux (requires full version of syslinux from slackware)

isohybrid /path/to/porteus.iso
dd if=/path/to/porteus.iso of=/dev/sdx (where x is your usb device letter NO NUMBER)

This will wipe all data from you USB device and create a read only iso9660 file system on the USB. It will also add the syslinux boot loader so no need to cd into the USB drive and run the bootloader install script.
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
Ed_P
Contributor
Contributor
Posts: 3058
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 3.2.2 64-bit ISO
Location: Western NY, USA

Re: bootloaders and menu entries: your way to install porteu

Post#9 by Ed_P » 04 Oct 2015, 20:36

An interesting approach brokenman, does it work with UEFI machines without switching the BIOS?
Ed

User avatar
brokenman
Site Admin
Site Admin
Posts: 5436
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: bootloaders and menu entries: your way to install porteu

Post#10 by brokenman » 04 Oct 2015, 23:16

I havent tried but I would think not since this produces an iso9660 partition and not FAT or EFI.
How do i become super user?
Wear your underpants on the outside and put on a cape.

jano
White ninja
White ninja
Posts: 6
Joined: 04 Oct 2015, 11:33
Distribution: Porteus !!
Location: Madrid - Spain

Re: bootloaders and menu entries: your way to install porteu

Post#11 by jano » 05 Oct 2015, 14:50

Ed_P wrote:jano, in that you don't specify /mnt/sda2 for the vmlinuz and .sgn files do you need it for the changes= file? Have you tried just changes=/porteus?
Honestly, I don't remember whether I tried and/or whether it worked. :oops:
I was at the same time trying to boot from grub and having persistance, so I tried many combinations, modifying what I found in different threads, until this did work :D .
EDIT: tested and it does work with changes=/porteus instead of changes=/mnt/sda2/porteus, so I'm changing the grub configuration. Now it's neater. Thanks !

User avatar
francois
Contributor
Contributor
Posts: 4902
Joined: 28 Dec 2010, 14:25
Distribution: kde xfce porteus manjaro kubun
Location: Enfin l'été, le changement climatique attendu: le soleil.

Re: bootloaders and menu entries: your way to install porteu

Post#12 by francois » 06 Oct 2015, 00:29

There is no need for this too:
sgnfile=porteus-v3.1-x86_64.sgn
Voltaire: Le mieux est l'ennemi du bien.

jano
White ninja
White ninja
Posts: 6
Joined: 04 Oct 2015, 11:33
Distribution: Porteus !!
Location: Madrid - Spain

Re: bootloaders and menu entries: your way to install porteu

Post#13 by jano » 07 Oct 2015, 08:05

francois wrote:There is no need for this too:
sgnfile=porteus-v3.1-x86_64.sgn
Right - removed. Thanks :D

Edited the above post removing unnecessary items as per Ed_P and francois comments

aus9

Re: bootloaders and menu entries: your way to install porteu

Post#14 by aus9 » 23 Oct 2015, 11:16

Hi

Altho you know my other posts francois
The use of a bootloader other than porteus syslinux are really welcome.
I have grub2 in MBR controlled by another distro. Its /etc/grub.d/40_custom contents are
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.

menuentry 'PBR3' {
set root='hd0,3'
chainloader +1
}
Naturally you need to run update-grub with root powers to affect the the real bootloader file in /boot/grub/grub.cfg for Xubuntu

Where PBR means Partition Boot Record as I have grub legacy installed in PBR for partition 3 and so its menu.lst for grub 1 contains (I will show one entry to keep it simple)
title portdev
root (hd0,2)
kernel /3/v root=/dev/sda3 changes=/porteus volume=100%
initrd /3/c.xz
I actually use the portlabel menu but that requires too much explaining here. Here I try to keep it simple no?

for those wondering, the iso was unpacked to get the kernel rrenamed to v and the initrd renamed to c.xz into a folder called 3. The iso folder /portues also copied to root of partition 3.
Small names suit my simple mind. heh heh

Actually its to do with typing less at the command prompt if things go awry, for grub legacy.

good luck

User avatar
francois
Contributor
Contributor
Posts: 4902
Joined: 28 Dec 2010, 14:25
Distribution: kde xfce porteus manjaro kubun
Location: Enfin l'été, le changement climatique attendu: le soleil.

Re: bootloaders and menu entries: your way to install porteu

Post#15 by francois » 24 Oct 2015, 01:42

@aus9:
Thanks for this menu entry of yours.

Here I try to keep it simple no?

You are right. But maybe you could simply cite these hyperlinks to refer to these more complex manipulations. :wink:
Voltaire: Le mieux est l'ennemi du bien.

Post Reply