So grub stops autobooting if any previous shutdown errors occur

Meaning if you hard shutdown your machine while testing etc.., when you reboot, grub will actually just stop and sit there. Which is totally what I want all the time…certainly don’t want to boot into that OPERATING SYSTEM that gets me and IP ADDRESS so I can remotely log into my BOX! I used the method described here to disable this. Basically, you disable the check from matering when the timeout decision is made in the make_timeout function.

Continue reading ↦

Make a VMware ESXi (Vsphere Hypervisor) USB Bootdisk

So this works the same way you do it for normal Linux distros….with one catch. Use Rufus, unetbootin (what we used) LiLi, etc… to actually write the iso properly to the usb key. Edit your BOOT.CFG file and add “ks=usb” directly after “b.b00? so it should very similar to: modules=/b.b00 ks=usb — /useropts.gz Boot with the USB and love me forever.


I seriously need a UPS…mdadm resync explanation

There were intermittent storms and wind around me last night causing not full on power outtages but instead, dreadful power dips! So my server went down. Waited a bit until things seemed to be normal. Brought it back up. About 2 minutes later, power dip (im thinking now that it was really only a problem for devices taking a ton of power/voltage, aka, my server). So I said screw it. Shut everything down.

Continue reading ↦

Flashing different LSI firmware on the M1015…on a UEFI bios!

Not fun. I just spent like 1.5-2 hrs messing around with this pulling my hair out. So I have an asus p8z77 which supports uefi. I just recently acquired a IBM Serveraid M1015 and read this awesome post about flashing different LSI firmwares to the card to enable pass-through etc.. I decided I wanted to flash the “IR” firmware to get the best of both worlds. So I made my usb boot key:

Continue reading ↦

So we lost power during an mdadm reshape/rebuild…yeah.

Yeah…try to mitigate against this in the future. We basically were doing a reshape to grow the array using these commands: # mdadm –add /dev/md0 /dev/sdfp1 # mdadm –add /dev/md0 /dev/sdgp1 # mdadm –grow /dev/md0 –raid-devices=9 So what initially happened is the box lost power and then the power came back the box automatically restarted… With this, mdadm actually assembled the array in a read-only mode and saw the array as the new number of devices:

Continue reading ↦

Using dd on mac osx

UPDATE – So a friend just turned me on to the fact that you can actually talk to a drive via a raw path in OSX. Using a device name like /dev/rdisk2 bypasses any extra buffer cache in between you and the raw disk. So in the example below, the entire operation would move much faster by using /dev/rdisk2 instead of just /dev/disk2. Thanks to Jared for notifying me of this and superuser.

Continue reading ↦

Disabling and re-enabling a daemon

So I’m doing some server/hdd moves etc.. that will be temporary. So I wanted to disable some of my services that rely on those mounts etc.. Rather than completely change runlevels the daemon starts and stops on (update-rc.d) or messing with symlinks in /etc/rc2.d, I found a much easier way: Disable daemon from any runlevels: # insserv -r Enable daemon again. It will keep any runlevels it previously had. # insserv

Continue reading ↦

htaccess with nginx

sudo apt-get install apache2-utils sudo htpasswd -c /var/www/mywebsite.com/.htpasswd exampleuser Put the following in your nginx conf file for the given server block you want this to apply to: auth_basic “Restricted”; auth_basic_user_file /var/www/mywwebsite.com/.htpasswd; Thanks DO!


Using find regex to remove specific files in a directory

So working with the ALU chassis, its totally the most fun time of my life (scp locally doesn’t support wildcards or directories, thank god I could initiate it remotely). I scp’ed over a bunch of files, cores, diags, and backups all with an awesome naming convention like so: 9-2_backup-alu2.0_2001-10-18_16-48-03-gmt.tgz 9-2_backup-alu2.0_2001-10-18_17-48-03-gmt.tgz 9-2_backup-alu-core1.0_2001-10-09_14-21-14-gmt.tgz 9-2_backup-alu-core1.0_2001-10-09_14-23-09-gmt.tgz 9-2_backup-alu-diag1.0_2001-10-09_14-22-05-gmt.tgz Where the basic number after “alu” is a backup, the core is a core, and the diag is a diag.

Continue reading ↦

The perfect mysqldump command

So this is how I recommend everyone backup their database…It basically provides for any mucked database you might have by adding remove statements before the create statements. And it back’s up all the databases you have for a given MySQL instance…which makes life easier! mysqldump -uroot -pawesomepassword –all-databases –add-drop-database –add-drop-table > db.sql