Possible fix for using apt through a broken HTTP proxy

Seen on a work email list. A possible solution to the problem where files downloaded through apt-get on Ubuntu at work (where we have a squid HTTP proxy) periodically get corrupted.

Put the following in apt.conf:

Acquire::http::Pipeline-Depth "0";

Quote from man apt.conf:

One setting is provided to control the pipeline depth in cases where the remote server is not RFC conforming or buggy (such as Squid 2.0.2) Acquire::http::Pipeline-Depth can be a value from 0 to 5 indicating how many outstanding requests APT should send. A value of zero MUST be specified if the remote host does not properly linger on TCP connections – otherwise data corruption will occur. Hosts which require this are in violation of RFC 2068.

Fixing an unbootable VMware VM after upgrading your Linux kernel

It seem that some of the newer Linux kernel versions (2.6.21 and 2.6.22) don’t like the LSI SCSI adapter emulation in some of VMware’s products. I myself ran into this when I upgraded the kernel on a Gentoo VM (VMware ESX Server 3.0.1) to 2.6.22. After rebooting, the system could not find the root partition.

It took a bit of searching to figure out what the problem was, but the solution was simple. Change the VM to use the BusLogic SCSI adapter instead of the LSI.

Some references:

Asus S-presso BIOS upgrade 1008.003

On my Asus S-presso I’ve got suspend to disk working but not suspend to RAM.

In an effort to get s2ram working, I upgraded the BIOS to version 1008.003.

Last time, I upgraded the BIOS, I used the HP USB Disk Storage Format Tool and HP’s boot files (both of which I found in a post on aaltonen.us) to format my SanDisk Cruzer Mini as a DOS-bootable disk.

This time, the links seemed to be broken, but I managed to find them in other spots, so I made my own copies:

I used these to boot off an SD card into DOS and then used Asus’s afudos utility to backup the current BIOS and upgrade to the new version:

afudos /i1008.003 /o1007.002

Unfortunately it didn’t help a lick with s2ram.

By the way, nice work, Asus:

$ sudo s2ram
Machine is unknown.
This machine can be identified by:
sys_vendor   = "To Be Filled By O.E.M. by More String"
sys_product  = "To Be Filled By O.E.M."
sys_version  = "To Be Filled By O.E.M."
bios_version = "1008.003"

"To Be Filled By O.E.M." — ha ha. Oops.

(sudo s2ram -f doesn’t work either — it sort of looks like it’s suspending and then it immediately wakes up).

Got suspend to disk working on my Asus S-presso

As previously mentioned, I was trying to get suspend to RAM and/or suspend to disk working on my Asus S-presso box with Ubuntu feisty.

Well, I got it to work. The problem was lame – for some reason when I installed uswsusp and it regenerated the initrd, it only did the 2.6.20-16-generic file and I was running the 2.6.20-16-386 kernel. I just had to do a mkinitramfs -u -k $(uname -r) and that updated the proper initrd for my kernel of choice.

Now I suspend to disk by doing sudo s2disk and then later when I power on the machine and choose the relevant item in the grub menu, the newly generated initrd will automatically resume by reading from my /dev/sda5 swap partition.

I also played with s2ram, but haven’t had too much luck there yet. My machine is not in the whitelist and I tried forcing it with -f and other options. What seems to happen is the machine attempts to suspend to RAM but then gets immediately woken up and goes right to the GNOME screensaver password prompt. I also tried upgrading to the latest version of uswsusp (0.7 [2007-09-03] instead of the 0.3 version that is in Ubuntu Feisty). No dice. Heck, perhaps my machine has a broken ACPI implementation. From what I hear, the ACPI spec is quite complex and is often poorly implemented.

I’d like to get s2ram working (any ideas?), but at least now I have s2disk working.

S-presso => no sleep

Computing mirroring real-life. Espresso is not conducive to sleep and neither it seems is the Asus S-presso small-form-factor PC.

I have an Asus S-presso small-form-factor PC that runs Ubuntu and is on all the time, because it is the print server for our Canon i950 ink jet printer.

Now my wife and I have decided to be more green/eco-friendly and to save money on our electricity bill, so running a computer 24/7 is not really helpful in that regard.

I got out my Kill-A-Watt last night and measured power demand of a power strip that serves the computer, printer, monitor, external hard drives, USB hub, etc. With the computer running in its normal steady state, usage seemed to be around 160 to 180 watts. With the computer powered off, I believe it went down to around 18 or so. If I actually unplugged the computer, I think it went down to around 11 (the computer has a front-panel display with a clock when it’s off but plugged in). Even after unplugging the computer and monitor and printer and such, I don’t think I got the usage below 9 watts (Perhaps the power strip LEDs?).

Powering the computer off at night and when we’re not using the printer would save power but would be a bit inconvenient. Ideally, we could have it suspend to RAM or disk and then use Wake on LAN to wake it up when we need it.

Well, I checked the BIOS settings and made sure that all the ACPI and APM stuff looked in order and then I booted up Ubuntu and tried to suspend it via GNOME’s power management stuff. Well, the computer yawned a bit and the monitor lost signal and the computer went to sleep for all of a second or two before promptly waking up and presenting the password prompt to unlock the screen. I tried this a few times. I checked the BIOS to see if anything was set to wakable and I couldn’t find anything.

Then I tried hibernating. First there was the obstacle that I apparently had no swap partition. Apparently during one of my upgrades, partition names changed and my fstab was no longer up to date so I had been unknowingly running without a swap partition. Oops. Well, that was easy to fix with a quick edit to fstab and an invocation of swapon. Now I tried to do a hibernate. The system jumped to text mode and dutifully wrote out the contents of RAM to swap, as I observed with the nice percentage done progress indicator. Then the system powered down and power usage was down to a nice 18 watts. Only problem was that pressing keys didn’t wake it up and when I pressed the power button on the machine, it did a complete cold boot and never made any attempt to restore the hibernated state.

After that I looked through the repository at a confusing bunch of power management stuff, including powernowd, powersaved, cpudyn, hibernate, and uswsusp and I tried to install some of them (some of them conflict with others) and had no luck. I also had no luck throttling the speed of my processor (Pentium 4 3.0 GHz)- it appears that my processor doesn’t support SpeedStep or the like.

Eventually, it was late and I gave up and powered the computer down for the night. I guess I will power the computer down every night and power it on in the morning, at least for now. I may give some thought to getting a little $50 Ethernet USB 2.0 print server box (e.g.: IOgear GPSU21, RJ45/USB 2.0, $53.99 ; though I recall these things often require special client software and don’t typically support bidirectional communication) or maybe just getting rid of the ink jet (which costs a lot of money in ink cartridges anyway) and replacing it with a networked laser printer (e.g.: Samsung ML-2571N, $109.99 after $50.00 Mail-In Rebate).

Suggestions?

VMware Unveils VMware Tools as Open Source Software: Financial News – Yahoo! Finance

VMware Unveils VMware Tools as Open Source Software: Financial News – Yahoo! Finance

VMware, Inc., the virtualization leader, today at VMworld 2007 announced that it has released a majority of VMware Tools as open source software as part of the project Open Virtual Machine Tools. VMware Tools is a set of guest operating system virtualization components that enhance performance and improve management of VMware virtual machines. Open Virtual Machine Tools (open-vm-tools) is hosted at http://open-vm-tools.sourceforge.net, and the source code is available today to enable Linux vendors to integrate open-sourced VMware Tools into upcoming versions of their operating systems.