Small fix for next Porteus (new option acpi=off)

New features which should be implemented in Porteus; suggestions are welcome. All questions or problems with testing releases (alpha, beta, or rc) should go in their relevant thread here, rather than the Bug Reports section.

Small fix for next Porteus (new option acpi=off)

Postby Falcony » 21 Feb 2017, 07:07

New boot option `acpi=off`

Currently if acpi=off option enabled Porteus starts with this error:

RTNETLINK1 answer: No such file or directory
acpid: error talking to the kernel via netlink



For Porteus `acpi=off` have to be implemented correсtly in boot scripts and described in documentation.

1. Patching current Porteus boot scripts:

Current /etc/rc.d/rc.M

Code: Select all
67 # Start ACPI daemon:
68 [ -x /etc/rc.d/rc.acpid ] && /usr/sbin/acpid -n &


now if acpi=off anyway it try to start acpid - and it failed with error.

Need to add checking before start acpid, if not equial acpi=off then start daemon

Change to /etc/rc.d/rc.M:

Code: Select all
67 # Start ACPI daemon:
68 if ! egrep -qo " acpi=off( |\$)" /proc/cmdline; then
69 [ -x /etc/rc.d/rc.acpid ] && /usr/sbin/acpid -n &
70 fi


Patch also start script of /etc/rc.d/rc.acpid:

Code: Select all
4# Start acpid:
5 acpid_start() {
6  if [ -x /usr/sbin/acpid -a -d /proc/acpi ]; then
7    echo "Starting ACPI daemon:  /usr/sbin/acpid"
8    /usr/sbin/acpid
9  fi


to:

Code: Select all
4# Start acpid:
5 acpid_start() {
6 if ! egrep -qo " acpi=off( |\$)" /proc/cmdline; then
7  if [ -x /usr/sbin/acpid -a -d /proc/acpi ]; then
8    echo "Starting ACPI daemon:  /usr/sbin/acpid"
9    /usr/sbin/acpid
10  fi
11 else
12 echo "ACPI daemon: it seems acpi=off boot parametr used."
13 fi



2. Please add descr. of acpi=off option to Porteus boot/docs/cheatcodes.txt:


After 'zram=some_value%':

Code: Select all
acpi=off

   ... disable ACPI on boot stage, may use with debug option.
       Correct value is only `off`       
       Example: 'acpi=off'
Falcony
Full of knowledge
Full of knowledge
 
Posts: 190
Joined: 01 Jan 2011, 13:44
Location: Russia

Re: Small fix for next Porteus (new option acpi=off)

Postby brokenman » 26 Feb 2017, 01:08

Thanks for looking into it.

There are a million kernel cheat codes and I don't think we can add them all. The cheatcodes file is mainly for porteus related cheatcodes and not the standard kernel cheatcodes. I think this problem with acpi is an upstream bug and I am waiting for it to be fixed. Thanks.
How do i become super user?
Wear your underpants on the outside and put on a cape.
brokenman
Site Admin
Site Admin
 
Posts: 5333
Joined: 27 Dec 2010, 04:50
Location: Brazil
Distribution: Porteus v3.2rcX all desktops

Re: Small fix for next Porteus (new option acpi=off)

Postby brokenman » 05 Mar 2017, 14:49

Ok, now I understand. Sorry for the confusion. I've patched this in rc.M now so next release should be ok.
How do i become super user?
Wear your underpants on the outside and put on a cape.
brokenman
Site Admin
Site Admin
 
Posts: 5333
Joined: 27 Dec 2010, 04:50
Location: Brazil
Distribution: Porteus v3.2rcX all desktops


Return to Development



Who is online

Users browsing this forum: No registered users and 3 guests