레이블이 MacBook Air인 게시물을 표시합니다. 모든 게시물 표시
레이블이 MacBook Air인 게시물을 표시합니다. 모든 게시물 표시

2014년 8월 7일 목요일

맥북에어에 우분투 14.04 + linux 3.16 설치

2013년 11인치 맥북에어를 사용 중이다. osx 적응에 실패, 우분투와 듀얼 부팅이 되도록 설치해 우분투 메인으로 사용하고 있는데 사실상 쓰지 않는 osx 파티션에 안드로이드 소스 등이 있어 수십 GiB의 용량이 놀고 있는게 영 맘에 걸려, osx 파티션을 더 줄이고 14.04도 나온지 꽤 됐겠다, 우분투를 다시 설치하기로 했다. 여러 문제가 산적해 있던 작년 이맘때와 달리 이제 설치가 매우 쉽고 간편하다. 심지어 리눅스로 도는 맥북에어가 osx 10.9보다 그래픽 성능이 좋다는 이야기도 있다.
http://www.phoronix.com/scan.php?page=article&item=ubuntu_1404_mba2013gl&num=1

지금 내가 사용하는 맥북에어는 2013년 11인치 모델(6,1)이다.



우분투 설치

설치는 그야말로 쉽다.
다음 링크의 기존 설치법에서 우분투 13.04 대신 14.04 버전으로 1 부터 5 까지 따라하면 된다.
http://dry-kiss.blogspot.kr/search/label/%EB%A7%A5%EB%B6%81%EC%97%90%EC%96%B4%202013%EB%85%84%20%EB%AA%A8%EB%8D%B8
우분투 14.04는 이제 2013년형 맥북에어를 거의 완벽하게 지원한다.
기존의 키보드 / 터치패드 / 사운드 등의 문제는 모두 해결되어 있다.
(커널 문제였고 우분투 14.04가 비교적 최신인 3.13 리눅스를 사용하니 당연하다면 당연한 이야기)
유일한 문제는 와이파이와 스크린 밝기 조절.

  1. 설치 후 와이파이가 인식되지 않고, 
  2. 처음엔 괜찮은데 뚜껑을 닫았다 여는 등의 동작에 의해 화면이 한번 껐다 켜진 후에는 화면 밝기가 아주 밝음과 아주 어두움 두단계로만 동작한다.

화면 밝기 문제는 그닥 중요하지 않으므로 무시하기로 하고...

와이파이 인식 문제 해결

일단 인터넷이 연결 안된채로 우분투 14.04를 설치하고,
부팅한 후 bcmwl-kernel-source 와 dkms 패키지를 deb로 받아 설치, 재부팅 하면 와이파이 문제는 해결된다.

커널 재빌드, 설치 문제 해결

한김에 간만에 최신 릴리즈인 3.16버전으로 커널도 재빌드, 설치했다.
커널 빌드 / 설치는 다음 글을 참고하시길.
http://dry-kiss.blogspot.kr/2014/01/debian-deb.html

재설치, 재부팅 후에는 bcmwl-kernel-source를 다시 설치해줘야 하는데,
3.15 이후 버전부터 빌드가 안되는 문제가 있었다고 한다.

다행히도 우분투 14.10(코드명 utop)을 위한 버전에서 문제가 해결되었다고 하니,
해당 버전을 받아서 설치, 재부팅 하면 와이파이가 다시 깔끔하게 된다.
다음 링크에서 받을 수 있다(dependancy의 dkms도 설치하는 걸 잊지 말자).
https://launchpad.net/ubuntu/utopic/amd64/bcmwl-kernel-source/6.30.223.248+bdcom-0ubuntu1

세줄 요약

osx으로 부팅, disk manager에서 우분투 설치할 파티션을 만들어주고,
우분투 14.04를 설치 후,
dkms와 bcmwl을 dpkg로 받은 후 재부팅 한다.
끝.

본문에서 언급한 패키지들 deb 다운로드 가능한 링크들

다음 링크들에 들어가 Downloadable Files 항목의 deb 파일들을 받고,
sudo dpkg -i <해당 deb 파일들의 경로>를 입력하시면 됩니다.

e.g., $ sudo dpkg -i bcmwl.deb dkms.deb

bcmwl 다운로드 링크
https://launchpad.net/ubuntu/utopic/amd64/bcmwl-kernel-source/6.30.223.248+bdcom-0ubuntu1
dkms 다운로드 링크
https://launchpad.net/ubuntu/utopic/amd64/dkms/2.2.0.3-1.1ubuntu5

2013년 10월 31일 목요일

Install Ubuntu 13.04 + linux 3.11 and dual-boot with OSX on Macbook Air, 2013

Macbook Air(MBA) is one of greatest machine for hackers. I bought MBA 2010 when 11" model released and used to hack with it.

One day, I attended linux forum and requested torvalds's signature on my MBA. He refused to have a signature on MBA, but I persuaded him with my promise to install linux on my MBA. After the event, I got torvalds's signature on my MBA and installed Ubuntu 12.04 on it. And, it was really great. MBA's mobility and linux. It's really cool hacking environment.

Recently, because MBA 2010 was too old, I bought MBA 2013 11" model and installed Ubuntu 13.04. Because Ubuntu 13.04 didn't support MBA well, I also build and installed linux 3.11 official version with some patch on it. Now, I'm enjoying my hacking life.

Because the installation was not so easy, I want to record / share my experience here.
Because the time I installed Ubuntu was about 2 months ago, some parts may not be up to date. Just hope it can be a little help to somebody :)


0. Install Environment
My MBA is 11" model published from 2013(6,1). I also upgraded it's cpu, RAM, SSD.

1. Download Ubuntu Image and Burn Install CD
Ubuntu distribute installation CD image for Mac in seperate way. Go to the link below and download 13.04 for mac image(ubuntu-13.04-desktop-amd64+mac.iso) and burn CD using it.
http://releases.ubuntu.com/raring/

I think live USB will be Ok, too. But, in my case, because my USB broken, I did with CD using USB CD driver.

2. SSD Partition
Make partition on SSD for Ubuntu installation. Open disk utility from Mac OSX(If hard to find, use spotlight).
Select SSD, enter to Partition tab, reduce partition size for Macintosh HD partition as you want to.
If my explanation is too concise, see the link below:
http://osxdaily.com/2009/11/20/resize-partitions-in-mac-os-x-with-disk-utility/

3. Boot to Ubuntu Install Image
Connect Live CD or Live USB you made from step 1, restart MBA. Before MBA powered on, press Option(alt) key. You should press it as soon as you pressed power button to turn on MBA. Then, booting partition selection screen like below photo will be displayed.

The USB displayed as Windows. Looks like OSX think it's just Windows if user trying to boot from other media such as CD or USB. It's annoying but, just select it. Then, MBA boot to Ubuntu in Live CD or Live USB.

4. rEFIt Install
Pressing option key every time can be annoying. The program rEFIt can help it. rEFIt is boot option selection / managing program. You can download from the link below:
http://refit.sourceforge.net/#download
Just execute downloaded rEFIt and execute install file. Then rEFIt be installed. Now, when you restart MBA, it doesn't boot to OSX automatically, rather ask you which partition you want to boot.

Actually, the developer of rEFIt doesn't support it any more. He is now developing same purpose program with new name rEFInd. It'd rather to use it. I just used rEFIt because I didn't know rEFInd at that time.


5. Ubuntu Install
Ubuntu installation is very easy. Just install Ubuntu as usually you did on other computer. It will ask you whether want to remove OSX and install Ubuntu on entire SSD. If you want dual-booting with Ubuntu and OSX, you should not remove OSX. Just install Ubuntu beside of OSX.

After Ubuntu installation completed, you can see screen below after reboot.

After select tux(the cute penguin) from this screen, grub bootloader comes. Select Ubuntu from grub bootloader. Now, it should boot to Ubuntu... But, not... It doesn't boot and screen stuck. We will solve this problem in next step.

6. Add nosmp on linux parameter
You can adjust linux boot parameter from grub by pressing key 'e'. You can boot successfully by adding nosmp on parameter.

There would be exist the line start with next content in second line from end of screen.
linux        /boot/vmlinuz-3.8.0 root=UUID=

Just enter ' nosmp'(without quotation mark, with one whitespace) on last of the line and press f10 key. Now, it will boot to Ubuntu.

7. Add nosmp permanently
Now we succeed to boot to Ubuntu. But, type nosmp every time boot to Ubuntu from grub may be very annoying and uncomfortable. You can add nosmp to boot parameter permanently.
Open /etc/default/grub file and find the line start with GRUB_CMDLINE_LINUX_DEFAULT=".Type nosmp inside quotation mark. It may need super user permission to edit the file.
After that, save and close file, and update grub config using the command below:
$ sudo update-grub

8. Let WiFi Work
Now, we can boot, but problem still exist. First, WiFi. It's because Ubuntu 13.04 have no device driver for MBA's WiFi. Download deb file from the link below:
http://launchpadlibrarian.net/138967184/dkms_2.2.0.3-1.1ubuntu3_all.deb
Install the deb file using the command below and reboot. Now, WiFi will work.
$ sudo dpkg -i path/to/downloaded/deb_file

9. Change To EFI Mode for Whole Cores
nosmp parameter from step above means we will use only one core in MBA. It was just a work-around for boot because MBA doesn't support bios way booting properly. It's shameful to use only one core in Multi-core era. You can use whole cores if you boot linux with EFI mode.See next link and change Ubuntu to EFI mode:
https://help.ubuntu.com/community/UEFI#Converting_Ubuntu_into_EFI_mode

The link's content says, in concisely, just install a program named boot-repair using next command,
sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update
sudo apt-get install -y boot-repair && (boot-repair &)

And change Ubuntu to EFI mode using the program.

After changed to EFI mode, remove nosmp from /etc/default/grub file, and sudo update-grub to make it effect.

Now, restart MBA. You should able to see lots of boot options like below photo.
Boot to Ubuntu in EFI mode.

Now, you can use whole cores in MBA.

Also, you may see lots of error message while booting. If it's too annoying, Open /etc/default/grub again and insert libata.force=noncq as we did with nosmp. Also, never forget to sudo update-grub.

10. Install linux 3.11
Problem still exist. fn key doesn't works, track pad works as just a mouse, not track pad(can't scroll using two fingers), speaker doesn't works. But, first, let's go to kernel 3.11 version.

Download 3.11.0 linux source code from kernel.org or git repository and build / install the kernel using Ubuntu 13.04's config file as usually do.
Kernel build / installation may be out of focus of this article. See other articles about kernel build / install from Ubuntu(e.g., http://dry-kiss.blogspot.kr/2014/01/how-to-build-install-linux-kernel-on.html).

11. Apply patches for Keyboard / Track pad / Speaker
Keyboard / Track pad / Speaker still not works although you installed 3.11.0 kernel. But, there exist patches for those problems. Latest kernel maybe already merged those patches. But, because this is just my experience sharing, I will say about that.

Download links below and save each of them as file. The link is just a text file. You can just open the link in browser and copy-and-taste the contents, save as a text file.
http://www.miek.nl/downloads/2013/macbookair-3.11.patch
https://bugzilla.kernel.org/attachment.cgi?id=107811

Go back to the kernel source you built and use command below to apply each patches:
$ patch -p1 < path/to/downloaded/patch

Now, build and install the patch applied kernel source again, boot to the kernel.
Now, Keyboard, Trackpad, Speaker problems all solved and works properly.

Wish your Happy Hacking! :D



Remaining Problem
Still one problem exist. Monitor brightness adjust button works well after MBA boot to linux. But, once it goes to sleep and comes back, monitor brightness become only brightest state or darkest state.

Referenced Web Pages



2011년 10월 18일 화요일

맥북 에어 11" 사용 1주년 소감.

작년 10월, 미국 출장을 나가 있던 난 당시 판매를 시작한지 얼마 되지 않았던 신형(물론 또다시 성능은 업그레이드 되고 가격은 그대로인 신형이 나왔지만) 맥북에어 11" 모델을 질렀다.

1년 사용해보고 소감이나 정리해 보려 했는데, 어느새 1년이 지났다.




1. 외관
뭐니뭐니해도 맥북에어는 외관이 일단 먹고 들어간다. 지금은 여기저기서 많이 보이지만, 처음 사들고 귀국했을 땐 한국은 아직 판매를 시작하지 않았을 때라 밖에서 펴들면 여기저기서 시선이 느껴졌다.

2. 이동성
태블릿 PC 에 비견하고 싶을 정도.
얇고 가벼운 만큼, 이동성은 최고다.
하지만, 1kg 정도의 중량은 잠시 들었을 땐 깃털 같지만, 동일 부피 대비 책에 비해 중량이 많이 나가기 때문에, 가방에 책도 좀 넣고 오래 들고 다니면 어깨가 약간 아프긴 하다.
하지만 역시 들고 다니기 편하기 때문에, 실외에서 코딩할 때 최고다.

3. 배터리
이건 이동성이랑 좀 겹치는 항목이긴 하지만... 30일의 대기시간, 10시간의 구동시간이라고 살당시 광고하고 있었는데.
10시간까진 좀 오바인 것 같고, 이클립스 띄우고 웹페이지도 30여 탭 열고 열심히 가지고 놀면 대략 4시간정도 가는 것 같다.
하지만 대기시간은 확실히 배터리 소모가 거의 없기 때문에, 그정도면 충분한 것 같다. 충전기는 집에 두고 들고 다닌지 오래됐다.

4. 성능
올해 나온 모델은 i5, i7 탑재이니 성능에서도 최고이지만, 내 경우 구매 당시 가장 많이 망설여졌던 부분이다. 내가 산 모델은 intel core2 duo를 탑재하고 있기 때문이다.
하지만 SSD 덕에 큰 무리는 가지 않는다. 애초에 게임도 하지 않고, 데스크탑을 메인으로 쓰고 어디까지나 실외에서의 서브 컴퓨터로 소스 리뷰 정도로 쓸 목적이었기에, 성능으로 고심해 본 적은 없다.
다만, 영화를 오래 틀면 팬이 돌아가기 시작하는데 그건 좀 신경쓰인다.

5. 화면 크기
주변에 맥북에어 사려는 사람들이 11"냐 13"냐로 고민하는 경우를 좀 보는데, 이동성이 목표라면 11", 메인으로 쓸거라면 13" 이상도 상관 없을 것 같다.
11"도 독을 치우면 그다지 화면 보는데 문제 있는 수준은 아니다.
더구나 11"는 거의 A4 용지 정도 크기라서, 그냥 책가방에도 잘 들어간다.


6. OSX
조금 적응기간이 필요하긴 하지만, 익숙해지면 더할나위 없이 편하다.
인터넷 뱅킹이나 액티브X는 가상머신에 Windows 깔면 되긴 하는데, 난 어차피 서브 컴퓨터 목적이기 때문에 데스크탑에서만 인터넷 뱅킹을 쓴다.

7. 아이패드? 맥북에어?
원체 슬림하다 보니 아이패드와도 조금 포지셔닝이 겹쳐버리는 문제가 있다.
나는 데이터를 소비하려는 목적이라면 아이패드(혹은 다른 태블릿 컴퓨터), 데이터를 생산하려는 목적이라면 맥북에어(혹은 다른 울트라 슬림 노트북)가 맞다고 생각한다.
이동성은 분명히 태블릿 컴퓨터가 압도적이고, 맥북에어는 할 수 있는 일에 있어 분명히 태블릿 컴퓨터에 압도적이다.
내 경우는 코드 리뷰와 간단한 테스트 코드 작성이 주목적이었기에 GNU 툴과 빌드 시스템 구축이 필요해서 일고의 고민 없이 맥북에어를 선택했다.