13 February 2015

Network Attached Storage 4, Testpi

I think it was this past Friday at night when I found the NAS lights on and flashing when going to look at the Raspi for whatever reason, and when I looked at the lights from the front, the light for the first disk was flashing orange. I went into the web interface and tried to repair, but was unable to, so I just removed the disk.

Saturday, I plugged it into the Dell to get the SMART info and try to perform the short test, and it made Parted Magic hang during part of the probe phase. I unplugged the drive after powering down the Dell, and was then able to boot into PMagic just fine - plugging the drive back in after reaching the desktop.

It took a while to get to the SMART info window because of the drive, and the short test hung at 90%, so I cancelled the test. I don't remember what happened, but at some point the clicking noise went away and the drive acted normally and the short test reported nothing. Regardless, it seems like the drive is just too unstable to use, since it's questionable when it'll have problems again. I might try it in an environment where stability isn't an issue, but that's something that doesn't come often.

This past Monday, I received my best friend's Raspberry Pi, since he no longer does anything with it (nor did he really want it), and after he sold a couple things, he got a new monitor, which allowed me to use the monitor that was replaced to start with some of the testing I needed to do.

After setting it all up, I booted the Testpi to see what he last had on that SD card, which was Raspbian from back then, and then shut it down to switch to the SD card I had brought with me which had the latest version of Raspbian. It took me a bit to set up routing the internet from my laptop's ethernet to the wirelsss (I hadn't done it in a while and it was simpler than I had thought), but afterwards the Testpi was able to access the net just fine. I was able to confirm a few things, but it ate up a lot of time to download and install stuff - maybe because of how I had to give it internet?

Since he had to work the next day, I had to leave earlier than usual, and when I got home, I tested out openSUSE, and after it took a while to install updates an packages (I had first forgotten to expand the second partition), I couldn't get XFCE to work. I tested Pidora next, and since it didn't have LibreOffice in its repository, I decided that it wasn't a viable candidate. While I could probably find a package source or compile from source code, I want to spend the least amount of time getting everything set up, since I'm going to have two machines to set up (Raspberry Pi 2 and Banana Pi).

The next morning, I was tinkering around more with Raspbian, trying to uninstall LXDE, but eventually I ended up creating a segmentation fault with Rhythmbox, so I called it quits for then. I grabbed Arch Linux and Bodhi Linux, but wrote Bodhi to one of the SD cards, writing Raspbian again to the other, and copying the Arch tar.gz to a flash drive before heading back to my room for the evening.

Bodhi Linux was a short test, since I accidentally deleted the shelf (a.k.a. panel for those unfamiliar) instead of the workspace switcher; I had created another shelf, and put everything on it to test it, since I didn't know what anything was, before finding Synaptic to look at the available packages. Everything I wanted to use was there, which I expected from being something based off of Ubuntu, and I shut down soon after that to swap the SD cards.

I reinstalled and reconfigured Raspbian as a mock set up to how things would be with the Raspberry Pi 2, and once I confirmed everything was fine, I shut it down and went to bed after writing Arch to one of the SD cards, since the Testpi was having networking issues. Well, specifically, the networking issues have been going on since I set the Testpi in my room after getting home from my best friend's place.

In the morning, I booted Arch and went through the installation instructions I found, and eventually got into XFCE... partially - I had the cursor and a light-gray background, but no panels, windows, or right-click menu. I rewrote Bodhi and Raspbian to the SD cards and copied the Raspbian image to a flash drive before leaving it all in my room, since I had an orientation-type thing to go to.

After returning, I started with Bodhi to carefully test and assess it, which I found that the Enlightenment window manager seemed fast and fluid, but that doesn't really mean too much in terms of anything else. With Raspbian, I installed Rhythmbox and tested it with LXDE to make sure it was just something weird that caused the prior segmentation fault, and it was. I had thought I installed all the packages with apt-get, but it didn't seem that way, and so I had to install them again with Synaptic - going to bed shortly afterwards. (I think I had some sort of problem with trying to use Openbox to fix the fact that I didn't have XFCE, but couldn't get back to LXDE easily, and I think that's what I fixed before going to sleep)

This morning, I installed Raspbian to the SD card that had Bodhi Linux on it and did a full installation with all the packages that both the Pi 2 and the Banpi will get, using the "stable" repository instead of "wheezy" (the other card was "wheezy"), and testing them all out and such as well. I then decided to grab the XFCE theme I use and realized I didn't have Filezilla, but after installing it, I came up with a lot of directory-related errors, and was met with more when connecting to Mei-chan. I found that I couldn't copy the archive (not enough space error), and when I went to check, I had no space left whatsoever. I decided to switch over to the other SD card (which is twice the size) and remembered about vsftpd - which I installed, configured, and tested.

I was done after that. Raspbian is going to pretty much be the distro to use, since I can't find anything better to use. I'll have a bit of preliminary testing for the Pi 2 and the Banpi when I get them both, just so I don't hit a brick wall with a blind install.

I don't remember when, but at one point, I tried to play a 1080p video which ended badly - luckily I was able to ssh into the Testpi, find the VLC process ID, and kill it.

It's been a bit of a hell with testing the past couple days, since the network didn't want to work sometimes, causing me to re-run package installation commands a lot to get packages that were partially downloaded or weren't downloaded at all. I think part of the problem was just EMI from a couple power cables, and even though I kinda cleaned up the cables, I don't have any proof that was the cause.

Bodhi Linux is an okay distribution, but some things are just awkward about it (namely the terminal program).

Considering that I was left with about 2GB left of an 8GB card, I decided that I should get 16GB cards for both the Pi 2 and the Banpi, and though the latter probably doesn't quite need that much, I'd rather have the extra space.

I'm quite excited for the Pi 2 and the Banpi (mainly the latter), though it probably won't be until next month when I can buy them.

12 February 2015

End of CrunchBang

The article I read is: A eulogy to CrunchBang, the Linux distro that time passed by (which appeared as "The Death of a Linux Distro" on my phone).

While I've seen CrunchBang, I never had a chance to test it out, since it wasn't something that interested me much.

Though I've only kind of seen 5 years worth of Linux in the making (the majority of it being openSUSE), it still has come a long way.

I haven't really done too much with Linux besides using and learning (more or less), so I won't call myself a hobbyist, but I have had the thought of respinning openSUSE, Gparted Live, and perhaps another distribution that I can't recall right now - though I've never really followed through with any of it. One of the reasons being that I just haven't really had that much of a need to (Gparted Live's a bit different though), since I can just install everything I need to from the base image without much problem.

It's quite true that most distributions are a lot more flexible now - allowing a variety of window managers to be installed and used (though having to put up with something before being able to use it.

To a point, it reminds me of Firefox, where after one point in time, Mozilla pulled the plug on supporting the Power PC architecture. Yes Mac OS X 10.4.x was outdated at that time, and the statistics that they were seeing was low enough for them to decide to remove support. A group decided to make a port of Firefox for PPC and 10.4.x/10.5.x called TenFourFox which allowed anyone with PPC an Mac OS X 10.4.x/10.5.x to still use an updated version of Firefox.

One of the problems was that the version was quite behind, but eventually the group closed the gap when Firefox 30 something came out, which was quite nice. But after discovering that Debian works quite well for PPC, there isn't a whole lot of need to use Mac OS X (only for the legacy emulation). In short, I mean that the TenFourFox group will probably have to pull the plug at some point, once Mac OS X 10.4.x/10.5.x is no longer a good idea to use.

Yes there are people out there using PPC machines, but at some point, they may (or may not) switch to Linux, since it's a lot more up to date than Mac OS X 10.4.x/10.5.x will ever be. Another thing is that there's a lot of removed support for Mac/PPC, so at some point the user will either have to continue using the last supported version of a software, or decide to make a better move.

Sure any group/distro has the ability to remove their support for the PPC architecture, but it's honestly hard to say, since it's really the only way to keep any PPC machine running until the processor gives out.


Anyway, cheers to the good run for CrunchBang, though I never gotten to know it, and to Philip Newborough for taking the initiative of filling the needed lightweight Linux gap.

02 February 2015

Raspberry Pi 2

Gizmodo's article about the Raspberry Pi 2 came up in my best friend's news feed on Facebook, which ended up in mine after he liked it.

From what I posted yesterday (or early this morning if you want to get technical), there's not much different, but the article does link to a store that sells them for (presumably) North America. (Direct link here)

It seems like the ethernet is indeed 10/100 as I had thought, so using it as a bittorrent client is definitely out of the question. However, I think I might just get the Pi 2 instead of it and the B+ together. Considering the quad-core on the Pi 2, there wouldn't be any problem with having it being an FTP while I do other things - I'd also just be able to mount it to the "case" I recently made which would keep the SoC relatively cool.

I'm sure MCM Electronics is a pretty decent online store, and while the BBB rating/review is pretty good,  I'm not too happy with how slow the site took to load (maybe because everyone wants the Pi 2?), so I'll wait for now (I don't have money for it anyway).

(Edit)

On the Raspberry Pi blog, there's a post about the Pi 2, and a couple links to retailers Element 14 and RS Components - with Element 14 not working correctly. I checked again at Newark and it was also there, so options are definitely available.

Raspi 4 correction and DD-WRT Client Bridge

A couple hours after posting Raspi 4, I looked on Amazon and saw that the B+ was cheaper than the B revision 2, so it's what I'll be buying instead. I'm unsure what I'll do with the extra USB ports, but I guess it'll allow me to expand it's storage ability (though the point of it is a small-file FTP server due to the 10/100 ethernet port).

One of my friends read earlier that the Raspberry Pi 2 will be coming out sometime soon which will have a quad-core 900MHz ARM and 1GB of ram and still be $35 USD. I'll need more info on it, but I'm quite sure the ethernet's still 10/100, assuming the USB controller still controls it.

Reading this article, it seems like it's on sale today, but only for the UK (or maybe just England?), since I didn't get any hits for it in the Newark Element 14 store.

Nonetheless, I'll probably end up getting one to use as the ultimate low-energy, low-heat solution for when I want to write. I'll also be able to listen to music and watch videos as well, provided I put it on an external drive. I'm decently confident that it'll be able to handle a lot more than the B (revision 1) that I have, so using a real web browser shouldn't pose any problem either. It'll be nice to be able to leave on all the time, since it probably won't consume all that much power, if at all any different from its predecessors.

I'll also be receiving my best friend's Raspi to tinker around with, since I'd rather not awkwardly tinker with mine along with the fact that he's not using it for anything (I think it underwhelmed him more than I). It'll help me figure out a use for my Raspi once I get the B+.

One possibility is to make my Raspi a ad-removing wifi access point, but as I think about it, it would make things a bit awkward as far as placement and such - I'll still keep it in mind however.

Another possibility is to make it a personal NTP server, where it updates its own time from the NTP server I use (ntpX.jst.mfeed.ad.jp - replacing X with 1, 2, and/or 3) then acts as a server to give the time for any of my machines (except for Triela and Sae-chan, considering their mobility), but considering the nature of NTP servers (and the NTP client service), it's not entirely necessary.

I was also thinking an MP3 player for my car (considering I'd depreciate the iPod, I could probably convert to OGG), but display and controls are only part of the complications of doing this.

I'll have to poke around more to see if there's something else that I can add to the list of possibilities, but off the top of my head, those are the only three at the moment.

Late yesterday (31 January) I remembered about using DD-WRT (it was within a conversation with a friend when conversing about using the Raspi as an access point) to make a partial wireless bridge by having the router connect to the AP directly (client bridge) instead of using two routers to make a full wireless bridge. I looked up the Tenda routers I was using and it wasn't within the router database, tough luck for me I thought.

The router I had bought toward the end of 2012 (I think?), for when I was seriously considering on getting my own internet line, had been mounted in my bedroom and sitting there ever since (I had set it up some, but I hadn't a clue where I kept the passes for it and such), which is the router I checked next - which came up.

After about 3.5 hours of reading, double-checking, and setting up, I was ready to begin the installation process, which was quite quick and easy compared to what the DD-WRT wiki had made it to be.

I then began setting it up as a client bridge, which was fairly easy, but besides misunderstanding the instructions a bit (along with not thinking about the instructions), I couldn't get it to connect. I even tinkered with the settings a lot, trying different things that might be the problem, according to the troubleshooting, but still nothing.

After finding a blog with instructions in a different order, I still couldn't get it to work, and so I began tweaking things again. I started over with the blog instructions, but also changed the settings that they had labelled as "optional", and still didn't work. I then (for whatever reason) decided to change the encryption type from WPA/WPA2 mixed mode to just WPA2 and change the type to AES, and when I went to check the status, the AP showed up!

The entire process (excluding research/etc) took 3 hours - most of it belonging to trying to set up the client bridge.

The immediate reasoning for doing this is to reduce the number of wireless connections from my bedroom (though it's only reduced by one whenever Mei-chan's on), to allow me to stay on the same subnet (192.168.0.x) instead of having a separate one (192.168.1.x) to transfer files from Taiga to Mei-chan, and allow a quicker run of the Cat6 when I need to do large transfers from Melty or the NAS. What this does for me in the future is to rid of the Tenda wireless bridge whenever I make the wired network for the second floor.

Anyway, once I had fixed the settings on Mei-chan and Taiga and verified that both were able to access the internet, I shut Mei-chan down and removed the PCIe wifi card to give to Lie-chan. The PCIe wifi card that Lie-chan had went to the Dell (as much as I wanted to put it into the Intel, I didn't feel like messing around with windows drivers); the PCI wifi card that the Dell had went into Ziggy.

I realised sometime ago that I could move the Raspi to my bedroom, but right now, I don't have a good place for it along with the fact that I had just taken out an expansion card from Mei-chan and I don't feel like putting one in (I'd like to have some rear USB ports free if I need it for whatever reason). The other reason is that I had also made a 30cm cable for the, so making another one so quick doesn't appeal to me that much either. I might do it at some point though, but we'll see.

Random afterthought: I was half-tempted to use the Linux label, since DD-WRT technically uses the Linux kernel, but since it's not an actual distribution, I decided against it.

30 January 2015

Raspi 4

While looking at some Raspberry Pi cases the day before yesterday, I looked at this "case" that comes with a fan that plugs into the GPIO pins, which I found quite interesting, since I had never thought to look at the pinout for the GPIO or to use GPIO to power the fan. I was planning on redoing the wiring yesterday, but my best friend had a day off, so I went to his place instead.

I had a small fan from somewhere (I think it was one of the fans from the old XBox?) that I had set aside for a while, and this morning, I was looking at it to see if I was able to use it instead of an 80mm case fan, and I was definitely able to. I pulled out some parts to begin making a mount for it before I realized that the shroud would make it quite annoying to access the GPIO pins to plug the fan into.

I then looked around to see if there was something I could make a new case out of, and saw the tin that my Tool Logic credit-card sized multi-tool thing came in. While I could have made a full case with it, that would be a lot more work than I was willing to put into it, and so I used the lid, since it was shallow enough to not block any ports; it also had enough leftover space to make it easy to figure out how/where to mount the fan.

After figuring out how to position the Raspi, I made the fan mount with two break-off PCI slot covers, using titanium wire to tie one part together (after drilling the holes to mount the fan), and using a couple wraps of clear tape to hold the other side together.

https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6AeNmAHZeE4SolKspARcTk871ntckPDMK0CLn_CWzUV7IxShx8wzQxgFX4KkNwj12_iO_A_1RDgFwyM6v8YTvF1LlK1g7TEDfaEgoArynp0mcrdWXjUTSqCCcoGkPkf9Zs6CaPmBQ71s/w1106-h829-no/
You can partially see the tape on the bottom joint of the fan mount.

I had actually forgotten to drill the holes to mount the fan bracket to the lid, but I was still able to drill the holes without too much of a problem. The lid gave me a bit of a problem drilling into - since the metal was kinda thin, the hole didn't get drilled out cleanly, but I was able to clean it up enough to where it works. I used two bolts to mount the fan to the bracket and two bolts to mount the bracket to the lid, and while I could have cut most of the excess off of the bolts, I didn't feel like expending the extra energy to do so, since it didn't matter either way.

https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKZwc0R-_eGqGzqiwQyewgjcjz9ZH_REv-hh38YpX3GWRIllONIP2eAcg-KlJcm_mgdtkMIIZderR_JLumHY_KQ2IHDpatRfgl2_D5mACLlQtdWVYqZoJP9HxkuYKNdmYGoGpkPmYUIl0/w1106-h829-no/
The leftmost bolt was the most annoying to tighten, since I was just barely able to get a 10mm combination wrench (open end) to hold the nut (I didn't feel like finding an adjustable wrench).

I reused the screws that I used as feet from the old "case", since the heads to the mounting bolts are obviously not flush against the bottom. I also had to cut part of the tin to accommodate the power cord - which is a USB A to mini-B cord with a mini-B to micro-B adapter attached to it. I also trimmed a part of the top ESD foam that wasn't necessary off, wedging it between the bottom ESD foam and the plug opening to kind of hold the plug a bit.

https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsQXCQPPfuH82n2a8gOHvpxpBvtFp8G7-K0BxA6Gx9-67j7gLMN3eurmmnJ3RGEwbCoqR6CGiZp3GKjc3XLd4PkGGGrEGr0ryPB_tkvWeswG4iJ4gjzBpzqic8VHW-z1j2Qn4qIud9Nug/w1106-h829-no/
The metal warped, since it was thin, which you can see here.

I had thought I was done, when I realized the board still had a bit of free movement (the ESD foam has permanent dents that partially prevent it from sliding around, which isn't enough to hold it securely. After about half a minute, I remembered that I thought of using another bolt from the fan-mounting hole to hold the board down. The bolt I used was originally quite long, and I was going to use two nuts to position it, but that proved to be very awkward to tighten properly at the correct height, so I just measured and cut it to length instead (which saves me a nut). I used part of the piece I cut from the lid to make a flat surface for the bolt to transfer the pressure onto, and trimmed a bit of the blue rubber to match the size.

https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiptWsVgJrlFE9g0ZyIo6Pa99mA27yvjIg-XujpWXXCf5F_xag6ngeF1i_lJXC0-vmav_zaAkZmt9aZfmq_mqd1rr_k3K-iEfOHAS-gmNwSugnU-bN2JvyDG-kr6YIM22BULJgcdVn-rzs/w1106-h829-no/ https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEatkNBBb-B_qykZTkYOhc4jU1a3GDZNAV1F27gub5RCdB4e_KKrlT7CgK0j0o1ZkihKS69o8424PME8elCGi25o7Ux_5NK0nLPwfg7vAF-N0UdTue4ynh5ZMvPKN7YAbDWnd2S7RaBT0/w1106-h829-no/
"Front" view and holding bolt closeup.

While it works, I'm worried that the stress might cause the fan assembly to crack and break, but I'm hoping that doesn't happen. The airflow is pretty much directly on the SoC and the LAN IC, which will keep it relatively cool, though it's not entirely necessary.

https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcSRjnx6blfGMjF2dlgdRPc8ieH8ecZg8-9P5d9aUGRCTdqUItulvZtobmg-b_hmDw3yIJ84KlRnjTZ92ui7rUjCW0_OiBgPcx5W7EYtM1DU4kQHbBQAMMsh7SRmyfz0HT_ys20Xj0hSg/w1106-h829-no/
Top view (angled). The angled cut on the bottom ESD foam was to facilitate having it in the corner, but wasn't the best layout.


I think I'll buy another Raspi since the second revision of the B model has mounting holes, which will make it much easier to attach to this "case" and allow me to remove the board-holding bolt. When that happens, I'll get a case to toss this Raspi into and use it for something else.

It took about 5-6 hours to make this "case", but it was worth it, since it's a lot more open and all the ports are a lot more accessible. The only problem is that the "foot" placement wasn't great, so it doesn't stand on the switch properly - oh well.

25 January 2015

SSH

After tinkering with the Raspi, I decided to try to learn a bit of  SSH, and though what I've learned is basic and limited to the LAN, it's enough for the moment.

One thing I've learned is that anything that can be done in terminal can be done with SSH, since it's accessing another machine with a runlevel 3 interface.

Last night, I decided to boot openSUSE 13.2 to runlevel 3 on Triela and try to SSH into her to run updates, but I had no such luck; I tried again with Lie-chan a couple hours ago and still had the same problem.

After poking around on the net, I found the problem. The first was that the firewall was blocking SSH (port 22), and the second was that the daemon wasn't running or set to run on boot.

Once I get the chance to (probably tonight when I update Melty), I'll be able to boot any machine to runlevel 3 and remotely update it and shut it down.

Oh, when I was tinkering with the Raspi, I sent a halt signal (sudo halt) which wasn't the best idea, since the terminal session hung - oops! I found out a couple hours ago with Triela that I should type sudo init 6 to reboot, and with Lie-chan I sent sudo init 0 with SSH to shut her down. Sending init 0 over SSH to the target machine does a proper shutdown which then sends a logout signal to the SSH client from the target machine, making it a much cleaner experience.

I tried to SSH into Taiga, but found that I was unable to since the dependencies for openssh-server were broken, so the server wasn't installed. I'll see if there's a way to fix it, though I think Debian PowerPC might make it problematic.


Things I've learned:
  • Check to make sure SSH daemon is running/scheduled to run on boot
  • Check to make sure firewall doesn't block incoming SSH signals
  • Use sudo init 0 to shut down machine instead of sudo halt
  • SSH is quite useful and I should have taken the time to learn it earlier

Raspi 3

I decided to tinker with the Raspi again, thinking of using it as a very low-powered FTP machine for transferring small files since the Raspi's ethernet is 10/100 and not gigabit.

Once it booted up, I got to some sort of weird display manager and had to grab the mouse to move the cursor so I could type in the login and password fields, but was unable to successfully log in for whatever reason. I was about to download Raspian, but then decided to look at the size of the ARM version of openSUSE. Since it was much smaller than Raspian, I tried openSUSE 13.2 first, but ended up with errors, so I went with 13.1 instead and got to the login without any problems.

I finished up setting up the FTP daemon before looking around on the internet a bit to learn how to SSH into the Raspi - to which I was successful. I then cleared out the SSH "known hosts" file and set up a static IP for the Raspi before playing with SSH a bit more.

What's nice is that I can just set up the Raspi with the bare minimum (power, ethernet, and usb drive) and then leave it alone - no need to login to it locally.

The only thing is that the Raspi is still a bit slow, even through SSH, but it's nowhere as bad as trying to run Chromium in Raspian.

I haven't set it up yet, since I'd have to rearrange the layout of the switch for the NAS and Melty, but I'll probably do it fairly soon.