Hot answers tagged

88

This question is answered as part of the answer to other questions, but it deserves canonical treatment here so it does not have to keep being repeated. You can't mount the image as a whole because it actually contains two partitions and a boot sector. However, you can mount the individual partitions in the image if you know their offset inside the file. ...


25

losetup provides partition probing through -P. Using this makes mounting partitions of a full disk image such as the Raspbian SD card image very easy: losetup -P /dev/loop0 raspbian.img mount /dev/loop0p2 /mnt mount /dev/loop0p1 /mnt/boot


19

Found this article -> Mount a Raspberry Pi SD card on a Mac (read-only) with osxfuse and ext4fuse, It worked like a charm. Here is the commands I ran om my mac: brew cask install osxfuse brew install ext4fuse sudo mkdir /Volumes/rpi sudo ext4fuse /dev/disk2s2 /Volumes/rpi -o allow_other sudo cp /Volumes/rpi/home/pi/Pictures/* /Users/me/work/raspi/Pix/ I ...


19

try reversing the slashes and pointing to the root mnt folder sudo mount -t cifs -o username=USERNAME,password=PASSWORD //192.168.2.12/TestShare /mnt/ if your password or username contains special characters try simplifying them.


18

After alot of research I could fix my Problem with usbmount: Adding ntfs to usbmount Install usbmount with sudo apt-get install usbmount. Install NTFS driver package ntfs-3g with sudo apt-get install ntfs-3g. Configure usbmount to mount specified filesystems by opening the usbmount file with sudo nano /etc/usbmount/usbmount.conf. In here there is a line ...


16

Disk drives are distinguished by their UUID(universally unique identifier). You can find the UUID of your HDs with the command ls -l /dev/disk/by-uuid/ Then you must create the mount points sudo mkdir /MOUNT/POINT1 and change the permissions of them sudo chmod 775 /MOUNT/POINT1 Then you add a line to your fstab file (which is located at /etc/fstab) wich ...


14

Put it in fstab. sudo su mkdir /mnt/timecapsule echo "//timeCapsuleIp/Data /mnt/timecapsule cifs user=timecapsuleUsername,pass=timecapsuleUserPassword,rw,uid=1000,iocharset=utf8,sec=ntlm 0 0" >> /etc/fstab Required cifs-utils package should be already provided on raspbian. Of course change timecapsuleUsername and timecapsuleUserPassword. The uid=...


13

I faced the same issue with Raspberry Pi 4 and Raspbian Buster, the solution for me was to modify the following file: /lib/systemd/system/systemd-udevd.service Before: PrivateMounts=yes After: PrivateMounts=no Then I rebooted and it was OK ;)


12

Raspbian 5/5/2015, the version I am working with, comes with read support for NTFS. Presumably earlier versions over the past year or two probably have this as well, but much past 2 years, I don't think they do. On a default install of Raspbian, the OS will automount your NTFS drive as read-only to /media with the NTFS volume name as a folder name. This ...


11

Because Raspbian is based on Debian, I suggest you to create a permanent system-specific configuration file according to the definitions as given in Debian's policies (see https://www.debian.org/doc/debian-policy/ch-files.html#configuration-files). Buster has a solid configuration for systemd and udev placed in the package's library files at /lib/systemd/...


9

There are a few things that you need to do to get this to work. First, after physically connecting the drive, run dmesg to see the name of the node in /dev. You should find something like this: [ 5155.744879] usb-storage 1-1.4.3:1.0: USB Mass Storage device detected [ 5155.753654] scsi host1: usb-storage 1-1.4.3:1.0 [ 5157.013418] scsi 1:0:0:0: Direct-...


9

have you rebooted your Pi after installing the utils? I had the same issue with my fstab file and it got resolved with a reboot of my Pi.


8

So, I found a solution that works quite well. Big thanks to avanc and his udev rule that makes this possible. I also modified it so that it could mount up to 4 flash drives at the same time (it can be increased if needed). Requirements Install pmount if not installed sudo apt-get install pmount This script mounts drives to /media/usb*, so make sure those ...


7

This is strictly a generic Linux question, but the answer anyway is partition UUIDs (Universally Unique Identifiers). Like the name says on the tin, when a partition is formatted, a random unique ID is generated that describes it. You can use this to mount to ensure that you always get the correct partition. The blkid command gives a list of UUIDs for ...


6

My version based on the answer above: Systemd service Put: [Unit] Description=Mount USB sticks BindsTo=dev-%i.device After=dev-%i.device [Service] Type=oneshot RemainAfterExit=yes ExecStart=/usr/local/bin/automount %I ExecStop=/usr/bin/pumount /dev/%I in /lib/systemd/system/usbstick-handler@.service Mount script Put: #!/bin/bash PART=$1 FS_LABEL=`lsblk -o ...


6

Should I be concerned about any particular type of wood when working with electronics? Not really. As long as it is dry, you keep some clearance between the wood and Pi, and you do not completely seal of the enclosure you should be fine. Is there any mounting plates I'll need for the monitor/Raspberry Pi 3? Not sure about the monitor but if you want to ...


6

There are mainly two reasons for the error message: 1. The partition is not of type ext2, ext3, ext4 2. You don't match the starting sector of the partition You don't need to create a /dev/loop0 device. You can mount the image direct. You should do to limit error possibilities. I use parted because it shows me the partition type. For the latest Raspbian ...


5

I got adding sec=ntlm to the options, the complete command is: sudo su mkdir /mnt/timecapsule echo "//timeCapsuleIp/Data /mnt/timecapsule cifs user= timecapsuleUsername,pass= timecapsuleUserPassword,rw,uid=1000,iocharset=utf8,sec=ntlm 0 0" >> /etc/fstab Then, run this command: mount -a You should no get any errors.


5

I was having this problem too (unable to mount Windows shares at boot). I found an option in the Raspberry Pi Configuration tool that fixed my problem. 1) Start X Windows (startx from terminal shell). 2) Click "Menu" button 3) Select Preferences->Raspberry Pi Configuration 4) Select the System tab 5) There is an option called "Network at Boot". Check the ...


5

The auto-mounting of USB devices in Raspberry Pi is handled by the GUI/DE (as suggested helpfully by multiple folks here), which is based on LXDE, and specifically, it's controlled by PCManFM, the file manager. To disable this behavior, open the File Manager, and from the Edit menu, choose Preferences. Pick the Volume Management tab/item. The second ...


5

Here's how to overcome this issue: sudo mount //192.168.1.250/PASSPORT2TB ~/mntPassport -o username=guest,password=,vers=1.0 That said, be aware that there appear to be some "issues" and new twists in the code in Raspbian "Stretch": Whereas Jessie & earlier were happy with username or user, Stretch insists upon username The man ...


5

Ok, I fixed it. I just had to add a 1 in /dev/sda to make it read /dev/sda1.


4

Update for users of Raspberry Stretch v9. Note the addition of vers=1.0 //IPofTimeCapsule/PathWithinYourTimeCapsule /mnt/TimeCapsule cifs username=insert,password=insert,rw,uid=1000,iocharset=utf8,sec=ntlm,vers=1.0 0 0


4

Here's how I did it yesterday on Raspbian: Create a directory /etc/samba/credentials Create a file /etc/samba/credentials/myserver In the myserver file, put the credentials for that server: username=myusername password=mypassword Note: spaces are important here – don’t use " = ", use "=". # chown -R root.root /etc/samba/credentials # chmod 700 /etc/samba/...


4

Utilize Microsoft's Common Interface File System (cifs) - the core of Microsoft's LAN Manager. (You can safely skip this tech info and proceed with the steps listed below) https://technet.microsoft.com/en-us/library/cc939973.aspx The Common Internet File System (CIFS) is the standard way that computer users share files across corporate intranets and the ...


4

The problem you have is that the manually added /etc/fstab entry is enumerated by kernel device name rather than UUID. When a block device is detected by the kernel, it is assigned a name such as sda or sdb. The partitions are assigned sequential numbers such as sda1 sda2 or sdb1 sdb2. These are assigned according to when the kernel detects a device and ...


4

Solved. I was missing leading / vers=1.0 may have helped Drive had two logical names. S-Drive wasn't working. Seagate was. Use: sudo mount --verbose -o username=John,password=********,vers=1.0 //192.168.1.1/Seagate /home/pi/SEAGATE/share/


4

You can repair most such problems on the Pi by rebooting to a root shell. Append init=/bin/sh at the end of cmdline.txt and reboot. After booting you will be at the prompt in a root shell. Your root file system is mounted as readonly now, so remount it as read/write mount -n -o remount,rw / You can then edit files. If you don't get a prompt then ...


4

If you want to edit files on the root partition, an easy way is to download some Linux distribution (Ubuntu for example) flash it to an USB stick and boot from it. Here is a tutorial how to do it. When you successfully booted Ubuntu you can edit your fstab with sudoedit /media/ubuntu/rootfs/etc/fstab If you want to edit it from "Files" hit Ctrl + l and ...


4

I don't think the Pi model is a factor here. When you made your backup, did you select New partition UUIDs? If not, that's likely the problem. SD Card Copier help says this: Under Raspbian Stretch and later versions, you cannot mount two partitions with the same UUID, so you will not be able to mount a cloned SD card when booted from the disk from which ...


Only top voted, non community-wiki answers of a minimum length are eligible