13 Jul 2011 mones   » (Journeyer)

Bye, bye Atlantis!

Yep, it was so long since last post that even the age of the space shuttles has ended. We'll miss them for sure.

And once again I have to recover an old post to reinstall the macbook because of yet another disk failure. This made me realize that:


  • Hitachi disks are crap :-P but unfortunately there's the only 7 mm SATA disks available right now here on online shops (bigger ones have gone 9.5 mm thick, not suitable for this macbook).

  • Since two years ago price has dropped 40% for the same size :-)

  • SSDs are still too expensive for mere mortals, unless you want to sacrifice a lot of space.


Instead the good'n'old Lenny, this time I used the latest point release for Squeeze, 6.0.2, which has been released a couple of weeks ago. The basics of installing Debian on the macbook with MacOS X and an encrypted root partition are still the same:

  • Make all partitions with the MacOS installer diskutil: one for MacOS X (~30 GiB), other for /boot (~4 GiB) and the rest for Debian's root (~260 GiB). The later ones formatted as Unix filesystem, never empty space. These will be /dev/sda2, /dev/sda3 and /dev/sda4 because /dev/sda1 is already used by the EFI partition.

  • Customize the MacOS X Tiger install so it install a minimal system (~5 GiB) from the first DVD. I don't have a band in my garage (there's just room for the car), neither want a Office or iWorks trial wasting space. In addition this makes this part much faster, and future upgrades to Leopard too!

  • Install rEFIt on MacOS X and reboot to see it works and boots MacOS X.

  • Boot into Squeeze installer CD/DVD (press 'C' for a while after the macbook startup ta-dah sound), setup partitions /boot and / on a encrypted volume, and install a minimal system (will be overwritten again, so no need to waste time installing).

  • The Debian wiki's theory is to install everything but the bootloader, which I followed.

  • The next is to reboot, enter rEFIt disk partitioning tool and synchronize the MBR with GPT.

  • The installer doesn't recognize the encrypted partition, so I had to setup it again, exactly the same as before and reinstall the system and now the GRUB bootloader into /dev/sda3.

  • Unfortunately here, due my excessive minimalistic second installation, I ended with a bootable system, but without root password or any other user.

  • Fortunately the Squeeze DVD has a rescue mode in the main menu (after rebooting), which is able to mount the encrypted partition and drop you to a root shell there, so everything can be fixed and even run tasksel to install the rest of the system. Of course this is not the recommended method ;-) but works in case of need.



There's no swap partition in this schema. Instead part of the /boot space is there to create a 2 GiB swap file. There's no difference with 2.6 kernels in running the swap on a file or on a disk partition.

Last step is to speed-up boot time by blessing the boot partition from MacOS X. Figure out the partition name with disktutil list:

/dev/disk0
   #:                   type name               size      identifier
   0:  GUID_partition_scheme                    *298.1 GB disk0
   1:                    EFI                    200.0 MB  disk0s1
   2:              Apple_HFS MACOSX             29.9 GB   disk0s2
   3:                    EFI                    3.9 GB    disk0s3
   4:   Microsoft Basic Data                    263.8 GB  disk0s4


And then sudo bless --device /dev/disk0s3 --setBoot --legacy --verbose, if your boot partition is the third like mine.

Funny to see the encrypted partition appear as MS data under MacOS X :-)

Syndicated 2011-07-11 23:17:52 from Ricardo Mones

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!