Best way to boot from HDD? Topic is solved

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
Cheesethief

Best way to boot from HDD?

Post by Cheesethief »

I know that during initial setup it asks if you will be using an HDD with the Pi. I do. Previously, I have been running Raspbian Wheezy for about 2 years off of an external HDD...


What is the best method to get Dietpi running this way? I.e. SD is needed for initial boot up, but every part of the OS after it booted via USB HDD.

When I had Raspbian, this is the method, I followed:

Code: Select all

sudo fdisk -l
Find the disk I need and run:

Code: Select all

sudo mount /dev/sd## /mnt
Copy contents from SD to HDD without traversing the filesystem:

Code: Select all

sudo rsync -ax / /mnt/
Then changed the rootfs location in:

Code: Select all

sudo nano /boot/cmdline.txt
And changed /dev/mmcblk0p1 to be /dev/sdXX:

Code: Select all

sudo nano /mnt/etc/fstab
After that added in the swap partition location, etc.


Does the DietPi installation do this when I select that I have an external HDD? Or does it just install programs to the HDD, while keeping rootfs and everything still on the SD card?

If it does not, is it recommended that I do what I did above before running initial setup where it asks me about how I will be using the pi?
User avatar
Fourdee
Site Admin
Posts: 2787
Joined: Tue Feb 06, 2007 1:36 pm

Re: Best way to boot from HDD?

Post by Fourdee »

Cheesethief wrote:Does the DietPi installation do this when I select that I have an external HDD? Or does it just install programs to the HDD, while keeping rootfs and everything still on the SD card?

If it does not, is it recommended that I do what I did above before running initial setup where it asks me about how I will be using the pi?
If you selected USB drive, DietPi will use your external HDD for software configurations that have personal data paths.

Some examples:
- owncloud will be setup to use /mnt/usb_1/owncloud_data
- All software that has a Music path, will use /mnt/usb_1/Music
- All software that has a downloads path (bittorrent) will use /mnt/usb_1/downloads
etc etc.

The SD card's 2nd partition is left as is and does not move to your USB drive.

If you want to move the SD contents over to USB, your best bet would be to:
- run a fresh install of DietPi
- Say no to the USB drive prompt.
- Complete your installation of software

At this point you can use your previous steps to reconfigure your RPi to use the USB drive.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Post Reply