Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Wednesday, February 27, 2013

View DNSMasq Leases

Use this command to view the current DHCP leases handed out by DNSMasq:

 cat /var/lib/misc/dnsmasq.leases  

Sunday, December 16, 2012

Recover a dead hard drive with ddrescue

I use Ubuntu, so this is geared towards using that OS, but gddrescue (ddrescue) should be available on most Linux distributions.

I got most of this info from: https://help.ubuntu.com/community/DataRecovery

Install with:
sudo apt-get install gddrescue

Find the disk to rescue with:
sudo fdisk -l

Then run the command using a command like this:
sudo ddrescue -r 5 /dev/sdf /tank/Backup/image /tank/Backup/logfile

In this case 5 is the number of retries attempted to read the data before giving up, /dev/sdf is the path to the device that you found via fdisk -l /tank/Backup/image is the image file that will be written. /tank/Backup/logfile is a logfile that is kept of the recovery.

If the backup is interrupted or you want to run it for another pass with hopes of recovering more information use a command like this:
sudo ddrescue -r 5 -C /dev/sdf /tank/Backup/image /tank/Backup/logfile

Note the -C which tells ddrescue to pickup where it left off, or try to fill in the blocks that are missing

Saturday, November 12, 2011

LVM Resources


From: http://www.howtoforge.com/linux_lvm

pvcreate /dev/md0
vgcreate imagestore /dev/md0
lvcreate --name ASZenData --size 500G imagestore
lvcreate --name ASZenSystem --size 10G imagestore
lvcreate --name VirtualBoxMachines --size 20G imagestore
mkfs.ext4 -m 1 /dev/imagestore/VirtualBoxMachines

Thursday, June 17, 2010

XFS the next great filesystem for your data?

I've been planning the reconstruction of a few servers lately and the rethinking of what the best approach might be has led me to XFS. While true it may once have been risky to use XFS in the past it appears they have made some improvements and XFS is now a great option for your data file system.

Here is a good rundown of XFS: http://blog.2ndquadrant.com/en/2010/04/the-return-of-xfs-on-linux.html

Monday, January 11, 2010

Learn the Top command options.

The top command is a utility to see what processes and resources are being used on a system in real time via a terminal. Personally I use it constantly to check on the health of my web server when connecting remotely.

The Geek Stuff has a writeup: Can You Top This? 15 Practical Linux Top Command Examples on 15 great things you can do with the top command.

Even though I use this command all the time I seldom use these more advanced features, but I will certainly keep the article around for reference.

Wednesday, October 7, 2009

I'm in love with the N900

I can't wait to get my hands on one of these devices and play around with it. The next few years are going to result in some REALLY cool new phone/computer mashups in the device world.



Friday, September 11, 2009

FUD from Microsoft to Best Buy employees against Linux

I made a posting onto facebook about this article:http://arstechnica.com/microsoft/news/2009/09/microsoft-teaches-best-buy-employees-how-to-troll-linux-users.ars This posting is a response that was too long for facebook to comments on that posting, most people can skip over this unless they are interested.

Marketing is all good, it is fine to say Ford > Toyota. But to say Ford > Toyota because Toyota can't use Ford parts is a bit underhanded. What is worse, they use tactics like this:

Windows is better because it uses MSN Messenger and mail and photo albums. Those things aren't supported on Linux.

In reality, I am chatting right now with MSN Messenger friends, and could easily access Hotmail or whatever the name of the mail service is these days, people have been checking Hotmail from this computer running Linux all week with NO issues.

True the native client (MSN Messenger) is not supported, but the Linux community would love to have Microsoft build packages or release the source code so that it COULD be installed. Rest assured the reasons that there is no MSN Messenger native client is because Microsoft has chose NOT to release one. So to count this as a strike against a Linux OS seems a bit unfair.

Here are some other points of contention:
  • Media compatibility: there are TONS of media players for just about every format around. The ONLY formats that give a significant hassle are the DRM formats, and guess what, they are proprietary and the ability to play them are controlled by those license holders (Microsoft, Apple, etc). If people were INFORMED about the consequences of their choices they might choose differently. Like if you archive/purchase your content in this format someone else can tell you how/when you are allowed to play your content. To say that Linux doesn't have support for such formats as MP3 is insane, and plainly untrue, on the very site the slides reference for support of the claim that Linux has poor MP3 support lies this page: http://www.linux.org/apps/all/Multimedia/MP3.html which lists no less then 115 applications for playing MP3's. I can assure you there are many more. Not to mention the many Windows MP3 players that can be played through technologies such as WINE. I tried to check the Windows 7 compatibility information referenced as a source of the comparison to Linux, but it says “Windows 7 Compatibility Center Coming Soon!” http://www.microsoft.com/windows/compatibility/windows-7/Default.aspx

  • Authorized Support: You say potato (http://support.microsoft.com/) I say potato (http://www.ubuntu.com/support, https://www.redhat.com/apps/support/, http://www.novell.com/linux/services_support.html) So what is not authorized about Linux support?

  • The list of reasons that customers should choose Win over Lin: Hopefully this is not meant to be an “all questions are correct” type of thing. Because Internet connection? Values? Hardware? Etc etc etc. This is like saying you should buy a Ford over a Toyota because Toyota's don't actually drive. Saying untrue statements, while a common sales technique is not what I expect from Microsoft... I hope they would be a bit above that.
  • Linux doesn't support Zune Office 2007: Again Fords are better because you can't use Ford parts in your Toyota. Come on! I could turn this around and say that Linux is better because it doesn't run the Linux Kernel... duh! This is leaving out things like WINE and Crossover Office that DO allow you to run all the applications listed (except zune) on a Linux box.

  • Updates: Ok, my Linux machine has an update function that works a lot like windows updates. I've had WAY less issues with my updates vs updates on the Windows boxes that I use/administer. This same sentiment has been conveyed to me via other people I know who use Linux.

  • Security: This is hotly debated, so i'm not even going to bring this up... this post is getting too long already.


To quote the article, and echo my sentiments:
“This Microsoft training material for Best Buy retail staff is deliberately attacking Linux. While there are correct assertions in the slides, the majority of the statements are inaccurate, or are only accurate in the specific way they are worded.”


To deliberately use wordplay to “win” your captive audience over seems very shady, and I would expect that a company like Microsoft to use straightforward “Facts” rather then double talk to persuade people.

Monday, August 31, 2009

Why you should care about open source software!

Occasionally people ask me why I use Ubuntu?

The simple and fairly complete answer is choice. The thing that really appeals to me about the open source software movement is the fact that if I don't like the direction my distribution is moving, I can change to another without loosing out on much functionality. If you don't like the way your IM app works, try another one, or write your own. If you don't like something you are free to change it.

I was reading a posting on the infamous slash dot on a comparison between Snow Leopard, Windows 7, and Ubuntu 9.10 (http://tech.slashdot.org/story/09/08/31/1916238/OS-Performance-mdash-Snow-Leopard-Windows-7-and-Ubuntu-910) and came across a great comment from user KingSkippus (http://slashdot.org/~KingSkippus) which nails the issue for me, I've posted the whole comment because finding it over there might be challenging, and it really is a great post from that site.

99.997% of the people using these computers don't care.


First of all, I think that number is way too high. While it may seem that way sometimes, people do care. Maybe not even a majority of them, but enough that it does make a difference.

Second of all, those who in theory don't care, when explained why it's important, start to care. When you add up the cost of upgrading from Windows 95 to Windows XP to Windows Vista to Windows 7, along with all of its associated applications (I'm looking at you, Microsoft Office), versus the cost of upgrading through the various versions of Ubuntu or any of the other popular distributions and their associated applications, people really start to notice. One of my favorite things to do when I'm showing off Ubuntu to people is to open the package manager application. I tell them it's like the "Add or Remove Programs" applet, except that you can actually add programs. "All this stuff is available to you for no cost. Just click it, and you're good to go."

When you explain to these people how there is absolutely zero technical reason why they can't have a movie or song play on the DVD player in their living room, their iPod, their computer, and anywhere else (and anyway else) they want to play it, but that thanks to DRM systems incorporated into Windows 7 and Mac OS X, they are artificially restricted from doing so because some third party has decided to "manage their digital rights" for them, it definitely gets their attention.

When you explain to these people how honest competition from really smart people doing really smart things just because they can and because they feel that others should benefit from their collective knowledge is one of the reasons why a lot of commercial closed-source software these days that might otherwise cost hundreds or thousands of dollars is sold for really low cost or given away for free because of how hard it is to compete with volunteer work, it also gets their attention.

When I show people my web browser (Firefox with AdBlock) and how I don't see particularly onerous ads on web sites because the person who wrote my browser isn't beholden to financial interest or corporate mandates, it has raised a lot of eyebrows.

I could go on, but hopefully you see my point. Free and open source software benefits everyone, even people who don't otherwise care, even people who shun it in favor of commercial and/or closed-source options. And sitting back and saying that people don't care isn't very productive. It's in our best interest to actually educate people so that they will care.

Wednesday, June 3, 2009

Where is the shift from OS 1.0 or 1.5 to OS 2.0?

I'm going to geek out on everyone for a bit. These are not well thought through ideas, just random thoughts. Any glaring holes in logic I blame on anyone else but me ;)

I have a bone to pick with makers of Operating Systems. It applies to everyone in the game, the makers of Windows, to the people involved with the Linux movement and everywhere in between. For a while now we have been involved, immersed if you will in the Web 2.0 movement. There are a lot of different variations on the differences between the Web 1.x and Web 2.0, let us assume for the sake of argument that the Web 2.0 phenomenon involves partially, or mainly the difference between a web that is content driven, and a web that is user driven.

In thinking about this shift and how it has impacted the ways in which I use the internet it got me to thinking, as many things often do, about the implications in user design and user experience design. Mainly in the ways that the role of the architect in Web "System" has changed. It used to be that the act of creating a site and regularly adding content used to be a difficult task. Then the web evolved a bit and server side scripting languages (PHP, ASP, etc) connected to databases came into fashion. They made things easier, but things like adding users, or changing site design quickly/easily were still challenging.

You see where this is going, many evolutions later and we have entire management system that make the types of things that Architects usually do to sites incredibly easy. Take for example this site (schwerzler.com) it is the first domain I ever registered and a site that I have managed since 2001. Some of the advancements in the site are easy to see, and a lot of them are direct results of my own learning associated with web technologies like css and html and php. At some point however I discovered a content management system (Joomla at the time) and it changed the way I thought about the web and the way as I as a sight owner interact with it.

Fast forward a few years more and I'm still using a CMS, one that works a bit better for me (Drupal, which is the same CMS I use for this site). Looking back I would have been crazy to include a tiny fraction of the features I have on this site or on Schwerzler.com onto my old 2001 site. With Drupal I can create content, add features and change the look and feel of the site all within a few moments, where with my limited skills as a programmer would have taken me weeks or months (or lets face it years) to implement. As cheesy as it sounds the CMS allowed me to focus more on what I put on my site and not how to put it on the site.

So what is my point right? I man the title of this post has something vaguely to do with Operating Systems right? O.K. I'll get to the point. In the same way that the Web 2.0 has revolutionized the ways that we interact with the web we need a similar kind of revolution allowing people to interact with their computers. Gone SHOULD be the days where I spend 70 hours in a weekend setting up Active Directory. Gone SHOULD be the days where after 70 hours I am still running down permissions issues (seriously, share permissions Vs. NTFS Permissions WTF?). Why do I feel like the girl in Goonies who is playing the playing the music and her every mistake brings the death of her friends ever closer.

Where is my nice interface, where is my UX? Why do I HAVE to have a degree (not any of the ones I have obviously) in order to understand the settings? Why does it seem like the Web is ahead of the OS market when it comes to giving users what it wants? This is NOT an OS specific issue by a long shot, Linux I knows carries many of the same problems, if not exactly then in close proximity) and I can only assume that a Mac has similar issues, if not I could probably find them.

I know that the setup and configuration of Active Directory is a complicated task meant for system administrators. I also know that MS has come a long way in progress to make the steps necessary to setup Active Directory much easier then it used to be, but come on people, these technologies were introduced in the late 1990's and the mechanisms to manage them remain stone age tools.

I know people will say I should have used this version (likely small business server, or the Linux equivalent) and I would have but those tools are honestly too broad and general for me. I don't WANT Exchange on my system... we use hosted email, I don't WANT WSUS, we only have a few PC's and WSUS is as prone to muck things up as it is to make things easier, I don't WANT a database on here, If I needed a database I will install one. I prefer to start from a clean base and add the few components that I need. Simple and clean. I want to be able to interact with the system quickly and efficiently, without feeling like a hacker.

My needs are simple, why aren't my solutions?

Thursday, May 14, 2009

Out with the Amarok in with the Listen

It happened one too many times, Amarok (Amarok) stopped playing my music. No good reason, just "too many errors". One last time it refused to play the one song I needed to hear right then. So it was time to switch. Pst... Listen (Listen), that is your queue.

I'm giving up form for function, the aesthetic for the operational. Its a tough choice, I've really loved Amarok, it was one of the first music players I scrobbled (My Last.fm profile) with. Now you can pick up scrobble integrated players at every turn.

First impressions, Listen just feels more like a Gnome app, which is not a surprise since Amarok has its roots so deep in the KDE world, and Listen is written in Python, which in my hobby coder world is my language of choice. We will have to see how things work out, I'm still hoping for something simple and elegant like foobar2000 (my all time favorite music player) or Songbird, and while I know I can run these via WINE, I'd rather support a native Linux option if I can.

Tuesday, December 23, 2008

You Might Be Elitist #2

If you do things the hard way just on principal... you might be an elitist.

Example: I'm in the process of some infrastructure shifting for a small business. They currently use Microsoft Small Business Server 2003 RC2 using Windows XP SP3 workstations.

In order to simplify things they are moving to a more homogeneous environment (all workstations will be exactly the same, there are only 4 so its not as big of a deal as it sounds).

Now I COULD stick with the SBS2003 installation, but there are a lot of things that I don't like about it. It DOES work pretty well, most of the time. Here is a list of things that I wish I could change:
  • Remote management WITHOUT having IE

    SBS2003 uses the RWW (Remote Web Workplace) in order to allow you to connect to a secure website and do things like check email (Outlook Web Access), Run Reports (status/use reports for server) and connect to the server & desktops. Most people look at the RWW as the strongest feature you get in SBS that you DON'T get in other Server environments (Either Microsoft server or any other server installation). For me it is a hindrance. I don't run IE, because I use Ubuntu for my OS. If I need to remotely administer or remotely connect to any of the computers at this location I have to start my XP virtual machine and connect from within there. It is the last "gotta have windows for this" thing in my migration from Windows to Linux.

  • Expensive client licensing

    Small Business Server 2003 Standard costs $639.99 according to Newegg.com. That includes a whole 5 CAL license. What does that mean? It means 2 things: 1. you have to choose user/machine licensing scheme. 2. you can only have 5 connected to the server at one time. This is pretty limiting. If you want 6 computers you need to spend an additional $349.99 according to Newegg.com This very quickly drives the cost of the server up, this is completely exclusive of any desktop costs. Oh yea... if you want to include SQL in the package the cost goes up more. Though at some point around the 15 user mark the cost of cal's becomes more then the cost of the server, even with SQL, so the more people you have the less it matters.

  • Unused services

    This is not as big of an issue for me as the other two items previously mentioned, but it is still something I would like to see addressed. Something I realized, running your own mail server is stressful. A lot of a business' ability to function hinges on access to email and telephone. Even if things are critical in other areas of the infrastructure if you have access to email and telephones you can hobble along. This is the primary reason we moved our main mail services from Exchange over to Gmail. The $50/user/year cost was acceptable to us in order to ensure that critical part of our infrastructure was operational. Once we had transitioned from exchange TO Gmail there was no "clean" way to remove exchange from our environment. In fact if there is no good way to not install exchange. The SBS components are SO tightly integrated that things begin to break down once you remove one part of it, even if it is not completely necessary. There are a bevy of things that are similarly required arbitrarily. Updating, backup, firewall, faxing.

  • Backup Solution

    SBS2003 does backups, but it misses the last critical step. Firstly it favors setting up full system backups, and the reading materials strongly suggest a daily schedule. In my sittuation that means a daily single file of about 30-40 GB. Now that excludes a few folders like the updated service packs etc that are easily accessible online and are not "installed apps" per-se. I have a drive on the server that I use to backup the server to, which is a sub-optimal solution. The real trick... and the killer for most backup scenarios is where is/are the off site options? My solution is not great, but it works ok. We purchased 2 500GB external hard drives that connect to the LAN. These are switched out weekly. We keep 2 weeks of daily full system backups (10 x30-40) plus as many weekly full system backups that will fit on each of the drives. In this sittuation the most we would ever lose is 1 week of data if the building burned to the ground on a friday. This scenario works ok, in theory, but all of the scripting/logic that is used to copy the large files over the network is coded by hand... by me, and I am not a coder. So it fails on occasion, and that is bad for a backup scenario. What would be better would be Weekly full backups and daily (or a few times a day) incremental backups directly to the NAS. This is NOT possible without the purchase of more software.


There are plenty of things that I like about SBS2003, but they are all things that are central to Microsoft's polcy of non-interoperability vs the fact that Microsoft has an inherently better product. They certainly do seem to be backing down from that stance with the release of some API's that make the ability of projects like SAMBA to interact more successfully with Windows.

So what is my alternative? Well I have two that I am actively pursuing, both of them Linux solutions to this common "Small Business Server" problem.
  • SME Server

    this is a prepackaged Cent-OS distribution that takes most of the hard parts of setting up a small business network out of the equation. It supports things like Roaming Profiles, User Startup scripts, mail, vpn, backup etc. It is a great package that brings it all together pretty well.

  • Do what Linux does best

    And that is to provide a customized solution to my specific problem. I found a few tutorials online that have helped me to get to the point where I can have users logging on to my Domain, hosted on a Linux domain controller. I can install/configure/uninstall any of the components in the SBS equation that I do not need, and switch out the ones that are present for something that fits my needs much better. It comes at a great cost however, and that is time. The amount of time it is going to take me to setup and get working the way I want is several factors more this way, but the solution is exactly what I want... in so far as the technology allows for.


So as you can probably guess, I'm opting for the fully customized Linux alternative. I'm still in the testing phase at the moment, configuring a virtual lab of computers that are acting as server and clients (both Linux and Windows) in order to hammer out my plan of attack. This is not to say that I am 100% set with this option, but the main advantage of testing the most desirable/most difficult solution first is that if it ends up not working, you will usually be pleasantly surprised at how little time it can take to implement one of the other solutions.

I'll try and keep this blog updated on my progress, so far I am impressed with how cool learning about this stuff has been.

Wednesday, December 17, 2008

You Might Be Elitist #1

If you thought this type of ignorance (like racism) had disappeared long ago. Sadly neither is true:

http://allforlinux.com/2008/12/it-teachers-kicked-her-student-because-of-linux/

Monday, October 6, 2008

Atmosphir: Free cross platform game.

About Atmosphir Read a review at Linux Haxor

I've long been a fan of cross platform games. Gaming was for several years the device keeping me latched to Windows. "But how can I play my games if I'm an Uber Linux dude?!?!" I would ask. Then I realized that I hardly ever play games anyway.

Every now and then I do like to loose myself in a game, and so I have begun to embrace the console mode of gaming. That works ok, but SOME games simply play better on a PC. Enter the cross platform gaming nitch.

The Pangea of gaming, where it doesn't matter what OS you run, it only matters if you desire to play a game or not. Across the board we are not there yet, but inroads are being made.

Atmosphir is one such inroad, and I heartily applaud the developers for making the game:
  • Free!

  • Cross Platform


I have not yet played, but rest assured I will check this out.



Tuesday, July 8, 2008

Create an emergency recovery disk


Linux.com has an article up detailing how you can create your own recovery disk from an ubuntu 8.04 cd.

http://www.linux.com/feature/137524

This is a great tool for anyone who does support and has gotten those calls late at night calls.  "I lost it! My computers brain is dead." followed by eyerolls.