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

Monday, March 8, 2010

Cricket Modem On Linux

I have a Cal-Comp A600 USB 3G modem from Cricket as my backup internet connection.  It's a "flip-flop" USB device that presents a small disk when first plugged in that has all the drivers you need to Windows and Mac.  Once the drivers are installed, they know how to frob the device to make it look like a modem, and not just a USB stick.

Getting this to work in Linux seems really poorly documented, so here's my attempt to save some poor bastard in the future a few minutes of pain:

# Flip this device
usb_modeswitch -v 0x1f28 -p 0x0021 -m 0x08 -M 55534243b82e238c24000000800108df200000000000000000000000000000
# Hold a moment for things to catch up
sleep 5
# Reset the device so it will come back as a modem
usb_modeswitch -v 0x1f28 -p 0x0020 -R 1

After that, NetworkManager should see a CDMA modem and offer to set it up for you (at least on Fedora 11 and 12, and I guess other recent distros with recent NetworkManger).

Sunday, February 22, 2009

The Obligatory RAID and Backup Post

This weekend I upgraded my back up server at home from mirrored 160GB disks to mirrored 1TB disks, so here's my obligatory "Linux RAID is insanely great" post:
Linux RAID is about as great as all other high quality RAID: It just plain works. It's not sexy, it's not going to get you borged by Google, but it will get the job done reliably with a minimum of fuss. Which is exactly what you want in your storage solution.
There are a lot of writeups about moving arrays around, so I'll skip the commentary and get to the "Mirrored disk migration HOWTO". This assumes you have two disks, sda and sdb being mirrored, and that your /boot is a separate ext3 filesystem that's being mirrored (eg: not in LVM)
  • grub-install /dev/sda
  • grub-install /dev/sdb
  • sfdisk -d /dev/sda > sda.partmap
  • sfdisk -d /dev/sdb > sdb.partmap
  • tar -cpvf boot-backup.tgz /boot
  • mdadm /dev/md0 --fail /dev/sda1 # wash rinse repeat for each md you have
  • halt
  • swap disk with nice shiny new disk
  • boot, if you get grub issues you probably need to do something like this at the grub prompt to get your menu back:
    # root (hd1,0)
    # configfile /grub/grub.conf
    then edit your boot line in the menu to make sure you boot off the other disk for this boot
  • sfdisk /dev/sda <>
  • mdadm /dev/md0 --re-add /dev/sda1 #wash, rinse, repeat for remaining partitions, watch /proc/mdstat for completion times
  • grub-install /dev/sda
  • Wash, Rinse, Repeat the above for /dev/sdb
  • At this point you can extend the last partition by blowing it away and making a new partition of larger size to use the rest of the disk and then use mdadm's --grow flag to make the md device use the new space. Alternatively, you can make a new md device with a new partition. I chose the latter because I then LVM the md device. yes, I know, that's very belt-and-suspenders of me and I could use the built in RAID features of LVM now, but hey, dm-raid was new when I did the original build of this system.
The important part to note here is that you need to make sure that you grub-install each disk before, during, and after, the migration. Otherwise you'll find yourself lacking an MBR a bootlaoder and sitting at a "PLEASE INSERT SYSTEM DISK AND PRESS ANY KEY TO CONTINUE" prompt. If you find yourself in that situation, just grab a LiveCD from your distro, boot it, and use grub-install from that like so (assuming your mirror of /boot is on sd{a,b}1):
  • mount -t ext2 /dev/sda1 /mnt
  • grub-install --root-dir=/mnt
  • umount /mnt
  • reboot
After that, it's a short hop, skip and a jump to use Time Machine to backup your Mac or something like rsnapshot, duplicity, Unison, BackupPC, or Bacula

Sunday, January 25, 2009

Long time, No Post

Random Braindump because I haven't posted in a while.

Work:
The new job is doing well so far but still learning workflow and systems. I'm the on-call at the moment which has proved highly interesting. I am enjoying things so far and as an added bonus it's raised my interest level in actually participating in FOSS again.

Food:
Made baked eggs to go with corned beef hash last weekend. I overcooked the eggs a tad but they were still tasty as well as easy. I have no idea why I haven't done this before. I'm going to try to work that into menu again this week, or possibly upgrade to huevos rancheros.

Made Chile Verde again on Friday too. Still damn tasty.

Linux:
Work has given me a Dell Dimension E6400c. It's very nice looking. Linux doesn't work on it well due to hardware newness. I'm running F10 on it now and the i915 and ALPS drivers cause major pain (OOPSes, video IRQ gets disabled, random noise in the input stream for the trackpad generates clicks and repositions the pointer). I'm hoping to punt back to CentOS 5.3 when it comes out which should work but have less "features" -- 5.2 didn't have any knowledge about the ICH8 chipset in this thing so no wired or wireless networking.

I also got roped into giving a presentation on SELinux at the Milwaukee LUG meeting in February. If you're in the neighborhood, drop by!

TeeVee:
I've been using First Gen Intel Core Duo 20" iMac with Elgato EyeTV as the primary TV lately so I can watch a few channels in HD. It's been a 50/50 experience so far. I like having HD, I like some of the timeshifting features, and I like the program guide. It's a much more pleasant experience than Time Warner's Mystro cable box which has a painfully slow program guide, takes 5 minutes to boot, and crashes weekly. How they can make something without a hard drive take 5 minutes to boot is truly beyond me.

On the downside, the Elgato doesn't have twin tuners, so you can only watch/record one thing at a time and there's a enough of a delay that it makes using the Wii very hard. Also, the provided remote sucks and on-screen controls when using the Apple Remote (which Jess has dubbed "The Tic-Tac") are a tad clunky.

All in all it's made me just hate television providers even more. All I want is about 30-odd ClearQAM channels in unencrypted form and I'm willing to pay for the service, why is that so hard for cable companies to provide?

I'm still waiting for the HD TV market to settle down a bit. There's a glut of cheapo 720p displays out there but 1080p displays are starting to become more prevalent and similar at the feature base. My back-of-the-envelope trending makes me think sometime this summer will be the time to buy. Then I can re-evaluate the media situation again.

Loving 24 so far, waiting for Heroes to return. Somehow I missed out on BSG, which makes me think I need to Netflix the whole thing.

Random:
  • TabKit is a wonderful, wonderful thing. If you use a lot of tabs in Firefox: get this now.
  • identi.ca upgraded to Laconia 0.7 this week. It's got some bugs but overall is very nice (groups, Twitter OMB integration, and a new look).
  • Super happy to have a smart president again.
  • Craving Nutty Bars, can't have them thanks to the poison peanut pandemic.
  • I derive an unhealthy amount of pleasure from Passive Aggressive Notes
  • Milwaukee is cold in the winter. I knew it would be, but damn, I can't wait for spring.

Saturday, October 25, 2008

Livna -> RPMFusion migration

Thorsten Leemhuis writes to remind us about the loss of the Livna mailing lists and the continuing migration of the Livna repos for Fedora to the RPMFusion repos announces a few months ago.

If you're a Livna, FreshRPMS, or Dribble user (and if you have an nvida card, ati card, mp3, or dvd around, you most probably are) you should probably start taking heed of the changes.

Sunday, August 17, 2008

Install Fest at Milwaukee LUG!

Advance warning that the Milwaukee Area LUG is having an Install Fest on Sept. 13th. More info can be found in the wiki. I'm going to try to be there with my laptop and a copy of liveusb-creator to make some USB Fedora keys for folks who want them as well as lend a hand.

If I have extra time, I'll try to setup DHCP on my laptop to run as an option server to present PXE'able images for various installers. This will require a bunch of downloading across my poor little cable-modem to get said images, so that might not happen, unless of course I travel to $hq and can co-opt their link.

If you're in Milwaukee, drop by and say "Hi" or bring a machine to install Linux on!