From e1de4b81323ad07dffb99f8005a40e3f772c7854 Mon Sep 17 00:00:00 2001 From: tiyn Date: Sat, 7 Jan 2023 04:22:25 +0100 Subject: [PATCH] mounting: samba/ntfs/dislocker added --- wiki/docker-images/samba.md | 2 ++ wiki/linux/dislocker.md | 48 +++++++++++++++++++++++++------------ wiki/linux/filesystems.md | 36 ++++++++++++++++++++++++++++ wiki/linux/ntfs.md | 30 +++++++++++++++++++++++ wiki/linux/samba.md | 27 +++++++++++++++++++++ wiki/samba.md | 15 ++++++++++++ 6 files changed, 143 insertions(+), 15 deletions(-) create mode 100644 wiki/linux/filesystems.md create mode 100644 wiki/linux/ntfs.md create mode 100644 wiki/linux/samba.md create mode 100644 wiki/samba.md diff --git a/wiki/docker-images/samba.md b/wiki/docker-images/samba.md index 7164f33..1a5696f 100644 --- a/wiki/docker-images/samba.md +++ b/wiki/docker-images/samba.md @@ -1,5 +1,7 @@ # samba +This is a docker container for a [Samba](../samba.md) +server. The official container and documentation was made by [dperson](https://hub.docker.com/r/samba). ## Set-up diff --git a/wiki/linux/dislocker.md b/wiki/linux/dislocker.md index fa9395f..c1df354 100644 --- a/wiki/linux/dislocker.md +++ b/wiki/linux/dislocker.md @@ -10,9 +10,12 @@ package. ## Usage -For the mounting to work two directories are required. +### Manual Mounting of Bitlocker Partition + +For the [mounting](/wiki/linux/filesystems.md#mounting) to work two directories +are required. One to mount the `dislocker-file` (`/mnt/bitlocker`) and one to mount the -windows volume (`/mnt/windows`). +[windows volume](/wiki/linux/ntfs.md#manual-mounting) (`/mnt/windows`). The device which holds the windows partition is assumed to be calles `/dev/sdc1`. @@ -20,18 +23,33 @@ The following command mounts the `dislocker` file to `/mnt/bitlocker`. Make sure to replace the password in the following command. There is no gap between the `-u` and the password: `sudo dislocker /dev/sdc1 -u -- /mnt/bitlocker`. - +If the Bitlocker partition is set up using a `.BEK` file then the follwing +command takes the path to the file in: +`sudo dislocker /dev/sdb2 -f -- /mnt/bitlocker` Alternatively a recovery key can be used: -`sudo dislocker /dev/sdc1 -p -- /mnt/bitlocker`. - -Afterwards the `dislocker-file` can be mounted to the `/mnt/windows` directory: -`sudo mount -o loop /mnt/bitlocker/dislocker-file /mnt/windows`. -It is possible that the partition uses the NTFS which requires the `ntfs-3g` -package to be installed to work with linux and specified in the command: -`sudo mount -t ntfs-3g -o loop /mnt/bitlocker/dislocker-file /mnt/windows`. -If the partition to mount is bootable or contains a windows system the -hibernation and fast boot have to be disabled to mount the partition with write -access. - -Following these commands the windows partition can be found mounted on +`sudo dislocker /dev/sdc1 -p -- /mnt/bitlocker`. + +Afterwards the `dislocker-file` can be mounted to the `/mnt/windows` directory +or another mount point as described in the +[NTFS entry](/wiki/linux/ntfs.md#manual-mounting). + +### Automatic Mounting at Boot + +Using [fstab](/wiki/linux/filesystems.md#mounting) the partition encrypted with +Bitlocker can be automatically mounted. +The following lines have to be adapted and written into +[`/etc/fstab`](/wiki/linux/filesystems.md#mounting). +In this case the intermediary dislocker file `dislocker-file` is mounted to +`/mnt/bitlocker`. + +```txt +UUID= /mnt/bitlocker fuse.dislocker bekfile=,nofail 0 0 +``` + +After that a line to mount the `dislocker-file` as a [NTFS](./ntfs.md) partition +has to be added as described in +[the NTFS entry](/wiki/linux/ntfs.md#automatic-mounting). +In this case the specified partition to mount is +`/mnt/bitlocker/dislocker-file`. +The mount point can be chosen according to preference - for example `/mnt/windows`. diff --git a/wiki/linux/filesystems.md b/wiki/linux/filesystems.md new file mode 100644 index 0000000..9dba5c7 --- /dev/null +++ b/wiki/linux/filesystems.md @@ -0,0 +1,36 @@ +# File Systems + +File systems control how data on a drive is stored. + +- [NTFS](./ntfs.md) is a proprietary file system used by Windows +- [Samba](./samba.md) is free windows interoperability software that is not a + classic file system can be mounted so it will be mentioned here + +## Mounting + +Mounting a file system makes the files of it accessible to the user. +The command `mount` is used to manually and temporarily mount file systems. +Automatic mounting is done by changing the file `/etc/fstab`. + +The exact guide on how to mount specific file systems can be found in their +respecitive wiki entries. +The following describes the general basics of mounting temporarily and +persistently. + +The basic mount command for temporarily accessing a file system is the +following: +`mount ` +All partitions can be found at `/dev` and the standard mount point is `/mnt` and +its subfolders. + +For automatic mounting the following line has to be adapted and added to the +file `/etc/fstab` +` ` +The partition can be specified by UUID - which can be found at +`/dev/disk/by-uuid` or other identifiers aswell as the simple path to it (for +example `/dev/sda1`). +The file system varies and a file system specific guide on how to mount them +can be found in their respective entries. +The dump flag signals if the file system should be dumped. +The `fsck` order signals if a file system should be checked at boot. +Boot partitions should be flagged with a `1` for this reason, otherwise `0`. diff --git a/wiki/linux/ntfs.md b/wiki/linux/ntfs.md new file mode 100644 index 0000000..3f39554 --- /dev/null +++ b/wiki/linux/ntfs.md @@ -0,0 +1,30 @@ +# NTFS + +NTFS is the proprietary [file system](./filesystems.md) of Windows. + +## Setup + +For the usage of NTFS file systems the `ntfs-3g` package - available on most +distributions - has to be installed. + +## Usage + +### Manual Mounting + +Partitions using [NTFS] can be mounted on Linux based operating systems by +running the following command: +`mount -t ntfs-3g -o loop `. +If the partition to mount is bootable or contains a windows system the +hibernation and fast boot have to be disabled to mount the partition with write +access. + +### Automatic Mounting + +For the usage of NTFS file systems the `ntfs-3g` package - available on most +distributions - has to be installed. +To automount partitions with NTFS the following line has to be adapted and added +to `/etc/fstab`: +` ntfs-3g nofail,windows_names,big_writes 0 0` +If the partition to mount is bootable or contains a windows system the +hibernation and fast boot have to be disabled to mount the partition with write +access. diff --git a/wiki/linux/samba.md b/wiki/linux/samba.md new file mode 100644 index 0000000..7afc87f --- /dev/null +++ b/wiki/linux/samba.md @@ -0,0 +1,27 @@ +# Samba + +[Samba](../samba.md) is the standard Windows interoperability suite for linux +and unix. + +## Usage + +### Manual Mounting + +The mounting of Samba shares requires a package containing `mount.cifs` in many +distributions packaged in the `cifs-utils` package to be installed. +Samba shares then can be mounted by adapting and running the following example: +`mount -t cifs /// -o username=,password=` + +### Automatic Mounting + +The mounting of Samba shares requires a package containing `mount.cifs` in many +distributions packaged in the `cifs-utils` package to be installed. +To automount Samba shares the following line has to be adapted and added +to `/etc/fstab`: +`/// cifs,nofail credentials= 0 0`. +An authentication file looks like the following: + +```txt +username= +password= +``` diff --git a/wiki/samba.md b/wiki/samba.md new file mode 100644 index 0000000..b127380 --- /dev/null +++ b/wiki/samba.md @@ -0,0 +1,15 @@ +# Samba + +[Samba](https://www.samba.org/) is a free software implementation of the SMB +protocol which provides file and print services. +Samba is the standard Windows interoperability suite for Linux and Unix. + +## Setup + +The software can be setup via docker with the +[samba image](./docker-images/samba.md). + +## Usage + +For the Linux based operating systems the handling of Samba shares is taken care +of by [mount.cifs](./linux/samba.md).