We’re rewarding the question askers & reputations are being recalculated! Read more.

Hot answers tagged

71

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. ...


26

/dev/mmcblk0p2 is the root file system, so it is not easily unmounted. It could probably be re-mounted as read-only, but a simpler way is to schedule a fsck at the next reboot. sudo touch /forcefsck then reboot. Or reboot with shutdown -rF now which does the same. (from https://superuser.com/questions/401217/how-to-check-root-partition-with-fsck) ...


20

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


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 ...


15

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 ...


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=...


14

Using fdisk: fdisk /dev/sda Type n to create a new partition. Type p to make a primary partition. Next press enter when prompted for a partition number to choose the next available. Press enter again to pick the next available sector to start the partition. Press enter again to use all of the remaining disk space. Type w to save the changes. Fdisk ...


13

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 ...


13

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.


12

The Hard Way Read my other answer on Is it possible to update, upgrade and install software before flashing an image?. You need to calculate the offset of the filesystem you wish to mount. The Easy, yet experimental way Consider using my new utility piimg. Just build and run $ sudo ./piimg mount archlinuxarm-13-06-2012.img /mnt NOTE This hasn't been ...


11

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 ...


10

If you're interested in the drives mounting automatically when you plug them in then you can try installing usbmount: sudo apt-get install usbmount When you insert a flash drive it will detect and mount it to /media/usb[0-7] and will unmount it when it is removed. Note: You will want to edit your /etc/usbmount/usbmount.conf To configure automounting as ...


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

After plugging in your flashdrive. Run the following command: grep "SCSI removable disk" /var/log/messages you should see something like the following Jun 16 23:48:58 raspberrypi kernel: sd 2:0:0:0: [sda] Attached SCSI removable disk The important part is the bit in the square brackets, in this case "sda" next enter the following command to create a ...


7

The system is intended to log data to a FAT32 USB stick, which may be unplugged, replugged or replaced at any time. The unplugged part of that is problematic. AFAIK, no computer system anywhere promises you the right to yank a USB stick out unannounced at any point without potential problems. So you will have to think about how to get around that. I ...


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 ...


7

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-...


6

While I don't have Arch Linux to check if this, it's probably mounted by kernel itself and never remounted. You can check your /proc/cmdline and you should see something like root=/dev/mmcblk0p2 and rootfstype=ext4 options. You can set them in /boot/cmdline.txt file. First one specifies which device (partition) should be mounted as root device, second one ...


6

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 ...


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=`...


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 ...


5

Unbelievable, there is a typo here: /dev/mmcblk0p1 /boot vfat defaults 0 0 /dev/mmcb1k0p4 /home ext4 defaults 0 0 ^ It should be an l not a 1.


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 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 ;)


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

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 ...


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

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 ...


4

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 page for mount.cifs ...


4

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


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