Jump to content

Kernel update script (semthex 10.4.8)


46 posts in this topic

Recommended Posts

Hello there,

since yesterday ive being working on a new version of the update script first coded by Prasys... the main feature is a md5 check between the current running kernel and the package available from semthex site, to avoid unecessary downloads. Ive also changed the way things go on the script to avoid any problem during the update process, making it safer.

 

I'll be very happy to implement new features, so if u got any idea just let me know =)

 

################################################################################

#

# Update script for the Semthex Kernel.

# Coded by hippiex

# ----------------------------------

# Thanks to Prasys

# (he made the first update script)

# ----------------------------------

# Thanks to:

# Rammjet ideas:

# 05/12/2006

# proper zip package

# Double-clickable script

# sudo on code

# kernel release check (8.8.1)

# 06/12/2006

# In some cases ppl might be upgrading from a 8.4.1 release

# (paulicat method).

#

# dussel idea: 06/12/2006

# http-proxy

#

# cardinal idea: 06/12/2006

# Changed the order to move the

# new kernel.

#

# your idea: Let me know!! 8-)

# ----------------------------------

# Releases:

# 18/01/07 0.6 - Semthex has changed his kernel download link. It is

# 6/12/06 0.5 - Safer way to move new kernel

# Allow upgrade from 8.4.1 kernel (paulicat method)

# 6/12/06 0.4 - Added http-proxy support.

# 5/12/06 0.3 - Added some pre reqs checks.

# 5/12/06 0.2 - Sudo included on code

# 5/12/06 0.1 - first beta version 8-)

#

################################################################################

Notes:

1 - To configure the script to download the update using a http-proxy, just edit the script file with TextEdit and change the variable useproxy="no" to useproxy="yes". Let me know if u need proxy+auth.

2 - Now the script allows users running the 8.4.1 kernel to update to latest 10.4.8/8.8.1, respecting some upgrade methodes (ex: Paulicat methode). It will show a Warning message and users will be able to decide the right thing to do. (Big thanks to Rammjet).

 

-- hippiex

KernUpdt.zip

Edited by hippiex
Link to comment
Share on other sites

If you set the script executable and then zip it, it should still be execuatble when downloaded. Otherwise, right now, the user needs to know how to set the executable bit.

 

Also, if you add "sudo" in the script to the particular commands needing root, the user wouldn't be foreced to operate as root before getting into the script. On first instance of sudo, the system will ask for password. If the script is sufficiently fast (which it should be), none of the other sudo commands will trigger a request for password - and if they do, the user will just have to comply.

 

Otherwise, looks very good.

 

Also, making it a suffix of .command it will be a double-clickable script.

Link to comment
Share on other sites

If you set the script executable and then zip it, it should still be execuatble when downloaded. Otherwise, right now, the user needs to know how to set the executable bit.

 

Done

 

Also, if you add "sudo" in the script to the particular commands needing root, the user wouldn't be foreced to operate as root before getting into the script. On first instance of sudo, the system will ask for password. If the script is sufficiently fast (which it should be), none of the other sudo commands will trigger a request for password - and if they do, the user will just have to comply.

 

Done

 

Otherwise, looks very good.

 

Thanks bro!

 

Also, making it a suffix of .command it will be a double-clickable script.

 

Done

 

 

 

Ive alse set a check for the processor type, to avoid problems with PPC users..

 

Thanks for the tips.

hippiex

Link to comment
Share on other sites

With your permission , I am thinking of adding some extras to my script , I will just remod the script back of yours and include the changes to mine. Thinking of adding a ping test or something like that

Link to comment
Share on other sites

A very minor suggestion... instead of

mv /kernel/mach_kernel /mach_kernel
chmod 644 /mach_kernel
chown root:wheel /mach_kernel

put

chmod 644 /kernel/mach_kernel
chown root:wheel /kernel/mach_kernel
mv /kernel/mach_kernel /mach_kernel

This way, should system crash right after mv command, kernel will still have correct attributes. Not that this is very likely, but just as a matter of principle :(

Link to comment
Share on other sites

chmod 644 /kernel/mach_kernel

chown root:wheel /kernel/mach_kernel

mv /kernel/mach_kernel /mach_kernel

This way, should system crash right after mv command, kernel will still have correct attributes. Not that this is very likely, but just as a matter of principle :hysterical:

 

Thank you for the advice, it is now fixed + it now allow users upgrading from 8.4.1 to use it as well (more info on notes )

 

Thanks again =)

-- hippiex

Link to comment
Share on other sites

I will merge some of the changes......like the version checking...

 

Hey Prasys,

im glad u liked it... please let me know if you have any idea for the script. I was coding the connection check, but when i was coding it i tought that it is not necessary because the download function (curl) will report any error (including a connect problem). Tonight ill release another version...

 

[]s

hippiex

Link to comment
Share on other sites

that it is not necessary because the download function (curl) will report any error (including a connect problem).

Yup, as long as you check the different return codes. Don't want the user trying to diagnose an internet connection problem if the problem is that the server is down or the file is no longer available.

Link to comment
Share on other sites

Hi hippiex,

 

thanks to implement the http-Support and its works great. In my case i do not need proxy+auth.

It is possible to display before the update begins the current and new Kernel Version with date and version like:

 

Current Kernel: xxxxxx

New Kernel: xxxxxx

 

DUssel

Link to comment
Share on other sites

It is possible to display before the update begins the current and new Kernel Version with date and version like:

 

Current Kernel: xxxxxx

New Kernel: xxxxxx

 

Hello Dussel,

Sure it is possible, ill code it on monday (coz weekends r the girlfriend day :-) ). Keep watching the thread ...

 

[]s

hippiex

Link to comment
Share on other sites

The script will work, but the version of 10.4.8 you are running is incomplete. You need to upgrade your 10.4.8 installation using the Apple Intel 10.4.8 Combo update and some other things. Then the new kernel will work.

 

Look over the 10.4.8 link in my signature.

Link to comment
Share on other sites

Hi Rammjet,

 

first of all, thanks for all the worls you do in this forum and in particular in "the genius bar". Regardind this post above I'm not sure I understand wht you're saying.

I installed from Jas reseed 10.4.8, checking senthex kernel. After that I use this Kernel script and all seems fine to me. Also uname-*r tells me 8.8.1. Are you saying I have to follow another procedure to have real 8.8.1 kernel? is there I way to be sure I have the latest?

 

Thanks ain advance for your response.

 

have a good day

Link to comment
Share on other sites

  • 3 weeks later...

Need help :-)

 

Used the script many times to update the Kernel. Thanks for this great tool!

 

But today the script couldn't download the "latest.zip" because there seems to be changes to the Semthex site. However the script continued to do its magic without having a new Kernel resulting in the Kernel being deleted. I executed the script a few times but it never worked. When I boot now I get the Darwin Loader message that the mach_kernel is missing and the system isn't booting up.

 

I already tried to unzip the Kernel from the mirror sites manually via MacDrive from Windows to mach_kernel on my Mac system partition and then use the Terminal program from the JAS 10.4.8 installer disk with the following commands:

 

chown root:wheel /mach_kernel*

chmod 644 /mach_kernel*

 

But unfortunately that doesn't help either. Any suggestions on how I can get the Kernel working again without a complete reinstall. Thanks!

 

EDIT: Found out more about this issue in this thread in posted new question here:

http://forum.insanelymac.com/index.php?s=&...st&p=265349

Edited by Nokman
Link to comment
Share on other sites

Need help :-)

 

Used the script many times to update the Kernel. Thanks for this great tool!

 

But today the script couldn't download the "latest.zip" because there seems to be changes to the Semthex site. However the script continued to do its magic without having a new Kernel resulting in the Kernel being deleted. I executed the script a few times but it never worked. When I boot now I get the Darwin Loader message that the mach_kernel is missing and the system isn't booting up.

 

I already tried to unzip the Kernel from the mirror sites manually via MacDrive from Windows to mach_kernel on my Mac system partition and then use the Terminal program from the JAS 10.4.8 installer disk with the following commands:

 

chown root:wheel /mach_kernel*

chmod 644 /mach_kernel*

 

But unfortunately that doesn't help either. Any suggestions on how I can get the Kernel working again without a complete reinstall. Thanks!

 

EDIT: Found out more about this issue in this thread in posted new question here:

http://forum.insanelymac.com/index.php?s=&...st&p=265349

the script should have backed up your old working kernel, so at darwin bootloader, just type :

 

 

boot: path_to_your_working_mach_kernel (don't type boot)

it should look like :

boot: mach_kernel.old

Link to comment
Share on other sites

Hi. This is very strange, but after I installed the latest JaS release of 10.4.8 from his DVD, I cannot run the script anymore: my system stops and I guess a grey screen saying to reboot or reset the computer.

WHY?!?

Link to comment
Share on other sites

 Share

×
×
  • Create New...