Categories
Unix

CentOS bootup hangs at iptables

I experienced an odd thing the other day when I went to reboot a server it was hanging at bootup at the iptables/firewall portion of the startup sequence.

I had to do “Interactive” bootup (by hitting “I”) and then I could say “n” on the firewall section. After that it booted up fine.

I examined my iptables and some postings on the ‘net will mention that failing to have the loopback interface in the rules, i.e. “-A RH-Firewall-1-INPUT -i lo -j ACCEPT”. I verified I had that, and then I realized that I also had a rule in place that was generated by an auto-rule script that uses IPs from failed attempts in log files. Somehow it had gotten 127.0.0.1 in there! I had to remove a blocking rule for 127.0.0.1 and then it worked.

So, rule of thumb, take care of what goes in your iptables file!

Categories
Unix

Restoring damaged /boot from XEN guest

I have a number of XEN and KVM virtual machines and I just had a case where one XEN guest had a problem with the new kernel I upgraded to. It would not boot, showing Error: (2, ‘Invalid kernel’, ‘xc_dom_parse_elf_kernel: ELF image has no shstrtab\n’) when the “xm create” was performed.

So I had to get into the /boot and fix the kernel and the grub.conf. How to do that safely on an image? Well it seems you CAN mount ext3 and other filesystems, but you CANNOT mount LVM or swap partitions. So fortunately the boot partition was ext3. Here are the set of commands I used to mount the image, vm01.img:

losetup -a

losetup /dev/loop5 vm01.img

fdisk -l /dev/loop5

lomount -t ext3 -diskimage vm01.img -partition 1 /mnt

Then you can go into /mnt and alter the kernels and edit grub/grub.conf. Once mounted, you can copy over new kernel files, but typically the /boot partition is a smaller size than the rest of the disk. I actually had some files I wanted to also copy over into /lib later, and they were needed for the networking to work. So I put them in gzipped tarballs in /boot a portion at a time and then when I would boot into the uncomplete setup I could copy them into place. A hack for sure, but that’s how I got more files over throughout the process.

Then, when done:

umount /mnt

losetup -d /dev/loop5

You need to do this to cleanly close the image. Then you can “xm create” your fixed up image!

 

 

Categories
Cellphone

RMA HTC Incredible

My recent (smart)phone is an Incredible-2, and it developed a dead zone on the touch screen lately. I brought it in to Verizon and was slightly disappointed to find out that it was under warranty and they would replace it for free! Disappointed because frankly that new Samsung Galaxy looks sweeeeeet as long as you ignore the kill code that people found on it.

Anyway, new free phone sounds good, so ship it I said. I got the package in the mail with nice & easy instructions and I swapped phones quickly. Kudos to Verizon for making it easy!

The one big bonus I have now is that this phone has MUCH BETTER reception than the old one! I’m not sure why, but in the past when I would drive through the “rainbow” tunnel at the end of the Golden Gate Bridge I would ALWAYS lose signal and my calls would drop. But this new phone has no issues. I can only deduce that not every phone has a nice clean routing of the antennae through the case?

So there you go, next time you get dropped calls, trade your phone in and presto! Happy days!