Category: Tech

  • Debian SMB Auto Mount

    One problem I had with running Debian servers is the inability to easily auto mount SMB shares in order to store and backup data to a central NAS.

    After a while of confusing research, I finally found a way to configure fstab to auto mount my SMB shares.

    In your fstab file, you can add a line such as this:

    //[NAS IP Address]/[SMB Share Location i.e. /public/backup] /[Where you wish to store this SMB folder on your debian based machine] cifs username=[SMB Username],password=[SMB Password],uid=[Desired Debian User to have access],gid=[Desired Debian Group to have access],iocharset=utf8  0  0

    That’s a lot of information, possibly confusing at first, so here’s an example:

    //127.0.0.1/public/backup /var/smbbackup cifs username=debian, password=password, uid=debianUser, gid=smbWrite, iocharset=utf8  0  0

    FYI: You can have multiple users (uid) and groups (gid) in the same fstab mount

    This is just a little impromptu how-to guide for something I occasionally forget, so I hope this helps someone!

  • How to Enable PCI Passthrough on Proxmox

    First, enable IOMMU on your motherboard (also known as VT-d for Intel chips), then boot to Proxmox.

    Access the shell of Proxmox and input the following:

    • Edit GRUB:
    nano /etc/default/grub
    • (For Intel Chips): Change ‘GRUB_CMDLINE_LINUX_DEFAULT=’ to:
    GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on"
    • (For AMD Chips): Change ‘GRUB_CMDLINE_LINUX_DEFAULT=’ to:
    GRUB_CMDLINE_LINUX_DEFAULT="quiet  iommu=pt"

    Save the changes using Ctrl+O and then exit using Ctrl+X

    • Run this command to update GRUB
    update-grub

    Reboot Proxmox

    You can verify the commands work by running:

    dmesg | grep -e DMAR -e IOMMU

    In your desired VM settings, you can now pass through your PCI device to the virtual machine