Search This Blog For Stuff

Loading...

Monday, September 13, 2010

The perfect home network. No, srsly. Purrrrrfect.

zomg I love Linux.  I'm finally getting the hang of the intricacies and the stability, robustness and ease of administration of Ubuntu seems to be growing exponentially.

[rough draft, have thoughts? help me by adding some geekness in the comments below]

Objectives for (my) perfect home network:

  • a Win7 box for voice input / MS Office, camtasia and other Win-only creature comforts
  • a Linux box dual screen synergy+ s/w kvm to control win/linux efficiently
  • a dual-boot Linux laptop
  • a multimedia front-end for TV/entertainment centre (music/movies/couch surfing, etc)
    • controls w/ remote and/or phone and from any PC
  • easily switch users between wife and I w/o entering passwords
  • safe file encryption on /home/
  • remote profiles for getting access to MY files from laptop or PC (win/linux) (not just files, but settings for Chrome/Firefox, etc...)
  • remote access from WAN (ssh -X port forwarding and/or FreeNX/VNC?)
  • automated backups to server and from server to....? (PC? cloud? friends ReadyNAS?)
  • an encrypted USB stick for my keychain w/ tools needed to boot any PC w/ Linux and ssh into home network and also same from Windows (if absolutely necessary)
  • Torrent server / RSS tracking to automatically download my favourite, uh, podcasts

and the very rough steps to accomplish this...

  1. old box, bunch of HDD's, install Ubuntu 10.04.1 (or whatever current flavour) Server  (many tutorials on a good Ubuntu Server setup)
    1. encrypt home folders or home partition during setup
  2. update (sudo apt-get upgrade)
  3. install webmin (does this need a tutorial link?)
  4. add limited gnome? for VNC / SSH -X administration?
  5. setup BIND for DNS internally if not supported by router (easier than it sounds)
  6. vmware server?
  7. mythTV? squeezebox? bacula?
  8. setup NFS for homes folder
  9. add "no_root_squash" to /etc/exports on at least /home/ so can rsync (needed for others?)
  10. setup samba shares for any win boxes? (could meld the win profile w/ *nix profile)
  11. autofs for mounting home on workstations over NFS (need trickery for laptop being remote)
  12. change /etc/ssh/sshd_config to have Port 54321 (I change all ssh ports of all boxes in ssh_config too so I don't have to remember to -P 54321 in CLI)
  13. ssh-keygen -t rsa -b 4096 & ssh-copy-id user@server
  14. install FreeNX on workstation (or even server if u must?!?)

Thursday, July 8, 2010

Spanning an archived or compressed file across multiple DVD's

Yes, yes, DVD's make a good permanent snapshot copy of data.. but how do you get the dog-goned data onto DVD?  In Linux.

Here's what I did.  I had a butt-load of client's MP3 / WAV audio files to send... 32 GB or so.  But client has, of course, Windows.  So I had to do it in such a way that limited the pieces of media I would have to burn and still be accessible via Windows.

  1. Compress and span multiple volumes all the files in the directory (I used File-Roller, but should have used the command line b/c it wouldn't let me chunk into files bigger than 2GB (7z restriction?)
  2. tar vcf - backup_audio.7z.* | split --bytes=2800000000 -a 3 -d - Audio.tar.
  3. Burn 3 Audio.tar.00? files to each Dual Layer DVD
Now, I had to chunk the files using TAR into 2.8GB files b/c I wanted to optimize files space on the DVD's -- a single DL DVD will hold roughly 8.4GB but can't store a file larger than 4GB.

Once I mail the 3 DVD's to the client, I'll have to log into the machine remotely and issue the following commands to extract the precious files... (after copying them all to a single directory, of course)

copy /b Audio.tar.* AudioBackup.tar


Then I would use 7zip to untar, then unzip the files.  For my own use, reassembling in Linux would require the following command:

cat Audio.tar.* > AudioBackup.tar

Next time I do this, I'm going to try it all in one command using gzip/tar, resulting in strictly one set of files to extract w/ 7zip  ;)  Which, I think is just adding the "z" option to zip in the TAR command.  But I am lazy and I had already had File-Roller compress my files (setting the size to be 8.4GB, but resulted in 2GB files as I mentioned)

**UPDATE**

using 7z from command line (7-Zip)

7z a -t7z -v4420M -mx9 -mmt Backup.7z ./backups/


Optionally, with TAR (compressed via ZIP) and SPLIT, the command would be something like this in one go:

tar -cvz ./backups/ | split -d -b 4420M - BackupDVD.tgz.

Monday, July 5, 2010

Foolproof nLite Super Windows XP Custom Install Disk

I've done so many custom boot CD's in the past, and I think the success of such is about 37.8%

To be sure your custom XP disc will be oozing with awesomeness and that you get the proper order of nLite, BTS and RVM Integrator, keep these things in mind:
  • start with an original (clean) disc (even if it's SP2/SP1)
  • take frequent snapshots (copies) of your progress, having to start from scratch again is a bitch
  • do yourself the favourest of favours, test your disc quickly in a VM like VirtualBox, Qemu or VMWare -- takes only an extra 10-15min to do this when you mount the ISO to the virtual CD drive
  • use an XP Pro disc (Retail/OEM) so you can easily enough change the install media to Home/VLK by changing setupp.ini and replacing the following files from a disc of another flavour:
    • DPCDLL.DL_
    • OEMBIOS.BI_
    • OEMBIOS.DA_
    • OEMBIOS.SI_
    • PIDGEN.DLL
    • SETUPP.INI
    • SETUPREG.HIV
  • do other cool stuff like integrate the latest LMHOSTS block file or any other scripties (installing recovery console, add a SAFEMODE:NETWORK boot.ini entry) you would normally do, stuff them in GUIRunOnce, save files into the $OEM$ folder so they are copied to the hard drive during install
    And now for the order of operations:
    1. slipstream SP3 into it using nLite, do only that
    2. make a copy of that sp3 XP as a base (I call these "vanilla" discs)
    3. run nLite against the source again, choose your tweaks; but be very conservative about removing things (better to turn them off than remove them)
    4. this is a good point to do a SP3 rollup... some require the use of RyanVM's integrator, some can be done w/ nLite, probably best to do it by itself
    5. run nLite AGAIN, slipstreaming all your BASE apps (addon packs) like FireFox, 7-zip, .NET, Crap Cleaner, FFDShow, Java, VLC
    6. take yet another copy of this, I call these "base" installs.. I can customize further from this base point as everything to this point has been a standard install configuration
    7. integrate your drivers now w/ nLite if this is for a particular box, or for a more generic install disc, run BashratTheSneaky's DriverPack installer against your source... best to use Method 2, KTD
    8. fire up nLite for the last time, only choosing "Bootable ISO" - create the .ISO to test out and burnitty-burn-burn.
    9. you can then install these once you get past the windows out of box experience message thingy


    Thursday, June 24, 2010

    Make a Duplicate / Backup Copy of an NTFS Partition From Linux

    So, you've got a dead Windows NTFS hard disk, and before trying to repair the bad sectors or damaged partition tables, you want to make an exact replica of the current filesystem.  From Linux (an Ubuntu LiveCD would do just fine)

    sudo ntfsclone --rescue -o - /dev/sdc | gzip -c > sectorlevel.img.gz

    if you have troubles getting that done, there's always good old "dd"

    dd if=/dev/sda of=/mnt/backup/sectorlevel.img

    Saturday, June 19, 2010

    So, you want to use a free program to convert video formats in Windows?

    Finding information on the internet can be a real PITA.  Wading through all the self-marketing affiliate spam b.s and trialware crap... fuggedaboudit.  Let me simplify some stuff for you (sorry for all the linkies in this post, they're meant to illustrate my process, so you might duplicate, or laff at it).

    Client asks "What's a good program I can use to get my .AVI home movies onto my iPad?"
    I'm all like "Snap.  iPad won't play video files?"
    • short answer is not really.  If you took them straight from video camera, probably, but not if you converted from DV video or other source.
    1. First step, g: play avi OR divx OR mpeg on ipad -- become disappointed
    2. Then check some download sites for popular software on the topic:  CNet (download.com) & Tucows -- become a little overwhelmed, CNet shows you great stats on reviews+popularity, plus you can sort by either!
    3. Next, check the YouTubes, see what the screencasters have to say. -- spend all afternoon and wind up watching Mariko Takahashi's Fitness Video, forgetting what you went there for. 
    4. You could ask the twittosphere, but there was little going on that wasn't spam.
    5. Same goes for the blogosphere.
    6. LifeHacker is usually an awesome place to find out about the best way to do.. well... stuff.

    ...in the end, I think this query sum's it up and anything off the first page should be great... special mention to these ones because of their sheer popularity:

    Saturday, June 5, 2010

    Top 15 essential / best (and free) Windows applications you need to install on a new system as soon as you get past the oobe wizard thingy what wants you to register and stuff

    Just did a factory-reset on clients laptop and wanted to install some apps for her.

    Now, generally I would use an nLite'd boot DVD with updates+tweaks+apps+drivers all slipstreamed and automated, but the factory reset was available (Sony Vaio can be restored to factory settings by pressing ALT+F10 on bootup without the rescue media/DVD) .

    So, when installing apps for a home user, here are apps you MUST put on for them (and for your sanity as well)

    Recuva - file recovery / undelete
    Defraggler - defrag hard drive, has scheduling too!
    CrapCleaner - delete crap off your computer in one-click (also tidies up your unwanted browsing/document history)
    iTunes (nuff said)
    HijackThis - turn off the mess of auto-loading programs that clog up the system tray and slow down the PC
    UBit Menu for Office 2007 (adds a 2003-esq bar to the ribbon)
    Google Internet Explorer
    Google Pack (FireFox+Google Toolbar, Skype, Google Earth, Chrome, Adobe Reader, Picasa)
    uTorrent - Download Torrent files (not as hard as you think, go to thepiratebay.org find an interesting public domain file to download, click the "magnet link" and wait for your download to complete!)
    Frostwire - share public domain files with friends or strangers
    UltraVNC - allow remote access, and/or connect to another computer (hint: port forwarding on your router)
    InstantVNC - NAT traversing single-click VNC remote control (I have an EchoServer, so this is a must for my users)
    CDBurnerXP Pro - super awesome CD/DVD burning software
    ImgBurn - I had a user who made a dvd for family members and re-copied the original several dozen times, I only told her about this on the last copy :(
    VLC - super-light media player with a butt load of codecs already installed
    7zip - like WinZip, only free-er

    Firewall/Antivirus suite
    (this ones' tricky and warrants it's own post, but the list felt incomplete if I didn't touch on it)...

    if you can't/don't want to pay for Eset Smart Security or Panda or Kaspersky, then you can get away with a combo of:
    Sygate Firewall and Avast/AVG  (don't really recommend avast/avg)
    Comodo Internet Security (this one's a bit tricky for the lay-user, but SUPER powerful)
    Sygate and PCTools Spyware Dr. + Malware's Antibytes

    If you think your user can hack it, give them a "user" account and access to the STRONG PASSWORD PROTECTED admin account for installing apps, and use Sygate + TeaTimer or other inoculator and Sandboxie to sandbox all web-apps... lock-down IE and lock-down Windows in general.

    **This was a quick post (as they often are) so I will expand on any points if there's interest.

    Thursday, May 20, 2010

    Switch users in Ubuntu Linux without entering passwords

    This is a great way for my wife and I to switch back and forth between users without having to enter passwords every freaking time.  All our data is encrypted on a LUKS partition and the /tmp and /swap partitions are encrypted too, so, the only thing to do is manually lock the workstation if going out for a while -- in case of theft.

    So, to enable this tweak, do the following under each user to be "switched back to" without locking (ie, no password)

    1. run gconf-editor
    2. browse to /desktop/gnome/lockdown/disable_lock_screen
    3. check the box


    Uncle Bob!