[last updated: 2018-01-02]
rPi home page
2024-10-07 re-install software
-----
This box has an add-on board that provides a power button and an interface to an mSATA SSD card.
I got a Samsung 850 EVO mSATA 500gb SSD (from NewEgg). This page is the steps I went through to get the box and the SSD up and running. Initially my goal is just to use it as storage for all my files (ie. excluding system files). Eventually I want to make it bootable and eliminate the SD card completely. There may be an intermediate configuration: boot from SD card, but move all system and personal files to SSD. This greatly reduces wear on SD card and extends its life.
- - - - - - - - - -
- Initial:
- Create directory - mounting location:
- Set up file system and partitions:
- There seem to be at least a couple of ways to do this. The most often recommended is using a GUI utility to create and manage partitions called GParted
- Best guess is that gparted is included in the pidesktop-base...deb previously downloaded, so all you need to do is:
$ sudo apt-get install gparted
- Instructions say you can "run it from the menu of your Raspbian OS ..." but I couldn't figure out how to do that.
But this worked:
$ sudo gparted
- gparted GUI opened.
In upper right of screen is a box to select the device. Selected /dev/sda
Device > Create Partition Table > Apply
Seemed to do something, progress bar scrolled, but after done, still shows "unallocated" in partitions and file system column, and lsblk shows no partitions.
OTOH, in gparted, View > Device information shows "Partition table: msdos"
I assume this means there is indeed a table there
My learning-curve-DUH says you first must create a Partition table, then create partitions in it.
- Partition > New
filetype: selected fat32
- However, it's suggested to use ext4 format as being a "native" Linux format, because while fat32 is more common, it has a 4gb filesize limit. Hard to imagine me exceeding that, but whatever, will consider re-do to ext4 format
- OTOH instructions elsewhere say that if you're going to download NOOBS, to make the SSD bootable, then you must use FAT32.
- In the end, I created an 8GB partition in FAT32 for some future NOOBS, and the balance in an ext4 partition.
label: entered: 1
now this box shows a single partition, encompassing entire disk,
and says "Create Primary Partition #1 ..."
and "1 operation pending" in box at the bottom
checked green check mark at top menu bar, clicked OK on warning, and process started...
- It seems to have worked. GParted now shows my /dev/sda1 with one partition
closed GParted
$ lsblk
shows sda1 partition under sda
So this appears to have been successful.
- An alternate method [not used] to using gparted:
- "From here you can (re)partition your mSATA SSD if it’s running a supported file system, with the following command:"
$ sudo fdisk /dev/<identifier>
in my case, <identifier> is sda
- response:>/br>
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help):
- ...
- Now that the file system and partition are set up, you must
mount the device to the location created above.
- element14 instructions:
"...when you boot your Raspberry Pi to the GUI and then connect the attached mSATA SSD, you will be prompted what to do with your “Removable media” that has been inserted, and the drive will be automatically mounted..."
It seems the instructions are explicit: "...boot ... and then connect ..." , because just rebooting showed no such prompt, but if I pulled the usb jumper with power off, and reconnected it after power up, indeed dialog came up asking what i wanted to do.
- I selected "Open in File Manager"
It worked, BUT it mounted the ssd1 into media/pi, not media/ssd as I'd intended...
- clicked eject icon in upper right of main screen and ejected ssd1
$ sudo mount /dev/sda1 /media/ssd/ssd
This worked, BUT, after powering down and re-booting, the ssd was again auto-mounted in the media/pi location...
- Got a reply to my question on the element14 forum. Yay!
Persistent mount points are specified in the file /etc/fstab.
- The file has columns of <device> <mountpoint> <fs type> <options> <dump> <pass>
[reply from forum says...] So you'd add:
/dev/sda1 /media/ssd/ssd ext4 errors=remount-ro 0 1
(this assumes ext4 file format - see notes above)
dump = 0 tells the dump backup utility to ignore this device/partition
pass = 1 tells fsck to check this partition first. Use this for root partition.
Other partitions should all be 2
- Confusions:
- lsblk shows the SD card (mmcblk0) is formatted into 4 partitions:
mmcblk0p1 - 1.6G mountpoint: [not specified?]
mmcblk0p5 - 32M mountpoint: /media/pi/SETTINGS
mmcblk0p6 - 69M mountpoint: /boot
mmcblk0p7 - 5.8G mountpoint: /
- But fstab only shows persistent mountpoints defined for p6 (options: "vfat defaults 0 2")
& p7 (options: "ext4 defaults,noatime 0 1")
- ...
- [soon will...]Edited fstab to add these lines:
/dev/sda1 /media/ssd/ssd FAT32 defaults 0 2
/dev/sda2 /media/ssd/ssd ext4 defaults 0 2
- But first to test...
created new dir /media/ssd/ssd2
manually mounted (sudo mount ...) both partitions into their respective locations...
so far that all seemed to work, but when i try to copy files from one partition to the other, I get permission denied...
... researching ...
..
- What I've learned about Permissions:
.
.
.
eof