Posted about 1 year ago
I had a little trouble installing lm_sensors on my Acer 5610 laptop running Gentoo 2.6.27-r8. I will describe what I did to successfully install lm_sensors and its dependencies.
Stuttering on read-edid
My main issue with installing lm_sensors is that one of its dependencies x11-misc/read-edid-1.4.1-r1 seems to be broken for my kernel version. I found a patch Gentoo Bug 252701 and downloaded it. After messing around for a little bit I figured out how to have ebuild patch the install for me so I can stay within the Gentoo packaging system.
Note that package ebuilds and other data are stored under /usr/portage directory. In this case if one were to look in /usr/portage/x11-misc/read-edid/ they would find an ebuild for each version of read-edid as well as a files directory. In that files directory might reside some patch files. I noticed that during an emerge these patches are applied. So I took the patch I downloaded and tossed it in /usr/portage/x11-misc/read-edid/files.
Confessing to ebuild
Now don't think ebuild is so stupid as to just let you be on your jolly way emerging this package with the new patch. It will be sure to let you know that the checksums are incorrect. So lets have ebuild regenerate the manifest for this ebuild.
sudo ebuild /usr/portage/x11-misc/read-edid/read-edid-1.4.1-r1.ebuild manifest
Now that ebuild has been appeased try to emerge read-edid alone or lm_sensors and ebuild should apply the patch to read-edid and the package should compile and install. Unlike Debian and Ubuntu lm_sensors for Gentoo seems to require not only that you load modules but also that a daemon be run so you will need to start that.
sudo /etc/init.d/lm_sensors start
Notes
One note, I actually rsync'ed the patch file from the link above over whatever patch was in the files directory. I don't think this is recommended but if you must do so at least make a backup of whatever patch file currently exists there.
If any instructions here weren't clear enough for you then you may contact me. Don't necessarily expect a response though, I'm a busy person!
Hope this helps someone
Sean
Posted in Linux, Tech | no comments
Posted about 1 year ago
I have managed to get Gentoo running on my Acer Aspire 5610 laptop. Here is an overview of the specs:
- CPU: Intel Core Duo 1.86Ghz
- RAM: 2GB PC25300
- HD: 160GB SATA 3G
- Network: Intel Pro/Wireless 3945ABG, Broadcom 44xx 10/100 Ethernet
- Removable Storage:Unknown 4-in-1 media card reader
I installed using the Gentoo 2008.0 i686 Live CD. I am wishing I would have taken the time to compile my own custom kernel but that can always be done later on. Anyway here are some tips to help anyone with the Acer 5610 series hoping to get Gentoo installed. I only ran into a couple of easy-to-fix problems after the install completed and I was booted into the system.
Getting Networking...Networked...
I had to manually insert the b44 module using
sudo modprobe b44
to get my wired network card to work properly. Before doing this eth0 did not exist and caused a few errors to spring up during boot up. This module can be loaded automatically by adding b44 into /etc/modules.autoload.d/kernel-2.6 as documented here.
Wireless networking has not been tested yet but I believe the 3945ABG is well supported among distributions. It seems to be recognized and I know there are modules for it. If you are having trouble try the following commands.
lsmod | grep 3945
If you don't see anything promising from that then try to find the appropriate module.
modprobe -l | grep 3945
Try inserting the modules that the previous command spat out, you only need to type in the module name not the extension nor the full path, look at this example.
modprobe iwl3945
Graphics Adapter Support?
I was very surprised with this one. Oddly letting Xorg -configure generate an xorg.conf clearly found an Intel 950 GMA integrated graphics controller. The xorg.conf looked pretty good, at least for now. However I got errors when trying to start X (errors will be posted later). I actually needed to also load a module for this as well, I forget the name of the module you can probably find it yourself though.
modprobe -l | grep intel
After loading that module my X server started up fine.
My laptop is not here, which is why some of the above information is not complete. The system was still updating before I left work and I wasn't about to pull the plug to the Inter Web. I will come back to this and update the information once I have it back. I need to see how the multimedia card reader works out so I will update with that info.
It might not be long before I have to take the Ubuntu stickers off the laptop and replace them with Gentoo counterparts.
Sean
Posted in Network Admin, Linux, Tech | no comments
Posted about 1 year ago
I'm setting up a testing environment with a Debian Etch based virtual machine running in Virtual Box. The environment calls for RAID 1 using mdadm and I have already begun setting up for this. I'm cloning a current non-RAID VDI and will document some of my findings and bottlenecks in this blog.
Assuming you are or can get as far as creating a VM...if not try Google or RTFM :)
Cloning a VDI
Move to the directory in which your vdi files are stored. I noticed that the VBoxManage command does not take into consideration that you may not be using the default ~/.VirtualBox directory for this. If you are NOT storing your VirtualBox images in ~/.VirtualBox then you MUST specify the full path as of version 2.1.2r41885. In my case the command would look something like below and I had to ask sudo to bless me with write permission to /opt. Clone as many virtual disks as you wish or your hard drive space will grant you.
VBoxManage clonevdi /opt/debian-web2-vraid1.vdi /opt/debian-web2-vraid2.vdi
Adding the Images
Add these disk images to VirtualBox, this can be done through the Virtual Media Manager in the File menu of VirtualBox. Then open the settings of the VirtualBox that you have hopefully created already and add these images in the hard disks menu. Sorry I'm just too lazy to make screenshots.
RAIDing Linux
I have found software RAID with Linux (specifically Debian) to be rather easy. Simply create an identical partition layout on each disk intended to be used in the RAID 1, instead of using a typical ext3 filesystem use the for RAID device option. Once all your partitions have been created, select the new option at the top of the main disk partitioning menu Configure RAID. Create a new RAID device, select RAID 1, I chose two active devices for the RAID you may be using more. You can also use a spare if you have planned for that. Repeat this for each RAID 1 device you wish to create. Once back at the main disk partitioning menu select each newly created RAID device and you can now set mount points and other options as you would any other device.
If I have left anything major out please let me know. Happy RAIDing! After having all this fun I bought 3x500GB Seagate Barracuda drives to add to the one I am already using to store my movies/music etc on. I plan on setting them up in 2 pairs of RAID 1 and creating one big device using LVM on top of the RAID for a sexy 1TB RAID 1! There is also a chance of a RAID 1+0 but LVM will be more difficult which is what I'm all about.
Sean
Posted in Linux, Tech | no comments
Posted about 1 year ago
I have been wrestling with Virtual Box for the past couple of days trying to get a small network of virtual machines communicating using the host machine (Kubuntu 8.04) as a router. Have been able to get the guest machines to communicate to the host machine and even to my server then on to the Interweb! Routing through Linux is so much fun and not hard to configure.
I often get stuck on a very simple and humbling problem. For some reason I always forget that the machine(s) being routed to will need to know how to get back. It happens to me a lot. I have been banging my head on the desk wondering why I can't get to 10.23.23.1 but I can get to 10.23.23.2, because I CAN get to 10.23.23.1, but 10.23.32.1 just does not know which route to take to get back to me.
Anyway, I have the kernel set to forward packets with:
echo '1' > /proc/sys/net/ipv4/ip_forward
The host machine knows how to get to both guest machines, and they know how to get to the host machine. They are both on the same network so a route that says use 192.168.0.2 to get to 192.168.0.0/24 should certainly be enough.
If I figure out what the problem(what I am overlooking) is I will update this blog.
Up too late again...but what is the point of living life if you don't live it!
Sean
Posted in Network Admin, Linux, Tech | no comments
Posted about 1 year ago
So in all the excitement of discovering over 100GB of free space on my hard drive and using it for Virtual Box, I will be installing different Linux distros for fun. I have decided to once again battle the mighty Gentoo. Since I enjoy a challenge I am going from the minimal install disc. I have the system running now, although I am missing a logging daemon :( and that is caused by what seems to be a C compiler issue. Since I am convinced as always, that I have done something foolish I will keep banging my head against the wall instead of sending a bug report. Maybe I will post on a forum somewhere, likely LinuxQuestions.org which I seem to frequent.
There has always been some mysterious force driving me to use Gentoo. Once I get it running and toy around with it for awhile in Virtual Box I could possibly end up going to Gentoo for my desktop at home. I still remember and more is coming back to me now, the long nights of maddening insanity trying to install Gentoo before I even knew what Linux even was. Haha, what a poor soul I was in those moments.
Going to finish my crown on the rocks which is now just crown, crank out some push ups, dips and sit ups. Then I need to find out what I'm doing with the rest of my night.
Update: Well I have Gentoo running in a virtual machine but still have trouble getting xfce installed. I am not giving up though, I want to give Gentoo a try and if I like it enough I may bear the task of migrating my Ubuntu desktop to Gentoo!
Update: Fixed this by re-emerging x11-libs/cairo with the X USE flag set. One can add USE flags on a per package basis by adding a configuration line in /etc/portage/package.use as shown below.
x11-libs/cairo X
Sean
Posted in Linux, Tech | no comments
Posted about 1 year ago
So I’ll keep this one short and to the point. I wanted to see in the admin of my site how much disk space each photo album was taking up, and also a grand total of all photo albums. As noted in the title I am using Attachment Fu in Rails. The latter of the two is very easy, I could just use a system call to du -chs and be done with it, or I could do some fun programming! Here is what I did…
To find the disk usage of a particular photo album is not completely simple. I need to consider each of three thumbnail sizes for each image as well as the original image itself. I might as well take advantage of the attachment_fu helpers in some sort of nested looping.
Ok, I’m beginning to rant so here’s the damn code:
Calculating size of each photo album.
def photo_album_size(album)
album_size = 0
album.pictures.each do |p|
album_size += File.size(DOCUMENT_ROOT + p.public_filename)
p.thumbnails.each do |t|
album_size += File.size(DOCUMENT_ROOT + t.public_filename)
end
end
return album_size
end
Calculating grand total of all photo albums.
def total_photo_albums_size()
albums_size = 0
albums = PhotoAlbum.find(:all)
albums.each do |a|
a.pictures.each do |p|
albums_size += File.size(DOCUMENT_ROOT + p.public_filename)
p.thumbnails.each do |t|
albums_size += File.size(DOCUMENT_ROOT + t.public_filename)
end
end
end
return albums_size
end
So thats it. I threw these in my photo albums helper and they work pretty well. By the way DOCUMENT_ROOT will have to be defined or you will have to substitute for it in some other way.
Sean
Posted in Ruby on Rails, Linux, Tech | no comments
Posted about 1 year ago
Sorry for all the 503 errors lately. It seems to be a bug in Haproxy 1.3.12 which is the latest package available to the Ubuntu distribution running on my VPS (running this site). I don’t feel like compiling the latest version which sounds to have a fix. Instead I will be dropping Apache2 → Haproxy entirely, in favor of Nginx. This suits my VPS much better, the current setup is total overkill anyway.
I’m really excited about this, and it should greatly increase the response time of the site. I hope to have this going before the weekend so I can spend some time adding features and fixing code for the site.
Posted in Website, Network Admin, Linux, Tech | no comments
Posted about 1 year ago
Well my first blog of 2009 is going to be a great one! All Linux enthusiasts and supporters should read on! Long story short and getting up to the point, I wanted a nice networked printer for the home. Since all computers are going through a switch including the wireless router, everyone would be able to print to the same printer, without messing around with sharing it on a computer. So I start shopping around a bit, and surprisingly didn’t think much of Linux support. I suppose the main reason for this is that I have now used a slew of cheap HP, Brother and Lexmark printers on Linux without any issues.
Meet my nemesis of December 2008, Kodak! I was at the nearest Best Buy browsing the printers. To my misfortune so was a Kodak sales representative. Please understand that I am not much for typical sales people. Anyway this guy wasn’t so bad but still had that unlikable edge to him. Enough about that, let me get on to the bigger issue. Basically Kodak does not support Linux, no drivers are provided or schematics released to the Linux community. Ok, I am going to jump around some here. Here is an overview of my conversation with the representative, mind you I tried to represent the Linux community with some dignity by not cursing his company!
Me: I’m almost sold on Kodak’s printers, ink cartridge standardization, low printing costs. Now, I don’t expect you to necessarily know this, but do you know whether or not Kodak has support for Linux.
Representative: To be honest I don’t know, but I don’t think so.
I buy the printer available, something I normally wouldn’t do but in hopes that maybe Kodak will change and realize Linux is not the evil cult that it has been labeled as. Now, Best Buy did not have in stock the model I originally wanted but a step down yet. The Kodak representative clearly stated to me, more than once the only features lost are the wireless and double-sided printing. Maybe I expect too much but in my mind this was ok. I don’t NEED wireless, I only NEED wired networking. Which took five minutes to explain in the very beginning. That conversation went like this:
Me: I am looking for a printer that has a NIC in the back.
Representative: You want wireless.
Me: No, wireless is good, but I really want a network connection you know cat-5.
Representative: Oh, printers don’t have serial connections anymore.
Me: (thinking oh my, what is it going to take! so I start using other means of communication like using my hands to simulate a network cable)
Representative: Oh, ethernet!
Me: (BINGO! Ok, do you need a break now? Or can I continue?)
Ok, sorry about that rant! Now we are back to where I was a moron and actually bought this thing! So I get home, unpack it all load the cartridges yada, yada. I soon realize there is nothing but a mere USB connection in the rear. I was not terribly upset as I should have payed more attention anyway whatever, so I go back and return the damn thing! It must have been a blessing from Tux, because I suddenly realized how I had betrayed all of my beliefs. Kodaks gooney is still hovering around, so I walk up to him and with a massive smile announce that I bought a Kodak printer, and had brought it back then my reasons as you can imagine. I again breached the subject of Linux support this is the juicy part people, listen up!
Me: I just can’t buy something that doesn’t have Linux support, otherwise I would be sold on Kodaks printers.
Representative: I’m sorry to hear that. Do other manufacturers support Linux?
Me: Yes, matter of fact some even distribute their own drivers and support, while others release their schematics so the community may develop its own drivers. (I just dropped some big names I knew worked HP, Lexmark, Brother).
Representative: Oh I see. Well, to be honest you are the first person who has asked me about Linux. I’m sure if it was that popular Kodak would support it, but obviously not enough people to use it for us to bother.
Me: Completely dumbfounded at this great mass of ignorance in front of me. But I sense that it will get worse so I stick around!
Representative: We won’t release our information to the Linux community until there is more security that our information won’t be released to our competitors and the rest of the world. If we release our ink technology to the Linux community, everyone could then duplicate it…
Me: At this point I stopped listening because I realized there was no hope but then I did inform him. Not only was he completely incorrect and probably misinformed that there is not enough demand for Linux. Who told this poor guy anything about giving our their super secret ink technology.
Ok enough of all that! Let me just finish that part of this massive blog off with, I will not buy ANYTHING Kodak until they open up their eyes, oh yeah and get out of bed with Microsoft!
Relative Links:
Kodak’s Official Version Of Why They Do Not Supply Drivers For Linux
Linux drivers for kodak 5100 printer
kodak printer driver
Ok, let me talk about positive things now! Well as long as the subject is Linux! Long story short, I bought an HP Photosmart C6380 AiO from the same Best Buy for $200, well OfficeMax had it for $159 so I price matched. So far I am thrilled with it. I set it all up on the wireless, booted up my laptop running Xubuntu 8.04 (now using Gnome). Went into the printer configration, searched for printers, oh! What do you know it found a HP Photosmart C6380, connected installed its own driver, and I was printing just like that. Of course I then ran another cat-5 down to the switch, and now everyone is printing! Really though, talking strictly printer, putting my Linux fanboy attitude aside. I am happy with the printer. I will save an in depth opinion on it for later after I have really used it through and through.
Coming to a close here, the website design will soon change drastically, which is what I’m going to work on now!
Sean
Posted in General, Linux, Tech | no comments
Posted about 1 year ago
I spent some time today and setup email on the new server. Much credit given to this how-to. It is now that I’m starting to fully enjoy my Linode. I basically have Postfix as the MTA and Dovecot performing IMAP/IMAPS and SASL. I am hitting the ceiling by now with memory usage, but I may be looking at taking Apache out of the picture in favor of something a bit smaller. Either Lighttpd or Nginx, leaning towards Nginx, if for no other reason than to just try something new.
Before all that I want to polish out my email setup by adding virus scanning solution which I haven’t decided on yet. I also will probably add postgrey but I don’t know anything about its resource usage yet, or even how it operates so that is another topic to research.
I also need to reconfigure the firewall so I can accept pings while resisting DoS attacks and the like. I actually took the time for once to write a SysV startup script for iptables. If I get some time to revise it and clean it up perhaps I’ll make it publicly available in case anyone wants to look at it.
Well I have plenty to do and as usual will pretend there is a chance of me going to bed at a good time tonight!
Sean
Posted in Network Admin, Linux, Tech | no comments
Posted about 1 year ago
Well as far as the website goes, the move has been made. It wasn’t a total success but I’m just glad I now have full control to configure everything the way I want it. I unfortunately answered wrong when I told the BlueHost representative that I didn’t need any files off the server. I had a backup of my files but not the database. Which really sucks because two days earlier I had written a database backup script and put it in cron. I did take the content out of Google’s page caches and recreated some of the blogs from it. Anyway things will be much better now and I can’t wait to test my capabilities. It may not look different but the site will have a much faster response time now. FastCGI was just bogging it down especially on shared hosting. I will also be able to set up better caching. I have yet to setup a mail server but I have other things to focus on at the moment, perhaps I will get that done either later today or more likely tomorrow.
I am using “Capistrano” to deploy now so I have been heavily customizing its tasks as well. You can do some interesting things with “Capistrano” many of which are even beyond my skill and creativity. For instance the default deploy:restart task wasn’t working with my application. I could have investigated the issue but instead I figured why not just write a new one since its a simple command to restart my Mongrel clusters. I took this code snippet I found here and modified it to just replace the default tasks as shown below.
namespace :deploy do
[ :start, :restart, :stop ].each do |t|
desc "#{t.to_s.capitalize} mongrel using mongrel_cluster_ctl"
task t, :roles => :app do
sudo "mongrel_cluster_ctl #{t.to_s} -c #{mongrel_conf}"
end
end
end
Since we are using the same namespace:task scheme these will get called in place of the default tasks. If you want to keep the defaults in place just change the namespace to suit your needs and add in the proper hooks.
I’m out of here for now
Sean
Posted in Website, Ruby on Rails, Linux, Tech | no comments