Terminus Logo  Secured by phpPhobos

Shadow Family   
  Login  - No Account?  Create One   
Search 
Friday, 19 April 2024  -
News FeedRSS Feed
rss rdf  
  Home 
  Authentication 
 Documentation 
    Site Documentation 
    About me 
  Legal Notice 
 Applications 
    Web Links 
 Hobbies 
    RC Models 
    RC Batteries 
    Build blogs 
 Modules 
    Downloads 
    Weblinks 
 Blacklists 
    Blacklist 
    Blockout 
    DNS Blacklist 
 Registered Bloggers 
  Joerg's Blog 
 Gallery [Listing]
  > Diving 
  > Steampunk 
  > RC Planes 
  > FPV Drones 
  > Indy travels 
 FAQ  [ Topics  ]
 Common Linux problem... 
 Routerboard RBxxxAH 
 Apple Mac-mini 
 PHP Phobos 
 Stargate's Backup sc... 
 eBook Reader / PRS-5... 
 RC Models 
 Server in SolLan 
Terminus's FAQ   [  Topics  | Groups  | Last  | Expand  | Search  | Print  | Documentation ]
Folder open  Linux on Apple Hardware [ Expand ]
  Question ?  How can I control the FAN on my mac mini ?   
  Question ?  How can I get rid of the GPT signature on a harddrive of the mac-mini ?   
  Question ?  Is it possible to run linux without mac-os X on a mac-mini ?   
  Question ?  How can I tell the kernel which sound board to load ?   
  Question ?  Are there benchmarks on the mac-mini regarding different specs ?   
  Question ?  What startup keys / Boot options to exist on the mac mini ?   
  Question ?  Is there a listing of the beep codes for the mini ?   
  Question ?  Dual Pairing bluetooth keyboard under Linux and OS-X ?   
  Question ?  How can I migrate my iTunes playlists to Amarok ?   
spacer line
Folder open  Answers
spacer line
Question ? How can I control the FAN on my mac mini ?   [
View DetailsView details
|
Print ViewPrint view
]

 So - why should I do something to have a different FAN control on my system ?
Well - quite simple. Under heavy load - my system does not seem to increase the FAN speed - even when the CPU Core's are at 75C, the FAN Speed is at about 2500RPM. I can manually tell the system to increase this - but I want it to be done automatically.
For this - I have written a little script - that can be run as daemon applesmc.sh. Check the attached file section.

What you need is a newer kernel supporting the applesmc kernel module. To be sure this module gets loaded at boot time - enter it into the /etc/modules file - this in a Kubuntu 7.04 system as example. For my mac mini - here are the modules I load at boot:

# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
msr
applesmc

Once this module loaded - use the macmini-fan and applesmc daemon scripts to set it up on boot. See the setup below:

sudo cp applemsc.sh /usr/bin
sudo cp macmini-fan.sh /etc/init.d/macmini-fan
sudo chmod +x /etc/init.d/macmini-fan /usr/bin/applemsc.sh
sudo update-rc.d macmini-fan defaults
sudo /etc/init.d/macmini-fan start

To check the FAN Status - call that script with the status parameter:

applesmc.sh -s

WARNING: The programs come as they are. They may brake your machine if not used correctly and I will take no responsibility for anything that happens to your computer, environment or whatever burns down !
Always use applesmc.sh daemon script to shutdown itself invoking

applesmc.sh -k

The macmini-fan script does this already on shutdown.
The reason is very simple. When beeing active - this daemon disables the automatic fan control of the system - and takes over the monitoring (by default) by polling every 10seconds what the CORE temperatures look like. If you kill the daemon - it will try to catch the kill signal and issue a command to reset the FAN control to automatic - however this is not always possible...

You have been warned ! When the daemon has started correctly - you see some stuff like this in your syslog (syslog logging is enabled by default. Havn't tried it without).

Sep 14 16:27:26 firebird applesmc: Version: 1.13 $ initialisation succeeded
Sep 14 16:27:26 firebird applesmc: Mode: manual - CPU 52C, FAN @ 2000RPM
Sep 14 16:30:06 firebird applesmc: CPU 57C, FAN @ 2000RPM > 2500RPM
Sep 14 16:31:26 firebird applesmc: CPU 52C, FAN @ 2500RPM > 2000RPM
Sep 14 16:32:36 firebird applesmc: CPU 66C, FAN @ 2000RPM > 2500RPM
...

Check the 2nd line stating Mode change to manual. When stopped - this has to change to auto !
Note the daemon will only log changes that would invoque a RPM change higher than a specified level (default is 500RPM).

A Daemon shutdown would look like this in syslog:

Sep 14 16:20:50 firebird applesmc[27266]: Daemon shutdown requested
Sep 14 16:20:50 firebird applesmc[27266]: Killed process 27002
Sep 14 16:20:50 firebird applesmc[27266]: Mode: auto - CPU 54C, FAN @ 2000RPM

while the console output would look like this:

# ./applesmc.sh -k
> applesmc Daemon shutdown requested
> applesmc Killed process 20139
> applesmc Mode: auto - CPU 51C, FAN @ 2000RPM

 

Entered by smurphy on Thursday, 13 September 2007 @ 23:27:23  
Linux on Apple Hardware - Apple Mac-mini, # Hits: 94123
spacer line
Question ? How can I get rid of the GPT signature on a harddrive of the mac-mini ?   [
View DetailsView details
|
Print ViewPrint view
]

 I have decided to give it a try after reading this.
Just make sure you install parted - and issue the command parted. Do the following - if we assume the disk is sda:

parted /dev/sda
mklabel msdos

This will get rid of the GPT signature on the disk, and you can use a standard fdisk/cfdisk program to set up your paritions.

WARNING: Using the mklabel command with parted will erase all partition informations of your harddisk - and you will need to repartition it. If you are smart - you first take a look at the partition using fdisk - change the units - to have the display in sectors, After the parted operation - you can restore the partition informations with fdisk again.

#sudo fdisk /dev/sda
Command (m for help): u
Changing display/entry units to sectors

Command (m for help): p

Disk /dev/sda: 60.0 GB, 60011642880 bytes
255 heads, 63 sectors/track, 7296 cylinders, total 117210240 sectors
Units = sectors of 1 * 512 = 512 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63    40965749    20482843+   7  HPFS/NTFS
/dev/sda2        40965750    60500789     9767520   83  Linux
/dev/sda3        60500790    64709819     2104515   82  Linux swap / Solaris
/dev/sda4        64709820   117210239    26250210   83  Linux

 

Entered by smurphy on Tuesday, 21 August 2007 @ 23:55:14  
Linux on Apple Hardware - Apple Mac-mini, # Hits: 91915

Next  Is it possible to run linux without mac-os X on a mac-mini ? 
spacer line
Question ? Is it possible to run linux without mac-os X on a mac-mini ?   [
View DetailsView details
|
Print ViewPrint view
]

 It is indeed possible. As the EFI (replacement of the BIOS) of the mac mini seems to have a fallback for default partition tables in case no GPT partition table is found - you can just delete the GPT signature as described in the related FAQ - create a new partition and install linux as usual.
Kubuntu 7.04 runs very fine on my little machine here.

NOTE: As it is also possible to run windows XP on that Box - make sure you first create the Bootcamp Driver CD - before repartitioning the harddisk. The BootCamp Image requires MAC-OS X installed as only OS to create a DriverCD for Windows XP SP2 Prefessional.  

Entered by smurphy on Tuesday, 21 August 2007 @ 22:46:00  
Linux on Apple Hardware - Apple Mac-mini, # Hits: 91481

Next  How can I get rid of the GPT signature on a harddrive of the mac-mini ? 
spacer line
Question ? How can I tell the kernel which sound board to load ?   [
View DetailsView details
|
Print ViewPrint view
]

 Actually - all you need to tell the sound-driver is which board-layout to load. In the specific case of the mac-mini, edit the alsa configuration file in /etc/modprobe.d and add the following:

options snd-hda-intel model=macmini

This will tell alsa what in/out jacks you have. 

Entered by smurphy on Thursday, 13 September 2007 @ 23:39:55  
Linux on Apple Hardware - Apple Mac-mini, # Hits: 91174
spacer line
Question ? Are there benchmarks on the mac-mini regarding different specs ?   [
View DetailsView details
|
Print ViewPrint view
]

 Check out the following 2 Links:
From the Lab: Core 2 Duo Mac mini tests
Mac mini Performance (August 2007)

Note that for the interactive use - make sure you take the fastest harddisk you find.
This makes - on even slower machine - really faster one (From the Interactivity feeling). 

Entered by smurphy on Friday, 26 October 2007 @ 10:31:05  
Linux on Apple Hardware - Apple Mac-mini, # Hits: 91002
spacer line
Question ? What startup keys / Boot options to exist on the mac mini ?   [
View DetailsView details
|
Print ViewPrint view
]

 The following is a collection of what I have found on the Net.
Take into account the the following mapping in case you use a keyboard:

    Windows Macintosh
  • CTRL -> COMMANDE
  • ALT -> OPTION

  • C : Forces most Macs to boot from the CD-Rom drive instead of the internal hard drive. Only works with Apple ROM drives and with bootable CD discs.
  • D : Forces the first internal hard drive to be the startup disk.
  • N : Netboot (New World ROM machines only) - Looks for BOOTP or TFTP Server on the network to boot from.
  • R : Forces PowerBooks to reset their screen to default size (helpful if ve been hooked up to an external montior or projector!)
  • T : Target Disk Mode (FireWire) - Puts machines with built-in FireWire into target Disk mode so a system attached with a FireWire cable will have that device show up as a hard drive on their system. Very useful for PowerBooks!
  • Mouse Button Held Down : Ejects any mounted removable media.
  • Shift : Disables all extensions (Mac OS 7-9), or disables Login items when using Mac OS X 10.1.3 or later. Also works when booting Classic mode up just like you were using the OS natively.
  • Option : When using an Open Firmware "New World ROM" capable system, the System Picker will appear and query all mounted devices for bootable systems, returning a list of drives & what OS they have on them. On "Old World" systems the machine will simply boot into s default OS without any Finder windows open.
  • Space bar : Brings up s Extension Manager (or Casady & s Conflict Catcher, if installed) up at startup to allow you to modify your extens ion set.
  • Command-V : Boots Mac OS X into "Verbose Mode", reporting every console message generated during startup. Really shows s going on behind the scenes with your machine on startup!
  • Command-S : Boots Mac OS X into "Single User Mode" - helpful to fix problems with Mac OS X, if necessary.
  • Command-Option : Rebuilds the Desktop (Mac OS 7-9).
  • Command-Option-P-R : Erases PRAM if held down immediately after startup tone. Your machine will chime when s erased the PRAM, most people will hold this combination for a total of 3 chimes to really flush the PRAM out.
  • Command-Option-N-V : Erases NVRAM (Non-Volatile RAM). Used with later Power Macintosh systems mostly.
  • Command-Option-O-F : Boots the machine into Open Firmware (New World ROM systems only).
  • Command-Option-Shift-Delete : Forces your Mac to startup from its internal CD-ROM drive or an external hard drive. Very helpful if you have a 3rd party CD-ROM drive that is not an Apple ROM device.
  • Command-Option-Shift-Delete-#(where #= a SCSI DEVICE ID) : Boot from a specific SCSI device, if you have your 3rd party CD-ROM drive set to SCSI ID 3, you would press "3" as the # in the combination.

 

Entered by smurphy on Wednesday, 09 July 2008 @ 17:24:46  
Linux on Apple Hardware - Apple Mac-mini, # Hits: 89281
spacer line
Question ? Is there a listing of the beep codes for the mini ?   [
View DetailsView details
|
Print ViewPrint view
]

 The following beep codes have been found so far.
The beep codes were revised in October 1999,[2] and have been the same since. In addition, on some models, the power LED would flash in cadence.

  • 1 beep = no RAM installed
  • 2 beeps = incompatible RAM types
  • 3 beeps = no good banks
  • 4 beeps = no good boot images in the boot ROM (and/or bad sys config block)
  • 5 beeps = processor is not usable

 

Entered by smurphy on Monday, 06 October 2008 @ 12:02:57  
Linux on Apple Hardware - Apple Mac-mini, # Hits: 87970
spacer line
Question ? Dual Pairing bluetooth keyboard under Linux and OS-X ?   [
View DetailsView details
|
Print ViewPrint view
]

 as I do have a mac-mini in tripple boot configuration, I wondered how to get my bluetooth keyboard to work using all operating systems at the same time. For windows, many howto's have been written out there (google). For linux though, emptines is what you get. So - it took me a long time to understand how it works and find a way to get it to work. In fact, the entire trick consists in reading the plist file on the mac-side, and decode it so that the linux side can read it too.

We will first need to find the blued.plist file on the Mac OS-X filesystem you have previously mounted under linux. Get it from
[MountPoint-OS-X-System]/private/var/root/Library/Preferences/blued.plist. Download the attached file plutil.pl into the same directory, and execute it under linux OS.

~# ./plutil.pl blued.plist 
plutil.pl v1.5

Old: blued.plist, from: binary, to: text
Found .plist
TryName: blued.text.plist
TryName: blued.text.plist
BinaryToXML:
Offsets are 1 bytes
Object Refs are 1 bytes
There are 9 objects in the file
The top object is at 0
The Offset Table is at offset 126

Int Lengths = 10
Misc Lengths = 37
String Lengths = 63
Unique Strings = 4
oVal=37755725973e42848271a0bf2743e00d
buf=
N3VXJZc+QoSCcaC/J0PgDQ==
oVal=b8767b7d6422049a32ce75b4ab6c4e33
buf=
uHZ7fWQiBJoyznW0q2xOMw==

In the same directory you will find now a file blued.text.plist. It has all required information we need for further processing.
All you need to do now is to identiy the keyboard.
I did find (code modified):

 (key)58-b0-35-81-28-6e(/key)
                (dict)
                        (key)00-1f-20-05-0a-2c(/key)
                        (data)
                        N3VXJZc+QoSCcaC/J0PgDQ==
                        (/data)
                        (key)00-1f-20-07-38-e4(/key)
                        (data)
                        uHZ7fWQiBJoyznW0q2xOMw==
                        (/data)
                (/dict)


For that, hit the Connect button on the keyboard and make sure it's in discoverable mode.

~$ hcitool scan
Scanning ...
        00:1F:20:05:0A:2C    Logitech MX5500 Keyboard

that's it. Look up the keyboard MAC Address (here 00:1F:20:05:0A:2C) in the bluez.text.plist file, and use the assigned (data) value to convert.
Convert it with:

~# echo -n "N3VXJZc+QoSCcaC/J0PgDQ==" | base64 -d | hexdump -C
00000000  37 75 57 25 97 3e 42 84  82 71 a0 bf 27 43 e0 0d  |7uW%.>B..q..'C..|
00000010

and you're done.
All you have to do now is to put that HEX Value into the linkkeys file. On an ubuntu 11.10 it is /var/lib/bluetooth/58:B0:35:81:28:6E/linkkeys. Just replace the value after the correct identifier:

00:1F:20:07:38:E4 B8767B7D6422049A32CE75B4AB6C4E33 0 4
00:1F:20:05:0A:2C 37755725973E42848271A0BF2743E00D 0 8

you're done.
NOTE that you see it also in the Oval output of the plutil.pl, however you still don't know which device it belongs to.

BTW - in case you need to access the keyboard in a kind of emergency, just putting the keyboard in discoverable mode and hit:

~$ sudo hidd --connect 00:1F:20:05:0A:2C

you can access it without key. 

Entered by smurphy on Friday, 23 December 2011 @ 10:31:24  
Linux on Apple Hardware - Common Linux problems, # Hits: 81335

Attach   plutil.pl  [ 23,196 bytes - application/x-perl ]
spacer line
Question ? How can I migrate my iTunes playlists to Amarok ?   [
View DetailsView details
|
Print ViewPrint view
]

 Found a script on the internet that does just that: itunes2m3u.py
Download the script, and make sure you find the iTunes Music Library.xml file. Copy both into the same directory, make sure you have python installed on your Linux machine, and execute the scripte with the iTunes Music Library.xml as argument:

~$ ./itunes2m3u.py iTunes\ Music\ Library.xml

It will dump all existing playlists in the iTunes library file as m3u files.

Import these into Amarok, and you're done.

Source for this script can be found here

Entered by smurphy on Saturday, 23 October 2010 @ 19:06:56  
Linux on Apple Hardware - Apple Mac-mini, # Hits: 79520

Attach   itunes2m3u.py  [ 7,882 bytes - text/x-python ]
 
Problems to  webmaster(-AT-)solsys(-DOT-)org  - best viewed @ 1920bpp
This site is powered by phpPhobos v2.0b446
© J. Mertin smurphy(-AT-)solsys(-DOT-)org 
Icons - Copyright Breeze artists GPL 2+