'macbook 2008'에 해당되는 글 3건

  1. 2019.02.10 mac OS 10.7.5의 어중간함.
  2. 2019.02.10 old mac에 linux 설치하기 #2
  3. 2018.05.15 old mac에 linux 설치하기 2

mac OS 10.7.5의 어중간함.

Personal Computer/MacBook 2008 2019. 2. 10. 14:14 posted by tolkien

맥북이 두대가 있는데, 그중 macbook 2008은 지원되는 OS가 mac OS 10.7.5 Lion까지다. 이유는 CPU는 64bit이지만, EFI Bios가 32bit라서... google로 찾아보면 어찌어찌 hack해서 이후 OS를 설치하는 덕후들도 있지만, 솔직히 그냥 평범한 notebook에 hackintosh 설치하는 것과 크게 다를게 없다.


그동안 별 불만없이 2nd PC로 잘 쓰고 있었다. 헌데 open source software 진영에서도 하나둘씩 지원을 멈추더니 google chrome, firefox가 EOL (End Of Life)를 선언하고 이후 web browsing하는 데, 하나둘씩 불편함이 늘어나고 있다. 최근에 문제가 된 것은 SSL 인증 문제. 느린 것을 참겠지만, 아예 접속이 안되니... 아직까지 firefox 마지막 지원 version (48.0.2)으로 internet을 쓸 수 있겠지만, 이것도 언제까지 갈지..


결정적으로 그동안 잘 써왔던, brew에서 10.7.5에 대한 지원을 다음 version부터 하지 않겠다고 하면서 편하게 쓰던 3rd party software도 힘든 상황이 되었다. 그 대안으로 쓸 수 있는 것이 아직까지 지원하고 있는 MacPort와 TigerBrew.


여기서 TigerBrew가 brew의 fork라서 쓰기 편한데, 이건 말그대로 Tiger OS, 즉, PowerPC Mac을 지원하는 project라는 거다. bottle도 전부 ppc binary라서 내가 쓸 때는 항상 build부터 시작한다. 가끔 build error는 덤.


google을 뒤져봐도 macOS 10.7.5를 Apple 지원없이 계속 쓰지 위한 움직임은 보이지 않는다. 68k Mac이나 PPC Mac처럼 사용기간이 오래된 것도 아니고, 충성스런 사용자층이 있는 것도 아닌 것같고. 실사용기와 레트로 사이에 낀 어중간함이 꽤 지속될 것같다.

macbook 2008에 mac OS 10.7.5를 설치해서 web browser 좀 써보겠다고 낑낑대다가 이럴바에는 linux가 났겠다고 다시 linux를 설치했다. 내가 써놓은 글을 보니 엄두가 안 나서, 다른 방법으로 시도.


CD/DVD drive가 망가졌으므로 bootable USB를 만들어야 하는데, 많은 site가 mac OS 10.7.5에서 동작하지 않는 program를 쓰라고 한다. 하지만, 난 command line friendly이므로...


1. ubuntu 16.04.5 LTS (64bit) iso image를 받는다.

2. mac OS에서 hdiutil를 써서 image 변환.

hdiutil convert -format UDRW -o ~/path/to/target.img ~/path/to/ubuntu.iso

3. dd로 image를 USB memory에 write (용량 2G이상이면 됨.) 대개, disk0는 macbook HDD이므로, USB memory는 /dev/disk1 이다. 잘 모르겠으면, df 또는 disk list 명령으로 찾아보자.

sudo dd if=~/path/to/target.img.dmg of=/dev/disk1 bs=1m

그리고, "Option" key를 누르고 전원을 켜면, USB memory를 선택하고 booting할 수 있다. 상당히 오래 걸리므로 인내.인내.인내 (한 10분정도 있어야 설치화면을 볼 수 있었던 것 같다.)


설치가 다 끝나면, network이 ethernet device만 되고, WiFi가 되지 않는다. linux console에서 lspci 로 보면 Broadcomm 4321 chip이 보이고, 이건 kernel에서 지원된다고 되어 있는데, iwconfig 로 보면 보이지 않는다. modprobe -a b43 으로 kernel module을 load하면 firmware가 없다고 투덜대면서 module load에 실패하는 것을 볼 수 있다. 집 network은 이미 WiFi만 제공하므로 어떻게든 잡아야 한다. (이전 설치에서는 ubuntu 12.04 설치 -> upgrade로 이 문제를 풀었다.)


4. bcmwl-kernel-source 제거

apt-get purge bcmwl-kernel-source

5. 설치 usb에서 b43-fwcutter 찾아서 설치

dpkg -i b43-fwcutter_019-2_amd64.deb

6. broadcom legacy driver binary download후 b43-fwcutter로 firmware 추출

tar jxf broadcom-wl-5.100.138.tar.bz2

b43-fwcutter -w /lib/firmware broadcom-wl-5.100.138/linux/wl_apsta.o

7. reboot


이후, usb mouse 사용중에 touch pad를 disable하거나, keyboard typing중에 touchpad를 disable하는 trick 도 찾아서 써봤는데...

.

.

.

.

.

.

.

booting하는데, 한 5분정도 걸리는 걸보고 내가 뭐한건가... 읖조린 다음

backup해두었던 mac OS 10.7.5로 돌아갔다.


참고 site:

 - How to Create a Bootable Ubuntu USB Drive, for Mac, in OS X

 - How to Enable Wi-Fi on MacBook, Mac Mini, MacBook Air for Ubuntu/Linux OS

 - 파일들.

broadcom-wl-5.100.138-wl_apsta.only.tar.bz2

disable_tpad_while_typing.py

README.fix


old mac에 linux 설치하기

Personal Computer/MacBook 2008 2018. 5. 15. 11:16 posted by tolkien

가지고 있는 macbook 2008 early model은 64bit cpu이지만, 32bit EFI BIOS여서 mac OS update에서 버림받았다. 그래도 그럭저럭 쓰다가 이젠... 사파리, 크롬도 못 쓰고, firefox 32bit 간신히 사용중인 상태에서 얼마전부터 ssh로 접속 안되는 곳이 생기기 시작. 아마 openssl issue로 추정. 그외 다수...라는 핑계로 mac OS 버리고 linux로 이주 결정.

 

가지고 있는 mac book 사양:

 - macbook 2008 + 2.5G RAM

 - DVD/CD ROM이 뭔가 읽어본지 꽤 되었고, 멀쩡한 음악CD를 읽지 못하는 것으로 보아 못씀.

 - mac OS 10.7.5

더보기

http://mirror.kakao.com/.../ubuntu-18.04-desktop-amd64.iso 여기서 다운로드 받은 iso 파일을 ...

맥에서

ubuntu.iso 로 이름 바꾼 다음에 ..

hdiutil convert -format UDRW -o ubuntu.img ubuntu.iso
하면 ubuntu.img.dmg 파일이 나오는데, 이걸 ubuntu.img 로 이름 바꾸고 ..
usb 메모리를 usb 포트에 꽂고 diskutil list 하면 usb 파티션이 어딘지 나와요. (저는 /dev/disk3 ... )
그러면 diskutil unmountDisk /dev/disk3 하면 언마운트 됐다고 나오고 ...

sudo dd if=ubuntu.img of=/dev/disk3 bs=10m

라고 하고 기다리면 돼요..

그리고 리부팅하면서 option 키 누르고 있으면 부팅 미디어 선택 가능한데, 그때 USB 를 선택하면 되고 ..

파티션 나눌 때 /efi 파티션을 아마 몇백메가 만들어야 할 거에요 ...

뭐 따로 설치하거나 ... efi 파일을 복사하거나 .. 하지 않아도 요즘 건 거의 다 돼요 ...

 

어쨌든 내 macbook은 안된다. 일단, boot media로 인식하지 못한다. rufus, unetbootin등 다 해봤지만, 어쨌든 usb로 booting하는데 실패했다. 그러다가, custom efi binary를 써서 booting하는 방법을 따라해보니 된다. 이에 전산고고학을 전공하시는 후학을 위해서 간략하게 기록해본다.

 

boot-linux-from-usb-flash-drive-on-macbook의 본문에 있는 내용보다 댓글 마지막에 제공하는 link가 더 잘 되는 것같다. (linux 환경에서 하는 것을 추천한다. 닭이던 달걀이던)

1. usb memory disk에 GPT partition을 만든다. sdX는 sda, sdb, ...

  dd if=/dev/zero of=/dev/sdX bs=10M 으로 깨끗하게 밀어버리고 하는 것을 추천한다.

  gdisk로 GPT partition으로 disk map을 쓴다고 선언하고 (use blank GPT),

  partition 하나를 만든다. type은 0700 (Microsoft Basic Data)

2. mkfs.vfat -F 32 /dev/sdX1 로 포맷

3. mkdir -p /mnt/1; mount /dev/sdX1 /mnt/1 으로 mount한 다음

   mkdir -p /mnt/1/elf/boot 로 directory 생성

4. /mnt/1/elf/boot directory에 파일 복사.

   -

UEFI_boot_from_ISO.zip
다운로드

   - boot.iso는 linux 설치배포 iso image

   최종적으로 usb memory에 다음처럼 있으면 된다.

  /efi/boot/bootX64.efi
  /efi/boot/bootIA32.efi
  /efi/boot/boot.iso
더보기
Ubuntu-based ISOs and those that contain a \boot\grub\loopback.cfg file can be easily UEFI-booted to just by copying some files, no menu is needed!
 
1. Format a FAT32 USB flash drive (e.g. using RMPrepUSB)
2. Make a \efi\boot directory on the flash drive
3. Copy your Ubuntu-based ISO file (must be <4GB) to the \efi\boot directory and rename it as boot.iso
4. Extract the .efi files from the UEFI_boot_from_ISO.zip file and copy them to the \efi\boot directory
 
FAT32 volume
===========
\efi\boot\bootX64.efi
\efi\boot\bootIA32.efi
\efi\boot\boot.iso
 
Note: \efi\boot is lowercase and boot.iso is lowercase.
 
That's it!
 
Now you should be able to UEFI-boot (32-bit and 64-bit) from the USB flash drive (disable Secure Boot in the BIOS options first).
 
To use a different Ubuntu-based ISO which should contain a \boot\grub\loopback.cfg file, simply replace the boot.iso file.
 
A 64-bit version of Ubuntu will not boot on a 32-bit UEFI system. Use a 32-bit Ubuntu ISO on a 32-bit UEFI system and a 64-bit UEFI ISO on a 64-bit UEFI system.
 
This tutorial is based on an article here, but the.efi files in my download have been patched by me to load the loopback.cfg file and so ensure reliable booting.
 
 

In depth

The .efi file contains a version of grub2 with an embedded grub menu
 
The grub2 variable iso_path must be set before loopback.cfg is called (and exported).
 
An example of a simple embedded menu which boots to the loopback.cfg file inside the boot.iso is:
 
set efi_machtype='x86_64'
export efi_machtype
set efi_arch='EFI64'
export efi_arch
fix_video
set grub2efi_intel_gma_patch='enabled'
export grub2efi_intel_gma_patch
fakebios
set grub2efi_fakebios='generic'
export grub2efi_fakebios
 
set boot_iso='/efi/boot/boot.iso'
export boot_iso
set iso_path=${boot_iso}
export iso_path
 
set real_root=${root}
export real_root
set real_prefix=${prefix}
export real_prefix
 
loopback loop (${real_root})${boot_iso}
set root=(loop)
set gfxpayload=keep
configfile /boot/grub/loopback.cfg
boot
 
 
A typical Ubuntu menu entry inside loopback.cfg inside boot.iso would be:
 
menuentry "Try Ubuntu without installing" {
set gfxpayload=keep
linux /casper/vmlinuz.efi file=/cdrom/preseed/ubuntu.seed boot=casper iso-scan/filename=${iso_path} quiet splash ---
initrd /casper/initrd.lz
}
 
 
Note that no persistent parameter is specified in the loopback.cfg, which prevents us from booting with persistence...:-(


그후, option key를 눌러서 boot media을 EFIboot로 선택하면 booting 된다. 안되면 다른 글을 찾아볼 것. 여기서 커피 한잔. 이제 시작한 거다.

설치는 다른 얘기다.
1. 배포폰 + 32/64bit 조합만으로 많은 삽질이 있었다.
2. 일반 pc처럼 mac OS -> grub로 얌전하게 booting되지 않는다.
   -> rEFInd라는 emulator를 설치해주어야 한다.
3. 나는 겪지 않았지만, 주변장치관련 잡다한 작업이 필요할 수 있다고 한다.

 

일반 PC와 달리 rEFInd를 설치할 partition이 필요하다. ubuntu 설치 usb로 booting후 바로 설치로 들어가는 것이 아니라 terminal을 열고 partition을 만들고 파일을 복사해주어야 한다.

- 설치할 disk가 sdb라고 한다면

- gdisk /dev/sdb 해서 GPT partition map을 쓴다고 선택한 다음

   100M size의 partition을 만든다. type은 ef00 (EFI system)

- mkfs.vfat -F32 /dev/sdb1 으로 format 후 mount

  mkdir -p /boot/temp-efi

  mount /dev/sdb1 /boot/temp-efi

- rEFInd 를 설치한다.

refind-bin-0.7.7.zip
다운로드

# mkdir ~/rEFInd/ && cd ~/rEFInd/
# wget http://downloads.sourceforge.net/project/refind/0.7.7/refind-bin-0.7.7.zip
# unzip refind-bin-0.7.7.zip
# cd refind-bin-0.7.7/
# ./install.sh

 잘 설치되었으면, 다음으로 마무리

# cd /boot/temp-efi # Or wherever you mounted your UEFI partition
# mv EFI/refind/ EFI/boot/ # Rename the directory
# mv EFI/boot/refind_ia32.efi EFI/boot/boot.efi # Rename the file

 

그리고, ubuntu 설치로 들어가서 설치하는데, 설치할 disk 선택시 전부 쓰기를 선택하면 만들었던 rEFInd partition이 날라간다. 따라서, 설치할 partition을 수동으로 만들어주어야 한다.

 

그외...

나는 ubuntu 12.04.5 64bit desktop을 먼저 설치한 다음, 14.04 -> 16.04로 단계적으로 upgrade했다.

- Fedora Live는 boot 초반에 grub console로 떨어진다. 뭔가 문제가 있겠지.

- ubuntu 16.04 desktop 32/64bit 둘 다 설치후반 grub 설치에서 error 나오고 멈춤.

 

참고 site :

 1. boot-linux-from-usb-flash-drive-on-macbook

 2. 136 - UEFI-boot directly from Ubuntu-based ISO files

 3. Linux-only installation on a 2006 Macbook using rEFInd