Hardware Reference
In-Depth Information
Disk /dev/sda: 1037 MB, 1037041664 bytes
2 heads, 63 sectors/track, 16075 cylinders, total 2025472 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0101bc87
Device Boot Start End Blocks Id System
/dev/sda1 * 32 2025471 1012720 6 FAT16
The first disk, /dev/mmcblk0 , is the SD card in the Raspberry Pi. The second, /dev/
sda/ , is a USB flash drive we put in one of the Pi's USB connections to use as the
example shared storage. Create a mount directory for the drive:
$ mkdir /mnt/PiShare
To see whether you were successful, run ls /mnt , and you should see PiSamba listed.
Open /etc/fstab in your favorite text editor, so you can tell it to connect to PiSamba
at boot:
$ sudo vi /etc/fstab
The contents of the file will look something like this:
#
# /etc/fstab
# Created by anaconda
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
LABEL="rootfs" / ext4 defaults,noa
time 1 1
LABEL="boot" /boot vfat noauto,com
ment=systemd.automount 1 2
/swap0 swap swap
Add the following line at the bottom:
/dev/sda1 /mnt/PiShare vfat defaults 0 0
For the first part, use the device name you saw listed when you ran fdisk (in this
example, /dev/sda/ ). Be sure to change PiSamba if you used a different name for your
mount, and make ntfs-3g whatever type of hard drive format you used. Save the file,
exit, and mount the share:
$ mount -a
Search WWH ::




Custom Search