linuxrc issues

Please reproduce your error on a second machine before posting, and check the error by running without saved changes or extra modules (See FAQ No. 13, "How to report a bug"). For unstable Porteus versions (alpha, beta, rc) please use the relevant thread in our "Development" section.
Bogomips
Full of knowledge
Full of knowledge
Posts: 2564
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

linuxrc issues

Post#1 by Bogomips » 01 Dec 2016, 19:41

Missing egrep switch for partial names beginning with hyphen:
  • floors NOLOAD and crashes boot
    • Booting

      Code: Select all

      from=/dev/sda10/tmp/iso/3.2.1/x86_64/Porteus-KDE-v3.2.1-x86_64.iso copy2ram ramsize=25% noauto rootcopy=/dev/sda4/kd64rcp noload=-1bp extramod=/dev/sda10/kd64xzm rammod=0-;1-;2-;-2bp
    • Messages
      ^creating live filesystem and inserting modules
      egrep: invalid option -- 1
      ^searching for additional modules in /dev/sda10/kd64xzm
      egrep: invalid option -- 1
      ...
      mnt/isoloop/porteus
      cp: can't create '/union/var/log/porteus-livedbg' no such file on directory.
      ...
      ^live system is ready now - starting Porteus
      cp: cannot stat '/union/sbin/init'
      !!ERROR!!
      Something went wrong and I cannot continue.
      Press Ctrl+Alt+Del to reboot.
  • also screws up RAMMOD so no modules copied to RAM
    • Booting

      Code: Select all

      from=/dev/sda10/tmp/iso/3.2.1/x86_64/Porteus-KDE-v3.2.1-x86_64.iso copy2ram ramsize=25% noauto rootcopy=/dev/sda4/kd64rcp noload=1bp extramod=/dev/sda10/kd64xzm rammod=-2bp;0-;1-;2-
    • Error Message
      egrep: invalid option -- 2
    • Nothing in RAM

      Code: Select all

      # Modules activated during boot time:
      /mnt/isoloop/porteus/base/000-kernel.xzm
      /mnt/isoloop/porteus/base/001-core.xzm
      /mnt/isoloop/porteus/base/002-xorg.xzm
      /mnt/isoloop/porteus/base/003-kde5.xzm
      /mnt/sda10/kd64xzm/flashplayer-plugin-23.0.0.207-x86_64-1.xzm
      /mnt/sda10/kd64xzm/geany-1.25-x86_64-1_slack.xzm
      /mnt/sda10/kd64xzm/gecko-mediaplayer-1.0.9-x86_64-1alien.xzm
      /mnt/sda10/kd64xzm/lt_080816-x86_64.xzm
      /mnt/sda10/kd64xzm/nvidia-304.131_3.2.1-x86_64-2bp.xzm
      /mnt/sda10/kd64xzm/terminator-0.97-x86_64-1sl.xzm
      
Relevant Switch Statements:
  • linuxrc

    Code: Select all

    guest@porteus:~$ grep -n "egrep.*LOAD" /mnt/live/linuxrc 
    303:find $PTH/base $PTH/modules -name "*.xzm" 2>/dev/null | egrep -v "$NOLOAD" | sort >/tmp/modules
    304:find $PTH/optional -name "*.xzm" 2>/dev/null | egrep "$LOAD" | sort >>/tmp/modules
    343:        locate -d $folder && { find /mnt/$DEV/$LPTH -name "*.xzm" 2>/dev/null | egrep -v "$NOLOAD" | sort >>/tmp/modules; } || fail $folder
    guest@porteus:~$ grep -n "egrep.*RAMMOD" /mnt/live/linuxrc 
    351:    [ $RAMMOD ] && { egrep "$RAMMOD" /tmp/modules > /tmp/rammod; cpmod /tmp/rammod; } || cpmod /tmp/modules
    
  • Remedial Switch

    Code: Select all

       Matching Control
           -e PATTERN, --regexp=PATTERN
                  Use PATTERN as  the  pattern.   This  can  be  used  to  specify
                  multiple search patterns, or to protect a pattern beginning with
                  a hyphen (-).
    
  • Busybox

    Code: Select all

    guest@porteus:~$ b=/mnt/live/bin
    uest@porteus:~$ echo abc | $b/busybox egrep -v -1bp
    egrep: invalid option -- 1
    guest@porteus:~$ echo abc | $b/busybox egrep -ve -1bp
    abc
    guest@porteus:~$ echo $?
    0
    guest@porteus:~$ echo nvidia-304.131_3.2.1-x86_64-1bp.xzm | $b/busybox egrep -v -1bp
    egrep: invalid option -- 1
    guest@porteus:~$ echo $?
    1
    guest@porteus:~$ echo nvidia-304.131_3.2.1-x86_64-1bp.xzm | $b/busybox egrep -ve -1bp
    guest@porteus:~$ echo $?
    1
    
    guest@porteus:~$ echo nvidia-304.131_3.2.1-x86_64-2bp.xzm | $b/busybox egrep  -2bp
    egrep: invalid option -- 2
    guest@porteus:~$ echo $?
    1
    guest@porteus:~$ echo nvidia-304.131_3.2.1-x86_64-2bp.xzm | $b/busybox egrep -e -2bp
    nvidia-304.131_3.2.1-x86_64-2bp.xzm
    guest@porteus:~$ echo $?
    0
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

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

Re: linuxrc issues

Post#2 by brokenman » 01 Dec 2016, 23:12

Thanks. Fixed for next version.
How do i become super user?
Wear your underpants on the outside and put on a cape.

Post Reply