Cheatcodes in porteus: an example copy2ram

Post tutorials, HOWTO's and other useful resources here.
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.

Cheatcodes in porteus: an example copy2ram

Post#1 by francois » 30 Apr 2011, 21:09

As from the first version 0.09, porteus offers different cheatcodes. Simply defined cheatcodes are commands that
are used to pass special options to the booting operating system. They could be used for example, to deal with hardware difficult to be managed. But they are also rapid fixes at bootup for some important changes of behavior of the operating system.

The cheatcodes could be incoporated into the menu.lst (instructions to the booloader, for Porteus namely GRUB) or type in at boot screen while there is a delay presented to choose from between different options (for example choosing between different OS on multiple partitions).

In GRUB 0.9, letter "e" is used to modify the appearing menu.lst items at booting.

1) copy2ram
For example, the copy2ram cheatcode will will speed up Porteus by loading the OS into RAM. RAM is the acronym for random access memory. RAM is known to be a lot more rapid than memory provided by HDD (hard disk drive). However, if you get more speed when running the OS into RAM, this is at the cost of a longer booting time needed to load the files at startup. Porteus needs at least 320MB of RAM to boot properly.

2) nocd and nosound

A second example is brought by Captain Picard, citation from faq manual:
http://porteus.org/faq.html#15

"A cheat code refers to a command that can be entered at the start of booting (or entered into porteus.cfg for permanence) which passes a value to porteus such as ... 'nocd' to boot with no CD or 'nosound' to boo with no sound. These can be very useful for trouble shooting problem components."

3) toroot
In Porteus v. 1.0, the toroot cheatcode permits booting directly into root mode without the use of the password, see:
/porteus folder cheatcodes.txt

In porteus 0.09 the cheatcodes are to be found on the live CD in the /porteus/cheatcodes.txt file. In the to be released versions 1.0 of porteus 32 bit and 34 but they will found in the /boot/docs/cheatcodes.txt file. The following cheatcodes are included in version 0.09 of porteus:

Code: Select all

Cheatcodes for Porteus.
=======================================

Boot parameters (also known as cheatcodes) are used to affect the
booting process of Porteus. Some of them are common for all Linuxes, others
are specific for Porteus only. You can use them to disable desired kind of
hardware detection, to start Porteus from harddisk, to skip the login
prompt and start GUI, etc.
   
Reboot your computer and wait several seconds until nice  graphical porteus
logo appears with a boot menu (it's there usually for less then 9 seconds).
Choose your desired menu entry and hit Tab, which will allow you to edit the
command line. Add your desired boot argument from the list below, to affect
booting the way you like:


acpi=off 
nohotplug

   ... Disable specified hardware autodetection in the case of hangups
       Your hardware won't be detected at all, you'll have to use "pcimodules"
       command after logging into Porteus and you'll have to try to modprobe
       all needed modules from the list manually.

autoexec=...
autoexec=startx
autoexec=xconf;startx
autoexec=xconf;startx;reboot

   ... Execute specified command(s) instead of Porteus login. In this
       example, skip porteus login prompt and automatically start XWindow
       system. Use semicolon (;) as command separator.
   ... Porteus will not reboot automatically after the command(s) finish,
       so if you'd like to restart, specify 'reboot' or 'poweroff' as the
       last command.
   ... If you need to use spaces in the commandline, replace them by ~.
       For example, autoexec=echo~Shutting~power;poweroff will do just like that.

autoexec=lxde

   ... This parameter will let you use lxde as default desktop over KDE one.

changes=/dev/device
changes=/dev/device/file.dat
changes=/path/
changes=/path/file.dat
changes=/dev/device/path/

   ... All changes you made in Porteus are kept in memory until you reboot.
       But with this boot parameter, you tell Porteus to use different device
       (or a file or directory) than the memory for storing changes. You can,
       for example, format your disk partition /dev/hda1 with some Linux
       filesystem (eg. xfs) and then use changes=/dev/hda1 to store all changes
       to that disk (it will be stored in 'changes' directory on that disk.
       This way you won't loose your changes after reboot.
   ... If you use a file name instead of device, and the file contains valid
       filesystem, Porteus will mount it as a loop device and will store changes
       to it. Moreover if you don't specify the device where the file is stored,
       Porteus will try to find it on all your partitions.
   ... If you use a directory, Porteus will save changes to it (it will make a
       'changes' subdirectory inthere). You don't even need a Linux filesystem
       on that disk, as the directory will be overlayed by posixovl. This way,
       you can save your changes even to VFAT or NTFS.

copy2ram

   ... Copy all files (all required and optional modules) to RAM.
       You'll need at least 320MB of RAM to do this and boot Porteus properly.
       This will slow down the boot phase but it will speed up Porteus!
debug

   ... Enable debug mode (and start ash shell several times during the boot)
       hit Ctrl+D to continue booting.

delay=some_value

   ... To be used for devices which needs extra time to settle up. Default value
       is 9 seconds so in case of failure you will have to use more than that.
       Example: scantimeout=15 will cause 15 second delay to perform second scan.

from_dev=/dev/sda1
   
   ... To load Porteus from different place instead of the boot device.
       This cheatcode also speeds up boot time as init script is searching
       for porteus data at specified device first.

from_dir=/path/to/folder

   ... This cheatcode provides path to directory where Porteus ISO image is unpacked.
       Can be used together with 'from_dev=' parameter to avoid searching through
       all available devices.
       Example: 'from_dev=/dev/sda6' 'from_dir=/linux/porteus-v08' will cause
       searching for *.sgn file in /mnt/sda6/linux/porteus-v09/porteus folder first.

from_iso=/path/to/image.iso

   ... This cheatcode can be used to boot from Porteus ISO image directly.
       Full path to ISO is required.
       WARNING: You can't use it together with 'from_dev=' parameter.
       Example: 'from_iso=/mnt/sda6/linux-images/latest-remix.iso'

fsck

   ... Enables filesystem check for ext(2,3,4), reiserfs and jfs partitions
       during boot time before anything is mounted by Porteus.

iocharset=some_iocharset

   ... Same as above but applies to fat and iso9660 (CD,DVD) filesystems. List of
       available iocharets can be found in /lib/modules/2.6*/kernel/fs/nls folder.
   ... You need to provide this parameter without 'nls_' prefix and '.ko' suffix.
       Example: iocharset=iso8859-2 will cause mounting of fat/iso9660 filesystems
       with polish charset.

lang=some_locale

   ... Specifies 'locale' option for ntfs filesystem and sets localization for
       whole system when Language-Selection-Tool is not used.
       Example: lang=pl or lang=pl_PL will cause mounting of ntfs partition
       with polish charset.

       Please remember:
       If porteus will be booted from nfts partition then nls support is reduced
       to utf8 encoding only. Remix doesn't provide localized versions of initrd
       so please stick with utf8, remaster initrd or use other filesystem for
       booting media if possible.

load=module

   ... Load optional modules from /optional/ directory on the booting media.
       You can use full module name (module.lzm) or you can skip the extension.

max_loop=some_value

   ... This parameter tells the kernel how many loop devices needs to be created
       in advance during boot time.
       Example: max_loop=150 will give you 150 loop devices from start but this
       number is hardcoded into kernel and you wont be able to create more.noauto

   ... List harddisks in fstab with 'noauto', so you have to mount every
       disk manually in order to access it.

nocd

   ... Don't even know about any cdroms at all.

noeject

   ... Do not eject CD/DVD disc during boot time and shutdown.
       Remember: when 'copy2ram' cheatcode is used then CD is unmounted by
       linuxrc and stays invisible for automounting daemons. To get access
       to files on it, you need to mount CD manually or simply take it out
       and insert back.
nodma

   ... Disable DMA for all CD-ROMs and disks.


nohd

   ... Don't even know about any harddisks at all.

noload=module
noload=module[1];module[n]

   ... Disable loading of any modules specified. This affects all the modules on
       Porteus CD, including /base and /modules, so using noload=kde will disable
       loading of all modules with 'kde' in the name. It is useful with copy2ram
       cheatcode, because any un-used module is not copied to ram. 

noswap

   ... Prevents of using swap partition by Porteus.

passwd=somepass
passwd=ask

   ... Set root's password to "somepass", or ask (with =ask) for a new password
       during the boot, before starting porteus (don't worry, the new password
       won't be shown at the login screen)

ramsize=some_value%

   ... Will let you set the custom size of root (/) aufs partition. Default value
       is 60% of available RAM memory. Useful for PC's with small memory amount.
       Example: ramsize=25%

sgnfile=some_name.sgn

   ... This cheatcode specifies *.sgn file which Porteus will search for.
       Useful when you need to store several linux-live distros on one disk/disc.
       Example: sgnfile=remix-usb.sgn

vmalloc=some_valueMB

   ... When plenty of modules are loaded (30 or more) some kernel drivers may not
       be initialized correctly. Use this cheatcode to increase kernel memory
       allocation and fix this issue.
       Example: vmalloc=256MB - if not enough try with 512MB option.
Some additional cheatcodes were expected in version 1.0 of both 32 and 64 bit. These will for sure make the life of the user simpler.

They are out now and can be found in Cheatcodes - what they are and how to use them in the info section of the Porteus site:
http://porteus.org/component/content/ar ... -them.html

Edited as of 2011-07-02 from Montreal.
Last edited by francois on 03 Jul 2011, 03:22, edited 7 times in total.
Prendre son temps, profiter de celui qui passe.

User avatar
Hamza
Warlord
Warlord
Posts: 1908
Joined: 28 Dec 2010, 07:41
Distribution: Porteus
Location: France

Re: Cheatcodes in porteus: an example copy2ram

Post#2 by Hamza » 30 Apr 2011, 22:14

I understand , you want an extented documentation of cheatcodes with definitions of all words same as Initrd (InitRamDisk) and what is their function.

That's a good idea.

The DOC Team , you have a new job for the community !
NjVFQzY2Rg==

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: Cheatcodes in porteus: an example copy2ram

Post#3 by francois » 30 Apr 2011, 23:37

This is it, and synonyms to the actual cheatcodes and those coming will be needed. And any thoughts or any deep reflexion on that type of tool is looked for.
Last edited by francois on 01 May 2011, 14:26, edited 1 time in total.
Prendre son temps, profiter de celui qui passe.

User avatar
Hamza
Warlord
Warlord
Posts: 1908
Joined: 28 Dec 2010, 07:41
Distribution: Porteus
Location: France

Re: Cheatcodes in porteus: an example copy2ram

Post#4 by Hamza » 01 May 2011, 09:27

If you want , you can begin the new documentation (maybe , the DOC Team will help you).
NjVFQzY2Rg==

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: Cheatcodes in porteus: an example copy2ram

Post#5 by francois » 01 May 2011, 14:35

In fact, from what I know Captain Picard has done or is really doing a nice job on that:
http://porteus.org/faq.html#1

Unless you mean something else than I understood.
Prendre son temps, profiter de celui qui passe.

User avatar
Hamza
Warlord
Warlord
Posts: 1908
Joined: 28 Dec 2010, 07:41
Distribution: Porteus
Location: France

Re: Cheatcodes in porteus: an example copy2ram

Post#6 by Hamza » 01 May 2011, 14:38

but , maybe , you can make another documentation with all definitions of cheatcode and what are their function.

In some word , you can make a big cheatcode.txt with more informations.
NjVFQzY2Rg==

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: Cheatcodes in porteus: an example copy2ram

Post#7 by francois » 01 May 2011, 18:42

This would be a big adventure for me. I would have to become the cheatcodes expert. However, lets say that for now this thread makes the access to cheatcodes concept a little more explicit on the forum. And it might expand itself with a little help of my friends.

I have sorted out alphabetically the cheatcodes in the first post. Which maybe should be done on the original cheatcodes.txt of the iso. It is simpler to consult this way. In addition I have cited an example from the faqs manual from Captain Picard.

I think we should hyperlink as much as we can the information provided on this site, but also from external sources. For sure everyone can google it, but pearls are not alwasy easily found on the net. We must try to be responsible and filter the information on the net.

Posted after 3 hours 21 minute 40 seconds:
In addition, some of these terms are cheatcodes, others options to be included for the cheatcodes. Where does one found all the possible options of the cheatcodes. Is the above file exhaustive? (Unless nobody reading this thread, maybe Ahau or captain picard can answer this one).
Prendre son temps, profiter de celui qui passe.

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: Cheatcodes in porteus: an example copy2ram

Post#8 by francois » 03 Jul 2011, 03:23

I made a correction to the first post of this thread to take into account the issue of an info section on cheatcodes:
http://porteus.org/component/content/ar ... -them.html
Prendre son temps, profiter de celui qui passe.

Post Reply