status: ready to install & create documentation..
This will be - by the time it's finished - a tutorial for installing
- Debian Live
on a MacBook Air 3,2 - late 2010 13"
- being encrypted via dm-crypt with luks
- running in parallel with Mac OS X
Useful Resources
MacBookPro Debian on MacBook Pro
InstallingDebianOn/Apple Debian on Apple
https://help.ubuntu.com/community/MacBookAir Ubuntu for MacBook Air
https://wiki.archlinux.org/index.php/MacBook Arch Linux for MacBook Air
Preparation within Mac OS X
Create USB stick with Debian live
source: https://help.ubuntu.com/community/How%20to%20install%20Ubuntu%20on%20MacBook%20using%20USB%20Stick
download Debian live from http://live.debian.net/cdimage/release/stable/amd64/iso-hybrid/
# convert ISO to IMG: $ hdiutil convert debian-live-7.5-amd64-gnome-desktop.iso -format UDRW -o debian-live-7.5-amd64-gnome-desktop.img # hdiutil will attach .dmg to filename, so rename: $ mv debian-live-7.5-amd64-gnome-desktop.img.dmg debian-live-7.5-amd64-gnome-desktop.img # attach USB stick & check which /dev/diskX it has: $ diskutil list # unmount USB stick $ diskutil unmountDisk /dev/diskX # copy image to USB stick $ sudo dd if=debian-live-7.5-amd64-gnome-desktop.img of=/dev/disk3 bs=1m
Install rEFit
get the rEFit 0.14 dmg from http://refit.sourceforge.net/ and install
- reboot at least twice till you see the rEFit screen after booting
Repartitioning
Using the Mac OS X's disk utility: -resize the Mac OS partition so there is enough space for debian after it
Installing debian
- boot with the created USB Stick
- choose installation in boot menu
- follow the installer and set up computer name, user name, network, ...
- when it comes to partitioning follow:
Partitioning
source: http://forums.debian.net/viewtopic.php?f=10&t=46874&sid=6cea2ec0394e8e8426d24208693e2e1c&start=15#p422454 thanks to macias
"" the next steps are adjusted for the MacBook Air & parallel Mac OS use. All changes are marked bold ""
1. Detect disks. The installer finds disks available to system. 2. Partition disks. We are going to manually create an Encrypted LVM system. In this example it is for one disk, with one Volume Group. Adapt the following instructions for more than one disk and or Volume Group, remembering the possibility of usefully using more than one stripe when using more than one disk. 2.1 Select 'Manual'. 2.3 Create a boot partition sda4 in the free space - 'New Partition size:' 256MB 2.3.1 Select 'Location for the new partition:' Beginning 2.3.2 Edit the 'Partition settings:' 'Use as:' Ext4 ... 'Format the partition: yes, format it' 'Mount point:' /boot 'Bootable flag:' on (though this should not be necessary on a purely linux system.) 'Done setting up the partition.' Click 'Continue' You should now be back on the main partitioning screen. 2.4 Create a new Encrypted partition on the remaining 'FREE SPACE'. (You could create more than one encrypted partition on one or more disks if you wished.) 2.4.1 Select the remaining FREE SPACE and click 'Continue' (or just double click on the FREE SPACE.) 2.4.2 Select 'Create a new partition' 2.4.3 Keep the existing partition size and click 'Continue'. 2.4.4 Select the 'Use as:' field ('Continue' or double click.) and then select 'physical volume for encryption'. On the next screen ... 2.4.5 Choose 'Erase data:' 'yes' - if you wish to erase the data on the partition and overwrite with random data. Choose 'no' - if you do not wish to do this. Be aware that on a 2 terabyte partition, for example, 'yes' could take many hours to complete. It is however more secure when this is done. You should now be back on the main partition screen with new partitions showing something like: EDIT '> #1 256.0 MB f ext4 /boot' '> #2 2.0 TB K crypto not active' 2.5 Now select 'Configure encrypted volumes' from this screen. Do NOT double click to make this selection. 2.5.1 Select 'Create encrypted volumes' 2.5.2 Choose which 'Devices to encrypt:' 2.5.3 Choose 'Finish' The next screen will inform you that the current partitions must be written to disk and cannot be undone. 2.5.4 When you are sure all is as you wish choose 'o Yes' on this screen. 2.5.5 Select 'Finish'. 2.5.6 Enter your 'Encryption passphrase:' twice into the two text entry fields. Note the length of passphrase recommendations on this screen. You should now be back on the main partitioning screen. The encrypted partition should now show '(sda2_crypt)' or something similar, in place of 'not active'. There should also now be a new entry 'Encrypted volume (sda2_crypt) ...' on this screen 2.6 Set up the file system on the encrypted volume. 2.6.1 Select the > #1 part of the new field 'Encrypted volume ...' that is select: > #1 25 GB f Ext3 and on the 'You are editing partition #1 of Encrypted volume ...' screen set 2.6.2 'Use as:' Ext4 2.6.3 Select 'Done setting up the partition' 2.6.4 Select 'Configure the Logical Volume Manager' The next screen will inform you that the changes to the encrypted partition(s) must be written to disk and cannot be changed. 2.6.5 When you are sure all is as you wish choose 'o Yes' on this screen. You will now see a sliding bar display while the Ext4 file system is written to partition #1 of Encrypted volume (sda5_crypt). There will now be a delay of several minutes. 2.7 Create the volume group. You should eventually be shown a screen 'Summary of current LVM configuration:' 2.7.1 Select 'Create volume group' 2.7.2 Enter the name of the volume group in the text field and click 'Continue'. (In this example the name 'VOLUME' is chosen.) You may now select more than one device over which the Volume Group will preside. However in our case we will only use the Volume Group on the Encrypted partition. 2.7.3 Select '/dev/mapper/sda5_cypt ...' and click 'Continue' There is now 'Volume Groups:' '1' showing on the 'Summary of current LVM configuration:' screen. 2.8 Create the logical volumes. 2.8.1 Select 'Create logical volume' and on the next screen double click on (in this case) 'VOLUME'. 2.8.2 Now enter the 'Logical volume name:' in the text field. (In our example we choose the name 'HOME') 2.8.3 Now enter the size of logical volume (HOME). (In our example we choose 24 GB.) The summary screen now shows 'Logical Volumes:' '1'. (2.8.4 Now 'Create logical volume' (ROOT with a size of 10 B in our example) and in turn, all the other logical volumes and sizes by repeating steps 2.8.1 to 2.8.4 as required) Do not forget to create a 'SWAP' logical volume somewhere in the volume group. 2.8.5 When you have created all the volume groups and logical volumes select 'Finish'. You should now be back on the main partitioning screen. In addition to the earlier additions you should now also see a summary of all your logical volumes within the volume group(s) (in our case one volume group: 'VOLUME'). The beginning of the list will look something like: LVM VG VOLUME, LV HOME - 24.0 GB Linux device-mapper (linear) > #1 24 GB LVM VG VOLUME, LV SWAP - 16.0 GB Linux device-mapper (linear) > #1 1 GB ... 2.9 Now set up the file systems and mount points for all the logical volumes. 2.9.1 Select the first logical volume (HOME) by selecting > #1 24 GB 2.9.2 Choose the 'Use as:' file system (in this example Ext4) 2.9.3 Select the 'Mount point:' / (in this case). 2.9.4 Select 'Done setting up the partition'. 2.9.5 Repeat steps 2.9.1 to 2.9.4 for all the logical volumes. On the main partitioning screen you could now see, for example: LVM VG VOLUME, LV HOME - 800.0 GB Linux device-mapper (linear) > #1 24 GB f ext4 / LVM VG VOLUME, LV SWAP - 16.0 GB Linux device-mapper (linear) > #1 16.0 GB f swap swap … with your other logical volumes if any. 2.10 Now comes the tricky part, that made me stuck at first: The debian partitioning tool recognizes sda4 (/boot) as EFI Boot, which will not work with rEFIt. --> Change sda4 type to ext4 again 2.10.1 Edit the 'Partition settings:' 2.10.2 'Use as:' Ext4 ... 2.10.3 Save and go back to menu 2.11 Finish partitioning and write to disk. On the main screen select: 2.11.1 'Finish partitioning and write changes to disk' and click on 'Continue'. You now have a final chance to change the LV settings, Or 'Write changes to disks?' 2.11.2 'o Yes' and click 'Continue'. You will see a sliding bar screen showing the file system being written into the volume groups.
- let the debian installer handle the rest of the installation
- grub: when asked, where grub shall be installed use the hard drive (usually: /dev/sda)
- reboot
Post-Installation tasks
- reboot, detach the USB stick
- within rEFIt choose "Start Partitioning Tool" and synchronize the GPT and MBR partition tables with a "y"