Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Montar un disco automaticamente al bootear

    Scheduled Pinned Locked Moved Español
    4 Posts 2 Posters 3.4k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      Mikeltb
      last edited by

      Hola,

      como puedo hacer un mount automático de un disco al iniciar el sistema?

      Gracias.

      Saludos.

      1 Reply Last reply Reply Quote 0
      • J
        javcasta
        last edited by

        Hola

        Para ejecutar un comando al inicio de pfSense:

        https://doc.pfsense.org/index.php/Executing_commands_at_boot_time

        Editando el config.xml y definiendo en <shellcmd>:

        <shellcmd>mycommand -a -b -c 123</shellcmd>
        

        o con:

        Any shell script can be placed in the /usr/local/etc/rc.d/ directory. The filename must end in .sh and it must be marked as executable (chmod +x myscript.sh). Every shell script ending in .sh in this directory will be executed at boot time.

        Y para montar el dispositivo /dev/da3 en la carpeta /tmp/mynewdisk/

        mkdir /tmp/mynewdisk
        mount mount /dev/da3 /tmp/mynewdisk/
        

        (Escribo de memoria, revisa los comandos: mount –help )

        salu2</shellcmd>

        Javier Castañón
        Técnico de comunicaciones, soporte y sistemas.

        Mi web: https://javcasta.com/

        Soporte scripting/pfSense https://javcasta.com/soporte/

        1 Reply Last reply Reply Quote 0
        • M
          Mikeltb
          last edited by

          Funciona, gracias.  ;)

          Así quedo el config.xml:

          
          	 <system><...
                            ...
                            ...>
                          <shellcmd>mount /dev/da0 /mnt/windows</shellcmd></system> 
          
          
          1 Reply Last reply Reply Quote 0
          • J
            javcasta
            last edited by

            Hola

            ¿Te funciona sin indicar el path completo a mount?

            /sbin/mount /dev/da0 /mnt/window

            Ok, para que un cron funcione hay que indicar el comando con su path completo, no sabía que en el config.xml en <shellcmd>admitiera sin el path completo la llamada a un comando. Bueno es saberlo :)

            Salu2</shellcmd>

            Javier Castañón
            Técnico de comunicaciones, soporte y sistemas.

            Mi web: https://javcasta.com/

            Soporte scripting/pfSense https://javcasta.com/soporte/

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.