Page 1 of 1

linuxrc issues

Posted: 01 Dec 2016, 19:41
by Bogomips
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

Re: linuxrc issues

Posted: 01 Dec 2016, 23:12
by brokenman
Thanks. Fixed for next version.