라즈베리 확장

SD card 분석


§SD card 파티션 분석
-Noobs 설치할 경우 적어도 5개 이상으로 SD card 파티션을 분할한다. 이는 Raspbian 이미지같이 전통적인 Standalone image로 설치하는 것과 차이가 있다.(raspbian으로 설치할 경우 파티션은 2개로 분할됨)
Img 파일을 SD카드에 기록하는 방식은 설치속도와 부팅속도가 빠르지만 이미지 기록 프로그램을 사용하여야 하는 단점이 있고,  NOOBS를 이용하는 방식은 다양한 OS를 설치할 수 잇고 부팅 시 바로 운영체제 설치를 선택할 수 있지만 설치속도와 부팅속도 느림
§Standalone partitioning
- A standalone .img file is a complete byte-for-byte image of an entire SD card. It includes the MBR (which stores the partition table) as well as all the raw partitions. This is the lowest-level possible way of writing an SD card, but it's the only way to access multiple partitions on an SD card using Windows (via the Win32DiskImager software).
-Raspbian 이미지를 설치하면 2개의 파티션 boot(fat)file system(ext4)로 나뉘게 됨
-Boot(fat, sdb1) – boot partion으로 라즈베리파이 펌웨어와 컴파일드리눅스 커널과 몇 개의 config 파일을 가짐
-File system(ext4, sdb2)- root partition으로 applicationhome directory리눅스에서 사용되는 파일들을 포함
-SD카드에 직접 이미지를 복사하게 때문에 큰 용량의 SD카드의 경우 지정된 용량의 공간을 할당하게 된다. 그렇기 때문에 앞서 설명했듯이, raspi-config에서 1. Expand_FileSystem 으로 최적화 시켜야 됨
§Standalone booting
-라즈베리파이는 bootstrap code를 사용하지 않음
1.Boot partition에 있는 bootcode.binload
2.Run start.elf(and fixup.dat)
3.Config.txt 파일을 읽고 GPU configurationset up
4.Cmdline.txt(ext4 읽으라는 내용 포함 되어 있음)파일을 읽고 kernel.img 파일을 실행
5.mmcblk0p2(file system partition) mount

6.Continues booting the rest of the system from 6


§NOOBS partitioning

-NOOBS를 처음 FAT-format SD card에 카피하면 하나의 파티션만 SD card에 할당 된다.


 Primary partition

Logical partition 

Type 

Label 

Contents 

 

FAT 

New Volume 

Noobs bootfiles & initramfs, 

OS recovery images


§NOOBS bootup(low-level)
1.FAT-format /dev/mmcblk0p1으로부터 bootcode.bin을 로드하고 실행
2.start.elf 가 없기 때문에 recovery.elf 파일을 로드하고 실행
3.Running recovery.elf then switches the firmware into "NOOBS mode" it usesrecovery.img instead of kernel.img, 

    recovery.cmdline instead of cmdline.txt, and it sets the root filesystem to recovery.rfs.

4.recovery.elfrecovery.cmdline을 읽고 recovery.img를 실행 recovery.cmdline으로부터 읽은 커맨드라인을 파싱하여 recovery.rfsload


§NOOBS bootup(setup mode)
1.NOOBS가 부트 되면 자동적으로 setup mode로 진입하게 되고 자동적으로 하나뿐인 파티션인 /dev/mmcblk0p1을 축소
2.RECOVERY라고 이름 붙여진 파티션을 만드는데 NOOBS의 경우 XGB, NOOBS lite의 경우 XMB로 생성됨
3.만들어진 파티션 /dev/mmcblk0p2은 확장파티션으로 대부분을 차지할 것임
4.Ext4-format partitiondev/mmcblk0p3 (32MB) 생성됨(SETTINGS으로 명명됨). 이것은 언어, 키보드, NOOBS가 필요한 것 들 등에 대한

     기본적인 OS가 로드되어야 되는 것들에 대해 저장하는 파티션

5.   다시 트리거 될 수 있는 프로세스를 방지하기 위해 recovery.cmdlineruninstaller를 삭제


 Primary partition

Logical partition 

Type 

Label 

Contents 

 

FAT 

RECOVERY 

NOOBS bootfiles & initramfs, 

OS recovery images 

 

extended 

 

Any logical partitons 

 

ext4 

SETTINGS 

NOOBS settings 


§NOOBS OS installation
-OS를 설치하면 해당 OS에 맞게 파티션을 할당하여 boot 파티션과

 file system 파티션을 가지게 됨

- 자세한 내용은 https://github.com/raspberrypi/noobs/wiki/NOOBS-partitioning-explained 참고

*NOOBS의 경우 기본적으로 Raspbian 외에 

Arch, OpenELEC등 설치 가능




만약 Arch를 추가 설치할 경우 파티션이 할당되고 부팅 시 선택 가능

(표 삽입에 암걸릴거 같아서 사진으로 대체..)




'프로그래밍 > Raspberry' 카테고리의 다른 글

Raspberry pi2 (시스템 콜)  (0) 2015.08.13
Raspberry pi2 (크로스컴파일)  (0) 2015.08.13
Raspberry pi2 (config.txt 분석)  (0) 2015.08.13
Raspberry pi2 (라즈베리 기본 설정)  (0) 2015.08.13
Raspberry pi2 (Raspbian 설치)  (0) 2015.08.13

+ Recent posts