LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - Installation
User Name
Password
Slackware - Installation This forum is for the discussion of installation issues with Slackware.

Notices


Reply
  Search this Thread
Old 08-09-2023, 05:59 AM   #1
timsoft
Member
 
Registered: Oct 2004
Location: scotland
Distribution: slackware 15.0 64bit, 14.2 64 and 32bit and arm, ubuntu and rasbian
Posts: 495

Rep: Reputation: 144Reputation: 144
Question mounting cifs from the installer


Hi all,
I want to use the slackware64 15.0 installer media for some data recovery,
so, I boot to the dvd, bring the network up with dhcpcd (dhcp client), create a mount point, and attempt to mount the cifs/samba mount from my local server (ip obfuscated)
Code:
dhcpcd
mkdir /mnt/smb1
mount //x.y.z.q/myshare /mnt/smb1
and it gives the error
Quote:
mount: /mnt/smb1: unknown filesystem type 'cifs'.
how can I mount cifs shares from the install media ?

note: I have no problems post installation, but for data recovery, the point is I want the data off the drive, so I can't install anything. (and just in case anyone suggests just plug the drive into another pc, it is an old ide drive, and is not recognised with my sata-ide adapter, but is readable on the old pc.)
 
Old 08-09-2023, 07:52 AM   #2
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,826

Rep: Reputation: 1499Reputation: 1499Reputation: 1499Reputation: 1499Reputation: 1499Reputation: 1499Reputation: 1499Reputation: 1499Reputation: 1499Reputation: 1499
Some ideas:

1. Use ssh
Code:
(cd /directory/from && tar c *) | ssh x.y.z.q 'cd /directory/to && tar x'
2. Or mount using nfs.

3.If you want to use cifs, you can install needed stuff to the system. Not to the hard disk: the installer OS runs in ram. Copy what is needed from another 15.0 system.
Code:
ssh x.y.z.q 'tar c /sbin/mount.cifs /lib64/libcap-ng.so.0.0.0'|(cd / && tar x)
ldconfig
Does the smb mount work now?
 
Old 08-09-2023, 08:45 AM   #3
timsoft
Member
 
Registered: Oct 2004
Location: scotland
Distribution: slackware 15.0 64bit, 14.2 64 and 32bit and arm, ubuntu and rasbian
Posts: 495

Original Poster
Rep: Reputation: 144Reputation: 144
unfortunately, trying the first method gives
Quote:
tar: This does not look like a tar archive
tar:Exiting with failure status due to previous errors
and trying the second method fails on the mount with
Quote:
mount error:cifs filesytem not supported by the system
mount error(19): No such device
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log mesages (dmesg)
I checked and /sbin/mount.cifs is present and executable, as is /lib64/libcap-ng.so.0.0.0

thanks for the suggestions. any more ideas?
 
Old 08-09-2023, 08:56 AM   #4
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
2. You need to fire up NFS server for NFS mounting to work.
 
Old 08-09-2023, 09:25 AM   #5
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,826

Rep: Reputation: 1499Reputation: 1499Reputation: 1499Reputation: 1499Reputation: 1499Reputation: 1499Reputation: 1499Reputation: 1499Reputation: 1499Reputation: 1499
I just tried the first (ssh) one here with an install USB. It worked here. I think your .bashrc prints some rubbish. Try
Code:
$ ssh username@x.y.z.q echo Hello
Hello
$
If it prints anything else, you need to clean your .bashrc.
 
Old 08-09-2023, 09:27 AM   #6
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,826

Rep: Reputation: 1499Reputation: 1499Reputation: 1499Reputation: 1499Reputation: 1499Reputation: 1499Reputation: 1499Reputation: 1499Reputation: 1499Reputation: 1499
Quote:
Originally Posted by Petri Kaukasoina View Post
I think your .bashrc prints some rubbish.
Or you have redefined 'cd' to print some rubbish.
Code:
ssh username@x.y.z.q 'cd /'
should not print anything.
 
Old 08-09-2023, 09:39 AM   #7
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,826

Rep: Reputation: 1499Reputation: 1499Reputation: 1499Reputation: 1499Reputation: 1499Reputation: 1499Reputation: 1499Reputation: 1499Reputation: 1499Reputation: 1499
And I tried the cifs mount: didn't work out here either. The cifs module is on the install image, but it doesn't work.

'modprobe cifs' complains:
Code:
modprobe: ERROR: could not insert 'cifs': Unknown symbol in module, or unknown parameter (see dmesg)
and dmesg tells:
Code:
cifs: Unknown symbol cifs_md4_final (err -2)
cifs: Unknown symbol cifs_arc4_setkey (err -2)
cifs: Unknown symbol cifs_arc4_crypt (err -2)
cifs: Unknown symbol cifs_md4_init (err -2)
cifs: Unknown symbol cifs_md4_update (err -2)
If I had to guess, it's because of mismatch between 'huge' kernel and 'generic' modules.

Last edited by Petri Kaukasoina; 08-09-2023 at 10:04 AM.
 
Old 08-09-2023, 11:01 AM   #8
timsoft
Member
 
Registered: Oct 2004
Location: scotland
Distribution: slackware 15.0 64bit, 14.2 64 and 32bit and arm, ubuntu and rasbian
Posts: 495

Original Poster
Rep: Reputation: 144Reputation: 144
Petri:
hmm. running
Code:
ssh root@x.y.z.q echo hello
prints hello (after putting in the password)
running
Code:
ssh root@x.y.z.q 'cd /'
prints out nothing. (after putting in the password)
i tried again by cd'ing into the directory to recover, then running
Code:
tar c *|ssh root@x.y.z.q 'cd /destination/path && tar x'
and it seems to work. so that is a workaround for now, thanks.

I get the same errors in dmesg as you do, regarding cifs mounting, although it looks like it boots the huge kernel, and that should have cifs support compiled in.

mounting cifs from the installer "should" work, (it has been one of the options in a network install for ages) so it is worth reporting to Pat.

Last edited by timsoft; 08-09-2023 at 11:08 AM. Reason: fix typo
 
Old 08-09-2023, 11:26 AM   #9
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,826

Rep: Reputation: 1499Reputation: 1499Reputation: 1499Reputation: 1499Reputation: 1499Reputation: 1499Reputation: 1499Reputation: 1499Reputation: 1499Reputation: 1499
I managed to load the cifs module like this. Copy a few additional modules in addition to the other files as before.

Code:
ssh x.y.z.q 'tar c /sbin/mount.cifs /lib64/libcap-ng.so.0.0.0 /lib/modules/5.15.19/kernel/fs/netfs/netfs.ko /lib/modules/5.15.19/kernel/fs/smbfs_common/cifs_arc4.ko /lib/modules/5.15.19/kernel/fs/smbfs_common/cifs_md4.ko'|(cd / && tar x)
ldconfig
insmod /lib/modules/5.15.19/kernel/fs/netfs/netfs.ko
insmod /lib/modules/5.15.19/kernel/fs/smbfs_common/cifs_arc4.ko
insmod /lib/modules/5.15.19/kernel/fs/smbfs_common/cifs_md4.ko
modprobe cifs
After that the cifs mount might work! I don't have a smb server to try with, so it timed out trying to connect to a non-existant server.

The insmod commands above should not have been necessary if I had managed to run depmod but it didn't seem to work. Got this output of 'depmod':
Code:
depmod: can't change directory to /5.15.19': No such file or directory
 
Old 08-09-2023, 11:31 AM   #10
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,826

Rep: Reputation: 1499Reputation: 1499Reputation: 1499Reputation: 1499Reputation: 1499Reputation: 1499Reputation: 1499Reputation: 1499Reputation: 1499Reputation: 1499
Quote:
Originally Posted by timsoft View Post
i tried again by cd'ing into the directory to recover, then running
Code:
tar c *|ssh root@x.y.z.q 'cd /destination/path && tar x'
and it seems to work. so that is a workaround for now, thanks.
Great! Last month I copied files from my Windows laptop gone to reboot loop just like this. Now it's a Linux laptop...
Quote:
it boots the huge kernel, and that should have cifs support compiled in.
No, CONFIG_CIFS=m in config-huge-5.15.19.x64.
 
Old 08-09-2023, 02:12 PM   #11
timsoft
Member
 
Registered: Oct 2004
Location: scotland
Distribution: slackware 15.0 64bit, 14.2 64 and 32bit and arm, ubuntu and rasbian
Posts: 495

Original Poster
Rep: Reputation: 144Reputation: 144
yes I just checked, and as there are no modules in the initrd it doesn't work. I guess i'll raise a request for current to get CONFIG_CIFS=Y (and CONFIG_EXFAT=Y while we're at it) in the huge config. That would allow cifs to actually work in the setup, and also allow mounting exfat drives which are becoming more common these days. I have my internal slackware repo on a samba share, so it is really usefull to have access at install time.
 
1 members found this post helpful.
Old 08-30-2023, 12:10 AM   #12
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,463
Blog Entries: 7

Rep: Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561
Quote:
Originally Posted by timsoft View Post
I want to use the slackware64 15.0 installer media for some data recovery
Alien Bob's Slackware Live is probably a better tool for this job: https://download.liveslak.org/

The installer's kernel contains exactly what it needs to install Slackware, and not really much else. While it can be used for system recovery in certain circumstances, as you've found, it has its limits.
 
  


Reply

Tags
boot, cifs, slackware



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cifs "mount error 13 = Permission denied" CIFS SUCKS humbletech99 Linux - Networking 45 04-06-2020 05:31 AM
manual mount cifs works but srcipt mount cifs has mount error (13): Permission denied CADIT Linux - Newbie 6 11-20-2009 02:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - Installation

All times are GMT -5. The time now is 12:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration