Author Archive

Nmap network discovery port scan

by on Mar.10, 2011, under Internet, Linux, Security

If you are like me, you don’t have time to run nmap scans and do other network maintenance. Running nmap is one of those really fun and useful tools that are easy to use, but since I rarely use it, I never remember the options.  Today was one of those situations where I needed to hunt down a host on my client’s network remotely running certain software. It wasn’t responding to any remote services (like RDP) or pings, so I didn’t even know if it was on the correct IP address.  I thought it would easy enough to do a quick network scan with nmap to discover the hosts running.

At a simple level, and on a small, class C network, I just ran this:

sudo nmap -PR 192.168.0.*

This allowed me to quickly see all the hosts that were up on the local subnet, and here’s an example showing the end of the output on the last host found:

Interesting ports on 192.168.0.210:
Not shown: 992 closed ports
PORT     STATE SERVICE
21/tcp   open  ftp
80/tcp   open  http
139/tcp  open  netbios-ssn
427/tcp  open  svrloc
443/tcp  open  https
515/tcp  open  printer
631/tcp  open  ipp
9100/tcp open  jetdirect
MAC Address: 00:1B:xx:xx:xx:xx (NEC AccessTechnica)
Nmap done: 256 IP addresses (20 hosts up) scanned in 42.07 seconds

That was super helpful.  The host I needed showed right up, at the correct IP address, with most of the ports I expected. (not the one shown above) Now I just need to remote into the system (if I can) and adjust things.  Nmap made it real easy on our Linux server.

There are some more useful commands, and as I need them, I’ll blog them. For today, this was all I needed.


Leave a Comment :, , , , , , , more...

Microsoft Kin TWOm initial reactions problems and no data plan

by on Mar.09, 2011, under Phone, Problems

First, let me say the Kin TWOm is a pretty good messaging phone that’s really a dumbed-down smart phone. Also, since I got these for my wife and kids, I don’t want them to utilize any data services. Call Verizon and have them disable all data services on the phone. This will leave text messaging turned on still, same with the Wifi. They just won’t be able to use the 3G data, which I don’t want them to. (its too expensive)

Also, on the data plan issue. Some people online have suggested that you can enable the “Airplane mode” to disable the data. Yes, well, that’s not exactly a solution, because it DISABLES YOUR PHONE USE as well! That’s not going to work. So… do as I suggested, just call and disable the data services. That is, of course, unless you want to use the 3G data. (but why get this phone with the data and issues, when you could have an Android phone?)

I like the phone, but there’s a couple big things I don’t like.

1. It’s got a terrible speaker phone. I mean, really bad. Its very quiet and sounds terrible.

2. Ringer is quiet and sounds terrible. And none of us liked the ring tones available. (although, that part is easy to remedy)

3. NO CONTACTS RESTORE! Verizon Backup Assistant is not available on this device. I called Verizon, and sure enough, they don’t support contact backup or restore on these phones! My family had to manually re-enter all their contacts on the phone. Not a huge deal for them, but if I had to do it, I have hundreds of contacts, I can’t imagine having to deal with that.

4. It is a capacitive touch screen, which works reasonably. However, if you are used to the touch screen on an iPod or iPhone, there’s no comparison in my opinion. (in my daughter’s as well, who has an iPod Touch and complains a little that this screen isn’t *that* good.) It doesn’t respond well enough to my touches, and sometimes takes several tries. This is the case on all three of the phone I got, so it’s not just “a bad phone.”

5. There’s no apps, except shortcuts to web sites. That’s ok, we didn’t get the Kin TWOm to be a full blown smart phone. But again, my daughter thought it was stupid.

6. It feels cheap and light, but not like it would break.

7. The keyboard is spaced weird. The EnV Touch and EnV 3 are way better QWERTY keyboards. But its not so bad you can’t use it.

I know, lots of complaints. Of few really annoying ones, but overall, if you get the Kin TWOm as a Messaging phone with the data disabled, its not a bad phone and my family likes them overall. We’ve only had them for a few days, and I’ll update if I hear more complaints or praise.

6 Comments :, , , , , more...

Netbook with Jolicloud vs Windows 7 vs Ubuntu Maverick vs Ubuntu Lucid

by on Mar.02, 2011, under Geek, Internet, Linux, Ubuntu, Windows 7

I tested Windows 7, Jolicloud, Ubuntu 10.10 Maverick, and Ubuntu 10.04 Lucid on my new Dell Inspiron Mini 10 (1012) Netbook.  First let me say, Window 7 on this netbook is barely usable. If you wait for the OS to finish booting, which takes at least 5 minutes before all the background processes finish loading, then it operates *Ok*.  But to be honest, I didn’t want to run this thing with Windows from the start.  Biggest reason…  from initial power on, it takes 3 minutes and 13 seconds to boot, connect to Wifi, and have your home page open.  WHAT!  Are you kidding me?  That’s just way too long for something that you want for some periodic web use.  And remember, that’s Windows 7 without any Antivirus software loaded up (at least any that I saw from a fresh Dell install from factory).  Once you load up some basic programs, Antivirus, Dropbox, backup software (I prefer Crashplan, but you could consider Dropbox just for essentials.), Office, just basic stuff for any Windows system, it’s going to slow down even further.   I don’t expect much from this little, underpowered Atom-based, mini laptop, but it should be something reasonable to use.  I think another post is coming for “My advice on buying a Netbook, for non-Geeks.”

So… I didn’t like the idea of Windows on my netbook. I am a Linux/Unix guy anyway, and I know there’s been some big improvements in the Linux Desktop area.  I use Ubuntu 10.04 Lucid as my primary desktop and laptop OS anyway, and I love it.  ( I still have a secondary Windows 7 system though.)  I wanted to give Ubuntu Netbook Remix 10.10 Maverick a try. I installed it, and immediately noticed something, I had no wireless.  Man, still!  For the last 1 to 2 years I’ve tried netbooks with Linux based OS’s and they always have issues with the wirless!  And to make it worse, getting the wireless to work looked easy, but it didn’t work. The “restricted drivers” in Ubuntu didn’t want to load. I did get everything working, but Maverick has some major issues that drove me nuts.

Maverick netbook version uses that nice looking, and clever user interface called Unity.  But I had a very hard time with it.  For one, I couldn’t add my own launchers.  Right click menu’s didn’t work, and it customizing it, if you even can, was very difficult.  For two, it crashed constantly!  For three, once I added the current Apt updates, the whole thing slowed so much I could barely operate it!  Maverick was such a pain to use, I just formatted and loaded Lucid after wasting over a day of tweaks and adjustments.

I will say this, Ubuntu Maverick did boot quickly. Times below are from initial power button, which includes BIOS POST.
- In about 50 seconds I had a desktop.
- 1:13 I saw the Wifi connection established
- 1:27 the web was launched and home page loaded.
Not too bad, in my opinion.

However, continuing with Maverick was a NO-GO.  Next, I installed Ubuntu 10.04 Lucid. Install was easy, just like Maverick, but I didn’t see the crashing, it got all the updates and didn’t slow to a crawl, and most importantly, the Restricted Drivers for the Broadcom Wireless adapter loaded without an issue and connected right away.  NICE! Even better, the boot times were almost identical to Maverick! Including waiting 20 seconds for the Dell to POST, it was about a minute and a half and I was online surfing.

Of course, I’ve also heard recently that there’s this OS called Jolicloud.  So I had to test that out too.  I guess its Ubuntu 10.04 based, so should be easy and familiar for me.  And it was! Install didn’t work using their USB creator. I had to get a separate tool and do a manual USB disk creation of their ISO, but I am not complaining about that because you have to deal with this for all the Linux-USB-netbook installations.  It just didn’t use their own USB creator as described on their website and required more steps, but still easy.

Jolicloud installed effortlessly on the netbook! I had pre-allocated about 30G of free space on the hard drive just for this. When install ran, it asked if it could install into the free space, I said Yes, and it was easy from there.  You do have the option to resize and change the partitions if you want, I had done this previously with Ubuntu in my case.  Install took same amount of time as Ubuntu,and I think was about 20-30 minutes.

Initial boot asked for user credentials and to create an account with Jolicloud.  You can even use Facebook login with it, but the base Linux still requires a user account.  I think the developers don’t really intent it to be used by more than one person, just for ease of use.  But I wanted my family accounts on there, so I created one for each, which is a little odd and buggy process. (it didn’t work right away, gave me an error, looked like it was crashing, but then did actually work with a disabled account.)

Best thing about Jolicloud was, THE WIRELESS JUST WORKED!  I love it!  Install was easy, system booted, and I clicked the icon to use my Wifi connection.  Nice!  Even better, I was online and adding their apps easily and everything just worked in that area.  For most people, this is all you need.  It installed and things get you online and functional with ease.  Next best thing… it boots with the same times as Ubuntu!  In about 1 minute 30 seconds, I am online and browsing, from the moment I pushed power.

Two things I don’t like about Jolicloud.  1. Suspend doesn’t seem to work, but that may not be the fault of Jolicloud, and rather a driver issue or Dell issue.  Hibernate works great, so I setup the system to use that on lid close. (which takes about 17 seconds to power down).  2. They seem to want you to use their apps.  I can understand that, but this is Linux,and I like to geek-out!  I couldn’t find a way to make a launcher, anywhere, for specialized apps.  In my particular case, I was using Netbeans, which installed fine, but there was no way to launch it, except to A) use command line, or B) browse to the folder and double-click the launch script.  I have other apps that may be an issue with this. I don’t like it,and I don’t like being confined to their launcher interface. Although, their user interface is very nice and for most all other operations it works very well and I like it!

Also, I don’t think they recommend it, but I used “apt-get” easily with no configuration. Everything I wanted to load with apt, worked without issue, so far.  I installed Mercurial, Apache2 and PHP5 to run a testing web server. Yes, I know, why would you do that on a Netbook?  Well, because, my son and I are playing with Javascript and PHP, and the netbook is really handy for him to play with while I use my laptop next to him.  Its fun!  Plus, with Jolicloud, using their built-in app install UI, they have about a Gazillion games and there’s lots to do on there for a kid.

So far, for me anyway, I am really liking Jolicloud. For most people, they’ll like it too, and its faster than Windows and you don’t need to deal with AV software. Not that you can’t get spyware or viruses, just that its not Windows, where you WILL get one without AV.

As for the Dell Mini 1012 netbook, I like it!  It’s got a nice, high-res display at 1366×768, unlike most netbooks that have only 1024×600. It’s battery is great too, and so far is lasting close to 5 hours. (probably average about 4 hours)  And with hibernation and only periodic use, it goes a couple days till I need to charge. Charging is slow though!  The keyboard is a little small for me, but usable.

This is not a post about comparison with an iPad, but I just have to say, even though I like this netbook and Jolicloud, it will only have limited use.  Now that my family has had an iPad for about 9 months or so, they don’t really want to use the netbook.  Main reason being… even with fairly quick boot time and ease of use, the iPad is WAY FASTER and easier to get online!  There’s also a “cool” factor, but even my anti-technology wife, she insists on using the iPad.  They all like it for that reason more than anything, that it powers on and you are online in literally a few seconds.  Also, the batter needs charging about once a week for us on the iPad.  I should also say, there’s no logins, weird moments where you need to “wait for that thing to show you are online”, or confusion about what to click and where to go. For the non-tech people, the iPad is hands down the best casual web device.  My kids use it for super quick Facebook checks and updates, my wife handles her recipes and does quick web lookups, and all if it without any of my help, and all of it very fast and easy.  A netbook, even with Windows, just doesn’t even compare.

If any of you readers have further questions regarding Jolicloud or Ubuntu Lucid or the Dell Mini, just comment and ask. I have the 250G drive loaded with all 3 in a triple boot setup, so I can probably check for specific issues if you like.

UPDATE 3/14/11 :

I added a new post on resource usage of each OS, if you are interested, with Screen shots.

Go here to check it out: http://www.1stbyte.com/2011/03/14/resource-usage-on-dell-inspiron-mini-1012-with-window-7-ubuntu-10-04-lucid-and-jolicloud/

9 Comments :, , , , , , , , , more...

Installing the Minefield package – Firefox 4 beta on Ubuntu 10.04 Lucid

by on Feb.27, 2011, under Geek, Linux, Ubuntu

I keep forgetting what to do to add the Firefox 4 beta to my Ubuntu Linux 10.04 Lucid systems. It’s quick and easy, just copy the lines below (one at a time) into Terminal and add the PPA sources to Apt. Then Minefield browser will be installed as the pre-packaged version of the Firefox 4 beta.


sudo add-apt-repository ppa:ubuntu-mozilla-daily/ppa
sudo apt-get update
sudo apt-get install firefox-4.0

Leave a Comment :, , , , more...

broadcom STA wireless driver “systemerror: installarchives() failed” on Ubuntu Maverick Dell Mini

by on Feb.24, 2011, under Geek, Linux, Ubuntu

broadcom STA wireless driver “systemerror: installarchives() failed” on Ubuntu Maverick Dell Mini

While attempting to Activate the proprietary Broadcom STA Wireless driver in Ubuntu 10.10 Maverick, I waited and then recieved the error, “systemerror: installarchives() failed”. I am using a Dell Inspiron Mini 1012. I am also booted into the Live USB install flash disk, not from my hard drive.

Some installs and uninstalls failed using the “Software Center.” So on to apt.

First thing I thought was, “we probably need our sources updated.” So, from terminal, run:

sudo apt-get update

(obviously, you will need to be connected to the “wired” ethernet and have a live internet connection, so make sure that’s working first.)

I had to do a little Googling,and I also checked in Software Center for anything with Broadcom in the search, and I found the bcmwl-kernel-source package. Let’s reinstall this and see if it works.
Next I ran:

sudo apt-get remove bcmwl-kernel-source

This process started to remove the package, but I noticed that it also was trying to remove DKMS Modules. This failed. Next, let’s try removing DKMS.

sudo apt-get remove dkms

That uninstalled ok, but then failed, again, on the bcmwl-kernel-source package. What’s the deal with this package?! Maybe just reinstalling inplace?

sudo apt-get --reinstall install bcmwl-kernel-source

Same problem!
Let’s try:

sudo apt-get -f --reinstall install bcmwl-kernel-source
sudo apt-get --purge remove bcmwl-kernel-source

Still not working! Fails on update-initramfs!
Seems that nothing I do will allow me to update/reinstall/fix this issue. The problem has something to do with the update-initramfs process and its not working on the USB stick. There may be some further log info, but what I found online was a bug in the “casper” system. I guess the USB sticks are not writable and update-initramfs will fail.
https://bugs.launchpad.net/ubuntu/maverick/+source/casper/+bug/591207
So I tried this: (be careful , you may end up with a non-bootable USB disk)

sudo apt-get install casper
sudo /usr/share/casper/casper-update-initramfs -u
sudo reboot

Woah!! Nice!! It worked on reboot!! Boom – Headshot! I didn’t even need to reinstall the Broadcom drivers! After booting into the Netbook Remix on the Live USB disk, once I clicked on the network manager icon, it showed me all the available wireless networks!

That was awesome! It felt like when I play Call of Duty Modern Warfare 2 when I get a headshot, which always comes as a surprise to me. Boom! Headshot! And then I think, “Ok, that was cool! Didn’t expect that to work!” ROFL!

Well, now that I can see the Wifi is working, I’ll install on my hard disk.

Good luck!

 

7 Comments :, , , more...

Revisiting MsMpEng.exe Antimalware service executable high resource usage

by on Feb.23, 2011, under Antivirus, Security, Windows 7, Windows XP

MsMpEng.exe – Antimalware service executable

I generally do not have any issues with Microsoft Security Essentials. It just works, and does its job quite well.  From time to time I notice some weird issues on my client computers, where MsMpEng.exe (Antimalware service executable) is using way too many and high resources and cpu time. (extra large amounts of memory and cpu time may even be 100%)

I had an original post here which may solve your issue as well:
http://www.1stbyte.com/2010/02/01/microsoft-security-essentials-msmpeng-exe-using-high-cpu-time/

That post says to exclude some directories from your scanning.  I have since found that, in the newer version of Microsoft Security Essentials, there are some options that have also helped.  We mainly want to tell MSSE that we only want to scan if the computer is not in use.  I also set to Limut CPU usage.

Check this option in the MSSE Settings tab, under Scheduled Scan:

“Start the scheduled scan only when my computer is on but not in use”

Open Microsoft Security Essentials and go to the Settings tab (shown below):

Next, in the Scheduled Scan settings on the left menu, look at the right side options and check the option box to only scan when my computer is not in use:

Security Essentials Settings - Make sure to Check this box

And last, save your changes:

Save your changes in Security Essentials

Save your changes in Security Essentials

I have tried this setting, and it does help.  But read my other post too, if this doesn’t help, maybe give that other option a shot.  Good luck!

 

8 Comments :, , , more...

How to remove or detach dvd from VirtualBox machine using VBoxManage command line

by on Feb.03, 2011, under FreeBSD, Linux

This took a while to solve, its not exactly user-friendly.  I have a FreeBSD server running VirtualBox virtual machines in headless mode, and I need to do everything using VBoxManage command line. (CLI)  In one case I wanted to remove the attached DVD ISO image from my machine. They don’t have a “storagedetach” or “removehd” command, you have to use the “storageattach” command, with some extra info.

List the VM info to see the port and device attached.
VBoxManage showvminfo vmMaridia
(My VM name is vmMaridia)

You will see stuff like so:

Storage Controller Name (0): maridiasata
Storage Controller Type (0): IntelAhci
Storage Controller Instance Number (0): 0
Storage Controller Max Port Count (0): 30
Storage Controller Port Count (0): 30
Storage Controller Name (1): maridiaide
Storage Controller Type (1): PIIX4
Storage Controller Instance Number (1): 0
Storage Controller Max Port Count (1): 2
Storage Controller Port Count (1): 2
maridiasata (0, 0): /vm/sys/maridia/mir1.vdi (UUID: fd813be8-dd38-4784-a374-d96263aae1ba)
maridiasata (1, 0): /vm/sys/maridia/mir2.vdi (UUID: dab57578-4de5-4bef-91ee-232c56eea671)
maridiasata (3, 0): /vm/sys/maridia/mardia-bu.vdi (UUID: 6ac3c6aa-ae5b-4d57-8f30-24e59d2ef381)
maridiasata (4, 0): /vm/sys/maridia/share-sata.vdi (UUID: d16a4847-95fb-43bd-b8b4-c7d9e38d9946)
maridiaide (0, 0): /vm/iso/sysresc156.iso (UUID: 10cbebd7-e058-4c8e-9487-52e7776d9935)

So, in my system, I wanted to remove from maridiaide controller, the port 0, device 0. Which is the sysresc156.iso.
To remove the DVD:

VBoxManage storageattach vmMaridia --storagectl maridiaide --port 0 --device 0 --medium none

The trick was, you just specify “none” as the medium when you want to remove it. Now when you run “showvminfo” on that VM, you’ll see no drive attached, in fact no maridiaide controller listed. (although, I do think it is registered still?)

1 Comment :, , more...

Fix ext4-fs cannot change data mode on remount with tune2fs

by on Feb.03, 2011, under Linux

I thought I’d be smart and enable data=journal on my root file system. I know its slower, but I prefer data integrity over speed on this system. Even if its not my main data volume, I like the idea of the whole OS running with the best integrity.

So, here’s what I did… I edited my /etc/fstab file, and added “data=journal” in the mount options. Here’s my old fstab:

/dev/mapper/vg1-root / ext4 defaults,errors=remount-ro 0 1

I changed it to:

/dev/mapper/vg1-root / ext4 rw,data=journal,journal_checksum 0 1

Well… upon reboot, I got an error and it wouldn’t load the system:

EXT4-fs: cannot change data mode on remount

Turns out, during boot it’s first mounted as read only, if I understand things correctly, then remounted per your fstab options. When I created the file system I didn’t use the option to journal_data, which is not “ordered” mode, per ext4 default. And the root file system is remounted during boot. (correct Linux Pros out there? I have that right, right?) So to fix this, I booted into my trusted SystemRescueCD (on USB) and ran this:

tune2fs -o journal_data /dev/vg1/root

Yahoo! It booted right up with my new fstab options. Note that YOU MUST have created that file system with journaling enabled in the first place, like you would with “mkfs.ext4 -j /dev/sda1″. (with the -j option)

PS. You can list the options on the file system with “tune2sf -l /dev/sda1″.

BTW, I am using Ubuntu 10.04 server, in case you wondered. :)

Leave a Comment :, , more...

Tuning FreeBSD loader.conf for ZFS to prevent kmem_map too small kernel panic

by on Jan.27, 2011, under FreeBSD, Networking

Been using FreeBSD 8 and 8.1 for over a year now, love it.  Have root on the ZFS mirror, works great!  However, I’ve struggled to find a good way to set the /boot/loader.conf variables for kmem_size and zfs.arc_max. Everything I tried didn’t seem to work, so I ended up leaving all that out and just let the default “auto-tuning” to its thing.  But whenever I tried to copy large files, like 20+ GB files, it would crash the server.  It would give me that “kmem_map too small” kernel panic.

In addition, I have a GB network and fairly new 500GB drives in my array, which, are not high-end, speedy drives, but should operate fairly well.  I was getting network transfer speeds of about 45MB/s to 55MB/s, varying.  But usually managed to stick to about 50 fairly regularly.  I am not using an scientific method of measuring this, only the Windows 7 transfer window.  So it’s not something I’d rely on, but it was close enough to see *about* what we’re doing.

I finally did some reading, and found that setting my vfs.zfs.arc_max to about one-half my RAM, minus 512MB, and setting vm.kmem_size to 1.5x my RAM, it would stop giving me the kmem_map panic.  I found a wide range of suggestions out there, but in general, there were more suggestions to set the kmem_size higher, and keep the arc_max lower than half the ram.   Also, I found the general thought was you would be best having 8G of RAM in the first place and auto-tuning seemed to work best.

For my server, running 8.1-RELEASE, I have an i3 cpu on an  Intel server board, with 4G RAM.  My ZFS is a mirror on the Root, plus my main storage using 6 drives, 500G  ea. (varying makes), in a RAIDz2 array. So I have no UFS, only ZFS.  Once I set those two parameters, I jumped from about 50MB/s to 72MB/s.  And my 48G transfer test of files moved over no prob.  FINALLY!! I love it!

Here’s my relevant loader.conf variables:

vm.kmem_size_max="8G"
vm.kmem_size="6G"
vfs.zfs.arc_min="1024M"
vfs.zfs.arc_max="1500M"
vfs.zfs.prefetch_disable=0

Also, I have two 16G swap partitions. (I know, overkill, but I wanted to pre-allocate those on my mirror and leave it for when I upgrade the RAM)

I am sure someone out there with a better understanding would recommend better values, but, it works good enough for me and so far its’ stable.

By the way this server also shares lots of media, VirtualBox VM’s, and also some Postgres and Mysql with Apache/PHP.  It’s not under any load, just a few of us access this system, but we do read/write large files from time to time.

I hope this helps others out there!  Good luck!

Leave a Comment :, more...

How to install Crashplan on FreeBSD

by on Jan.26, 2011, under Backup, FreeBSD

A how-to for installing Crashplan backup software on FreeBSD, my favorite server software with my favorite backup software.

We owe Kim Scarborough and Aaron Baff for this information, BIG TIME! Thank you, Thank you, Thank you, Kim and Arron for your help in making this possible!

Kims original HOW-TO is here:
http://kim.scarborough.chicago.il.us/do/nerd/tips/crashplan

I have no contact or reference info for Aaron, exept, here’s the original CrashPlan forum thread with our conversations:
https://crashplan.zendesk.com/entries/112498

All credit for this really belongs to Arron and Kim! I only wanted to record my own notes and share my experience here.

Greg’s How-to: How to install Crashplan on FreeBSD!

Note, this install is on a FreeBSD 8.1-RELEASE system. Kim installed on FreeBSD 7. Also, this doesn’t seem to matter for installation purposes, but my system also runs with ZFS on a GPT root mirror, with other ZFS pools on the system as well using RAIDz2. (where I will store my Crashplan data)

Below I mention “install some/port”, which is not intended to be a literal command. I’ll leave the details of installing ports to you, which you can find online on other sites.

1. install emulators/linux_base-f10
Note: I had to find glibc-common online and manually load into distfiles when I first tried to install on 8.1.
Update 3/30/11: As of 3/30, and running on FreeBSD 8.2, I did not need to find glibc manually, it just loaded first try. Maybe the first time I tried the mirrors were unavailable?

1.b Check /etc/rc.conf
After you install the Linux base packages, check /etc/rc.conf that linux is enabled and add it if not.
linux_enable="YES"

2. Add to fstab and mount:
linproc /compat/linux/proc linprocfs rw 0 0

Then…
mount linproc

Update 3/30/11 FreeBSD 8.2: I wasn’t able to mount linproc at this point. I rebooted the system, then it mounted. So, reboot first, then add this to your fstab and make sure it mounts before you reboot.

3. install sysutils/linux-procps

Update 3/30/11 FreeBSD 8.2: In the next steps 3, 4, 5, 6, 7, I needed to add the following to my /etc/make.conf file. Note that the “f10″ is NOT in quotes. Once this was added, these extra ports installed fine.

OVERRIDE_LINUX_BASE_PORT=f10
OVERRIDE_LINUX_NONBASE_PORTS=f10
LINUX_DIST_SUFFIX=f10

4. install /usr/ports/textproc/linux-f10-expat


5. install /usr/ports/x11-fonts/linux-f10-fontconfig


6. install /usr/ports/x11/linux-f10-xorg-libs


7. install /usr/ports/java/linux-sun-jre16
note: you’ll need to manually find and download the jre-6u3 file from sun/oracle.

You should have these installed. (or similar, maybe other versions)

linux-f10-expat-2.0.1 = up-to-date with port
linux-f10-fontconfig-2.6.0 = up-to-date with port
linux-f10-xorg-libs-7.4_1 = up-to-date with port
linux-procps-3.2.5 = up-to-date with port
linux-sun-jre-1.6.0.03 = up-to-date with port
linux_base-f10-10_3 = up-to-date with port

8. change to linux bash, as root:
/compat/linux/bin/bash

Note that this puts you into the linux compat environment. If you go looking for /usr/local/bin/crashplan, it won’t be there unless you are in the linux compat environment first. The actual location is here:
/compat/linux/usr/local/crashplan

9. Install Crashplan.
go to the Crashplan-install folder (where you extracted it) and start the ./install.sh script. Use all defaults and finish the script.

10. Edit run.conf. In the /usr/local/crashplan/bin folder,
edit the run.conf file. There are two long lines defining
Java statup parameters. Add the following to the SVR line.

-Djava.nio.channels.spi.SelectorProvider=sun.nio.ch.PollSelectorProvider

That should go within the quotes!

11. Try starting the service:
/usr/local/crashplan/bin/CrashPlanEngine start

You’ll need to start this manually (from within linux bash), and will not start at boot.
(until one of us writes an rc script)
Update 3/30/11: Here’s an rc.d startup script how to for Crashplan:

http://www.1stbyte.com/2011/03/30/an-rc-d-startup-script-for-crashplan-running-on-freebsd/

12. Use the “headless” install connection per the Crashplan FAQ’s online to connect from another Linux/Windows/Mac system to manage the service.

Good luck!!

16 Comments :, , more...

Install FreeBSD on a ZFS pool that’s mirrored using GPT partitions

by on Aug.30, 2010, under FreeBSD

Here’s my notes for ZFS root installation with FreeBSD 8.1. (amd64 on my system)

Boot up the FreeBSD install disk, you’ll need one with the Fixit system.  In the examples listed, I had 2 disks, ad4 and ad6.  Yours may be different, replace as necessary.

1. Add the modules on boot, hit “6″ at the BTX loader menu, then enter these lines at the “OK” prompt.

load ahci.ko
load opensolaris.ko
load zfs.ko
boot 

 

2. At the sysinstall menu, go to Fixit.

3. Create the GPT disks and partitions.

  • Delete any partions already on the disk, and destroy. (only if needed)  On my disks, I had 2 partitions created from another OS installation.  “-i 2” indicates the partition number.  You may need to add a third or more.
    gpart delete -i 2 ad4
    gpart delete -i 1 ad4
    gpart delete -i 2 ad6
    gpart delete -i 1 ad6
    gpart destroy ad4
    gpart destroy ad6 
  • Create the gpt disk.
    gpart create -s gpt ad4
    gpart create -s gpt ad6 
  • (NOTE: “gpart show” and “gpart show –l” will display the partitions.
  • You may want to layout different partitions, but we’ll just create a boot, swap, and zfs partition here, with GPT labels.  (swap is better left off ZFS for crash dumps)
    gpart add -s 128 -t freebsd-boot -l boot0 ad4
    gpart add -s 128 -t freebsd-boot -l boot1 ad6
    gpart add -s 8388608 -t freebsd-swap -l swap0 ad4
    gpart add -s 8388608 -t freebsd-swap -l swap1 ad6
    gpart add -t freebsd-zfs -l disk0 ad4
    gpart add -t freebsd-zfs -l disk1 ad6
    
  • 
    

    Next, add the bootcode to the disk.

    gpart bootcode -b /dist/boot/pmbr -p /dist/boot/gptzfsboot -i 1 ad4
    gpart bootcode -b /dist/boot/pmbr -p /dist/boot/gptzfsboot -i 1 ad6
    

4. OK, now we’ve got some GTP disks setup for a mirror and boot. 
IMPORTANT!!!  Make sure you don’t skip this step, create the /boot/zfs directory for the zpool.cache.

mkdir /boot/zfs

 

5. Now we can start the ZFS fun! On the FreeBSD wiki and on other sites I used as reference, there may be listed other options and settings for your ZFS layout.  Here, I am going to keep it very simple, but I’ll list out my options later.

Also, you may prefer different names or even separate location/directory/ZFS filesystem for your root pool. My preference is to call the root pool “rpool” and place the FreeBSD system in the ROOT filesystem.  (looks like this: rpool/ROOT)  In addition, my preference is to place “/home” outside of the ROOT fs.  Which allows is to separate system from data and management of snapshots is more flexible. But this is totally a preference thing.  One of the beautiful things about ZFS is the flexibility and ease of use.

  • Let’s create the pool. Notice the gpt/disk# items, which correspond to your gpt labels. Also, we’ll disable a mountpoint on rpool.
    zpool create rpool mirror gpt/disk0 gpt/disk1
    zfs set mountpoint=none rpool
    

  • Add the ROOT filesystem.  Again, here you may prefer to add all ZFS filesystems for places like /usr, /var, /tmp, and other system locations.  I don’t recommend it, but in this example we’ll keep it all in one filesystem, except /home.
    zfs create -o mountpoint=/mnt rpool/ROOT
    zfs create -o mountpoint=/mnt/home rpool/home
    

    (OPTIONAL file systems)

    zfs create rpool/ROOT/usr
    zfs create -o compression=lzjb -o setuid=off rpool/ROOT/usr/ports
    zfs create -o compression=off -o exec=off -o setuid=off rpool/ROOT/usr/ports/distfiles
    zfs create -o compression=off -o exec=off -o setuid=off rpool/ROOT/usr/ports/packages
    zfs create -o compression=lzjb -o setuid=off rpool/ROOT/usr/src
    zfs create rpool/ROOT/var
    zfs create -o exec=on -o setuid=off rpool/ROOT/tmp
    

6. Install the base system.  We’ll be intsalling the system into the /mnt directory for now, but we’ll change those mounts later.

  • cd /dist/8.1*
    export DESTDIR=/mnt
    for dir in base catpages dict doc games info lib32 manpages ports; do (cd $dir ; ./install.sh) ; done
    cd src ; ./install.sh all
    cd ../kernels ; ./install.sh generic
    cd /mnt/boot ; cp -Rlp GENERIC/* /mnt/boot/kernel/
    

7. Edit /mnt/boot/loader.conf and add these lines.

ahci_load="YES"
zfs_load="YES"
vfs.root.mountfrom="zfs:rpool/ROOT"

8. Edit /mnt/etc/rc.conf and add these lines. I have re0 as my network interface, your’s may be different.

zfs_enable="YES"
ifconfig_re0="DHCP"
hostname="systemname"

9. Edit /mnt/etc/fstab and add these lines. Setup your swap.

/dev/gpt/swap0 none	swap	sw	0	0
/dev/gpt/swap1 none	swap	sw	0	0

 

10. Copy the zpool.cache.  IMPORTANT!!!!! Don’t forget this step!!

cp /boot/zfs/zpool.cache /mnt/boot/zfs/zpool.cache

 

11. Export this…

export 	LD_LIBRARY_PATH=/dist/lib

 

12. Unmount ZFS filesystems and set the correct mountpoints for the new root to boot. If you setup other/optional zfs filesystems, then you’ll want to set their correct mount points, too.

zfs umount -a
zfs set mountpoint=legacy rpool/ROOT
zfs set mountpoint=/home rpool/home

 

13.  Set the bootfs property of the pool to rpool/ROOT

zpool set bootfs=rpool/ROOT rpool

 

That’s about it!  Well, actually, you’ll still need to do a lot of post install stuff.  (see the wiki (set passwd, time zone, etc))  This is only a very base load of FreeBSD, root doesn’t even have a password. 

Keep in mind, at the time I wrote this, there is a bug in the zfs boot loader, where you can only boot from the first disk in the mirror.  Kind of reduces the usefulness of a root mirror, that’s for sure.  However, there is a patch that you can compile a new zfs loader with.  There’s a procedure to do so, and I’ll write up a how-to on that sooner than later.

Here are the site’s I used as reference, as well as the forum post on the root mirror boot issue.

http://www.b0rken.org/freebsd/zfs.html

http://wiki.freebsd.org/RootOnZFS/GPTZFSBoot/Mirror

http://forums.freebsd.org/showthread.php?p=95482

1 Comment :, more...

Gpart File Exists Error on FreeBSD

by on Aug.25, 2010, under FreeBSD

Tried to manually setup my disks in order to install root FreeBSD on a ZFS mirror, but following the how-to’s available, I couldn’t get pass the first command.

gpart create -s gpt ad0
geom 'ad0': File exists

 

I tried deleting the partitions/slices, even doing a “dd of=/dev/null” on my drives.  But I keep getting this file exists error, which is totally less-than-helpful.  Google didn’t give me much help either, but it did lead me to other info which helped.

So… delete the partitions:

gpart delete -i 2 ad0
gpart delete -i 1 ad0

 

In the above, I only had 2 partitions, so you may need to add a line for “-i 3” if you had a third, fourth, etc.  Also, in my case I was setting up a mirror on ZFS, so I repeated all these for both drives. (ad0 and ad2, for my system)

After that, there was a ONE EXTRA thing that was needed before the “gpart create” command would work.  You need to “destroy” it!

gpart destroy ad0

I was finally able to runt he gpart create normally after that. If you had drives setup previously from another system, this was how I removed any partition info on them.

These are the sites I used as reference.

http://forums.freebsd.org/showthread.php?t=9777

http://www.b0rken.org/freebsd/zfs.html

http://wiki.freebsd.org/RootOnZFS/GPTZFSBoot/Mirror

Leave a Comment : more...

Removing offending key in known_hosts

by on Aug.05, 2010, under Uncategorized

sed -i '53d' ~/.ssh/known_hosts
Run in your home directory. Replace “53″ with the line number referred to in the known_hosts error from the ssh login attempt. You need the “d”. If you had line 12, then you’ll show ’12d’ in that sed command.

Leave a Comment : more...

My idea for an open alternative to Facebook

by on May.05, 2010, under Internet

I am always getting ideas, and this might be a cool one. I want a new Facebook. I want to make my own version of it. Only, not centrally controlled, and not a direct single-place-to-go site to be social.

Why? Because I foresee a downfall. And because Facebook, if its not already there, is becoming an evil giant that not only controls your personal data, it legally owns it. Leo Laporte actually removed his account from there because of their policies. (although, he may have recreated one.) And its also becoming a source of malware, or rather a “vector of attack” for malware. The general public will never care about the privacy issues, even though they say they do, but that’s the problem, I think. We need something better.

We need an open-source version of it. It needs to be distributed, and federated, like email, and not centrally owned/managed on one persons servers. It also needs security by default. Also, everything needs to be opt-in by default. It needs to be simple.

I want to build this! Guess what, Google Wave has the beginnings of this. Problem is, Wave isn’t going anywhere, and it doesn’t have the federated services yet. If it did, Wave could potentially form into what I would want. (to some extent) Another thing, guess who else created some of the needed technology? P2P networks! all the file/mp3 networks out there already created, in part, the idea I’ve got. Only they did it for file sharing. I think some of those concepts, including the way email works, could be utilized for a “Facebook-like-net-web-app” that’s cross platform.

It would take these parts: (off the top of my head)
- A peering web service, that anyone can run on their own servers.
- A web service, that connects using the peering services, anyone can run and connect to the fbnet. (FB = First Byte, by the way!)
- A web app, where one can manage their profile. (that can be hosted by anyone on existing web servers)
- A client app, like for Winblows, Mac, Linux, Iphone, Droid, etc.

Technically it works distributed like email servers do, crossed with the way P2P servers work. Only, from a user’s perspective, its like email meets twitter and blogs, and personal web pages, complete with public profiles, wall’s, status messages, and comments like Facebook has.

Kewl idea, I think. But, just like all my other ones, it’s gonna take a lot of money!

Leave a Comment : more...

DNS settings hijacked and av.exe won’t go away. Internet turns Inertnet!

by on Feb.25, 2010, under Antivirus, Networking, Windows XP

Had a fun time today cleaning off some trojans and rootkits.  On this one client system, while trying to go online, the Internet  turned into the Inertnet! (Hahahha! I love that one!)  As usual, I have lots of ideas why, but no real evidence and clients saying “I don’t know how it got there.”  Doesn’t really matter though, it’s there and I am going to clean it off.  I managed to easily scan for and clean off a couple of them, but one would’t detect with any scanner.  AV.exe kept popping up, showing the fake windows security center and Antivirus 2010.  I used Process Explorer to see the offender, but I couldn’t find the file, it was hidden.

I rebooted with UBCD4Win, found the file and deleted it.  Problem is, this caused a mess in Windows. Nothing would load, I always got a “Open With” dialog box.  After some Googling, I found out where to fix that in HKCR in the registry.  In there, there was a setting for .exe files to open, and it was set to use av.exe in the user profile to open them!  How do you like that?!!

I wasn’t able to fix that in the current user profile, it was locked down somehow.  Opening in the Administrator account of XP allowed me to fix it though.  The default value for “exefile” should be set to:

“%1″ %*

(Just google that for more info.)

Ok, so got that all fixed.  Fun how you clean off these bugs, only to leave windows all messed up after!  Next, did all my final scans, tweaks and other items. (lock down IE, disable scripts/Flash/Adobe, add a windows update to Trusted Sites, and force user to use Firefox.  I also changed the icon on Firefox to the one for IE so the user will pretty much always use it!)  Then I tried to get all the updates caught up, only no go!  Wait, I am on the same Internet connection as my system, and it works for me, why not the client system?  Hmm… well they are on an isolated subnet, going through the firewall separately. (keeps their bugs off my systems!)  But, wait, those are the same DNS settings?

AH! Take a look at those NIC properties in XP.  DNS is hard set to 93.188.x.x!  Nslookup shows that as some place at a .com.ua domain. Well, let’s fix that one, and set to DHCP like it should be!  Problem solved, Windows Update works!

Fun stuff!  I’ve cleaned a lot of bugs over the years, and I’ve heard of DNS hijacking, but that’s the first one I’ve seen like that.

Leave a Comment :, , , , more...

3DS Bundles at GameStop.com


Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

1st Byte Solutions