
- #How to format usb drive on raspberry pi install#
- #How to format usb drive on raspberry pi torrent#
- #How to format usb drive on raspberry pi windows#
Test: you should be able to connect from another computer and test read/write, folder creation etc.By default, the Raspberry Pi boots from a microSD card. Note user configuration (security) has a separate section, also Samba users are described elsewhere. Restart the Samba service: (jessie: doesn’t work anymore, 'rvice is masked'). Enough to say, setup 'wins' and domain name, then add a shared folder definition for your data as seen below: We have a section to configure Samba elsewhere. Update and install Samba, then lauch it's configuration file Optional: you can do a cleanup now to reduce the system size so it contains only the necessary parts: check the dedicated section to learn more NOTE Now we share our new created drive with Samba in the next steps dev/sda2 /mnt/datadrive ext4 defaults 0 2Ĭomment out the following line which refers to the SD card: #/dev/mmcblk0p2 / ext4 defaults,noatime 0 1
Modify fstab to mount our drives on startupĪnd add the following lines (substitute 'datadrive' with your own name): /dev/sda1 / ext4 defaults,noatime 0 1. Sudo cp /boot/cmdline.txt /boot/cmdline.origĪdjust this to read: dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/sda1 rootfstype=ext4 elevator=deadline rootwait rootdelay=5 We are not done yet: now we configure the system to boot into the new system drive. This will take some time - go and get yourself a coffee :) Copy system data to the system drive: systemdrive. To confirm the drives have been created, run df -h NOTE: In this scenario we have created the new drives as systemdrive and datadrive respectively. Now the partition table has been created, we format all drives (in the below example the system drive and the data drive) as linux ext4 Write the changes by pressing w once doneįormat the drives. Repeat this step for all partitions you wish to create Create a second partition for your data (again, primary). Create a primary partition: Use n, then p. Enter the fdisk utility for the appropriate device ('sda'). Typically, your USB storage would be identified as sda: We will assume this is the case in further documentation. NOTE: you can find your devices in many other ways: try for instance lsblk Figure out first which drive is your USB. The second will be used for data of your choice.
As mentioned, the system partition is going to be used mainly for preserving the life of your SD card. For this scenario, we will setup two: one for system, one for data. Now is the time to tweak the mentioned memory setting to 16 MB (via raspi-config)
Login remotely using your credentials of a SUDO user.Note that using a USB hub might bring some issues, it is a good idea to plugin this USB stick directly into RasPi (after all it boots a system).If it contains data however, make sure it is backed up: we will wipe it Plugin a USB stick with big enough storage for your purpose (note you need to extract 4GB for the system, as described below).If you are going to continue headless, you can change the amount of graphics memory to something like 16 megabytes. Start with a fresh Raspbian setup (described in the section Raspberry Pi Headless Setup (of course this will work with headed setup as well).You might want to save some time if you want something more simple. This configuration is more complex than others shared elsewhere.
Make sure your usage scenario corresponds to what you want to achieve.
The data partition (or part of it) is shared over the network. This includes the system itself and a data partition A Raspbian base setup is moved to a USB drive, to extend the life of the SD card (by avoiding frequent reads and writes to the system, caches etc.). As a typical setup is on 2 partitions (usually 'System' and 'Data'), we will do so as well. This is a snippet of configuration for many usecases: running a torrent server, running a media share etc.
This section describes configuring a fresh RasPi installation to be run from USB and to have content shared over networks (including Windows networks).