Debian Squeeze on Macbook Pro (Part III)

1 comments

This might be the last part of Debian Squeeze installation story. In this part I'm going to describe about what I did for backup.

At first, to backup the entire debian system, we can use "dd".

The command is like this:

dd if=/dev/sda4 of=/path/to/backup-`date +%s`.img


To restore, boot from some place else (live CD or the other OS) and then run:

dd if=/path/to/backup.img of=/dev/sda4


Here, /dev/sda4 is the '/' partition where debian is installed.

Example:

momotaro@debbie:~/Downloads$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda4             9.2G  5.3G  3.5G  61% /
tmpfs                 1.9G     0  1.9G   0% /lib/init/rw
udev                  1.9G  264K  1.9G   1% /dev
tmpfs                 1.9G     0  1.9G   0% /dev/shm
/dev/sda6             187G   40G  138G  23% /home
/dev/sdb1             466G  423G   43G  91% /media/hd
momotaro@debbie:~/Downloads$


To backup personal file, I use rsync.

rsync -av /home/momotaro/Pictures/ /media/hd/Pictures
rsync -av /home/momotaro/Music/ /media/hd/Music/iTunes/Music
rsync -av /home/momotaro/Documents/ /media/hd/Documents


The next step would be to run this backup script within a useful scheduled time, like weekly or maybe less.

Debian Squeeze on Macbook Pro (Part II)

0 comments

So, this is what I did to make wifi works on Macbook. First, I had to connect to the Internet by using cable. Thanks God our house has the cable (confirmed with my housemate that the cable is dedicated to the people who needs to do weird things LoL).

Below are the steps to enable connection via cable:

  1. Edit /etc/hosts, add newname so it become something like this: 127.0.1.1 debbie newname
  2. Set hostname to newname by using this command: hostname newname
  3. Remove oldname from /etc/hosts so it become: 127.0.1.1 newname
  4. Find out the name of the network card interface (usually it's eth0) by using: ls /sys/class/net 
  5. If there is a NetworkManager installed, you need to stop it by using the script from the usual location /etc/init.d, then you'll also need to remove it by using apt-get. But if there is a NetworkManager installed, why would you need to use command line to connect to the LAN?
  6. Next, bring up the connection by using:
    sudo ip link set dev eth0 down
    sudo dhclient eth0
And next, just follow the steps explained on this page (wl) thoroughly and you should be getting a working wifi on Macbook Pro (late 2010 version).

If there is not a network manager available, then need to install it by using:
apt-get install network-manager-gnome
or
apt-get install network-manager-kde

By default, linux has ipv6 installed. To disable it:
run: echo net.ipv6.conf.all.disable_ipv6=1 > /etc/sysctl.d/disableipv6.conf

and then modify /etc/modprobe.d/aliases.conf, add these lines:
alias net-10 ipv6 off
alias ipv6 off

And yes, time goes by so quickly when you are working on the computer (have you noticed that?). 
I lose track of time while working on these things I looked at the clock and then realized that it's already 1AM, OMG!!

Next step would be trying to:
  1. Installing GNOME (will be very easy) *
  2. Make brightness auto-adjustment works. Though by following the steps from Debian's wiki, the brightness up and down keys are working properly.
  3. Assigning MAC keys to their original purpose.
  4. Finding out how to backup the entire debian, for future
  5. Auto backup for essential folders when an external HDD is attached and last backup was older than 1 week -> it might be disturbing that every time you connect an external HDD, it backs up. ** 
  6. Create a script to backup everything

* To KDE fans: no offense, this is just a matter of taste. I might or might not be ending up liking KDE, but before that I still would like to see GNOME
** Well, lets admit that when your HDD is working fine, this kind of thing seems too exaggerating. But when it's dead, you'll be sorry like I was when you didn't have it.

Installing Debian Squeeze on Macbook Pro 13" (late 2010)

0 comments

Shrinking MAC OS partition
Is almost impossible. Some people reported that DiskUtility hanged up in the middle of the process. For me, I ended up reformat the entire disk, and then re-install MAC OS on a small newly created partition (29GB), and left the rest as "FREE SPACE".


Installing rEFIt
Is perhaps the simplest task among all. rEFIt can be downloaded from:
http://refit.sourceforge.net/

Run the installer, and then reboot twice to be able to see the changes.


Creating bootable USB disk

  1. Download Debian installation disk image from: http://www.debian.org/devel/debian-installer/
  2. Convert iso to img by using: hdiutil convert -format UDRW -o ~/path/to/target.img ~/path/to/ubuntu.iso
  3. Insert an empty USB drive (will be formatted)
  4. Run diskutil list to find out device node: e.g. /dev/disk2
  5. Unmount USB: diskutil unmountDisk /dev/disk2
  6. Write the bootable drive: sudo dd if=/path/to/downloaded.img of=/dev/rdiskN bs=1m
thanks to: https://help.ubuntu.com/community/Installation/FromUSBStick

Note:
  • also work on SD card
  • need to use the full CD installation, because to get macbook's wireless card to work with linux it will need extra effort which can be done later. If you use the network installer CD image, you will end up getting a merely CLI debian.

Installing Debian
  1. Insert USB or SD card, reboot and choose to boot from USB.
  2. Install as usual.
  3. Reboot.
  4. Run rEFIt's partition manager on the boot screen.
  5. Choose to boot from Linux.
  6. And voila you'll got a Debian with no Internet connection because wifi is not working.

Hopefully I can later successfully install wifi driver for Broadcam BCM4322.


Some useful readings:
http://wiki.debian.org/wl#Squeeze
http://wiki.debian.org/MacBook