mloop / uloop output

Post here if you are a new Porteus member and you're looking for some help.
Post Reply
User avatar
Ed_P
Contributor
Contributor
Posts: 3145
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 3.2.2 64-bit ISO
Location: Western NY, USA

mloop / uloop output

Post#1 by Ed_P » 21 Jun 2017, 20: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

fulalas
Contributor
Contributor
Posts: 586
Joined: 26 Oct 2016, 15:34
Distribution: Porteus
Location: Brazil

Re: mloop / uloop output

Post#2 by fulalas » 21 Jun 2017, 22:59

Try this:

Code: Select all

 &>/dev/null

Bogomips
Full of knowledge
Full of knowledge
Posts: 2536
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: mloop / uloop output

Post#3 by Bogomips » 21 Jun 2017, 23: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

User avatar
Ed_P
Contributor
Contributor
Posts: 3145
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 3.2.2 64-bit ISO
Location: Western NY, USA

Re: mloop / uloop output

Post#4 by Ed_P » 21 Jun 2017, 23: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

Bogomips
Full of knowledge
Full of knowledge
Posts: 2536
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: mloop / uloop output

Post#5 by Bogomips » 23 Jun 2017, 12: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 -s /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

User avatar
Ed_P
Contributor
Contributor
Posts: 3145
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 3.2.2 64-bit ISO
Location: Western NY, USA

Re: mloop / uloop output

Post#6 by Ed_P » 23 Jun 2017, 17: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 -s /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

Bogomips
Full of knowledge
Full of knowledge
Posts: 2536
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: mloop / uloop output

Post#7 by Bogomips » 23 Jun 2017, 19: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

User avatar
Ed_P
Contributor
Contributor
Posts: 3145
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 3.2.2 64-bit ISO
Location: Western NY, USA

Re: mloop / uloop output

Post#8 by Ed_P » 23 Jun 2017, 20: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

Bogomips
Full of knowledge
Full of knowledge
Posts: 2536
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: mloop / uloop output

Post#9 by Bogomips » 23 Jun 2017, 21: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

Post Reply