Sunday, April 13, 2008

PS2 doesn't work after 10.5.2 update


this is another thing that didn't work for me after updating to 10.5.2 on several computers, and several installations including laptop trackpad,

the solution is fairly easy, you need to restore your ApplePS2Controller and AppleACPIPlatform kext (Kernel Extensions).

so the first thing you need to have is the 10.5.1 kext here are links (in case you didn't back it up):
AppleACPIPlatform.kext
ApplePS2Controller.kext

the way to restore them is from the command line:

  1. open terminal and write these commands:
  2. sudo -s (press enter and write your password and press enter again)
  3. mv /System/Library/Extensions/ApplePS2Controller.kext /System/Library/Extensions/ApplePS2Controller.kext.10.5.2
  4. mv /Extensions/AppleACPIPlatform.kext /Extensions/AppleACPIPlatform.kext.10.5.2
  5. these commands will backup your current 10.5.2 kext, just in case
  6. next copy the 10.5.1 kext and set their premissions like this:
  7. cp -R /ExtensionsBackup/ApplePS2Controller.kext /System/Library/Extensions
  8. chmod -R 755 /Extensions/ApplePS2Controller.kext
  9. chown -R 0:0 /Extensions/ApplePS2Controller.kext
  10. cp -R /ExtensionsBackup/AppleACPIPlatform.kext /System/Library/Extensions
  11. chmod -R 755 /System/Library/Extensions/AppleACPIPlatform.kext
  12. chown -R 0:0 /System/Library/Extensions/AppleACPIPlatform.kext
  13. Reboot
that's it, if you are suffering from any problem please post comments on this post.

Enjoy.

Friday, April 11, 2008

HFS+ partition type changed - what to do?

if you have for some reason a partition that is not recognized as HFS+ but it is (for instance if you tried to resize using Gparted and the HFS+ converted to something else), this is what you do in order to fix it:

enter fdisk, once you have entered fdisk and pressed p for print it will display a table with partitions details looking like this:



Note the second column (id), it is telling us what is the type of the partition in a hex representation. the HFS+ partitions should have AF as ID.

if it is not AF and the last column does not say HFS+ then use the command:
setpid X (where X stands for the partition number)
then the fdisk will show the partition table just for the X partition and ask for the partition ID you want to set like this:



write AF as the ID and press enter.
u (stands for Update)
w (stands for write)
it will tell you that you need a reboot like this:



write y (stands for yes)
q (stands for quit)

reboot, your done.

Enjoy.

Restore bootable partition

You have recently installed kext, application, update, another OS on a different partition and after boot all you get is a blinking cursor, and no darwin boot, and system not booting.

this post will explain step by step how to turn your partition back to a bootable state.

Data you should know.
you need to know what are you hard disk and partitions configuration,
  • how many drives do you have
  • how many partition on each drive
  • what OS and File System is installed on each Partition
  • what OS you would like to restore as primary boot loader
Solution 1:
first solution is accomplished using the "GNU Gparted Live CD", it is free Linux based application, you can download it here as an ISO file, you need to burn the iso file on to a CD and boot from it.

once you boot from the Live Cd you see this screen:


in the upper graphic parts you see square shapes that each represent a partition, above them there is a drop down that display the currently selected hard drive (in this case hda and its size is 37G), in linux (as in mac) drive is represented as file under folder dev, so the first drive is: /dev/hda.

if you choose from the drop down another driver it will display that drives partitions.
the lower table display the partitions in more details, you can see in this example that the first partition is NTFS, and it has the boot flag marked, that means that the NT file system will be booted from.

one of the thing you can do, is set a partition to being a bootable by setting the boot flag to it. you do that by right clicking with the mouse on the desired partition and choosing "manage flags" , from the pop up window check the boot flag check-box, close the window and click the "Apply Changes" button after it finish, reboot, and your HFS+ file system should be bootable again.

Solution 2:
there is another option to do this from command line using the fdisk utility available from the leopard DVD.
steps:
  1. insert the Leopard install DVD and boot from it
  2. at boot time press F8, and you will see the darwin boot screen
  3. write -s and press enter this will enter "Single User" mode
  4. execute the two lines that appear there regarding fsck and mount as described in the "Single User" post.
  5. next enter these commands:
fdisk -e /dev/rdiskX (where X stands for your leopard install hard disk number (first one is 0 second is 1 etc.))
then in the fdisk utility write ? for list of commands (help screen)



write p (short for print) and press enter then it will display a table of disks and partitions
find your HFS+ partition and remember its number (if it is the first partition it will be 1)
next write: f X where X stands for the HFS+ partition probably 1 if it is the first partition,
next write: u (short for update) and press enter
then write: w (short for write) and press enter
lastly press q (quit)
then restart and the HFS+ partition should be bootable again.

so for summary, the commands should look like this:
boot single mode (after restart press F8, at the prompt write -s and press enter)
/usr/sbin/fdisk -e /dev/rdisk0
f 1
u
w
q
Reboot

if these solutions did not help that means one of two things:
  1. you have just installed Leopard and did not install Darwin as described in the "Install Leopard" post.
  2. or for some reason your partition ID has changed from AF to something else causing the HFS+ file system to recognized incorrectly.
the first case is solved by simply installing the darwin from the DVD.
the second case can be solved from the fdisk utility instructions in this post.

Enjoy.

(All About) Boot into Single User


What is "Single User"?
"Single User" is a boot mode, you actually tells the unix shell that the OS should load only prompt (no GUI), and the local console login is the only login available (can't be logged on from the network),

Why would you like to do that?
sometimes the system requires an administrative actions by the administrator, such as disk checkup, partition altering, drivers uninstalling, backups, etc.
at this delicate tasks you don't want other users to touch/create/remove/use files, hardware, CPU, and use resources. this is why you enter into single user mode.

What can you do in "Single User" Mode?
since single user mode is for administrator and no GUI is available then every task you can do from terminal (command line) as root user you can do here, which is practically everything (on the current system) it wasn't meant to be used for regular work such as surfing the web (there is no network) or reading files etc. you can use all the unix commands available for OS X and all the command line utilities and applications available on that machine.

How to enter Single User Mode?
  1. Restart your computer
  2. Continuously press F8 until you see the Darwin boot prompt
  3. write "-s" without the quotation marks and press enter (for real mac do this instead)
  4. you will soon reach a prompt
  5. note the lines written to the console about fsck and mount
  6. write: /sbin/fsck -fy
  7. press enter and then the system should write:
    ** The volume XXX appears to be OK
    or
    ***** FILE SYSTEM WAS MODIFIED *****
    if it is the second option, then repeat the fsck command (6) until you get the first line saying the volume is OK
  8. write: /sbin/mount - uw / this will mount your file system
  9. thats it you are in "Single User"

Enjoy.

 
the menu is from: Milonic DHTML menus