01.21.10
Posted in Hacks, Linux/*BSD/Unix at 4:12 pm by Nate Smith
Recent glitches required me to update a server I had running Php and MySQL. Before upgrading mySQL I dumped all of my databases using the dump command. When I went to recreate a couple databases in the new installation using PhpMyAdmin a few databases were a little too large and timed out as they were imported. I found a hint to a nice way to import saved tables here (http://www.modwest.com/help/kb.phtml?qid=241&cat=6) but my favorite tip was in the comments: ”
"you can also get to the mysql shell and then type "source file.sql",where file.sql is your dump file"
This turned out to be very handy. Good stuff.
Permalink
12.11.09
Posted in Debian, Linux/*BSD/Unix, gadgets at 12:47 am by Nate Smith
You may wonder why this card does not work once you have it installed and the drivers are loading. Check your logs, you are probably missing the firmware that the drivers need to operate.
Here is a good site to reference for getting these devices working in Debian:
http://wiki.debian.org/ipw2200
Permalink
12.10.09
Posted in Debian, Linux/*BSD/Unix, gadgets at 11:51 pm by Nate Smith
I was using DHCP, TFTP and PXE to install debian on a Soekris 4801. The tftp daemon I was using was ATFTPD. It wouldn’t allow the Soekris to PXE boot until I changed a startup parameter in /etc/default/ataftpd. I added ‘–no-blksize ‘ to the list of startup parameters based on some blog entries I found.
The other thing that I had to do was create a symbolic link to pxelinux.cfg -> /tftpboot/debian-installer/i386/pxelinux.cfg.serial-9600/ instead of pxelinux.cfg. This works much better with the installer over a serial terminal.
Here are some useful blog links for installing linux on a Soekris single board computer.
http://wiki.soekris.info/Installing_Debian_Linux_5.0
http://strugglers.net/wiki/Debian_on_Soekris
http://roland.entierement.nu/pages/debian-on-soekris-howto.html
http://www.linuxvillage.ca/support/soekris4801.html#inst
http://hugi.to/blog/archive/2006/12/23/ubuntu-pxe-install-via-windows
And a link to Soekris engineering: http://www.soekris.com/index.htm
Permalink
06.25.09
Posted in Linux/*BSD/Unix at 9:34 pm by Nate Smith
To add a user to the smbpasswd file they must already exist in the passwd file. Use the useradd command to add a user. Then user “smbpasswd -a username” to add the user to the smbpasswd file.
Permalink
01.19.09
Posted in AoE, Linux/*BSD/Unix, System Administration, Uncategorized at 9:51 am by Nate Smith
This is really written as a reminder to me since I seem to have to go in search of this information whenever I need to format large disks.
Using parted for GPT.
The parted tool is very utilitarian but it gets the job done.
GPT is necessary for disks with space probably greater than 4 Terrabytes. (I can’t remember if it is 2 or 4 or 4.5) but it would probably be a good practice to start using it on anything over 2. GPT replaces the old style partition tables. The old FAT and BIOS restrictions are some of the last vestiges of 16 bit computing cruft we carry along with us into the 64-bit world.
The version of parted I was using didn’t have support for XFS. This example is borrowed from the Coraid web site:
shell # parted /dev/etherd/e0.0
(parted) mklabel gpt
(parted) print Disk geometry for /dev/etherd/e0.0: 0kB - 3001GB Disk label type: gpt
(parted) mkpart primary 0 1000G
(parted) mkpart primary 1000G 2000G
(parted) mkpart primary 2000G 3001G
(parted) print
Disk geometry for /dev/etherd/e0.0: 0kB - 3001GB
Disk label type: gpt
Number Start End Size File system Name Flags
1 17kB 1000GB 1000GB
2 1000GB 2000GB 1000GB
3 2000GB 3001GB 1001GB
(parted) quit shell
# cd /dev/etherd/ shell
# ls e0.0* e0.0 e0.0p1 e0.0p2 e0.0p3 shell
# mkfs.ext3 /dev/etherd/e0.0p1 shell
# mkfs.xfs /dev/etherd/e0.0p2 shell
# mkfs.reiserfs /dev/etherd/e0.0p3
in this case the disk in question is an AOE disk, but if you had a large SCSI array you would just substitute that instead of /dev/etherd/e0.0.
Parted can make the filesystem (mkfs) for you, type “help” at the (parted) prompt. EXT3 was not implemented in the version I was using.
`tune2fs -l /dev/sda1 | grep UUID” is how I find the UUID of the drive. If there are other ways to find the UUID of a drive I would like to learn them.
once you know the UUID for a drive you can mount it using just the UUID using the -U flag in the mount command:
mount -v -U 2ab524bc-3640-4dfd-bf4c-0373172e0159 -t ext3 /mnt/ether/
in the command above
-v yeilds verbose information about the mount command
-U tells the mount command to use the UUID of the device and is followed by the one we want to use. (those UUIDs are long aren’t they?)
-t tells the type of filesystem we are mounting. In this case, ext3. This is not always necessary
finally /mnt/ether/ is the directory I have set up for testing this etherdisk drive.
You can add the entry to fstab to cause a mount. Just remember if you are using aoe to make sure the aoe module is loaded first! Other large disk types won’t have that problem. This is what the entry should look like:
GUID=a241eee7-13e7-425d-854e-fa5ec1ee4c62 /mnt/largefs auto defaults 0 0
Now we have great big open file systems to save all that crufty old data on.
Permalink
11.07.08
Posted in Bacula, Linux/*BSD/Unix, Windows/Microsoft at 4:47 pm by Nate Smith
If you use Bacula to back up Windows Servers you need to be backing up the Windows system state. This saves the registry and associated information in a snapshot. Bacula itself cannot grab the registry because the files that make up the registry are always in use.
Prior to Windows server 2008 (Windows 2000, XP, 2003, etc.) you could do it like this:
create a file like c:\systemstate.bat and place the following line in it:
ntbackup backup systemstate /F c:\systemstate.bkf
This will cause the systemstate to be written to a file called systemstate.bkf so that if you need to do an exact restore of the machine you can.
Windows 2008 throws everything for a loop.
You get an error if you try to use the wbadmin equivalent:
wbadmin start systemstatebackup -quiet -backuptarget:c:
If you do that, you get an error. Windows will no longer allow you to back up the system state on Windows volumes that are classified as “critical volumes”. This will include the boot disk among others. Fortunately there is a workaround found in this MS KB article http://support.microsoft.com/kb/944530 . However…..
You have to read carefully.
It says you need to add a DWord entry to this subkey:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\wbengine\SystemStateBackup\
I did not see that the “SystemStateBackup” subkey did not exist in mine so I did not create it. Make sure to create it if you do not have it. Then add the following:
Name: AllowSSBToAnyVolume
Data type: DWORD
Value data: 1
Save the registry and you should be able to save the system state using the commands outlined above.
Permalink
05.11.08
Posted in Geek Culture, Linux/*BSD/Unix, gadgets at 4:26 pm by Nate Smith
I had some trouble installing Squeezecenter (formerly Slimserver) on Ubuntu Hardy Heron (8.04). Everything goes according to the instructions from the Slim Devices (Logitech) web sites but once you try to access the web server problems pop up.
It seems the issues stem from Apparmor. A program used to protect certain settings on Ubuntu. you can see the issued in /var/log/messages.
After a lot of digging the answer was available here: http://bugs.slimdevices.com/show_bug.cgi?id=7580#c1
There is probably a more elegant solution but this will work for now, and I just wanted to point anyone else in this direction in case others have problems.
Permalink
09.30.07
Posted in CallWeaver, Linux/*BSD/Unix, VoIP Telephony at 10:52 pm by Nate Smith
In the coming weeks I am going to write a tutorial on installing Callweaver on a bare machine. I will probably start with a fresh install of Debian and then make sure I include all the problems I have along the way.
Callweaver is a little daunting to get started on, it has a few pre-requisites that can make it a bit challenging. It might help some people coming into the fold to see what is involved.
Permalink
Posted in Linux/*BSD/Unix, Slug - the NSLU2 at 10:49 pm by Nate Smith
I de-underclocked my 3rd NSLU2 tonight. I follow the directions here: http://www.nslu2-linux.org/wiki/HowTo/OverClockTheSlug. I have used needlenose pliars and an X-acto knife in the past. I used the Needlenose again tonight.
The difference is really perceivable. Before it is de-underclocked it takes it a while to boot. After the procedure it pops right up.
I’m going to try to move this blog to the NSLU2 in a couple of weeks. Right now it seems the debian installer is broken. I may work around that or I may just wait. When it is working it is super-easy.
Permalink
06.20.07
Posted in Debian, Hacks, Linux/*BSD/Unix at 1:42 am by Nate Smith
What a cool little computer. The Linksys NSLU2 or as it is affectionately known, “The Slug”, is a little network computer that is meant to serve up USB disk devices on a network. It has been hacked. (yay smart people!) and you can now run Debian on it. Wow. The machine itself would have been nice to have a flash card expansion in it, but oh well. With a Thumb drive of two to four Gigabytes you can download a very functional installation of Debian Linux and run the device for a VPN, email, a phone system or a media server etc. Once you connect a USB hard drive it becomes a very capable machine provided you limit the tasks. It is capable of much more that it was with the original firmware. It is also possible to overclock (de-underclock) the machine by simply crushing, cutting or desoldering a resistor. The Slug is even better than Linux on the Linksys WRT54G because the slug is expandable and faster. Right now I am working on setting one up to relay the weather. I can already make telephone calls on it using Callweaver software. I have another one set up as a bacula file daemon with a hard drive and a USB tape drive attached. I need to learn my way around UDEV a little more to make this work like I would like. I’m using a USB hub for the Tape Drive and Hard drive and the devices get “misplaced” during a reboot.
Linksys gives hackers a lot of nice tools. Thanks Linksys! The Linksys Slug, check it out, very cool.
Permalink
« Previous entries