Wie mounte ich eine Windows-Freigabe in OpenDreambox über Telnet?

Wie mounte ich eine Windows-Freigabe in OpenDreambox über Telnet?

Ich habe im Stammverzeichnis der Festplatte C einen neuen Ordner mit dem NamenAufnahmenund ich habe es mit allen geteilt. Ich möchte diesen Ordner jetzt auf meiner Dreambox mounten, damit ich darauf aufnehmen kann.

Da es sich aber um eine originale Dream Multimedia Box mit Enigma2 handelt, habe ich keine OptionenNetzwerkbrowseroderMount-Managerim Netzwerkeinstellungsmenü also kann ich das nicht so einfach über das Menü machen, nicht ohne das Image der Dreambox zu verändern.

Ich habe gelesen, dass es möglich ist, es über Telnet zu mounten. Wie genau mache ich das? Welchen Befehl oder welche Befehle verwende ich?

Ich habe diese beiden Befehle im Web gefunden:

Beispiel 1:

mount –t cifs –o username=name,password=password //192.168.1.10/dreambox

Beispiel 2:

mount -t smbfs -o username=YourUserName //x.x.x.x/YourShareName /your/mountpoint

Kann ich einen dieser beiden Befehle verwenden? Warum steht cifsin dem einen „in“ und smbfsin dem anderen „in“? Was bedeuten diese Schalter? Und außerdem: Muss ich das bei jedem Neustart tun oder ist das eine permanente Einrichtung?

Ich verbinde mich mit PuTTYtel mit der Dreambox und sie präsentiert sich als OpenDreambox 1.6.0.

Aktualisieren:Hier ist die Ausgabe des PS-Befehls in PuTTYtel.

OpenDreambox 1.6.0 dm500hd

dm500hd login: root
root@dm500hd:~# ps
  PID USER       VSZ STAT COMMAND
    1 root      1724 S    init [3]
    2 root         0 SW   [migration/0]
    3 root         0 SWN  [ksoftirqd/0]
    4 root         0 SW   [migration/1]
    5 root         0 SWN  [ksoftirqd/1]
    6 root         0 SW<  [events/0]
    7 root         0 SW<  [events/1]
    8 root         0 SW<  [khelper]
    9 root         0 SW<  [kthread]
   10 root         0 SW<  [kblockd/0]
   11 root         0 SW<  [kblockd/1]
   12 root         0 SW<  [khubd]
   13 root         0 SW   [pdflush]
   14 root         0 SW   [pdflush]
   15 root         0 SW<  [kswapd0]
   16 root         0 SW<  [aio/0]
   17 root         0 SW<  [aio/1]
   18 root         0 SW<  [ata/0]
   19 root         0 SW<  [ata/1]
   20 root         0 SW<  [ata_aux]
   21 root         0 SW<  [scsi_eh_0]
   22 root         0 SW<  [scsi_eh_1]
   23 root         0 SW   [mtdblockd]
   24 root         0 SWN  [jffs2_gcd_mtd3]
   70 root      2180 S <  udevd --daemon
  310 root         0 SW   [b_event]
  311 root         0 SW   [b_idle]
  317 root         0 SW<  [fp]
  339 root         0 SW<  [dmx0]
  345 root         0 SW<  [dmx1]
  354 root         0 SW<  [dmx2]
  355 root         0 SW<  [dmx_hw_sec]
  391 messageb  2408 S    /usr/bin/dbus-daemon --system
  394 root      1928 S    /usr/bin/wdog tpmd
  395 root      4312 S    tpmd
  398 root      1928 S    /usr/bin/wdog dccamd -
  399 root      3136 S    dccamd -
  408 avahi     3084 S    avahi-daemon: running [dm500hd.local]
  441 root      4076 S    nmbd -D
  443 root      6780 S    smbd -D
  458 root      6780 S    smbd -D
  465 root      2504 S    udhcpc -R -b -T3 -A10 -p /var/run/udhcpc.eth0.pid -i
  477 root      1712 S    /usr/sbin/zeroconf -i eth0
  493 root      2348 S    /usr/sbin/dropbear -r /etc/dropbear/dropbear_rsa_host
  496 root      1832 S    /usr/sbin/inetd
  499 root      2504 S    /sbin/syslogd -n -O /var/log/messages -s 32 -b 1 -m 2
  501 root      2504 S    /sbin/klogd -n
  614 root      2256 S    /usr/sbin/automount --pid-file=/var/run/autofs/_autof
  675 root      2504 S    /bin/sh /usr/bin/enigma2.sh
  678 root     65104 S    /usr/bin/enigma2
  687 root     65104 S    /usr/bin/enigma2
  709 root     65104 S    /usr/bin/enigma2
  717 root     65104 S N  /usr/bin/enigma2
22611 root      2824 S    telnetd
22612 root      2820 S    -sh
22737 root      2820 R    ps
root@dm500hd:~#

Aktualisieren:Ich habe den /media-Ordner offensichtlich bereits.

root@dm500hd:/# cd /media
root@dm500hd:/media# cd /share
root@dm500hd:/usr/share#

Wenn ich versuche, cdwird /sharees umgeleitet zu /usr/share. Kann ich also diesen Ordner verwenden, anstatt einen neuen zu erstellen? ...

Aktualisieren:Ich habe jetzt einen neuen Versuch gestartet...

root@dm500hd:/# sudo mkdir /newfolder/share
-sh: sudo: not found
root@dm500hd:/# $ sudo mkdir /newfolder/share
-sh: $: not found
root@dm500hd:/# $sudo mkdir /newfolder/share
mkdir: cannot create directory '/newfolder/share': No such file or directory
root@dm500hd:/# $sudo mkdir /media/share
root@dm500hd:/# $sudo chmod a+r /media/share
root@dm500hd:/# $sudo mount -a
mount: mounting /dev/sda1 on /media/hdd failed: No such file or directory
root@dm500hd:/# edit /etc/fstab
-sh: edit: not found
root@dm500hd:/# edit /etc/fstab
-sh: edit: not found
root@dm500hd:/# open /etc/fstab
-sh: open: not found
root@dm500hd:/#

Also musste ich das Dollarzeichen hinzufügen? Und keine Leerzeichen dazwischen? Es sieht so aus, als hätte es dieses Mal funktioniert... Ich habe zuerst versucht, einen Ordner mit dem Namenneuer Ordner. Warum hat es abgelehnt? Ich habe dann den Ordner /media/share erstellt... wie hat sich das auf die bestehenden ausgewirkt?AktieSymlink (oder was auch immer das war), der vorher da war?

Ist shdas die Bourne- oder die Thompson-Shell? Oder werden alle Linux-Shells shund sogar die Ash-Shell als solche abgekürzt?

Wie bearbeitet man eine Datei in der Shell? Ich musste fstabsie unter Windows herunterladen und bearbeiten und sie dann über FTP zurückschicken.

Dann habe ich es versucht $sudo mount -aund das hier kam dabei heraus:

root@dm500hd:/# $sudo mount -a
mount: mounting /dev/sda1 on /media/hdd failed: No such file or directory
mount: mounting //192.168.0.107/recordings on /media/share failed: No such device
root@dm500hd:/#

Dies ist der Inhalt meiner fstab-Datei:

rootfs               /                    auto       defaults              1 1
proc                 /proc                proc       defaults              0 0
devpts               /dev/pts             devpts     mode=0620,gid=5       0 0
usbfs                /proc/bus/usb        usbfs      defaults              0 0
/dev/mtdblock2       /boot                jffs2      ro                    0 0
tmpfs                /var                 tmpfs      defaults              0 0
tmpfs                /tmp                 tmpfs      defaults              0 0
/dev/sda1            /media/hdd           auto       defaults              0 0
//192.168.0.107/recordings /media/share smbfs auto,user=classified,password=classfied 0 0

Ich werde versuchen, die Box neu zu starten und sehen, ob es funktioniert.

Aktualisieren:Immer noch kein Glück ...

Ich bekomme immer noch mount: mounting //192.168.0.107/recordings on /media/share failed: No such devicedie Meldung. Ich habe versucht, die IP durch den Computernamen zu ersetzen, aber ich bekomme immer dieselbe Meldung.

Ich habe sogar versucht, die Reihenfolge der Begriffe in fstab umzukehren (falls es eine Frage der Syntax ist), sodass /media/share als erstes in der Zeile steht. Das Ergebnis war mount: mounting /media/share on /computername/recordings failed: No such file or directory.

Aktualisieren:Ich hatte Glück...

Warum bestehen Sie darauf, in zu mounten /media/share? Ist das eine Konventionssache? Kann ich in einen anderen Ordner mounten? Ich habe das Problem gelöst, indem ich in Windows einen neuen Ordner und eine neue Freigabe erstellt und dann mount -t cifsden Befehl verwendet habe.

OpenDreambox 1.6.0 dm500hd


dm500hd login: root
root@dm500hd:~# $sudo mount -a
mount: mounting /dev/sda1 on /media/hdd failed: No such file or directory
mount: mounting //192.168.0.107/recordings on /media/share failed: No such device

Ich denke, das /dev/sda1 on /media/hdd failedliegt daran, dass kein Laufwerk angeschlossen ist. Diese STB kann eine Festplatte an den eSATA-Anschluss anschließen, aber es ist keine angeschlossen.

Ich denke, die zweite Zeile wird angezeigt, weil die IP falsch ist. Ich denke, es hätte 192.168.0.101 sein müssen, obwohl 192.168.0.107 der Name der STB-Box war, auf der ich mich einklinken möchte.

root@dm500hd:~# ps
  PID USER       VSZ STAT COMMAND
    1 root      1724 S    init [3]
    2 root         0 SW   [migration/0]
    3 root         0 SWN  [ksoftirqd/0]
    4 root         0 SW   [migration/1]
    5 root         0 SWN  [ksoftirqd/1]
    6 root         0 SW<  [events/0]
    7 root         0 SW<  [events/1]
    8 root         0 SW<  [khelper]
    9 root         0 SW<  [kthread]
   10 root         0 SW<  [kblockd/0]
   11 root         0 SW<  [kblockd/1]
   12 root         0 SW<  [khubd]
   13 root         0 SW   [pdflush]
   14 root         0 SW   [pdflush]
   15 root         0 SW<  [kswapd0]
   16 root         0 SW<  [aio/0]
   17 root         0 SW<  [aio/1]
   18 root         0 SW<  [ata/0]
   19 root         0 SW<  [ata/1]
   20 root         0 SW<  [ata_aux]
   21 root         0 SW<  [scsi_eh_0]
   22 root         0 SW<  [scsi_eh_1]
   23 root         0 SW   [mtdblockd]
   24 root         0 SWN  [jffs2_gcd_mtd3]
   70 root      2180 S <  udevd --daemon
  313 root         0 SW   [b_event]
  314 root         0 SW   [b_idle]
  320 root         0 SW<  [fp]
  344 root         0 SW<  [dmx0]
  351 root         0 SW<  [dmx1]
  359 root         0 SW<  [dmx2]
  360 root         0 SW<  [dmx_hw_sec]
  396 messageb  2408 S    /usr/bin/dbus-daemon --system
  399 root      1928 S    /usr/bin/wdog tpmd
  400 root      4312 S    tpmd
  403 root      1928 S    /usr/bin/wdog dccamd -
  404 root      3136 S    dccamd -
  413 avahi     3084 S    avahi-daemon: running [dm500hd.local]
  451 root      4076 S    nmbd -D
  453 root      6780 S    smbd -D
  473 root      6780 S    smbd -D
  489 root      2504 S    udhcpc -R -b -T3 -A10 -p /var/run/udhcpc.eth0.pid -i
  503 root      1712 S    /usr/sbin/zeroconf -i eth0
  519 root      2348 S    /usr/sbin/dropbear -r /etc/dropbear/dropbear_rsa_host
  522 root      1832 S    /usr/sbin/inetd
  525 root      2504 S    /sbin/syslogd -n -O /var/log/messages -s 32 -b 1 -m 2
  527 root      2504 S    /sbin/klogd -n
  640 root      2256 S    /usr/sbin/automount --pid-file=/var/run/autofs/_autof
  701 root      2504 S    /bin/sh /usr/bin/enigma2.sh
  704 root     84536 S    /usr/bin/enigma2
  713 root     84536 S    /usr/bin/enigma2
  735 root     84536 S    /usr/bin/enigma2
  748 root     84536 S N  /usr/bin/enigma2
  739 root         0 SW<  [kdvb-ad-0-fe-0]
  886 root      7324 S    smbd -D
  965 root      2824 S    telnetd
  966 root      2820 S    -sh
 1063 nobody    2292 S    vsftpd
 1065 root      2316 S    vsftpd
 1076 root      2820 R    ps
root@dm500hd:~# smbd
root@dm500hd:~# $sudo mount -a
mount: mounting /dev/sda1 on /media/hdd failed: No such file or directory
mount: mounting /computername/recordings on /media/share failed: No such device

In dieser letzten Zeile habe ich versucht, den Netzwerknamen des Computers anstelle der IP-Adresse in derfstabDatei. Aber das hat nicht geholfen... vielleicht muss es eine IP sein und kein Netzwerkname?... keine Ahnung...

root@dm500hd:~# $sudo mount -a
mount: mounting /dev/sda1 on /media/hdd failed: No such file or directory
mount: mounting /media/share on /computername/recordings failed: No such file or directory
root@dm500hd:~# $sudo mount -a
mount: mounting /dev/sda1 on /media/hdd failed: No such file or directory
mount: mounting //media/share on /computername/recordings failed: No such file or directory
root@dm500hd:~# $sudo mount -a
mount: mounting /dev/sda1 on /media/hdd failed: No such file or directory
mount: mounting //media/share on /computername/recordings failed: No such file or directory
root@dm500hd:~# $sudo mount -a
mount: mounting /dev/sda1 on /media/hdd failed: No such file or directory
mount: mounting //computername/recordings on /media/share failed: No such device

Ich habe versucht, die fstab-Datei auf verschiedene Weise zu bearbeiten und zu aktualisieren, beispielsweise durch Hinzufügen zusätzlicher Leerzeichen … Ich dachte, für den Fall, dass es an der Formatierung liegt …

Dies ist der Teil, der mir die funktionierende Lösung lieferte:

Ich habe einen Ordner mit dem Namen erstelltTraumboxunter Laufwerk C auf dem Windows-Rechner und teilte es mit demAlleGruppe. Dann habe ich die folgenden Befehle ausgeführt.

root@dm500hd:~# cd /
root@dm500hd:/# mkdir
BusyBox v1.15.3 (2010-10-14 16:48:44 UTC) multi-call binary

Usage: mkdir [OPTIONS] DIRECTORY...

Create DIRECTORY

Options:
        -m      Set permission mode (as in chmod), not rwxrwxrwx - umask
        -p      No error if existing, make parent directories as needed

root@dm500hd:/# /hdd/movie
-sh: /hdd/movie: not found
root@dm500hd:/# mkdir /hdd/movie

The /hdd is a syslink (symbolic link) I think so it is really located at `/media/hdd`. Note that this is the same location where `/dev/sda1` is mounted.

root@dm500hd:/# mount -t cifs -o username=user,password=pass //192.168.0.10
7/dreambox /hdd
mount: mounting //192.168.0.107/dreambox on /hdd failed: No such device or address
root@dm500hd:/# mount cifs user=user,password=pass //192.168.0.101/dreambox /hdd

192.168.0.107 ist die IP der STB-Box, also ist das falsch. Die richtige IP für den gemeinsam genutzten Windows-Computer ist 192.168.0.101. Außerdem ist es „Benutzername“ und nicht „Benutzer“.

Dies ist die Ausgabe:

BusyBox v1.15.3 (2010-10-14 16:48:44 UTC) multi-call binary

Usage: mount [flags] DEVICE NODE [-o OPT,OPT]

Mount a filesystem. Filesystem autodetection requires /proc be mounted.

Options:
        -a              Mount all filesystems in fstab
        -r              Read-only mount
        -w              Read-write mount (default)
        -t FSTYPE       Filesystem type
        -O OPT          Mount only filesystems with option OPT (-a only)
-o OPT:
        loop            Ignored (loop devices are autodetected)
        [a]sync         Writes are [a]synchronous
        [no]atime       Disable/enable updates to inode access times
        [no]diratime    Disable/enable atime updates to directories
        [no]relatime    Disable/enable atime updates relative to modification time
        [no]dev         (Dis)allow use of special device files
        [no]exec        (Dis)allow use of executable files
        [no]suid        (Dis)allow set-user-id-root programs
        [r]shared       Convert [recursively] to a shared subtree
        [r]slave        Convert [recursively] to a slave subtree
        [r]private      Convert [recursively] to a private subtree
        [un]bindable    Make mount point [un]able to be bind mounted
        bind            Bind a directory to an additional location
        move            Relocate an existing mount point
        remount         Remount a mounted filesystem, changing its flags
        ro/rw           Read-only/read-write mount

There are EVEN MORE flags that are specific to each filesystem
You'll have to see the written documentation for those filesystems

Wie man sieht, handelt es sich hierbei um eine falsche Syntax. Man muss eine der Optionen verwenden.

root@dm500hd:/# mount -t cifs -o username=user,password=pass //192.168.0.10
1/dreambox /hdd
root@dm500hd:/# mount -a
mount: mounting //computername/recordings on /media/share failed: No such device

Diese letzte Zeile ist darauf zurückzuführen, dass ich diese Zeile noch zur fstab-Datei hinzugefügt hatte. Nachdem ich die fstab-Datei bearbeitet und diese zuvor hinzugefügte Zeile entfernt hatte, mount -t cifswurde dieser Befehl wirksam.

root@dm500hd:/# mount -a
root@dm500hd:/# $sudo mount -a
root@dm500hd:/#

Beachten Sie, dass keine Fehlerausgabe erfolgt, wenn ich mount -aoder mache sudo mount -a.

Ich bin dieser Anleitung gefolgt:http://www.maxteknik.se/forum/viewtopic.php?t=3828

Antwort1

Am einfachsten geht das mit dem SMB-Protokoll. Erstellen Sie auf Ihrem Linux-Rechner den Einhängepunkt für den freigegebenen Ordner:

$ sudo mkdir /media/share
$ sudo chmod a+xr /media/share

Der zweite Befehl setzt das Verzeichnis `/media/share/ als lesbar und ausführbar (d. h. Benutzer können in dieses Verzeichnis wechseln) durchalleBenutzer.

Auf *ix-Systemen werden Einstellungen zum Mounten von Laufwerken (lokal oder remote) in der etc/fstabDatei festgelegt. Das allgemeine Format der Datei ist:

DRIVE  LOCAL_MOUNT_DIRECTORY FILESYSTEM OPTIONS    


Bearbeiten Sie es /etc/fstabauf Ihrer Linux-Box und fügen Sie diese Zeile hinzu:

//x.x.x.x/recordings /media/share smbfs auto,user=USER,password=PASS 0 0

Ändern Sie die Einstellung x.x.x.x./YouShareName, um die IP-Adresse Ihres Windows-Servers anzuzeigen und USER und PASS korrekt einzustellen. Wenn alles gut geht, sollte es funktionieren und beim Neustart des (Linux-)Systems gemountet werden. Um es ohne Neustart zu testen, führen Sie Folgendes aus:

$ sudo mount -a

Weitere Informationen und eine ausführlichere Anleitung finden Sie unterHier.

verwandte Informationen