Browsing shared USB router drive [SOLVED]

Browsing shared USB router drive [SOLVED]

Postby superclerk637 » May 15th, '18, 11:25

Hello,

(I was logged in as root for all of the things I did in this post. And SMB and cifs-utils are installed on my main machine.)

I have a USB enclosure (containing a 240 GB SSD, NTFS format, volume label "storage") plugged into my Linksys WRT-AC1200 (stock firmware). I would like to see the files in MGA6. The router's fancy features are turned off (FTP server, DLNA server, the app that lets me modify settings from my Android phone or Alexa). Under Windows, the sharing works fine. The entire drive is one giant share, no passwords or anything. (after I get linux to see the drive, I can implement passwords if I wish.)

Under Mageia, go into Dolphin. Look under "places" and click on "Network". Then click on "Samba Shares" and then "Workgroup". An icon shows up for "Wrt-ac1200(Samba 3.0.28a)". Click on that and you can see the directories on the router's USB drive, just like in Windows 7. Click on an .xls file, for example, and the file opens in OpenOffice Calc. Very nice. But the "WrtAC-1200" still does not show up in Dolphin's "Devices" section.

When I open a terminal window and type "diskdrake --smb", I can browse the servers on the network and set up the router's USB drive. Diskdrake will create an entry in /etc/fstab as follows:

Code: Select all
//wrt-ac1200/Router\040Storage /mnt/storage cifs username=% 0 0


I specified a mount point of /mnt/storage, it will be owner root, group root, and it will be "drwxr xr x". Close Dolphin and open a new Dolphin. Look under "Devices". The entry for "Router Storage on wrt-ac1200" is finally there, so everything is fine, right?

No. Click on the entry in Devices, and nothing will happen. Go to a terminal window and cd over to /mnt/storage, and it is not mounted.

A couple of hours ago, I thought I got a message in the lower right corner of the screen (and a message in a terminal window that I had open) that I had to re-type my password to access the share. But I do not get these message now.

Can anybody help me figure out how to mount this thing? I have tried wikis, Mageia documentation, forums, I even tried installing Ubuntu instead of Mageia to try to see the share and write down settings with my pen. It didn't work. I just can't find the way to get this drive mounted from bootup (or in the devices section of Dolphin).

EDIT: Why is "Router\040Storage" in the fstab file? I changed the volume label of that USB NTFS drive from "Router Storage" to "storage". But every time I remove the line from /etc/fstab and re-create the location on the USB drive (diskdrake --smb), the computer still finds "Router Storage" or "Router\040Storage". Is this mis-naming (or the extra space) hurting me? Is "Router Storage" hard-coded into the linksys firmware? Do I need to reinstall Mageia to get rid of "Router\040Storage"?

Any help is greatly appreciated.
Last edited by superclerk637 on May 21st, '18, 08:57, edited 1 time in total.
superclerk637
 
Posts: 14
Joined: Mar 19th, '16, 14:50

Re: Browsing shared USB router drive

Postby doktor5000 » May 16th, '18, 18:53

So there are several issues here. For dolphin, if it does not create a "bookmark" for the samba share once you accessed then you might need to add a bookmark it yourself. See https://userbase.kde.org/File_transfers ... places_bar
Usually in KDE4 you used to have to go to Network and then add a connection instead of browsing devices. If you only browsed it and did not create a bookmark then that is normal, I'd say.

For the fstab entry, I believe you hit an older bug where it will put username=% there but this is not the main issue. (see https://bugs.mageia.org/show_bug.cgi?id=20718 or https://bugs.mageia.org/show_bug.cgi?id=22011 which are partly about this )
The issue is that you created an fstab entry, but that does not mount it unless you click the mount button in diskdrake, see http://doc.mageia.org/mcc/6/en/content/ ... --smb.html

If you want to mount it manually, open up a terminal and as root issue
Code: Select all
mount /mnt/storage

and post the output here.

For your question regarding the name of the cifs share being "Router Storage" (or Router\040Storage which is just encoded differently, it's the same) that is because this is the name of that samba share on the linksys router, there's no relation to the NTFS volume label.
Although on a quick search I've not found anything in the linksys documentation on whether you can change that share name at all, and if so how.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 14495
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Browsing shared USB router drive

Postby superclerk637 » May 19th, '18, 07:36

Okay...

When I type "mount /mnt/storage", I get:

Code: Select all
Password for %@//wrt-ac1200/Router\040Storage: *****
mount error(112): Host is down
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

(NOTE: The first line, except for the *****, was in bright white, the rest was "regular white".)

When I go into Dolphin, look under "Devices" and double-click on "storage on wrt-ac1200", I get a notification in the lower right corner of the screen about "bell". Also, I get the following in the terminal window (that I still had open):
Code: Select all
Broadcast message from root@localhost.localdomain (Fri 2018-05-18 23:04:45 EDT):

Password entry required for 'Password for %@//wrt-ac1200/Router\040Storage:' (PID 6166).
Please enter password with the systemd-tty-ask-password-agent tool!

But I am not dropped back to the command prompt. When I type the password, I get a "command not found" message from bash (this makes sense, because my password is not a command), then I am dropped back to the command prompt.

I can recover Dolphin by clicking on some other entry in the "Devices" section or something in the "Places" section.

If I go to a terminal window and manually mount:

"mount //wrt-ac1200/Router\040Storage /mnt/storage -t cifs", I get the same as the beginning of this post:

Code: Select all
Password for %@//wrt-ac1200/Router\040Storage: *****
mount error(112): Host is down
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

(most of that first line was in bright white, as before)

I unplugged the ARRIS unit from my cable company, and switched off the Linksys. Waited 90 seconds, restarted the ARRIS unit, then the Linksys. When I try to manually mount in a terminal window, I still get the "host is down" message.

Does this mean I need an entry in my hosts file? Since I already have the usual "127.0.0.1 - localhost" in there, should I try adding "127.0.0.1 - Router\040Storage"?

Why is the "host down" and what do I do?

EDIT: Would the "GIGOLO" tool in Linux Mint (if I switched) do away with these problems by taking a "brute force" approach to seeing the network resources and mounting drives/directories?
superclerk637
 
Posts: 14
Joined: Mar 19th, '16, 14:50

Re: Browsing shared USB router drive

Postby superclerk637 » May 19th, '18, 09:30

Okay, it is "sort of" working now. But I would like some more help with this. After googling my problem, I found an ubuntu post. Here is the entry in fstab that works:

//192.168.1.1/Router\040Storage /mnt/storage cifs vers=1.0

Here is part of the output of the 'mount' command:

Code: Select all
192.168.1.1/Router Storage on /mnt/storage type cifs
(rw,relatime,vers=1.0,cache=strict,username=root,domain=WORKGROUP,
uid=0,noforceuid,gid=0,noforcegid,addr=192.168.1.1,soft,unix,
posixpaths,serverino,mapposix,acl,rsize=61440,wsize=65536,
echo_interval=60,actimeo=1)


(Please keep in mind everything in parenthesis [after "type cifs"] has no spaces. I used several lines and code tags to make it easier to read.)

Note that it is NOT necessary to put an entry in /etc/hosts that says "192.168.1.1 [insert a few spaces] wrt-ac1200" (if you do that, it seems to have no effect on anything, although there might be other effects I don't know about yet).

I still need to type in a password before the main login. Even "fakepass", which is not a real password, will work (even just pressing <ENTER> works!). It does not matter whether root or a regular user is about to log in. Even though the router does not require a password, Mageia makes me type something in anyway. I guess I should not complain, since the drive does get mounted, and that is what I wanted. But can I eliminate Mageia from requiring the "before-login" prompt for the wrt-ac1200's drive?
superclerk637
 
Posts: 14
Joined: Mar 19th, '16, 14:50

Re: Browsing shared USB router drive

Postby doktor5000 » May 20th, '18, 20:12

So if it demands a passwort but accepts any password, this seems to be some kind of public share. You can specify an empty password and or username like this:
http://www.thinkplexx.com/learn/howto/l ... t-password
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 14495
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Browsing shared USB router drive

Postby superclerk637 » May 21st, '18, 08:50

Something went wrong, and I had to reinstall Mageia about 5 or 6 times (wireless was not working, even after I installed wpa_supplicant, and sometimes the router's USB drive was not seen). I got it working now. ALL OF the right RPMs must be installed to see and interact with the hardware (and correct networking and wpa-supplicant daemons must also be running). (I had to install cifs-utils after the initial install -- this triggered about 8 other RPMS like "lib64sambawhatever" to be installed as well). (I am using a new motherboard with good RAM and capacitors, no overclocking, a good PSU and a UPS, so I don't think bad hardware or ripple current/surges were causing any problems.)

It looks like EITHER of these will work in fstab:

Code: Select all
//wrt-ac-1200/Router\040Storage cifs username=% 0 0

//192.168.1.1/Router\040Storage /mnt/storage cifs vers=1.0


The first one is what the control panel networking applet (which I think is diskdrake) set up. The second is the one I discovered about 24 hours ago. I thought a specific version had to be specified -- perhaps that is not true.

The "mount" command does not allow me to use a "-o password" option, so it should not normally be in fstab. But when mount (or the fstab file) calls the mount.cifs helper program, this becomes valid/legal. The thinkplexx.com web page does not say this, but the manpages do. The manpage for mount.cifs says the username and password can come from the environment or from a file (linux has an "environment" just like MS-DOS did). If mount.cifs does not find these, it will ask. They are not found, so it is still prompting for a password. Thank you for pointing that web page out!

Right now, I'll just keep hitting <ENTER> for the password, because I need to get some work done. I can get the user and password into an environment variable or credentials file (like the manpage for mount.cifs says) later. Thanks! Marking as solved.

EDIT: Dolphin now shows the files (click on the router storage under 'Devices') without setting up any bookmarks or anything. [ANOTHER EDIT: Works as both regular user and root.] Nice. Thanks!
superclerk637
 
Posts: 14
Joined: Mar 19th, '16, 14:50

Re: Browsing shared USB router drive [SOLVED]

Postby superclerk637 » May 27th, '18, 04:59

I have had time to explore the configuration from my last post. Dolphin only works when I am a regular user. I can only copy files to the router's USB drive when I am root (I have to use terminal windows to copy since Dolphin doesn't work as root). On most bootups, the USB drive on the router is visible. Sometimes it is not.

Sometimes the blue default wallpaper (Plasma/KDE) will fade to black just as the "welcome new user" splash screen is generated. After you dismiss this window, the wallpaper and taskbar will come back, but it will take several minutes. When this happens, you will be able to log out, but the computer will not shut down. It's like the song "Hotel California", where you can check out anytime you like, but you can never leave. And typing <CTRL> <ALT> <F2> won't lead to a login prompt, so you cannot kill any processes. You will need to hit the reset or power buttons. So I gave up.

Next, I tried installing MGA6 on my old machine in the basement in a dual-boot with 64-bit XP (Asus P5GC/MX-1333 board, Intel Core 2 Duo 8600, 4 GB RAM, video chip on the motherboard). I am using a later hardware version of this board, where Asus replaced many electrolytic capacitors with polymer ones (I have several copies of this board, so I know this is true). Things started to decay after only 10-12 boot cycles. I started getting messages like "LSB: Waiting for......" and "martian code at 169.1.1.132" or something. Perhaps the network was not "up" when the machine tried to detect it. The directory /mnt/storage was empty, so mounting clearly failed. Maybe I could have switched from "Net Applet" to "Network_Manager". But I was tired of reinstalling and trying to fix a half-working machine. Clearly, MGA does not like either of my computers.

Why is Mageia having these weird problems with my hardware? Is there a setting that I don't know about, like "NOAPIC" in GRUB's boot process? Is there a problem between my I/O chip and the SSD in either the main box (AsRock 970A-G/3.1, AMD 8150 chip, 16 GB RAM) or the basement machine (P5GC/MX-1333)? Windows Seven and XP 64-bit have no problems on these two boards. I'm sorry, but Windows just works. Why is Mageia having problems?

BTW, I tried Mint Cinnamon 18.3 on my basement computer. The wireless (Atheros 5212/5213/5214) worked immediately, and after several boot cycles, it is still running strong, and looks nice too. It sees the CIFS storage hanging off the server "wrt-AC1200" just fine. Auto-mounting it can probably be accomplished. Although I have not yet tried saving files there yet.

I will leave this tagged as "solved", but it is not really solved. I can only copy files (on my main machine, from the original post) to the router's drive as root, and MGA is so "glitchy" that it won't boot reliably. Mageia cannot be used on either of my computers.
Last edited by superclerk637 on May 28th, '18, 08:17, edited 3 times in total.
superclerk637
 
Posts: 14
Joined: Mar 19th, '16, 14:50

Re: Browsing shared USB router drive [SOLVED]

Postby morgano » May 27th, '18, 08:32

I wonder if it may be this: Recent kernels fail on some hardware.
https://bugs.mageia.org/show_bug.cgi?id=23075
https://bugs.mageia.org/show_bug.cgi?id=23060

Maybe the other system you tried that worked use elder kernel, with not as many "fixes" for the spectre/meltdown mayhem.
You could try some Magiea kernel and microcode from last year and see if that works better. And possibly chime in on the bugs.
Mandriva since 2006, then Mageia since 2011 at home & work. Thinkpad T40 T42p T43 T60 T61 T400. Aspire 7. Fileserver. Workstation using LVM, LUKS, VirtualBox, BOINC, Dropbox, CAD, urpmi-proxy, NextCloud...
morgano
 
Posts: 549
Joined: Jun 15th, '11, 17:51
Location: Kivik, Sweden


Return to Networking

Who is online

Users browsing this forum: No registered users and 1 guest

cron