<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Mount on Michael’s Domain</title><link>https://jeltsch.org/en/tags/mount/</link><description>Recent content in Mount on Michael’s Domain</description><generator>Hugo</generator><language>en-us</language><copyright>Copyright © 2002 - 2026 Michael Jeltsch.</copyright><lastBuildDate>Fri, 24 Jul 2026 00:18:18 +0300</lastBuildDate><atom:link href="https://jeltsch.org/en/tags/mount/index.xml" rel="self" type="application/rss+xml"/><item><title>Directory hard links in Linux</title><link>https://jeltsch.org/en/directory_hard_links/</link><pubDate>Thu, 03 Jun 2021 00:00:00 +0000</pubDate><guid>https://jeltsch.org/en/directory_hard_links/</guid><description>&lt;p&gt;Directory hard links in Linux are forbidden because they would:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;create cycles in the directory hierarchy.&lt;/li&gt;
&lt;li&gt;break the assumption that directories form a tree.&lt;/li&gt;
&lt;li&gt;complicate deletion and reference counting.&lt;/li&gt;
&lt;li&gt;make filesystem traversal and maintenance much harder.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Instead, Linux allows hard links for regular files and symbolic links for both files and directories. To emulate something similar to directory hard links, you can mount any file system path into any other directory (&lt;em&gt;bind mount&lt;/em&gt;). However, you need to be careful because you can get the same problems as with directory hard links, namely circular and thus infinite file paths…&lt;code&gt;sudo mount --bind /home/user/Documents/Desktop/ /home/user/Desktop/&lt;/code&gt;. Such a link disappears after a reboot. If you want to make it permanent, you can add the mount to /etc/fstab:&lt;code&gt;/home/user/Documents/Desktop/ /home/user/Desktop none bind&lt;/code&gt;. Some say this does not work with LVM, but at least, on Ubuntu 20.04 it does. Obviously, this entry should be at the bottom of the fstab!&lt;/p&gt;</description></item><item><title>Mounting lvm2 manually</title><link>https://jeltsch.org/en/mounting_lvm2_manually/</link><pubDate>Fri, 02 Aug 2019 00:00:00 +0000</pubDate><guid>https://jeltsch.org/en/mounting_lvm2_manually/</guid><description>&lt;p&gt;All commands as sudo:&lt;/p&gt;
&lt;div class="codeblock syntax-highlight mb-3"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;vgscan (--mknodes)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;vgchange -ay (volumegroupname)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;(lvdisplay or lvs or ls -l /dev/volumegroupname/)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;mkdir -vp $PATH/{home,root} (to make a moint point)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;mount /dev/volumegroupname/home $PATH/home
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;mount /dev/volumegroupname/root $PATH/root
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;(ls -al $PATH/home)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;</description></item><item><title>Mounting group directories via the fstab</title><link>https://jeltsch.org/en/mounting_group_directories_via_the_fstab/</link><pubDate>Mon, 11 Feb 2019 00:00:00 +0000</pubDate><guid>https://jeltsch.org/en/mounting_group_directories_via_the_fstab/</guid><description>&lt;p&gt;At the University of Helsinki, one can apply for group directories, which is simply disk space on a NAS. These are easily mounted when you use a university-managed computer via the university menu, but what about if you use your own machine? At least for Ubuntu Linux, the way to mount these directories has changed multiple times during the years and it again broke recently. The current entry in the /etc/fstab file in my (Vanilla, non-university-managed) Ubuntu 16.04 is as follows:&lt;code&gt;# HY group directories//group2.ad.helsinki.fi/h204 /home/local_username/GROUP-drive cifs noauto,user,user=hy_username,nobrl,uid=1000,gid=1000,file_mode=0666,dir_mode=0777 0 0&lt;/code&gt;Then you can simply execute &amp;ldquo;mount /home/local_username/GROUP-drive&amp;rdquo; and you will be asked for your HY password. The number 2 and the string &amp;ldquo;h204&amp;rdquo; in the server address (group2.ad.helsinki.fi/h204) are specific for the cost center which is in this case H2042 (taking the first digit from the cost center string and first four characters from the cost center string, respectively).And here are some instruction on how to do it manually on a Macintosh:https://helpdesk.it.helsinki.fi/en/instructions/saving-and-sharing/group-storage-space/remote-access-home-and-group-directory-mac&lt;/p&gt;</description></item><item><title>Accessing shared folders in VirtualBox (Linux guest)</title><link>https://jeltsch.org/en/accessing_shared_folders_in_virtualbox_linux_guest/</link><pubDate>Fri, 28 Jul 2017 00:00:00 +0000</pubDate><guid>https://jeltsch.org/en/accessing_shared_folders_in_virtualbox_linux_guest/</guid><description>&lt;p&gt;Transferring files from the host to the guest OS and vice-versa doesn&amp;rsquo;t work out-of-the-box when you install 
 &lt;a href="https://www.virtualbox.org/" target="_blank" rel="noopener noreferrer nofollow"&gt;VirtualBox&amp;nbsp;






 
 
 
 &lt;svg class="svg-inline--fa fas fa-up-right-from-square fa-2xs" fill="currentColor" aria-hidden="true" role="img" viewBox="0 0 512 512" overflow="visible"&gt;&lt;use href="#fas-up-right-from-square"&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;
 from the Ubuntu repositories and download an Ubuntu VirtualBox image (e.g. from 
 &lt;a href="http://www.osboxes.org/virtualbox-images%29" target="_blank" rel="noopener noreferrer nofollow"&gt;http://www.osboxes.org/virtualbox-images)&amp;nbsp;






 
 
 
 &lt;svg class="svg-inline--fa fas fa-up-right-from-square fa-2xs" fill="currentColor" aria-hidden="true" role="img" viewBox="0 0 512 512" overflow="visible"&gt;&lt;use href="#fas-up-right-from-square"&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;
. After installing the guest additions, drag-and-drop didn&amp;rsquo;t seem to work for me and I needed to set up a &amp;ldquo;Shared Folder&amp;rdquo;. After setting it up via the GUI, it doesn&amp;rsquo;t automatically appear on the guest desktop. You need to mount it:&lt;code&gt;sudo mount -t vboxsf name(as_specified_via_VirtualBox_GUI) ~/mount_point_in_the_guest_OS/&lt;/code&gt;There are obviously many other ways how to achieve this (e.g. via Samba or sftp or sshfs)…&lt;/p&gt;</description></item><item><title>cryptsetup</title><link>https://jeltsch.org/en/cryptsetup/</link><pubDate>Sun, 25 Jan 2009 00:00:00 +0000</pubDate><guid>https://jeltsch.org/en/cryptsetup/</guid><description>&lt;p&gt;I switched already quite a while ago from the old cryptoloop technology to the newer cryptsetup technology. However, I still forget how to manually create and mount encrypted volumes, because I do this rarely. Here are the commands:&lt;code&gt;cryptsetup create cryptovolume /dev/mapper/logical_volumemount /dev/mapper/cryptovolume /mountpoint&lt;/code&gt;In this case I mapped a logical volume, but of course you can map physical volumes, too:&lt;code&gt;cryptsetup create cryptovolume /dev/sdb1mount /dev/mapper/cryptovolume /mountpoint&lt;/code&gt;&lt;/p&gt;</description></item><item><title>How to access encrypted volumes from live CDs</title><link>https://jeltsch.org/en/how_to_access_encrypted_volumes_from_live_cds/</link><pubDate>Sun, 25 Jan 2009 00:00:00 +0000</pubDate><guid>https://jeltsch.org/en/how_to_access_encrypted_volumes_from_live_cds/</guid><description>&lt;p&gt;Once you have decided to encrypt your hard drive, you might find yourself in the situation where you need to pull off data from it when the regular decryption mechanisms you use are not in place. E.g. when the OS is not booting or the drive has some physical problems. In that case you need to boot from a CD/DVD that supports the encryption technology that you used. In my case I need a live Ubuntu CD/DVD, preferably the same version that was used to encrypt the disk! Otherwise there might be incompatibilities:&lt;code&gt;sudo apt-get install lvm2 cryptsetupsudo modprobe dm-cryptsudo cryptsetup luksOpen /dev/sda2 crypt1 (result: key slot0 unlocked, command successful)sudo vgscan --mknodes (result: Found volume group &amp;quot;default&amp;quot;)sudo vgchange -ay (logical volumes become active)sudo mkdir /volume1, etc.sudo mount /dev/default/root1 /volume1&lt;/code&gt;&lt;/p&gt;</description></item><item><title>Mount Samba shares (why doesn't Nautilus work?) and making smb mounts permanent</title><link>https://jeltsch.org/en/mount_samba_shares_why_doesn_t_nautilus_work_and_making_smb_mounts_permanent/</link><pubDate>Sat, 26 May 2007 00:00:00 +0000</pubDate><guid>https://jeltsch.org/en/mount_samba_shares_why_doesn_t_nautilus_work_and_making_smb_mounts_permanent/</guid><description>&lt;p&gt;&lt;strong&gt;Mount Samba shares&lt;/strong&gt;Apparently it is very easy to connectfrom within Nautilus to Windows computers (or rather to computers running smb services). The only thing you have to do is to type smb:/// into the URL bar and the network is browsed for available domains, workgroups and services. However when one tries to open some files (e.g. some image) there often appears the error message that those files cannot be accessed via samba.What to do? I figured that when you mount smb shares, that this works correctly. In order to mount my user directory on another computer this is the command:&lt;code&gt;sudo mount -t smbfs -o username=michael,password=here_goes_my_password //paula/michael /mnt/smb&lt;/code&gt;paula is the netbios name of the other computer and michael is the name of the share.You can also set the owner of all the files of the mounted file system with the -o uid=owner option:&lt;code&gt;sudo mount -t smbfs -o username=michael,password=here_goes_my_password -o uid=500 //paula/michael /mnt/smb&lt;/code&gt;If you don&amp;rsquo;t want to type your password, you can save it in a file like this:&lt;code&gt;username=susannepassword=0sdf7b&lt;/code&gt;and then you can refer to this &amp;ldquo;credentials&amp;rdquo; file:&lt;code&gt;sudo mount -t smbfs -o username=susanne,credentials=/home/susanne/.smbpasswd //patolmac217/susanne /mnt/smb&lt;/code&gt;In order to unmount use:&lt;code&gt;sudo umount /mnt/smb&lt;/code&gt;This mostly fails as you are likely to have some open windows/terminals that keep the connection active. Close them and try again. You also might try umount -f.&lt;strong&gt;Making smb mounts permanent&lt;/strong&gt;When you mount an SMB share, it will be gone upon system restart. To make it mount automatically during system bootup, you have to create a new entry in the /etc/fstab file. In my case e.g.:&lt;code&gt;//paula/michael /mnt/smb smbfs credentials=/home/jeltsch/.smbpasswd 0 0&lt;/code&gt;In the .smbpasswd file is my username and my password. Probably not very safe, but who cares? .smbpasswd should be anyway only readable by yourself!&lt;/p&gt;</description></item><item><title>Mounting disk image files and encrypted filesystems/partitions</title><link>https://jeltsch.org/en/mounting_disk_image_files_and_encrypted_filesystems_partitions/</link><pubDate>Sat, 26 May 2007 00:00:00 +0000</pubDate><guid>https://jeltsch.org/en/mounting_disk_image_files_and_encrypted_filesystems_partitions/</guid><description>&lt;p&gt;To dump a disk (or a partition) into a file, you use the following command:&lt;code&gt;dd if=/dev/hda3 of=file.bin&lt;/code&gt;This command writes the complete data on the hda3 partition into the file file.bin.To mount the filesystem that is in the file, you need to create a loopback device:&lt;code&gt;losetup /dev/loop0 file.bin&lt;/code&gt;Now you can mount the filesystem as usual:&lt;code&gt;mount -r -t filesystemtype /dev/loop0 /mnt/mountpoint&lt;/code&gt;Apparently, one can combine the last two commands into one:&lt;code&gt;mount -t filesystemtype -o loop ./file.bin /mnt/mountpoint&lt;/code&gt;If you want to encrypt the data on a file, that contains a whole filesystem, it is getting a bit more complicated:&lt;code&gt;sudo mkdir /mnt/secure (create mount point for the filesystem)dd if=/dev/zero of=path/to/file bs=1k count=409600 (create an empty file with 400 MB size) sudo /sbin/losetup -e xor /dev/loop0 path/to/file/sbin/mkfs -t ext2 /dev/loop0 409600 (format the device as ext2)sudo mount -t ext2 /dev/loop0 /mnt/secure (mount the device file)cd /mnt/securechown username . (change the owner of the top level directory of the filesystem)&lt;/code&gt;If you want to unmount the filesystem:&lt;code&gt;sudo umount /dev/loop0&lt;/code&gt;If you want to get rid of the filesystem, you have to un-associate it from the loop device 0: &lt;code&gt;/sbin/losetup -d /dev/loop0&lt;/code&gt;For some reason RedHat 9 doesn&amp;rsquo;t come with DES support, so for the time being (until I patch the kernel or move to Suse Linux) I am using the faster, but much weaker xor encryption.Suse 9 comes with inbuilt strong encryption and offers already during the installation the possibility to create an encrypted partition. Suse 9 asks during booting for the passphrase to mount the encrypted filesystem. The boot process stops and waits for 2 minutes before continuing if you don&amp;rsquo;t type in the password. In order to reduce this time, you can edit the file /etc/init.d/boot.crypto. Change in the following line 120 to e.g. 10:&lt;code&gt;:${TIMEOUT:=120}&lt;/code&gt;If you have missed your chance to type in the passphrase during boot time, you can mount the encrypted partition as follows:&lt;code&gt;/sbin/losetup -e twofish /dev/loop0 /dev/hda7 mount /dev/loop0 /media/conf&lt;/code&gt;BTW: The information about encrypted filesystems resides in /etc/cryptotab.&lt;/p&gt;</description></item><item><title>How to mount a NFS export</title><link>https://jeltsch.org/en/how_to_mount_a_nfs_export/</link><pubDate>Wed, 23 May 2007 00:00:00 +0000</pubDate><guid>https://jeltsch.org/en/how_to_mount_a_nfs_export/</guid><description>&lt;p&gt;&lt;code&gt;sudo mount -t nfs -o rw server:/var/www /webserver&lt;/code&gt;or&lt;code&gt;mount server:/var/www /webserver&lt;/code&gt;The mount can be put into /etc/fstab, e.g.:&lt;code&gt;server:/var/www /webserver nfs rsize=8192,wsize=8192,timeo=14,intr,user&lt;/code&gt;This doesn&amp;rsquo;t mount the nfs export automatically during startup, but any user can mount it by executing &amp;ldquo;mount /webserver&amp;rdquo;. Be aware that if you have mounted another filesystem under /var/www (e.g. if you keep all html data on a seperate partition like /var/www/htdocs), these won&amp;rsquo;t be available unless you export the partition&amp;rsquo;s mountpoint seperately!&lt;/p&gt;</description></item><item><title>Formating an mounting an external firewire reiserfs disk</title><link>https://jeltsch.org/en/formating_an_mounting_an_external_firewire_reiserfs_disk/</link><pubDate>Mon, 21 May 2007 00:00:00 +0000</pubDate><guid>https://jeltsch.org/en/formating_an_mounting_an_external_firewire_reiserfs_disk/</guid><description>&lt;p&gt;I didn&amp;rsquo;t know how to format an unformatted drive under Linux. I attached a firewire case with an old 12 GB Macintosh-formatted HD to my computer. In order to format it with reiserfs, I used Yast2. I had to go to expert mode and rewrite the partition table. By this action Yast2 puts an entry into the fstab, that I modified to:&lt;code&gt;/dev/sda1 /media/firewire reiserfs noauto,user 0 0&lt;/code&gt;since I don&amp;rsquo;t want to have it connected every time I boot up. Instead I can now mount it as a regular user manually with:&lt;code&gt;mount /media/tmp/&lt;/code&gt;To make the drive writable to normal users (or to whomever you want to grant access) you need to change the ownership and/or permissions of the mountpoint:&lt;code&gt;chmod -R a+rwx /media/firewire&lt;/code&gt;&lt;/p&gt;</description></item><item><title>smb mounts via fstab or automount?</title><link>https://jeltsch.org/en/smb_mounts_via_fstab_or_automount/</link><pubDate>Mon, 21 May 2007 00:00:00 +0000</pubDate><guid>https://jeltsch.org/en/smb_mounts_via_fstab_or_automount/</guid><description>&lt;p&gt;I have many computers I need to connect to from my Linux box. Network browsing works, but is terribly slow, so I want to create some shortcuts, that I can mount with a single mouseclick what I need from a list. First I thought to modify the fstab and put there entries that would allow me to easily mount smb shares as a normal user. E.g.:&lt;code&gt;//paula/michael /media/smbmounts smbfs noauto,user,credentials=/home/jeltsch/.smbpasswd1 0 0&lt;/code&gt;This works if I have the entry mounted at system startup (without the &amp;ldquo;noauto&amp;rdquo; entry). If the &amp;ldquo;noauto&amp;rdquo; entry is present, the smb share is not mounted at system startup, but must explicitely be mounted by the following command:&lt;code&gt;mount /media/smbmounts&lt;/code&gt;Because of the &amp;ldquo;user&amp;rdquo; option in the fstab, every regular user should be able to do this. Not so! First I had to enable the &amp;ldquo;suid&amp;rdquo; for the smbmnt command (it appeared to be in /usr/bin/smbmnt, but was linked to a link that linked to /usr/lib/samba/classic/smbmnt:&lt;code&gt;chmod +s /usr/lib/samba/classic/smbmnt&lt;/code&gt;Then I found contradicting information whether the mountpoint (in my case /media/smbmounts) has to owned by the mounting user or not. To be safe it did:&lt;code&gt;chown jeltsch /media/smbmounts&lt;/code&gt;Still I got an error which I couldn&amp;rsquo;t figure out and I decided to use automounts.&lt;/p&gt;</description></item><item><title>How to mount a partition formatted with UFS (UNIX file system) and the partitioner included with the MacOS X installer</title><link>https://jeltsch.org/en/how_to_mount_a_partition_formatted_with_ufs_unix_file_system_and_the_partitioner_included_with_the_macos_x_installer/</link><pubDate>Thu, 29 Mar 2007 00:00:00 +0000</pubDate><guid>https://jeltsch.org/en/how_to_mount_a_partition_formatted_with_ufs_unix_file_system_and_the_partitioner_included_with_the_macos_x_installer/</guid><description>&lt;p&gt;fdisk is not really able to read the partition table that the Macintosh installer writes. To figure out what you have you can e.g. use the Yast partitoning tool. &lt;code&gt;mount -t ufs -o ufstype=openstep -o ro /dev/sda3 /media/misc&lt;/code&gt;&lt;/p&gt;</description></item><item><title>Creating and mounting iso images (CD image files) under linux (dd)</title><link>https://jeltsch.org/en/creating_and_mounting_iso_images_cd_image_files_under_linux_dd/</link><pubDate>Sat, 23 Dec 2006 00:00:00 +0000</pubDate><guid>https://jeltsch.org/en/creating_and_mounting_iso_images_cd_image_files_under_linux_dd/</guid><description>&lt;p&gt;Creating and mounting iso images under linux is very easy.Creating:&lt;code&gt;dd if=/dev/cdrom of=filename.iso&lt;/code&gt;Mounting:&lt;code&gt;sudo mount -o loop -t iso9660 filename.iso /mnt/iso&lt;/code&gt;The file endings iso, raw and cdr denote all iso files. Image files with the bin/cue ending, however, are not iso files. You can convert them into iso files with 
 &lt;a href="http://he.fi/bchunk/" target="_blank" rel="noopener noreferrer nofollow"&gt;bchunk&amp;nbsp;






 
 
 
 &lt;svg class="svg-inline--fa fas fa-up-right-from-square fa-2xs" fill="currentColor" aria-hidden="true" role="img" viewBox="0 0 512 512" overflow="visible"&gt;&lt;use href="#fas-up-right-from-square"&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;
. bchunk needs the cue file to do this! Allthough some non-Linux burning applications (e.g. Toast Titanium for MacOS) can handle (burn and convert) the bin file without the cue file.&lt;/p&gt;</description></item></channel></rss>