mloop / uloop output

Post here if you are a new Porteus member and you're looking for some help.

mloop / uloop output

Postby Ed_P » 21 Jun 2017, 21:19

How does one suppress the screen output of the mloop and uloop commands? I've tried "2>/dev/null" and "2>&1 &" to no avail.
Ed
User avatar
Ed_P
Contributor
Contributor
 
Posts: 2944
Joined: 06 Feb 2013, 23:12
Location: Western NY, USA
Distribution: Cinnamon 3.2.2 64-bit ISO

Re: mloop / uloop output

Postby fulalas » 21 Jun 2017, 23:59

Try this:
Code: Select all
 &>/dev/null
fulalas
Contributor
Contributor
 
Posts: 498
Joined: 26 Oct 2016, 16:34
Location: Brazil
Distribution: Porteus

Re: mloop / uloop output

Postby Bogomips » 22 Jun 2017, 00:33

A variation:
Code: Select all
oot@porteus:/home/guest# w=$(mloop $r/x86_64/modules/003-lxde.xzm)
root@porteus:/home/guest# ls /mnt/loop
etc/  home/  opt/  usr/  var/
root@porteus:/home/guest# ls /mnt/loop/usr/
bin/  doc/  include/  info/  lib64/  libexec/  man/  sbin/  share/  src/

root@porteus:/home/guest# w=$(uloop)
oot@porteus:/home/guest# ls /mnt/loop
root@porteus:/home/guest#
8)
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
Bogomips
Full of knowledge
Full of knowledge
 
Posts: 2432
Joined: 25 Jun 2014, 16:21
Location: London
Distribution: 3.2.2 Cinnamon & KDE5

Re: mloop / uloop output

Postby Ed_P » 22 Jun 2017, 00:49

fulalas wrote:Try this:
Code: Select all
 &>/dev/null

:good: Perfect. Thank you. :beer:

Bogomips wrote:A variation:

:crazy: ................................ :%)



:D



-edit-

Code: Select all
guest@porteus:~$ w=$(mloop /mnt/sda6/porteus3.2/changes/porteussave.dat)
Password:
mount: wrong fs type, bad option, bad superblock on /dev/loop14,
       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try
       dmesg | tail or so.
guest@porteus:~$ ls /mnt/sda6/porteus3.2/changes/
porteussave.dat*
guest@porteus:~$

Error could be due to it being in use.
Code: Select all
Cmdline:  quiet BOOT_IMAGE=/porteus3.2/vmlinuz from=/ISOs/Porteus-CINNAMON-v3.2.2-x86_64.iso volume=33 reboot=cold changes=EXIT:/porteus3.2/changes/porteussave.dat extramod=/porteus3.2/Modules
Ed
User avatar
Ed_P
Contributor
Contributor
 
Posts: 2944
Joined: 06 Feb 2013, 23:12
Location: Western NY, USA
Distribution: Cinnamon 3.2.2 64-bit ISO

Re: mloop / uloop output

Postby Bogomips » 23 Jun 2017, 13:41

Why this penchant of OP for Newbie questions, I've no idea. :unknown:

Let's try:

  • Firstly
    Code: Select all
    w=$(mloop /mnt/sda6/porteus3.2/changes/porteussave.dat 2>&1); echo $?
    echo "$w";

  • And for Seconds
    Code: Select all
    ln -/mnt/sda6/porteus3.2/changes/porteussave.dat  porteussave.xzm
    w
    =$(mloop porteussave.xzm 2>&1); echo $?;
    echo 
    "$w";      
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
Bogomips
Full of knowledge
Full of knowledge
 
Posts: 2432
Joined: 25 Jun 2014, 16:21
Location: London
Distribution: 3.2.2 Cinnamon & KDE5

Re: mloop / uloop output

Postby Ed_P » 23 Jun 2017, 18:24

Bogomips wrote:Why this penchant of OP for Newbie questions, I've no idea. :unknown:

I couldn't find the Dummies section for what I thought was a question not worthy of the Intermediate section. :wink:

Let's try:

  • Firstly
    Code: Select all
    w=$(mloop /mnt/sda6/porteus3.2/changes/porteussave.dat 2>&1); echo $?
    echo "$w";


Code: Select all
guest@porteus:~$ w=$(mloop /mnt/sda6/porteus3.2/changes/porteussave.dat 2>&1); echo $?
Password:
0
guest@porteus:~$ echo "$w";
 Please enter root's password below
using /dev/loop4

Please wait while i gather some info ....

mount: wrong fs type, bad option, bad superblock on /dev/loop14,
       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try
       dmesg | tail or so.


 #################################
 Your data file has been mounted at:
/mnt/loop

You can unmount it by typing uloop

Here is a list of the files:
guest@porteus:~$ uloop
Password:

nothing is mounted in /mnt/loop

guest@porteus:~$



  • And for Seconds
    Code: Select all
    ln -/mnt/sda6/porteus3.2/changes/porteussave.dat  porteussave.xzm
    w
    =$(mloop porteussave.xzm 2>&1); echo $?;
    echo "$w"


Code: Select all
guest@porteus:~$ ln -s /mnt/sda6/porteus3.2/changes/porteussave.dat  porteussave.xzm
guest@porteus:~$ w=$(mloop porteussave.xzm 2>&1); echo $?;
Password:
0
guest@porteus:~$ echo "$w";
 Please enter root's password below
using /dev/loop4

Please wait while i gather some info ....

mount: wrong fs type, bad option, bad superblock on /dev/loop14,
       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try
       dmesg | tail or so.


 #################################
 Your data file has been mounted at:
/mnt/loop

You can unmount it by typing uloop

Here is a list of the files:
guest@porteus:~$

The ln command is a clever approach though.
Ed
User avatar
Ed_P
Contributor
Contributor
 
Posts: 2944
Joined: 06 Feb 2013, 23:12
Location: Western NY, USA
Distribution: Cinnamon 3.2.2 64-bit ISO

Re: mloop / uloop output

Postby Bogomips » 23 Jun 2017, 20:17

What gives here?
Code: Select all
s=/mnt/sda6/porteus3.2/changes/porteussave.dat;
file $s
mkdir s
sudo mount $s s
ls s
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
Bogomips
Full of knowledge
Full of knowledge
 
Posts: 2432
Joined: 25 Jun 2014, 16:21
Location: London
Distribution: 3.2.2 Cinnamon & KDE5

Re: mloop / uloop output

Postby Ed_P » 23 Jun 2017, 21:14

Bogomips wrote:What gives here?
Code: Select all
s=/mnt/sda6/porteus3.2/changes/porteussave.dat;
file $s
mkdir s
sudo mount $s s
ls s

Code: Select all
guest@porteus:~$ s=/mnt/sda6/porteus3.2/changes/porteussave.dat;
guest@porteus:~$ file $s
/mnt/sda6/porteus3.2/changes/porteussave.dat: SGI XFS filesystem data (blksz 4096, inosz 512, v2 dirs)
guest@porteus:~$ mkdir s
guest@porteus:~$ sudo mount $s s
Password:
My pet ferret can type better than you!
Password:
mount: wrong fs type, bad option, bad superblock on /dev/loop14,
       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try
       dmesg | tail or so.
guest@porteus:~$ ls s
guest@porteus:~$

guest@porteus:~$ cat /proc/cmdline
quiet BOOT_IMAGE=/porteus3.2/vmlinuz from=/ISOs/Porteus-CINNAMON-v3.2.2-x86_64.iso volume=33 reboot=cold changes=EXIT:/porteus3.2/changes/porteussave.dat extramod=/porteus3.2/Modules
guest@porteus:~$

guest@porteus:~$ dmesg | tail
[ 3675.893316] wlan0: RX AssocResp from 20:aa:4b:eb:a8:16 (capab=0x11 status=0 aid=1)
[ 3675.894927] wlan0: associated
[ 3748.163929] wlan0: disconnect from AP 20:aa:4b:eb:a8:16 for new auth to 20:aa:4b:eb:a8:15
[ 3748.176496] wlan0: authenticate with 20:aa:4b:eb:a8:15
[ 3748.184183] wlan0: send auth to 20:aa:4b:eb:a8:15 (try 1/3)
[ 3748.186154] wlan0: authenticated
[ 3748.187399] wlan0: associate with 20:aa:4b:eb:a8:15 (try 1/3)
[ 3748.191138] wlan0: RX AssocResp from 20:aa:4b:eb:a8:15 (capab=0x1411 status=0 aid=6)
[ 3748.192355] wlan0: associated
[ 3949.045858] XFS (loop14): Filesystem has duplicate UUID 6e8e8e05-334b-4cdd-af0b-958965dd5687 - can't mount
guest@porteus:~$

The save.dat file is in use.


-edit-

Now if we try your approaches with a save.dat file not in use, we get:

Code: Select all
guest@porteus:~$ w=$(mloop /mnt/sda6/porteus3.0/changes/porteussave.dat)
Password:
guest@porteus:~$ ls /mnt/loop
dev/  etc/  home/  mnt/  opt/  root/  tmp/  usr/  var/
guest@porteus:~$ ls /mnt/loop/usr/
bin/  lib/  lib64/  man/  share/  src/
guest@porteus:~$ w=$(uloop)
Password:
guest@porteus:~$ ls /mnt/loop/
guest@porteus:~$

guest@porteus:~$
guest@porteus:~$ w=$(mloop /mnt/sda6/porteus3.0/changes/porteussave.dat 2>&1); echo $?
Password:
0
guest@porteus:~$ echo "$w";
 Please enter root's password below
using /dev/loop4

Please wait while i gather some info ....

 #################################
 Your data file has been mounted at:
/mnt/loop

You can unmount it by typing uloop

Here is a list of the files:
dev
etc
home
mnt
opt
root
tmp
usr
var
guest@porteus:~$ uloop
Password:

/mnt/loop has been unmounted


guest@porteus:~$
guest@porteus:~$ ln -s /mnt/sda6/porteus3.0/changes/porteussave.dat  porteussave.xzm
guest@porteus:~$ w=$(mloop porteussave.xzm 2>&1); echo $?;
Password:
0
guest@porteus:~$ echo "$w";
 Please enter root's password below
using /dev/loop4

Please wait while i gather some info ....



 #################################
 Your data file has been mounted at:
/mnt/loop

You can unmount it by typing uloop

Here is a list of the files:
dev
etc
home
mnt
opt
root
tmp
usr
var
guest@porteus:~$ uloop
Password:

/mnt/loop has been unmounted

 
guest@porteus:~$
guest@porteus:~$ s=/mnt/sda6/porteus3.0/changes/porteussave.dat;
guest@porteus:~$ file $s
/mnt/sda6/porteus3.0/changes/porteussave.dat: SGI XFS filesystem data (blksz 4096, inosz 256, v2 dirs)
guest@porteus:~$ mkdir s
guest@porteus:~$ sudo mount $s s
Password:
Harm can come to a young lad like that!
Password:
guest@porteus:~$ ls s
dev/  etc/  home/  mnt/  opt/  root/  tmp/  usr/  var/
guest@porteus:~$ uloop
Password:

nothing is mounted in /mnt/loop

guest@porteus:~$ 

w=$(mloop file) is indeed an interesting variation. :good:
Ed
User avatar
Ed_P
Contributor
Contributor
 
Posts: 2944
Joined: 06 Feb 2013, 23:12
Location: Western NY, USA
Distribution: Cinnamon 3.2.2 64-bit ISO

Re: mloop / uloop output

Postby Bogomips » 23 Jun 2017, 22:34

Ed_P wrote:
Code: Select all
guest@porteus:~$ s=/mnt/sda6/porteus3.0/changes/porteussave.dat;
guest@porteus:~$ file $s
/mnt/sda6/porteus3.0/changes/porteussave.dat: SGI XFS filesystem data (blksz 4096, inosz 256, v2 dirs)
guest@porteus:~$ mkdir s
guest@porteus:~$ sudo mount $s s
Password:
Harm can come to a young lad like that!
Password:
guest@porteus:~$ ls s
dev/  etc/  home/  mnt/  opt/  root/  tmp/  usr/  var/
This shows that upstream has caught up with mloop, and that a simple mount statement now suffices. 8)
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
Bogomips
Full of knowledge
Full of knowledge
 
Posts: 2432
Joined: 25 Jun 2014, 16:21
Location: London
Distribution: 3.2.2 Cinnamon & KDE5


Return to Newbie questions



Who is online

Users browsing this forum: No registered users and 1 guest