한국어
Embedded
 

fdisk로 부팅 가능한 sd카드 파티션을 생성

 
sd카드 장착 umount 해야함
 
$ sudo fdisk /dev/sdb
 
Welcome to fdisk (util-linux 2.31.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
 
새로운 파티션 테이블 만들기
Command (m for help): o
Created a new DOS disklabel with disk identifier 0x6e90b7a1.
 
전문가 모드
Command (m for help): x
 
Expert command (m for help): h
Number of heads (1-256, default 245): 255
 
Expert command (m for help): s
Number of sectors (1-63, default 62): 63
 
Expert command (m for help): c
Number of cylinders (1-1048576, default 966): 966
 
Expert command (m for help): r
 
첫번째 파티션 (부트파티션)
Command (m for help): n
Partition type
   p   primary (0 primary, 0 extended, 4 free)
   e   extended (container for logical partitions)
Select (default p):
 
Using default response p.
Partition number (1-4, default 1):
First sector (2048-15523839, default 2048):
Last sector, +sectors or +size{K,M,G,T,P} (2048-15523839, default 15523839): 83968
 
Created a new partition 1 of type 'Linux' and of size 40 MiB.
Partition #1 contains a vfat signature.
 
Do you want to remove the signature? [Y]es/[N]o: y
 
The signature will be removed by a write command.
 
파티션 타입
Command (m for help): t
Selected partition 1
Hex code (type L to list all codes): c
Changed type of partition 'Linux' to 'W95 FAT32 (LBA)'.
 
부트 파티션 플래그 설정
Command (m for help): a
Selected partition 1
The bootable flag on partition 1 is enabled now.
 
두번째 파티션
Command (m for help): n
Partition type
   p   primary (1 primary, 0 extended, 3 free)
   e   extended (container for logical partitions)
Select (default p):
 
Using default response p.
Partition number (2-4, default 2):
First sector (83969-15523839, default 86016):
Last sector, +sectors or +size{K,M,G,T,P} (86016-15523839, default 15523839):
 
Created a new partition 2 of type 'Linux' and of size 7.4 GiB.
 
Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
 
파일 시스템 생성
$ sudo mkfs.vfat -s1 -F 32 -n "boot" /dev/sdb1
[sudo] password for pjk:
mkfs.fat 4.1 (2017-01-24)
mkfs.fat: warning - lowercase labels might not work properly with DOS or Windows
 
$ sudo mkfs.ext4 /dev/sdb2
 
 
$ sudo fdisk -l /dev/sdb
Disk /dev/sdb: 7.4 GiB, 7948206080 bytes, 15523840 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x6e90b7a1
 
Device     Boot Start      End  Sectors  Size Id Type
/dev/sdb1  *     2048    83968    81921   40M  c W95 FAT32 (LBA)
/dev/sdb2       86016 15523839 15437824  7.4G 83 Linux

 

번호 제목 글쓴이 날짜 조회 수
51 Raspberry Pi에서 I²C 그리고 Bit-bang (비트뱅) makersweb 2023.08.27 365
50 Yocto 프로젝트 3.4 릴리스(honister) 이상 버전으로 마이그레이션 시 참고 사항 makersweb 2023.03.21 628
49 Raspberry Pi 와 ATtiny85 간 I²C 통신 file makersweb 2023.03.18 342
48 로직분석기와 함께 PulseView 를 사용해서 CAN 신호 캡쳐 file makersweb 2023.03.16 421
47 임베디드 개발자를 위한 Hex,Bin,Dec 변환기 유틸 file makersweb 2023.02.27 1034
46 ATtiny85 개발보드(HW-260) file makersweb 2023.01.02 362
45 플랫폼 디바이스 및 디바이스 트리 makersweb 2021.03.20 3732
44 Android 기기를 사용하여 Raspberry Pi SD 카드 작성 방법 file makersweb 2020.08.01 900
43 Raspberry Pi 의 프레임버퍼(Framebuffer)구성 makersweb 2020.05.15 1715
42 라즈베리파이2에서 RTOS기반 GPIO제어(LED) file makersweb 2020.04.21 1537
41 POSIX를 지원하는 오픈소스 RTOS, RTEMS file makersweb 2020.04.15 1604
» 라즈베리파이 부팅 가능한 sd카드 파티션 생성 makersweb 2020.04.15 1614
39 플랫폼 디바이스 및 드라이버에 대해서 makersweb 2020.02.01 6049
38 디바이스 트리(Device Tree, DT) makersweb 2020.01.12 5340
37 RISC-V : 자유롭고 개방 된 RISC 명령어 세트 아키텍처 [2] file makersweb 2020.01.01 920
36 임베디드 비대칭 멀티 프로세싱(asymmetric multiprocessing) 시스템 file makersweb 2019.12.31 877
35 임베디드 시스템에서 베어메탈(Bare metal) 이란? makersweb 2019.12.11 3261
34 HelloWorld 커널 모듈과 yocto 레시피 추가 방법 file makersweb 2019.12.09 5545
33 ESP32 블루투스 스피커(A2DP Sink) file makersweb 2019.10.29 3456
32 ESP-IDF 의 A2DP리뷰 (ESP32) file makersweb 2019.10.28 9489