• Welcome to Peterborough Linux User Group (Canada) Forum.
 

Raspberry Pi 3 kit

Started by ssfc72, December 30, 2016, 05:28:05 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

fox

A company called Adafruit makes a script that you can download and use to transfer you OS from the SD card to the external HD, SSD or pendrive; you can read about it here. This looks like a good alternative to BerryBoot if you already have your OS installed. The other thing it suggests is that additional power is not required if running from a pendrive, and it also suggests that additional power may or may not be needed, depending on the external drive you are using.
Ubuntu 24.10 on 2019 5k iMac
Ubuntu 24.04 on Dell XPS 13

bobf

...and we're here after the quantum leap from the ROAD TRIP! <^8# thread! <^8#

...so no point dawdling - on it went, in it went, fired it up, and voila! It booted right up! 197 updates later (using apt-get, like you had to ask! <^8#), I added ntpdate, and started surfing with the pre-installed Chromium browser. Now, I make it sound quick and easy, but the updates process took closer to 2 hours than one to complete.

I also found out that only one media player, omxplayer, which is also pre-installed on Raspbian Jessie, takes advantage of the RPi's built-in GPU for hardware acceleration, so my supposition at this point is that it's a subtask on any of the Kodi-type installs for media playback. I have *not* tried anything else, but I have to point out that omxplayer is a standalone command-line interface program only, although I'm aware that there are at least a couple of GUI interfaces written to <ahem!> 'stream'line the process <hyuk, hyuk!>

I first tried a 720p media file from a USB key plugged directly into the RPi, but the following morning, I decided I needed to evaluate a 1080p stream over wifi - the crux of the matter! <^8# I'm delighted to report that it works like a charm! Not one solitary hiccup in a ~2-hour movie. VERY impressive - not that it shouldn't be, but it's nice to confirm that reports are not exaggerated at all, in my limited experience.

So much for the good news...

I then downloaded and installed LibreELEC the same way, and it booted up just fine, but I've found a design flaw in its initialization that I also hope to have found a work-around for. LibreELEC's tagline is, "Just enough OS for Kodi", and sadly, that's apparently inescapably true. Because I use a 63-character WPA wifi key, what I *like* to do is boot up, stick in my USB key, open up my (encrypted!) spreadsheet containing my wifi key, copy it to the clipboard, and paste it into the password field to connect to my router. Oh, and when this *couldn't* happen, I also downloaded the OpenELEC version to find that this is a consistent problem, and not specific to the RPi Foundation version... More specifically, in either, there's no way to run a second task like LibreCalc *OR* even terminal, and try to facilitate the copying-in of the pre-typed key. And I did find a suggestion that <CTRL><ALT><F3> would bring up a terminal... Nope... Tried every combination of <CTRL><ALT><SHIFT><F-key> there was... NADA!

So... After much experimentation - AND GROUSING! - I *finally* relented and attempted to type that sucker in manually. *NO DIFFERENCE!* It appears that the interface cannot handle a full 63-character key, pasted in or typed in manually, and I tried at least a half-dozen times, determined that I *must* be mucking it up somehow, and "practice makes perfect". Nope...

So I abandoned all attempts, and instead went to NOOBS. Very simple to set up; download and unpack the zip file, format your SD card, copy the extracted stuff over, stick it in, boot it up, done. AND NOOBS HAS THE SAME SHORTCOMING - you CANNOT jump to a second task to facilitate copying over the wifi key, or any other parallel task you may want or need!! Now, I did NOT try to type in the main wifi key, I used my guest wifi network instead, and absolutely no problems, connected perfectly fine, worked like a charm. AND I WAS *NOT* going to try to type all that other in again! Which is the heart of the problem; I've got some 1500 movies on my NAS media server, and it's ON THE MAIN NETWORK SIDE, OF COURSE! <^8# So, on my isolated guest wifi side, I've got NOTHING. Which sucks...

But then I took a closer look at the NOOBS documentation, and it "says" I can copy over the appropriate wpa_supplicant.conf file that's already been set up (in this case, by Raspbian!!) to the NOOBS root folder with the rest of its files, and it can immediately make use of it. ***SO***, by extension, *if* I can reimage Raspbian from Clonezilla (of course I did! <^8#), I can copy off that file and put it on the NOOBS reinstall thereafter. *NOW*, I make no presumption that having that file on there will automatically provide enabled access to LibreELEC et al that might be installed onto the SD card *by* NOOBS, *but*, if I reload a fresh copy of LibreELEC, initialize it, then return it to my laptop and copy the wpa_supplicant.conf file over containing the necessary wifi access information *to it*, then I may neatly circumvent the problem and place my entire library at Kodi's feet - so to speak - at the next boot...

IS THAT BROKE ENOUGH FOR YOU?!â,,¢ <^8# And naturally, I'll keep you posted...

Jason

Quote from: fox on February 22, 2017, 01:53:04 PM
A company called Adafruit makes a script that you can download and use to transfer you OS from the SD card to the external HD, SSD or pendrive; you can read about it here. This looks like a good alternative to BerryBoot if you already have your OS installed. The other thing it suggests is that additional power is not required if running from a pendrive, and it also suggests that additional power may or may not be needed, depending on the external drive you are using.

According to the website, the USB ports in total can manage up to 1.2 A of current draw (if your power supply supports 2.5 A). If you look up the specs for the hard drive you're interested in from the manufacturer website, it should tell you the current draw. They may list several current values, you want the maximum one. Flash drives use very little power so they should all work.

Source: https://www.raspberrypi.org/help/faqs/#power
* Zorin OS 17.1 Core and Windows 11 Pro on a Dell Precision 3630 Tower with an
i5-8600 3.1 GHz 6-core processor, dual 22" displays, 16 GB of RAM, 512 GB Nvme and a Geforce 1060 6 GB card
* Motorola Edge (2022) phone with Android 13

bobf

Yeah, it sounded to me like the recommendation for a 2.5A 5V microUSB power supply for the Raspberry Pi was to ensure that, no matter what you plugged into (supposedly?) ALL of the ports at the same time, it would still provide enough power to the Pi itself to avoid starvation, like we saw quite some time ago during Glen's presentation. I don't KNOW this for sure, and I've forgotten just where I read that (it was recently, though), but if you try it, and you get the little beach ball icon in the upper right corner of your screen, as Dan & Trevor pointed out, the RPi's even capable of signalling it's not getting enough power. Now, I wouldn't go plugging in a bunch o' USB hard drives to test out the theory...! Oh, and Mike, there's a RPi-specific image available for OpenMediaVault that you might find VERY interesting...!

***UPDATE***

I also went back and created a wpa_supplicant.conf file and installed it on the SD card with the NOOBS software. Nuh-uh! *NOT* gonna do it. The documentation says it should work; in my testing, it somehow disabled the RPi's wifi completely. Like it wasn't there. Try to connect wifi, "no devices are available". Four iterations of that, and I said, "Screw it! It was working without it...", so I reformatted and copied the NOOBS stuff back over, and there it was, both my networks available. SO... I took another shot at putting in my main password, which I hadn't tried in NOOBS, and no go. I tried it again, and, lo and behold <angelic chorus!>, it worked! Now, as I'd mentioned, I'd done it with my guest wifi side, but this was better.

I selected LibreELEC for the install, and off it went, and as sure as God made little green apples, LibreELEC/Kodi fired up the default configuration wizard, and wanted the wifi password - again <sigh!> So I selected my main AP, put in the password, took GREAT care to check it twice, clicked on "Done", and sure enough, it popped off some network timeout error - AND LISTED AN IP ADDRESS NEXT TO ITS NAME!!

So, I'm in! I told it how to get to my movies, and I'm watching "Training Day" (the older one with Denzel Washington & Ethan Hawke) in 1080p without ANY losses over wifi. I'll work on add-ons later...

And it makes me wonder whether timing issues on the RPi have something to do with the wifi's ability to work at all, and how... I don't have any more than some of the anomalies to go on, but it's in the back of my head...

Thumbs up to all those who are winning their battles, too! <^8#

fox

Quote from: elpresidente on February 22, 2017, 04:42:04 PM
According to the website, the USB ports in total can manage up to 1.2 A of current draw (if your power supply supports 2.5 A). If you look up the specs for the hard drive you're interested in from the manufacturer website, it should tell you the current draw. They may list several current values, you want the maximum one. Flash drives use very little power so they should all work.

Source: https://www.raspberrypi.org/help/faqs/#power

This is helpful. So one of the drives is a Samsung Spinpoint M8. According to a review I read, maximum power consumption is 3.9 watts at startup. Another site noted that the drive is 5 volts. Doing the math (amps=watts/volts), I get a maximum draw of 0.78 amps. With the max draw of all usb ports being 1.2 amps and no other occupied ports with a media server, this looks safe to me, as any function other than startup would use no more than 2/3 on average than startup. To put it another way, if it starts up OK, it should be fine. Any flaws in this logic?
Ubuntu 24.10 on 2019 5k iMac
Ubuntu 24.04 on Dell XPS 13

Jason

Quote from: fox on February 22, 2017, 07:51:35 PM
This is helpful. So one of the drives is a Samsung Spinpoint M8. According to a review I read, maximum power consumption is 3.9 watts at startup. Another site noted that the drive is 5 volts. Doing the math (amps=watts/volts), I get a maximum draw of 0.78 amps. With the max draw of all usb ports being 1.2 amps and no other occupied ports with a media server, this looks safe to me, as any function other than startup would use no more than 2/3 on average than startup. To put it another way, if it starts up OK, it should be fine. Any flaws in this logic?

I don't see any. You double-checked that your power supply is rated at 2.5 A?
* Zorin OS 17.1 Core and Windows 11 Pro on a Dell Precision 3630 Tower with an
i5-8600 3.1 GHz 6-core processor, dual 22" displays, 16 GB of RAM, 512 GB Nvme and a Geforce 1060 6 GB card
* Motorola Edge (2022) phone with Android 13

fox

You don't see any what? Yes, power supply I bought is 2.5 amps.
Ubuntu 24.10 on 2019 5k iMac
Ubuntu 24.04 on Dell XPS 13

fox

Quote from: fox on February 22, 2017, 01:53:04 PM
A company called Adafruit makes a script that you can download and use to transfer you OS from the SD card to the external HD, SSD or pendrive; you can read about it here. This looks like a good alternative to BerryBoot if you already have your OS installed. ....
Well I tried that script and it didn't work properly and messed up my boot. It may have been because I had two distros already installed on the SD card. I could recover it, but I reread the instructions for BerryBoot and decided that this is what I should have used at the outset instead of Noobs. I'm going to start over.
Ubuntu 24.10 on 2019 5k iMac
Ubuntu 24.04 on Dell XPS 13

bobf

You may find that the adafruit script can manage the coherency of a single-boot system, but a NOOBS/multi-OS config messes it up completely. If I remember, I'll check the script. I'd be inclined to think that dd would still win the day in this instance... YMMV.

Thumbs up on the drive, though, Mike. I don't see any problem, and yes, the greatest draw would be at spin-up, so if it's up, it's good to go. And keeping it up might be a good reason for a UPS of some size. I have a APC BE350G-CN that supposedly wouldn't hold up anything bigger than a laptop (which I consider the only type of computer that has a UPS [read: battery] built in.) It supports my cable modem, VoIP modem, and telephone base station perfectly, though...

Jason

Quote from: fox on February 23, 2017, 12:36:33 AM
You don't see any what? Yes, power supply I bought is 2.5 amps.

I don't see any flaws in your logic.
* Zorin OS 17.1 Core and Windows 11 Pro on a Dell Precision 3630 Tower with an
i5-8600 3.1 GHz 6-core processor, dual 22" displays, 16 GB of RAM, 512 GB Nvme and a Geforce 1060 6 GB card
* Motorola Edge (2022) phone with Android 13

fox

Well BerryBoot doesn't seem to be any better, and it's arguably worse. It will load an OS on your external drive, but then it tells you to remove the SD card and boot. But the Pi won't boot without the SD card in! I tried this twice, and then I tried booting leaving the card in, but when you do that it just brings up the install menu again. It is also very, very slow at downloading Raspbian. What I'm trying now is to install the OSes on the card again with BerryBoot, and then see if I can then get it to install them on the drive. I have a feeling that I'm going to go back to Noobs and reinstall one on the card, move it with Adafruit, and then install another OS on the drive manually.
Ubuntu 24.10 on 2019 5k iMac
Ubuntu 24.04 on Dell XPS 13

Jason

#41
You probably already did this but just in case, this might help. I would follow the instructions in the first section and then prepare the boot media however you like.

https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/msd.md
* Zorin OS 17.1 Core and Windows 11 Pro on a Dell Precision 3630 Tower with an
i5-8600 3.1 GHz 6-core processor, dual 22" displays, 16 GB of RAM, 512 GB Nvme and a Geforce 1060 6 GB card
* Motorola Edge (2022) phone with Android 13

fox

#42
Thanks, Jason. I hadn´t seen that. Had I seen it 30 minutes ago, I would have tried it immediately. However, I am again in the process of reinstalling Raspian with Noobs onto my SD card. I´ll then try the Adafruit script and see if it works to move my installation to the usb drive. That would still require the SD card to boot, but it refers immediately to the files on the drive (if it works). If not, Iĺl try it the way you referred me to.

Update: again the Adafruit script didn´t work. Again, I tried editing the config files to change what should be booted, but no dice. So I´m now downloading the Raspbian image and will be trying Jason´s method.

I must say, this is starting to get quite annoying. I´ve restarted this process 4 or 5 times and am getting pretty frustrated. Maybe I´m out of my depth on this one.
Ubuntu 24.10 on 2019 5k iMac
Ubuntu 24.04 on Dell XPS 13

fox

#43
Success; sort of. I now have Raspbian running from my external drive, though it still needs to boot from the SD. That's fine with me; it was all I was after all along until Jason's article pointed to the possibility of booting entirely from a usb drive. Now I'm wondering if I can install and boot LibreELEC from the same drive? Not sure how to proceed to get that. The link Jason gave me for how to set up Raspbian from an external usb drive mostly worked, but I had to hand-edit the cmdline.txt and /etc/fstab to substitute my drive (/dev/sda2) for the partition on the SD. Several attempts ago, I tried doing same using the UUID#, but it didn't work. The problem could have been how I specified the UUID or because I used Noobs instead of the Raspian image for the installation. The operation of Raspian is definitely faster from the external drive.
Ubuntu 24.10 on 2019 5k iMac
Ubuntu 24.04 on Dell XPS 13

fox

#44
I'm now happy to report that it is possible to install multiple OSes on a usb external HD or pendrive through Berryboot. The problem I had was due to one line in a config file. The file is cmdline.txt, and all you have to do is remove the line about enabling usb boot. This seems rather strange on two accounts. The first is that you would think that you actually need that line and the second is that it starts with a "#", which to me means it's a comment and won't be used anyway. No matter; remove that line on the SD card after you have run Berryboot and installed an OS, and then all is well. Once the OS is installed, a menu comes up which allows you to add another OS. I installed OpenELEC first, and then Ubuntu Mate; this time on a usb pendrive instead of a disk. (I had previously tested the pendrive and two external drives and all gave a speed of around 35 mbsp; about 5x the speed of the SD card. Both distros are working and the speed increase over the SD card is quite noticeable. Ubuntu Mate has a few minor problems, including that the wifi doesn't work until you reboot. But it seems pretty good so far.

Incidentally, I can now give a talk on RPi distro installation options as a result of all of my fiddling.
Ubuntu 24.10 on 2019 5k iMac
Ubuntu 24.04 on Dell XPS 13