운영체제 깨알지식 웹핵






#맥OS #MacOS #hdiutil #diskutil #dd #bootable USB stick #시동USB #Linux Live USB #데비안 리눅스

[2020년 05월 03일]

MacOS에서 ISO 파일로부터 부팅 USB 만들기 - Debian Netinstaller 기준

요약
  1. wget https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-10.3.0-amd64-netinst.iso
    Debian 누리집에서 네트워크 설치용 ISO 파일을 내려받는다.
  2. hdiutil convert -format UDRW -o debian-10.3.0-amd64-netinst.img debian-10.3.0-amd64-netinst.iso
    ISO 파일을 IMG 파일로 변환한다.
  3. mv debian-10.3.0-amd64-netinst.img.dmg debian-10.3.0-amd64-netinst.img
    hdiutil의 결과 파일이 .img.dmg 확장자이므로 img 확장자로 변환한다.
  4. diskutil list
    USB 스틱을 삽입한 후에 위 명령어를 실행하여 장치이름 확인: 여기서는 /dev/disk2.
  5. diskutil unmountDisk /dev/disk2
    맥OS 운영체제에서 USB 스틱을 내린다(Unmount).
  6. sudo dd if=debian-10.3.0-amd64-netinst.img of=/dev/disk2 bs=1m
    IMG 파일을 USB 스틱으로 복사한다.
  7. 이렇게 만든 부팅USB를 설치하고자 하는 장비 USB에 넣고 부팅한 후 Debian 운영체제를 설치한다

LattePanda 4/64(CPU: 인텔 아톰® x5-Z8350 프로세서(2M 캐시, 최대 1.92GHz), RAM 4GB, EMMC 64GB)에 Ubuntu Server 18.04 LTS를 기반으로 Transmission-daemon 및 MinDLNA 서버로 사용하고 있었다.

근래에 Dell Wyse 5070(CPU: Intel® Celeron® J4105 Processor (4M Cache, up to 2.50 GHz) , RAM 4GB, EMMC 16GB) Thin Client를 개비하여 메모리 8GB, M.2 SATA SSD 1TB를 붙여서 웹서버, 트랜스미션 데몬, MiniDLNA 등등의 복합서버로 활용하게 되었다 (방열용 선풍기가 없어서 조용하다는 점, 낮은 전력소비 때문에 집에서 항상 운영해도 전기세 걱정이 덜함). 이 때문에 라떼판다가 용도를 잃고 방구석으로 밀려났다.

노트북이 있어서 굳이 필요하지는 않지만 -- 델 와이즈의 절반 이하로 전력 소모량이 작으니 상시 켜 놓는다는 생각으로 -- 크로미움으로 간단한 웹서핑, MiniDLNA 클라이언트로 VLC를 사용하여 영화/음악감상을 할 목적으로 라떼판다에 데비안리눅스(Debian Linux)를 설치하려고 하였다. 주류 리눅스 배포판 중에서는 그나마 데비안이 가장 가벼운 듯하여 선택하였음.

[jinsuk@mac:~/Downloads]$ wget https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-10.3.0-amd64-netinst.iso
--2020-05-03 15:29:39--  https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-10.3.0-amd64-netinst.iso
Resolving cdimage.debian.org (cdimage.debian.org)... 194.71.11.173, 194.71.11.165
Connecting to cdimage.debian.org (cdimage.debian.org)|194.71.11.173|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://caesar.ftp.acc.umu.se/debian-cd/current/amd64/iso-cd/debian-10.3.0-amd64-netinst.iso [following]
--2020-05-03 15:29:40--  https://caesar.ftp.acc.umu.se/debian-cd/current/amd64/iso-cd/debian-10.3.0-amd64-netinst.iso
Resolving caesar.ftp.acc.umu.se (caesar.ftp.acc.umu.se)... 194.71.11.142
Connecting to caesar.ftp.acc.umu.se (caesar.ftp.acc.umu.se)|194.71.11.142|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 351272960 (335M) [application/x-iso9660-image]
Saving to: ‘debian-10.3.0-amd64-netinst.iso’

debian-10.3.0-amd64-netinst.i 100%[=================================================>] 335.00M  5.62MB/s    in 67s

2020-05-03 15:30:49 (5.00 MB/s) - ‘debian-10.3.0-amd64-netinst.iso’ saved [351272960/351272960]

[jinsuk@mac:~/Downloads]$ 

위와 같이 wget을 이용하여 크기가 가장 작은 네트워크 설치용 Debian ISO 파일을 내려받았다. 다음 과정은 모두 맥(Mac)에서 우분투(Ubuntu) 부팅usb 만들기 (통계쟁이 엔지니어) 누리집을 참조하였다.

참고한 위 누리집에서 iso 파일을 img 이미지로 변환하라고 해서 따랐다. (iso 파일로 진행해도 될 듯한데, 그 차이를 파악하기 귀찮아서 그대로 함)

[jinsuk@mac:~/Downloads]$ hdiutil convert -format UDRW -o debian-10.3.0-amd64-netinst.img debian-10.3.0-amd64-netinst.iso
Driver Descriptor Map(DDM : 0) 읽는 중...
Debian 10.3.0 amd64 n           (Apple_ISO : 1) 읽는 중...
Apple(Apple_partition_map : 2) 읽는 중...
Debian 10.3.0 amd64 n           (Apple_ISO : 3) 읽는 중...
.
EFI(Apple_HFS : 4) 읽는 중...
..
Debian 10.3.0 amd64 n           (Apple_ISO : 5) 읽는 중...
.......................................................................................................................
경과 시간: 311.425ms
속도: 1.1Gbytes/초
저장: 0.0%
created: /Users/jinsuk/Downloads/debian-10.3.0-amd64-netinst.img.dmg
[jinsuk@mac:~/Downloads]$ mv debian-10.3.0-amd64-netinst.img.dmg debian-10.3.0-amd64-netinst.img
[jinsuk@mac:~/Downloads]$ ls -FCls debian-10.3.0-amd64-netinst.i*
343040 -rw-r--r--@ 1 jinsuk  staff  351272960  5  3 15:37 debian-10.3.0-amd64-netinst.img
344096 -rw-r--r--@ 1 jinsuk  staff  351272960  2  8 22:47 debian-10.3.0-amd64-netinst.iso
[jinsuk@mac:~/Downloads]$ 

그리고 ISO -> IMG 변환의 결과 파일이 .img.dmg 확장자를 가지므로 .img 확장자로 변경해주었다.

이제 USB 저장장치를 삽입하고 .img 파일을 전송한다.

[jinsuk@mac:~/Downloads]$ diskutil list
/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk0
   1:                        EFI EFI                     314.6 MB   disk0s1
   2:                 Apple_APFS Container disk1         1.0 TB     disk0s2

/dev/disk1 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +1.0 TB     disk1
                                 Physical Store disk0s2
   1:                APFS Volume Macintosh HD - 데이터   750.5 GB   disk1s1
   2:                APFS Volume Preboot                 80.1 MB    disk1s2
   3:                APFS Volume Recovery                528.1 MB   disk1s3
   4:                APFS Volume VM                      7.2 GB     disk1s4
   5:                APFS Volume Macintosh HD            11.1 GB    disk1s5

/dev/disk2 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *8.0 GB     disk2
   1:             Windows_FAT_32 UBUNTU-SERV             8.0 GB     disk2s1

[jinsuk@mac:~/Downloads]$ diskutil unmountDisk /dev/disk2
Unmount of all volumes on disk2 was successful
[jinsuk@mac:~/Downloads]$ sudo dd if=debian-10.3.0-amd64-netinst.img of=/dev/disk2 bs=1m
Password:
335+0 records in
335+0 records out
351272960 bytes transferred in 361.963271 secs (970466 bytes/sec)
[jinsuk@mac:~/Downloads]$ 

MacOS에서 GUI를 이용하여 ISO 파일로부터 부팅 디스크를 만들고자 할 경우에는 공개용 소프트웨어인 에처(Etcher)를 추천한다.

이제 데비안을 설치할 수 있는 Live USB 부팅 디스크가 만들어졌다. 라떼판다의 USB 포트에 끼우고 BIOS를 참조하여 부팅하면 데비안 리눅스를 설치할 수 있다.

[처음 작성한 날: 2020.05.03]    [마지막으로 고친 날: 2020.05.03] 


< 이전 글 : 삼바나 윈도우 공유폴더를 Linux에서 마운트하는 방법 (2020.05.04)

> 다음 글 : Raspbian 10 RealVNC 작은 까만 화면 오류 - 모니터 연결 (2020.04.23)


크리에이티브 커먼즈 라이선스 이 저작물은 크리에이티브 커먼즈 저작자표시 4.0 국제 라이선스에 따라 이용할 수 있습니다.
잘못된 내용, 오탈자 및 기타 문의사항은 j1n5uk{at}daum.net으로 연락주시기 바랍니다.
웹핵.다이누.넷 대문 깨알지식 대문