Putting root partition on USB drive

The SARPi project forum. For anything and everything relating to Slackware ARM on a Raspberry Pi 1, 2, and 3. This forum is NOT a replacement or substitute for the Slackware (ARM) forums on Linux Questions website! Please try to seek help there first about any issues you may be experiencing, or question you might have, before posting on here.
User avatar
spidergawd
Registered user
Registered user
Posts: 3
Joined: Thu Jun 09 2016 - 00:46:01
Location: USA

Putting root partition on USB drive

Postby spidergawd » Thu Jun 09 2016 - 01:01:49

Hi, want to first thank FatDog for all the help installing Slackware on my Pi. After a recent SD card failure, I decided to reinstall with just the /boot partition on the SD card and everything else on a USB thumb drive. Seems to be much more stable, but it's only been 15 days so far so too early to say for sure (my system crashed about once per week before). Anyway, I didn't see anything on this site addressing the issue of only having the /boot partition on the SD card, so I wanted to share my experience in hope it might help someone else. Basically the only problem I had was that the installer wrote all of the boot files to the /boot directory on the root partition of the thumb drive, even though I specified to mount the SD card as /boot. The solution was simple enough: remove the SD card and thumb drive from the Pi, mount them on my Slackware PC, and move the boot files from the thumb drive to the SD card. After that it booted beautifully and has run without problems ever since.

Cheers!

User avatar
linicks
Registered user
Registered user
Posts: 126
Joined: Mon Oct 27 2014 - 20:26:01
Location: Pompey, England

Re: Putting root partition on USB drive

Postby linicks » Thu Jun 09 2016 - 17:31:24

See my post about backing up the SD Card:

viewtopic.php?f=30&t=141

It works great. About 2 months ago I had a power cut, and when it came back on, I powered up my Pi's - but one of 5 didn't come up. After mounting the SD Card on my notebook, I found that the /boot partition was trashed/totally empty!

Anyway, restored it from the image file and all worked as it should. Took about 40 minutes to restore.

Nick
https://linicks.net/

Q. What is the difference between a duck and an elephant?
A. You can't get down off an elephant.

User avatar
spidergawd
Registered user
Registered user
Posts: 3
Joined: Thu Jun 09 2016 - 00:46:01
Location: USA

Re: Putting root partition on USB drive

Postby spidergawd » Sun Jun 12 2016 - 04:15:51

Great advice to back up the system.

I had been using Berryboot to dual-boot Slackware and Raspbian, but since I never boot to Raspbian I decided to do a fresh install of Slackware only this time instead of using a backup image. I also wanted to try putting everything other than /boot on a different drive, and this was the perfect time to try it.

My /boot partition on my SD card is unmounted, so no need to shut down the system to remove it. It is also a mere 61 MB partition, so no worries of it not fitting on a different disc. Of course, I'd need to shut down the system to remove the USB thumb drive containing the swap, /, and /home partitions, but I've played around in the past with using netcat to copy entire partitions over the network without shutting down the Pi. It's been a while, but if I recall correctly it's best to remount the partitions read only during the process. I would have a weekly cron job set up on the PC to put netcat in listen mode, and another cron job on the Pi start a couple of minutes later to pipe the output of a dd command to netcat, sending it over the network to a file on the PC, remounting the partitions read/write when completed. That said, I'd still rather shut down the Pi, remove the SD and thumb drives, and do a manual dd on the PC, but it can be fun to play with netcat. It really is a great little tool!

User avatar
spidergawd
Registered user
Registered user
Posts: 3
Joined: Thu Jun 09 2016 - 00:46:01
Location: USA

Re: Putting root partition on USB drive

Postby spidergawd » Sat Jul 16 2016 - 06:07:25

My Pi was up and running great for 45 days after putting root partition on USB drive, and then the thumb drive died completely. Can't access it at all on any computer, the light doesn't even come on. Thankfully, I'd done a backup, so once I got a new drive it was easy to restore and get back up and running again, to give it another try. I'm hoping it was just a bad thumb drive, only time will tell if this one works out.

For the backup, I used an rsync method as described in this Stackexchange thread, showing how to do a backup of a running Raspberry Pi:

http://raspberrypi.stackexchange.com/qu ... -of-itself

I followed the suggestions to stop some services first, and compose an exclude list. The first time I ran it, it took several hours (overnight), but successive backups only copy whatever has changed since the last backup, and completes in minutes. I've got a cron job set up to do a backup once per week, even sending a WOL magic packet to my pc if the pc isn't running (and another on the pc to shut down when finished, if it wasn't up when the process started, or leave it running if it already was). In order to restore to a new thumb drive, it isn't as simple as a dd method, but wasn't any real challenge. Just had to use fdisk to create a partition table for the drive, and then mkswap and mkfs to format the partitions, and then run rsync in reverse. Booted right up!

Return to “SARPi Project - Slackware ARM on a Raspberry Pi”

Who is online

Users browsing this forum: CommonCrawl [Bot] and 0 guests