Blog is back (sort of) – x_alarm_chrubuntu.zip rehosted


The file can be found on the original URL (as posted all over the web) and you can get it here: http://craigerrington.com/chrome/x_alarm_chrubuntu.zip

And the article you’re probably looking for is here: http://craigerrington.com/blog/fixing-touchpad-issues-on-arm-chromebook-chrubuntu/


Hi everyone.

I’m not a writer or a tech instructor, I just happened to have a blog install at the time I discovered the crouton/chrubuntu stuff and I had a specific chromebook (Samsung ARM) that no one else seemed to have gotten working.

So while my monthly visits are counted in the 10s, and my posts generally have similar views, the chrubuntu/arm/chromeos stuff has something like 100,000 unique visitors.

So I’m sort of bad at keeping my blog online, and every time I forget to renew my hosting etc, I lose everything (and as a quick google for ‘x_alarm_chrubuntu.zip’) thousands of other people’s articles directly quoting my previous findings no longer work (as litterally everyone just copies and pastes the blog entries and republished, no one mirrors the files in use).

As such, I get emails from time to time asking me to re-provide the files.

Most of my guides are out of date and have been superceded.

However, I’ve spent the morning on archive.org and rebuilt all the content of my previous posts. I’ve managed to use wordpress permalinks to make all the original blog posts appear on the same URLs as they’ve been on previously (so that other people’s reposts will still work) and I’ve re-hosted the chrubuntu fixes file.

There are bits and pieces missing throughtout:

Links to credit original authors: All names are intact, but I’ve lost some hyperlinks, so apologies to anyone who is no longer credited in an appropriate manner.

Code blocks: No longer nicely formatted, but I’ll hopefully fix this over the next few days

Comments are gone (Jetpack can’t re-join old comments, this won’t be fixed which is a shame)

I hope that this stuff going back online helps someone.

And NOTE: If you want to republish my work, PLEASE attribute credit AND re-host the files in question as you do so (so that if my blog ever goes down again SOMEONE has the files online)

I’ll be publishing everything to GitHub in the next few days to get a more permanant record online.

 

 

PRTG – WMI Repair – 80041002

I’ve been dealing with some issues in the PRTG Network Monitoring system we use at work. PRTG uses a combination of SMNP, WMI and a few other tools to monitor network infrastructure.

One day, we had a server flag a bunch of red alarms all with the same errors.

A combination of the PRTG Error code PE015 and WMI error 80041002 (object not found).

There were all sorts of WMI issues discussed on the PRTG website, with comments referring to yet more fixes. All to do with permissions, incorrect sensor setting etc. None of the fixes helped us – and since it had worked for months and months up until the day of errors – I found it hard to believe that there was a general configuration error.

I spent a lot of time on google looking at standard WMI issues people were discussing related to the 80041002 error code until I finally got there and my sensors are back up and running.

I’m documenting this online so that any other PRTG (or I suppose WMI) users have something else to try.

Below are all the steps I took to get back and working. I have a feeling that only the last two commands (under ‘WMI Rebuild’) actually did anything, but I can’t be sure as I’d need another failed system to test against.

Re-register the DLLs:

Regsvr32 %SystemRoot%\System32\wbem\wmidcprv.dll
cd /d %windir%\system32\wbem
for %i in (*.dll) do RegSvr32 -s %i
for %i in (*.exe) do %i /RegServer

You will probably get a WMI popup here, just close it

Namespace Repair:

net stop winmgmt
wmic /NAMESPACE:\\root path "__namespace.name='wmi'" delete
mofcomp %windir%\system32\wbem\wmi.mof
net start winmgmt

WMI Check and Rebuild

winmgmt /verifyrepository (this reported “inconsistent” in our example)

winmgmt /salvagerepository (this completed properly)

winmgmt /verifyrepository (as a final check and received “consistent”)

At this stage, our sensors were able to talk to the server again.

(Source: http://social.technet.microsoft.com/Forums/windowsserver/en-US/df00b2e4-3bab-4b46-ad5a-95e82617a039/wmi-errors?forum=winserverNIS)

crouton script, from SD card

Updated some of the instructions below

So, I’ve just been shown how to install the XFCE chroot environment onto an SD card.. (I will include instructions for internal and external). These instructions supercede all previous ones, as a lot of fixes are incorperated by the Crouton developer, and are no longer needed.

So now, you can run ChromeOS, a full Ubuntu with an XFCE desktop, literally at the same time, switch between them with a key stroke, and not use up any of the internal storage of your Chromebook…

These instructions are written for the ARM Chromebook – they will work for other devices BUT be very careful and figure out the name of your SD card using “sudo fdisk -l” before following anything below – anywhere you see “/dev/mmcblk1″ you should substitute for your SD card name.

First up, if you’re like me, you’ll want to remove your original chroot, and start again with the SD.

So first command:
sudo delete-chroot precise

sudo delete-chroot precise

Making an EXT4 Partition on your SD Card

(ignore this whole section it you want to install internally, I’ll give you a shout when it’s time to join back in!)

This assumes you want to use the whole SD. If you have another computer, instead of using your Chromebook – this can be replaced with “insert SD in computer, make EXT4 partition with gparted”…But this is written with the assumption you’ll be using an ARM chromebook for all steps.

Get into a shell

This is destructive to your SD card, kiss its content goodbye (or back it up)

First, we’ll just check the name of our SD card:
sudo fdisk -l

sudo fdisk -l

On the ARM chromebook it’s /dev/mmcblk1

Next wee’ll unmount any partitions mounted on the SD
sudo umount /dev/mmcblk1*

sudo umount /dev/mmcblk1*

Next we’re going to create a new partition table on the SD card.
sudo parted /dev/mmcblk1

sudo parted /dev/mmcblk1

This will take you into the ‘parted’ application, where we can create the new table.. Execute the following line and then click enter
mktable msdos

mktable msdos

Type “yes” when asked and hit return. Then type “quit” and click enter.

Reboot the chromebook to clear the mount points and stuff… (Do it, seriously)

Get back into a shell

Now we’re going to create a linux partition onto the SD card
sudo fdisk /dev/mmcblk1

sudo fdisk /dev/mmcblk1

This will take you into the ‘fdisk’ application.

Type the following in order:
n p 1 8192

n
p
1
8192

If you now execute:
sudo fdisk -l

sudo fdisk -l

you will see your new partition (notice that it’s the name of the drive with “p1″ added to the end, this will be different on the non-arm devices….), but now we need to put a file system onto it..

Execute the following command to install an ext4 filesystem:
sudo mke2fs -t ext4 /dev/mmcblk1p1

sudo mke2fs -t ext4 /dev/mmcblk1p1

Eject your card

Re-insert it

Done…. Your card now has a working ext4 filesystem and we’re ready to install crouton onto it..

OK, at this point, you have a working SD Card

OR if you’re installing internally, **this is where you join back in with the instructions***

We’re back to the basics of crouton now…

First, download the script (for the most up to date download, go here: https://github.com/dnschneid/crouton – at the top of the page, you will see a link like http://goo.gl……. I’m not posting it here as it changes regularly, and these instructions need to stay up to date…)

Make sure before you download it that you delete any previous versions of the script that you might have (just in case you use an old one)..

Back in a shell, once the script is downloaded, execute:

FOR SD CARD PEOPLE::
sudo sh -e ~/Downloads/crouton -t xfce -p /media/removable/External\ Drive

sudo sh -e ~/Downloads/crouton -t xfce -p /media/removable/External\ Drive

(careful with this location – if you’re familiar with linux use your “tab” key to complete the location, it’s easier and always accurate…)

OR FOR INTERNAL DRIVE INSTALL::
sudo sh -e ~/Downloads/crouton -t xfce

sudo sh -e ~/Downloads/crouton -t xfce

Wait for the process to complete..Answer any prompts (like your name, and password)

Now, to launch into your new desktop, the commands are:

FOR SD CARD USERS

With SD card inserted, open a crosh window -> ctrl+alt+t
Enter the shell by typing “shell”
Type
cd /media/removable/External\ Drive/bin sudo bash startxfce4 -c /media/removable/External\ Drive/chroots/

cd /media/removable/External\ Drive/bin
sudo bash startxfce4 -c /media/removable/External\ Drive/chroots/

FOR INTERNAL INSTALLS
sudo startxfce4

sudo startxfce4

Then to switch between the two desktops, just use the following key combo:

CTRL + ALT + SHIFT + “Back”

Enjoy!!

Fixing desktop scrolling in Crunchbang and Openbox

I have just finished installing Crunchbang linux onto a laptop, and came across something pretty annoying. Whenever I touched the destkop, and tried to scroll with the trackpad through the virtual desktops, it just went insane, speedily cycling through the two desktops… Totally unusable. I assume it holds up better with a real mouse wheel?

I’ve found a workaround, and modified someone’s instructions from a few years ago. I’m just going to dump the text I posted to the crunchbang forums below. (Link: )

I’m posting this here for two reasons: To make it easier to google for future people (I’ve tried to use lots of words in here, that I used myself when tracking it down)….And to help me in the future, in case the forums disappear..

——————————-

If you’re anything like me, you may get really frustrated with the default desktop scrolling that comes with Openbox/crunchbang.

If you don’t know what I’m talking about, let me describe the problem.

If you use a touchpad/trackpad/non-clicking mouse wheel – When scrolling up or down, with the desktop selected, you quickly fly between desktop 1 and 2 – *really* quickly – as they cycle from 1,2,1,2,1,2,1,2,1,2 – uncontrollably so

I struggled to find an answer online, and found people suggesting disabling the whole function. I’d rather not do this. Since I found a way to do it, I wanted a thread where it was described with lots of keywords for future googlers :)

I then found (post #7) where someone came up with a good idea – set one direction go to desktop 1, and the other direction go to desktop 2. This way you get a nice controllable way to switch between desktops using the touchpad…

Unfortunately, the instructions are out of date.

To set it up as described in the waldorf images:

Menu > Settings > Openbox > edit rc.xml

Search for
<mousebind button=”Up” action=”Click”> <action name=”GoToDesktop”><to>Previous</to></action> </mousebind>

<mousebind button=”Up” action=”Click”>
<action name=”GoToDesktop”><to>Previous</to></action>
</mousebind>

and replace it with
<mousebind button=”Up” action=”Click”> <action name=”GoToDesktop”><to>2</to></action> </mousebind>

<mousebind button=”Up” action=”Click”>
<action name=”GoToDesktop”><to>2</to></action>
</mousebind>

then search for
<mousebind button=”Down” action=”Click”> <action name=”GoToDesktop”><to>Next</to></action> </mousebind>

<mousebind button=”Down” action=”Click”>
<action name=”GoToDesktop”><to>Next</to></action>
</mousebind>

and replace it with
<mousebind button=”Down” action=”Click”> <action name=”GoToDesktop”><to>1</to></action> </mousebind>

<mousebind button=”Down” action=”Click”>
<action name=”GoToDesktop”><to>1</to></action>
</mousebind>

(swap the “1″ and “2″ round to taste, depending on the direction you prefer).

Restart Openbox and job done…

crouton targets

I’ve posted a lot about the crouton script by David Schneider, basically because its my favourite solution for having a working linux userland on the Chromebook – as it doesn’t require rebooting between OS’s and I get as much ‘linux as I need’… So I just wanted to talk very briefly about a nifty part of the script..

targets

In my original guide I talked about using the script to set up an XFCE desktop, and the command looked something like this:
sudo sh -e ~/Downloads/crouton -t xfce

sudo sh -e ~/Downloads/crouton -t xfce

(for internal)

and
sudo sh -e ~/Downloads/crouton -t xfce -p /name/of/your/card

sudo sh -e ~/Downloads/crouton -t xfce -p /name/of/your/card

(for an SD/usb install..)

Well the “-t” in there is where we specify a target, and there are a few to choose from.. for instance the Ubuntu Unity desktop (albeit with very few packages installed…so not really useful yet..):
sudo sh -e ~/Downloads/crouton -t unity

sudo sh -e ~/Downloads/crouton -t unity

And many others (with varying levels of success) are listed here: https://github.com/dnschneid/crouton/tree/master/targets

And remember as he says on the README file:

“Chroots are cheap! Create multiple ones using -n, break them, then make new, better ones!”

“The delete-chroot command is your sword, shield, and only true friend. sudo delete-chroot evilchroot”

OUTDATED: Scrolling with the touchpad in the XFCE chrootc

OUTDATED
This is all out of date now. There is a new set of instructions with all fixes included and the option to install to SD. CLICK ME TO READ NEW ARTICLE

Edit: New script for mouse fix from the crouton developer, instructions updated.

If you followed my previous guide to install XFCE and run it at the same time as ChromeOS, you’ll be pleased to know that thanks to the developer of the “crouton” script who makes this all possible (David Schneider) it is now possible to enable two finger scroll support in the X environment.

David has written a script to enable the extra support, and I’ve written a guide below to install his script, and to have it come up automatically each time.

The instructions below all should be typed into the terminal *of the chroot* not from ChromOS.

First up, we need to install a quick dependency for the script
sudo apt-get install xdotool xautomation
1

sudo apt-get install xdotool xautomation

Next, you’ll want to create the actual script (again, all credit to DS)
mkdir ~/scripts cd ~/scripts wget https://raw.github.com/dnschneid/crouton/wheel/chroot-bin/croutonwheel sudo chmod +x croutonwheel sudo nano /usr/bin/fixmouse
1
2
3
4
5

mkdir ~/scripts
cd ~/scripts
wget https://raw.github.com/dnschneid/crouton/wheel/chroot-bin/croutonwheel
sudo chmod +x croutonwheel
sudo nano /usr/bin/fixmouse

this will make a new file called fixmouse, opened in nano, in here type:
bash ~/scripts/croutonwheel &
1

bash ~/scripts/croutonwheel &

(click ctrl+X to close and save)

sudo chmod +x /usr/bin/fixmouse

Next, go to the XFCE menu > Settings > Session and Startup

Choose “Application Autostart” tab, click “Add”. Put whatever you want in name and description, make sure the command is set to “fixmouse”.

Now, exit XFCE from the menu, and start it back up from your chromeOS terminal.

You should now have use of the mouse “wheel” function.

Obviously if you know what you’re doing, all you need is the script and go fill your boots ;)

OUTDATED: Updated chroot mouse fix

This is no longer relevant. Crouton now includes these fixes. Upgrade your existing install, or install again. The new guide is available here. It includes all the fixes and the option to install to SD card…

The previous article on fixing the scroll function in the X chroot has been updated with a better script (better performance) – and slightly modified instructions available on the original post

If you followed the guide previously, simply copy the content of this file: https://raw.github.com/dnschneid/crouton/wheel/chroot-bin/croutonwheel – into your wheel script (if you followed the directions in my post, this will be located: /home/YOURNAME/wheel)…And then you’ll need the “xautomation” package in your chroot.. Simply execute this from the chroot shell:

sudo apt-get install xautomation

Thanks again to David Schneider for making this all possible

As before, feel free to ask questions in the comments here, I can certainly help people get to the same stage as me…However, if there’s something I’m not sure about, I may refer you to the “Issues” section of the github page.

Chromebook (ALL): ChromeOS and xfce/ubuntu at *the same time*

This article is mostly accurate still, but there’s more up-to-date information available in a new guide – including new fixes, and the option of installing to SD card..

Hey everyone, I came across the “crouton” project tonight (https://github.com/dnschneid/crouton)

This is an incredibly elegant script, and the developers deserve a big pat on the back.

This script allows you to install Ubuntu (or debian if you want to mess around) along with a full XFCE desktop that runs simultaneously with ChromeOS and lets you switch between the two desktops with a keystroke.

The instructions come from the readme on the project page, but are written for non-ARM devices, I’ve made a slight addition afterwards. First off, go to the link above, and download the crouton script, then follow these steps:

Since the instructions are ever changing, make sure you check the link above to make sure you’re up to date, I’ll leave these here for archival reasons…

Download crouton.
Open a shell and run
sudo sh -e ~/Downloads/crouton -t xfce
1

sudo sh -e ~/Downloads/crouton -t xfce

Wait patiently and answer the prompts like a good person.

Done! You can jump straight to your Xfce session by running
sudo enter-chroot startxfce4

sudo enter-chroot startxfce4

or, as a special shortcut
sudo startxfce4

sudo startxfce4

switch between Chromium OS and your chroot using Ctrl+Alt+Back and Ctrl+Alt+Refresh.
Exit the chroot by logging out of Xfce.

ARM Differences (note: the instructions on the project site have since been updated and now include correct instructions for ARM:

The TTYs work differently, so when you’re in the chroot XFCE desktop, there’s a different keystroke to move between chrome OS and Ubuntu chroot, we need to add “shift” to the combos

So “ctrl+alt+shift+back” will switch between the two.

This will let you run whatever linux apps you want while not having to constantly reboot the laptop.

If you’re like me, you may also find it useful for your chroot ubuntu environment to be able to see some of the files in your main chrome environment (your download folder for example)… To do this, you need to “bind” any folder from chrome that you’d like to access to a folder within the chroot.

For example, if you wanted to share your Chrome download folder with your Ubuntu area, you would:

1. From your chroot environment, create a directory to act as the mount point:
sudo mkdir /chrome

sudo mkdir /chrome

Then, from your chrome shell execute:
sudo mount -o bind /home/user/XXXXXXX/Downloads/ /usr/local/chroots/precise/chrome/

sudo mount -o bind /home/user/XXXXXXX/Downloads/ /usr/local/chroots/precise/chrome/

Then, when you’re in your chroot environment, if you browse to the /chrome directory, you will find the contents of your chrome download folder..
Written by craigerrington No comments Posted in arm, chromebook, github, linux

elementary OS Makes it to ARM

The elementary OS developers have announced their PPA now has 1:1 compatability with the i386 and x64 releases.

If you’re already running the ChrUbuntu build (hopefully with my touchpad fix) you can simply execute the following commands:
sudo add-apt-repository elementary-os/daily sudo apt-get update sudo apt-get install pantheon sudo reboot

sudo add-apt-repository elementary-os/daily
sudo apt-get update
sudo apt-get install pantheon
sudo reboot

When you’re back at the login screen, be sure to select the “Pantheon” session.

All done!

Full announcement: https://lists.launchpad.net/elementary-dev-community/msg01889.html

Pay Attention – Try not to melt your ARM Chromebook Speakers

Bit of a tip.

Everyone testing Linux builds on the ARM Chromebook should be very VERY careful about playing with settings in alsamixer – enabling the wrong things at the wrong levels can trigger a kernel bug that will literally melt your speakers (I’m talking from experience here…)

More details over on Marcin Juszkiewicz’s blog: http://marcin.juszkiewicz.com.pl/2012/12/10/how-to-fry-speakers-in-your-chromebook/