Slackware 13.37 on 2007 Macbook
07/02/12 19:31 Filed in: hardware
My macbook mostly sits beside my comfy chair in the lounge. It rarely sees any real use - for quick internet info (answers to "Millionaire" questions, looking up well-known faces on the telly etc) I use an iPad.
On the odd occasion I do use it, it is likely to just play a game.
To make the thing more useful, I decided to explore the use of Slackware 13.37 (32 bit) on it.
I had no expectations when I started researching Linux on (older) macbooks, but I soon found plenty of info for dual booting (and even triple booting with Windows in the mix) Mac OS X and Linux.
I have a 60g SSD in the macbook, so disk space is a little tight, but I figure I can always put the 250G seagate drive back in it.
Method is pretty simple:
1. Re-partition your existing drive to make room for the Linux operating system.
I made a 14gig partition for Slackware. I made it a fat partition, and I did it with the Disk Utility on Mac OS X. You can boot the macbook into Slackware and do it from the installation script, but I prefer to work with native tools when I can.
2. Download rEFIt
rEFIt is an efi boot manager. I downloaded the .dmg from the site and ran the installer. Then I read the instructions, and ran the script it told me I should run to enable rEFIt. Done that, and rebooted. The rEFIt menu came up. At this point, you should choose the "partition tool" in the rEFIt menu and sync the partition tables.
I then chose the Mac OS X bootable drive (only choice that showed up!) and it booted and all my data was there. (and yes, I did back up before doing any of this!)
3. Place the Linux install DVD in the dvd drive and reboot, holding down the "c" key when the computer boots. (rEFIt also would have allowed booting from the Install DVD)
If all is well with your DVD, it will boot and put you into the Slackware install procedure. When logged in as root, run "gparted", make the Linux partition active, change it's type to "Dos fat bootable" and save the changes.
4. Start the Slackware install.
When offered the partition list, format it - I chose ext2 because I did not want a journal, you choose whatever you like - and then start the install as normal. Install Lilo on the MBR as usual.
5. Follow the install script until it ends.
6. Reboot.
7. rEFIt should kick in and give you the option of Mac OS X or Linux. Your choice.
What works:
Ethernet (cabled)
Sound
Trackpad
WiFi after the usual slackware shenanigans of enabling it in the rc.inetd.conf file.
All in all, I am happy with my experiment. In the future I will replace the 60gig SSD with a larger drive - it will slow things down, but I think the extra storage will come in handy.
Edit: My Linux drive boots every second time I choose it, not every time I choose it. I don't know why, but I may try to find out one day.
On the odd occasion I do use it, it is likely to just play a game.
To make the thing more useful, I decided to explore the use of Slackware 13.37 (32 bit) on it.
I had no expectations when I started researching Linux on (older) macbooks, but I soon found plenty of info for dual booting (and even triple booting with Windows in the mix) Mac OS X and Linux.
I have a 60g SSD in the macbook, so disk space is a little tight, but I figure I can always put the 250G seagate drive back in it.
Method is pretty simple:
1. Re-partition your existing drive to make room for the Linux operating system.
I made a 14gig partition for Slackware. I made it a fat partition, and I did it with the Disk Utility on Mac OS X. You can boot the macbook into Slackware and do it from the installation script, but I prefer to work with native tools when I can.
2. Download rEFIt
rEFIt is an efi boot manager. I downloaded the .dmg from the site and ran the installer. Then I read the instructions, and ran the script it told me I should run to enable rEFIt. Done that, and rebooted. The rEFIt menu came up. At this point, you should choose the "partition tool" in the rEFIt menu and sync the partition tables.
I then chose the Mac OS X bootable drive (only choice that showed up!) and it booted and all my data was there. (and yes, I did back up before doing any of this!)
3. Place the Linux install DVD in the dvd drive and reboot, holding down the "c" key when the computer boots. (rEFIt also would have allowed booting from the Install DVD)
If all is well with your DVD, it will boot and put you into the Slackware install procedure. When logged in as root, run "gparted", make the Linux partition active, change it's type to "Dos fat bootable" and save the changes.
4. Start the Slackware install.
When offered the partition list, format it - I chose ext2 because I did not want a journal, you choose whatever you like - and then start the install as normal. Install Lilo on the MBR as usual.
5. Follow the install script until it ends.
6. Reboot.
7. rEFIt should kick in and give you the option of Mac OS X or Linux. Your choice.
What works:
Ethernet (cabled)
Sound
Trackpad
WiFi after the usual slackware shenanigans of enabling it in the rc.inetd.conf file.
All in all, I am happy with my experiment. In the future I will replace the 60gig SSD with a larger drive - it will slow things down, but I think the extra storage will come in handy.
Edit: My Linux drive boots every second time I choose it, not every time I choose it. I don't know why, but I may try to find out one day.
Comments
Making .mp3 files from .wav files
31/10/11 13:10 Filed in: code
I have a love-hate relationship with iTunes.
For many reasons I don’t use it to manage my music. (like crashing and taking my library with it, like making it too hard to change the .mp3 quality on the fly, like being a bottleneck for “i”Devices, like not recognising Linux, etc)
I keep my music on an external hard-drive in .wav format.
When I want it on one of my other devices, I use the following applescript to produce .mp3’s from the selected .wavs:
-------8<--------------------------------------------------------------
-- Use this as you like, but at your own risk - it comes with no warranty for anything at all.
-- Select (multiple) .wav files in a folder and convert them to .mp3 files
-- uses lame from here: http://www.thalictrum.com/index.php?pageid=6&artid=6 (10.6 & up)
-- Get the wave files (to Do: make it a droplet!)
set WavFiles to choose file with prompt "Choose the .wav files to convert" default location "/Volumes/MYBOOK/Music/" with multiple selections allowed
try
-- because we use a shell script, work with POSIX paths (and quote them!)
repeat with aFile in WavFiles
set theFile to the POSIX path of aFile
-- Uncomment next line for info on files for debugging
--set infofile to info for theFile
do shell script "/usr/local/bin/lame --quiet --preset medium " & quoted form of theFile
end repeat
on error eMessage number eNumber
display dialog ("Error number was " & eNumber as string) & ": " & eMessage
return
end try
try
-- because lame spits out the original file with a .mp3 extension
-- we end up with .wav.mp3 files. This try block fixes that...
repeat with bFile in WavFiles
set origfile to the POSIX path of bFile & ".mp3" as string
set t1File to the POSIX path of bFile as string
set t2File to (text 1 thru ((count t1File) - 4) of t1File) as string
set destfile to t2File & ".mp3" as string
do shell script "mv " & quoted form of origfile & " " & quoted form of destfile
end repeat
display dialog " .mp3's created " buttons {"OK"} with icon note
on error eMessage number eNumber
display dialog ("Error number was " & eNumber as string) & ": " & eMessage
end try
-------8<--------------------------------------------------------------
The place I got lame from is in the comments in the script. It does all the heavy lifting.
There really isn’t anything tricky about this code, except that lame just tacks an .mp3 extension on to the original file, resulting in a file “filename.wav.mp3”, which I find ungainly. That’s the reason for the second “repeat” loop - it finds all those files we just made with the double extensions and makes them into “filename.mp3” - much neater!
To use this applescript on your mac, get lame and install it. Copy the code from above, paste it into the AppleScript Editor (using “Paste and Match style”), change (or remove) the “default location” to your default for your .wav files, compile, test and store in your applescript folder.
For me, this answers the need for .mp3 files for my Windows and Linux computers, and my other “i”Devices that live with me.
Hope you find it useful.
For many reasons I don’t use it to manage my music. (like crashing and taking my library with it, like making it too hard to change the .mp3 quality on the fly, like being a bottleneck for “i”Devices, like not recognising Linux, etc)
I keep my music on an external hard-drive in .wav format.
When I want it on one of my other devices, I use the following applescript to produce .mp3’s from the selected .wavs:
-------8<--------------------------------------------------------------
-- Use this as you like, but at your own risk - it comes with no warranty for anything at all.
-- Select (multiple) .wav files in a folder and convert them to .mp3 files
-- uses lame from here: http://www.thalictrum.com/index.php?pageid=6&artid=6 (10.6 & up)
-- Get the wave files (to Do: make it a droplet!)
set WavFiles to choose file with prompt "Choose the .wav files to convert" default location "/Volumes/MYBOOK/Music/" with multiple selections allowed
try
-- because we use a shell script, work with POSIX paths (and quote them!)
repeat with aFile in WavFiles
set theFile to the POSIX path of aFile
-- Uncomment next line for info on files for debugging
--set infofile to info for theFile
do shell script "/usr/local/bin/lame --quiet --preset medium " & quoted form of theFile
end repeat
on error eMessage number eNumber
display dialog ("Error number was " & eNumber as string) & ": " & eMessage
return
end try
try
-- because lame spits out the original file with a .mp3 extension
-- we end up with .wav.mp3 files. This try block fixes that...
repeat with bFile in WavFiles
set origfile to the POSIX path of bFile & ".mp3" as string
set t1File to the POSIX path of bFile as string
set t2File to (text 1 thru ((count t1File) - 4) of t1File) as string
set destfile to t2File & ".mp3" as string
do shell script "mv " & quoted form of origfile & " " & quoted form of destfile
end repeat
display dialog " .mp3's created " buttons {"OK"} with icon note
on error eMessage number eNumber
display dialog ("Error number was " & eNumber as string) & ": " & eMessage
end try
-------8<--------------------------------------------------------------
The place I got lame from is in the comments in the script. It does all the heavy lifting.
There really isn’t anything tricky about this code, except that lame just tacks an .mp3 extension on to the original file, resulting in a file “filename.wav.mp3”, which I find ungainly. That’s the reason for the second “repeat” loop - it finds all those files we just made with the double extensions and makes them into “filename.mp3” - much neater!
To use this applescript on your mac, get lame and install it. Copy the code from above, paste it into the AppleScript Editor (using “Paste and Match style”), change (or remove) the “default location” to your default for your .wav files, compile, test and store in your applescript folder.
For me, this answers the need for .mp3 files for my Windows and Linux computers, and my other “i”Devices that live with me.
Hope you find it useful.