Posts

Clock shows wrong time when dual booting Windows and Linux (*nix)

Everybody dual booting Windows and Linux (or any other *nix derivative) surely has different hours when booting back to Windows from Linux. Well, that's because Windows manages the clock in "local time" instead of UTC which is what most other OSes do (such as Linux). According to this Lifehack (http://lifehacker.com/5742148/fix-windows-clock-issues-when-dual-booting-with-os-x) there's a workaround in order to force Windows to use UTC. It's a simple registry entry that starts working as soon as you reboot your PC back into Windows. I'll copy it here for posterity in case LH ever runs into trouble and disappears. Search for: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation Right click anywhere in the right pane and hit "New > DWORD (32-bit) Value". Name it "RealTimeIsUniversal". Double click on it and give it a value of "1". That's it. Just reboot back into Windows and check that (if your cloc...

ALARM on two partitions

Create two Linux partitions (type 83), one for /boot and the other one for the rest of the OS. Try to use GPT (cgdisk instead of fdisk) in order to later on use the UUID trick on the bootloader. For /boot, 200 or 300MB should be enough. Remember to format /boot as ext2 and the other partition as ext3/4. Once you're all set, download ALARM's tar.gz file. Extract the OS tar.gz (tar zxfv) to the ext3/4 partition. Then move the /boot from the ext3/4 partition to the ext2 partition. Now, edit fstab file on the ext3/4 partition and while leaving the existing lines, add these lines: /dev/sda1   /boot        ext2    defaults,noatime     1 2 /dev/sda2   /            ext4    noatime              0 1 That should be it. Unmount everything, plug the drive into ...

CPU Scaling

I don't like hot CPU's so when I install Linux I usually setup and install cpupower on it. It's dead easy. Check this: pacman -S cpupower cat /etc/systemd/system/cpuscaling.service [Unit] Description=change cpu governor [Service] User=root Type=oneshot ExecStart=/usr/bin/cpupower frequency-set -g ondemand [Install] WantedBy=multi-user.target systemctl enable cpuscaling.service systemctl start cpuscaling.service And this is what you should see after starting the service/rebooting: systemctl status cpuscaling.service * cpuscaling.service - Change CPU Governor Loaded: loaded (/etc/systemd/system/cpuscaling.service; enabled) Active: inactive (dead) since Tue 2014-08-19 06:07:54 UTC; 40s ago Process: 2250 ExecStart=/usr/bin/cpupower frequency-set -g ondemand (code=exited, status=0/SUCCESS) Main PID: 2250 (code=exited, status=0/SUCCESS) Aug 19 06:07:54 alarm cpupower[2250]: Setting cpu: 0 Aug 19 06:07:54 alarm systemd[1]: Started Change CPU Govern...

Sync Windows 2008 R2 domain controller with NTP servers

Taken from http://defaultreasoning.com/2009/11/16/synchronize-time-with-external-ntp-server-on-windows-server-2008-r2/ Kept here just for archiving purposes. All credits to them. 1 - First, from your computer open a command prompt and run "C:\>netdom /query fsmo" to locate your PDC Server. 2 - Then log in to your PDC Server and open the command prompt. 3 - Stop the W32Time service: C:\>net stop w32time 4 - Configure the external time sources, type: C:\> w32tm /config /syncfromflags:manual /manualpeerlist:”0.pool.ntp.org, 1.pool.ntp.org, 2.pool.ntp.org” 4a - May need to poke with the " and the , on the previous command. 5 - Make your PDC a reliable time source for the clients. Type: C:\>w32tm /config /reliable:yes 6 - Start the w32time service: C:\>net start w32time 7 - The windows time service should begin synchronizing the time. You can check the external NTP servers in the time configuration by typing: C:\>w32tm /query /configuration 8 -...

[Howto] USB sniffing

SniffUSB tool: http://www.pcausa.com/Utilities/UsbSnoop/ Important blog article by crope: http://blog.palosaari.fi/2013/07/generating-rtl2832u-driver-code.html IRC log with crope and mchehab about USB sniffing: [11:06am] crope_: mchehab: ping. I have one RTL2830 driver 3.12 regression. I suspect it is coming from I2C changes, but problem is here that I2C subsystem maintainer has not answered to mails.... [11:07am] crope_: it is that https://patchwork.kernel.org/patch/3079491/ [11:07am] crope_: maybe it could be still safe to marge that patch even I am not sure why it is needed [11:16am] dddtest_e9d3d joined the chat room. [11:24am] mchehab: crope_: hmm... khali is on this channel [11:27am] mchehab: if just re-adding "priv->tuner_i2c_adapter.dev.parent = &i2c->dev;" is enough to fix it, go for it [11:37am] crope_: mchehab: I2C maitainer *just* replied [11:37am] crope_: and he says there should be parent, but it is unclear why it has not been crashed earli...

Headless home server - Boot via GPT/EFI UUID

My Headless home server (Seagate Dockstar) doesn't have a standard boot manager. It simply boots a uBoot image, either from it's NAND or from an external HDD. All this is set up in it's BIOS. Unfortunately it doesn't have a iLO/DRAC/SIMC/IPMI so that I can control the BIOS over a network connection. Anyway, this amazingly cheap/"low power" device comes with a crippled OS and I like ArchLinux ARM a lot better. Since ALARM (short for ArchLinux ARM) doesn't fit in the small NAND I have to setup the BIOS to point it to an external USB device. But there's a downside to this. Since the PlugPC has 4 USB ports and since the HDD's don't always take the same amount of time handshaking with the BIOS on boot-up, what happens is that sometimes disk A is sda and disk B is sdb but some other times disk A is sdb and disk B is sda. Rather confusing...for us and for the small server too. And worst of all, when the change happens the device won't boot u...

Headless home server - Setting up Dynamic DNS (FreeDNS) and IPv6 tunnel (HE.net)

Every time I install a PlugComputer I setup a Dynamic DNS service so that I can access it's shell and apps/services from the Internet easily. My preferred Dynamic DNS service is FreeDNS which is very easy to install and setup. Plus, it's working on FreeBSD servers :-P Setting up an account at FreeDNS is fairly simple and it is also simple to setup a subdomain in the form of an A NAME with them. A subdomain is basically something that looks like aname.domain.com . Whatever! So after setting up your A NAME, you need to configure the headless server so that it frequently checks your public IP address. If it has changed from the last time it checked, it then has to register the new public IP address with your A NAME. Most Dynamic DNS services make this easy for us in the form of a URL that we can visit. And since the headless server doesn't run a proper web browser we can use WGET. Frequent checks are configured in the form of a script that is run every, say, 5 minutes. ...