USB External HDD

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
endlesszeal
Posts: 13
Joined: Wed Sep 02, 2015 12:47 am

USB External HDD

Post by endlesszeal »

First of all, thank you so much to the people who made,create and maintain DietPi!!! I got a RaspberryPi (1st gen) as gift and I immediately started browsing the web to see what I can do with it. I stumbled upon this and was able to setup DietPi with transmission and miniDNLA.

I download and watch a lot of anime and I loved being able to get the remotely dl'd and then watch the videos anywhere on any device. However, it was short lived at the microsd couldnt withstand the amount of writes I was doing (5Gb/day) and it finally corrupted and failed to boot. I recently bought a SanDisk Ultra MicroSD and Seagate 500gb USB powered external hard drive.

I followed the install prompt and tried to install DietPi onto the Seagate but it didnt recognize it and it just stops at the screen: "Please insert a USB Drive to proceed with install." I tried formatting the Seagate to both exFAT and NTFS but all it would do is may a horrible beeping/scratching noise and the process would not proceed. Finally I just stuck a USB Lexar 16GB FAT32 stick and it installed successfully.

Now my question is, is it even possible to install DietPi on my Seagate 500GB USB drive? If not, is there a way I can just mount the hard drive, point all the torrent downloads to the Seagate and then share it via DLNA?

Im pretty new to Unix and command lines, so please bare with my newbness.

Again, thanks to everyone who put this awesome program together.

Regards.
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: USB External HDD

Post by Fourdee »

endlesszeal wrote:but all it would do is may a horrible beeping/scratching noise
Hi Endlesszeal,

It sounds like your issue is lack of power to your 2.5inch USB HDD. Some USB HDD's require 700+ma to function correctly. I had the same issue on my 1st RPi.

Heres what you can do to fix it:

Option1:
Run dietpi-config, select Advanced from the menu, select and enable Max Usb Current. You will need at least a 2Amp power supply for this to work. Also, i'am not 100% sure if this applies to 1st gen 256mb models.

You can also set this after writing a fresh DietPi image. This will allow you to setup the dedicated USB HDD on 1st run. Simply open the file config.txt on the boot parition, change max_usb_current=1

Option2:
Use an external HDD that has its own separate power supply.

Option3:
Purchase a RPi v2 (1GB) and a 2Amp PSU. Then apply the Max Usb current in option 1.
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.
endlesszeal
Posts: 13
Joined: Wed Sep 02, 2015 12:47 am

Re: USB External HDD

Post by endlesszeal »

thank you for the quick reply!!

i found another spare ext. hdd that has its own power plug. ill end up using that.

is there a way i can just plug it in and edit miniDLNA to share its folders? i saw somewhere that if i edit its config file to "ext drive path /Video" it should update to include that folder for my animes? or can i go into diet-config and edit a setting? also, im assuming i will have to mount and format the hard drive to EXT4 to use it. but im not sure how to do that.

im not really wanting to reinstall dietpi on to the ext hard drive as i already have it running on a 16GB stick, so if there is a way i can just add my external hard drive and share it on miniDLNA that would be great.

thank you again!
sarmisak

Re: USB External HDD

Post by sarmisak »

It's easy to format your drive, run parted and enter print devices, then quit. You should see your hard drive in that list. After finding your device enter

Code: Select all

mkfs.ext4 /dev/sdaX
, it should run for a few seconds and tell you that file system is created successfully. Now run blkid, find your device in the list and copy it's UUID, and run

Code: Select all

mkdir /mnt/external
echo 'UUID="xxx-xxxx-x-x-x-xxx" /mnt/external ext4 defaults 0 0' >> /etc/fstab
You should mind the >> (double arrows) else you can overwrite your fstab.

Try running mount -a and everything should be up and running.
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: USB External HDD

Post by Fourdee »

im assuming i will have to mount and format the hard drive to EXT4 to use it. but im not sure how to do that.
Simply run the following:

Code: Select all

/DietPi/dietpi/dietpi-external_drive_setup
If its successful, you'll need to tell DietPi this is a USB install. Simply run the following command:

Code: Select all

sed -i "/USBDRIVE /c\USBDRIVE 2" /DietPi/dietpi/.installed
All future dietpi-software installs will now use the USB drive for your data storage.
endlesszeal wrote:is there a way i can just plug it in and edit miniDLNA to share its folders?
The easiest way would be to reinstall. Simply run dietpi-uninstall and select MINIDLNA. Then run dietpi-software to reinstall.

Another method would be to edit the data directories in the minidlna config file /etc/minidlna.conf

If you have any existing music from the previous install that you want to copy to your USB HDD, they would be in /root/Music.
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.
Neoderek
Posts: 1
Joined: Wed Jun 20, 2018 7:49 pm

Re: USB External HDD

Post by Neoderek »

I have a little problem, similar than the op.

If i use parted / print devices:

root@DietPi:~# parted
GNU Parted 3.2
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print devices
/dev/sda (500GB)
/dev/mmcblk0 (31.4GB)

Thats ok. My HDD is /dev/sda. If now i use blkid:

root@DietPi:~# blkid
/dev/mmcblk0p1: LABEL="boot" UUID="5DB0-971B" TYPE="vfat" PARTUUID="27504eef-01"
/dev/mmcblk0p2: LABEL="rootfs" UUID="060b57a8-62bd-4d48-a471-0d28466d1fbb" TYPE="ext4" PARTUUID="27504eef-02"
/dev/mmcblk0: PTUUID="27504eef" PTTYPE="dos"

Where is my sda?

This hdd only have 1 partition, i think i must seen /dev/sda1, it's tha's right?

Aditional info: I
If i use sudo fdisk -l to check partitions:

( a lot of info about ram)

Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 8192 93802 85611 41.8M c W95 FAT32 (LBA)
/dev/mmcblk0p2 98304 61315071 61216768 29.2G 83 Linux
Post Reply