네게로오는길...

USB 메모리 파티션 만들기 포맷하기

집드라이브 Zip drive 형태로 만들기

  • 집드라이브 Zip drive
    집드라이브는 64개의 헤드, 32개의 섹터로 구성되어 있고 파티션 번호가 4입니다.
    100 MB는 96 실린더이며 250 MB는 239 실린더입니다.
    따 라서, USB 메모리를 집드라이브로 인식하려면 64개의 헤드, 32개의 섹터로 구성되고, 메모리에 맞게 실린더를 정해야 합니다. 예를 들어 32 MB의 USB메모리를 집드라이브로 변환하면 31.25 실린더가 되므로 31실린더로 만들어야 합니다.
  • mkdiskimage로 USB메모리를 집드라이브로 만들기
    데비안에서 패키지 syslinux를 설치하면 mkdiskimage 가 있습니다. 사용방법은 다음과 같습니다.
    # mkdiskimage -4 /dev/sdb 0 64 32
    (주의 하드디스크와 이름에 주의합니다. 미리 # fdisk -l 로 이름을 확인합니다. !)
    여기서 0은 메모리에 맞게 실린더를 정하는데 프로그램이 자동으로 정해줍니다.
    -4 는 파티션 4번으로 설정하게 합니다.
    이렇게 만들어진 USB메모리는 부팅설정이 파티션 번호 4번으로 됩니다.
  • 이렇게 만들어진 USB메모리에 부트 로더를 설치합니다.
    # syslinux /dev/sdb4
    USB 메모리 루트에 ldlinux.sys가 생깁니다.
    sylinux 를 실행할 때 그 파티션을 마운트하면 안 됩니다.

하드디스크 형태로 만들기

  • USB 메모리 파티션 만들고 포맷하기 (주의 하드디스크와 이름에 주의합니다. !)
    # fdisk -l
    메모리의 이름을 확인합니다.

    # fdisk /dev/sdb
    여기에서 FAT16으로 파티션을 만들고 Boot를 체크하여 부팅할 수 있게 합니다.
    mkdosfs은 패키지 dosfstools 에 있습니다.

    # mkdosfs /dev/sdb1
    도스용으로 포맷합니다.
  • 부트로더를 설치합니다. syslinux를 사용합니다.
    패키지 syslinux mtools 가 설치가 안되어 있으면 설치합니다.
    # syslinux /dev/sdb1
    USB 메모리 루트에 ldlinux.sys가 생깁니다.

참고) MBR 오류로 부팅이 안되면 다음과 같이 합니다.

  • # install-mbr /dev/sdb
    install-mbr은 패키지 mbr에 있습니다.
  • 같은 방법으로 윈도우에서 MBR 오류로 부팅이 안되면 다음과 같이 할 수 있습니다.
    # install-mbr -r /dev/sda
    MBR 지우는 명령입니다.

USB 메모리에 운영체제 설치하기

마이크로소프트 도스 USB 부팅 MS DOS USB Booting (집드라이브형태로)

  • 먼저 집드라이브 모양으로 파티션 설정이 되있고 systlinux 부트로더를 설치한 USB메모리를 마운트 합니다.
  • USB메모리에 memdisk, 플로피 디스크 이미지 파일을 저장합니다.
    $ cp /usr/lib/syslinux/memdisk /media /usbdisk/
    $ cat /dev/fd0 ~/w98dosi.flp
    $ cp ~/w98dosi.flp /media/usbdisk/
    추가로 chain.c32 menu.c32 isolinux.bin 도 저장합니다.
  • syslinux.cfg 를 다음과 같이 USB메모리에 맞게 고쳐 저장합니다.
    # The line with default menu.c32 activates the simple menu sytem.
    default menu.c32

    # The line prompt 0 suppress the normal boot: prompt.
    prompt 0

    # Give the menu a title. The title is presented at the top of the menu.
    menu title My Recovery USB MEMORY DISK

    # The timeout 600 sets a timer that counts down for 60 seconds.
    # It says 600 since it measures time in tenths of seconds. Once that time expires,
    # the menu entry that is the default is selected automatically.
    # If no menu item has the menu default then the first menu item is selected.
    timeout 600

    # The ^ symbol in a MENU LABEL statement defines a hotkey.
    # The hotkey will be highlighted in the menu and will move the
    # menu cursor immediately to that entry.
    #
    # Reusing hotkeys is disallowed, subsequent entries will not be
    # highlighted, and will not work.
    #
    # Keep in mind that the LABELs, not MENU LABELs, must be unique,
    # or odd things will happen to the command-line.

    label hda
    menu label My Local Hda Booting
    menu default
    kernel chain.c32
    append hd0

    label 98
    menu label Windows 98 SE Dos Installation Diskette Booting
    kernel memdisk
    append initrd=w98dosi.flp

    label sc2
    menu label System Commander 8.13 Recovery Diskettte 2
    kernel memdisk
    append initrd=sc813-2.flp

    label 95
    menu label Window 95 Dos Booting Diskette
    kernel memdisk
    append initrd=dos95k.flp

    label 62
    menu label Dos 6.2 Booting Diskette
    kernel memdisk
    append initrd=dos62k.flp

마이크로소프트 도스 USB 부팅 MS DOS USB Booting (하드디스크 형태로)

  • 먼저 부트로더가 설치된 USB 메모리 와 MS DOS boot floppy disc를 mount합니다.
  • 플로피 디스크의 boot sector를 복사한 후 USB 메모리에 복사합니다.
    $ dd if=/dev/fd0 of=~/dos.bss bs=512 count=1
    $ cp ~/dos.bss /media/disk/
    이어서 부팅에 필요한 파일 (io.sys, msdos.sys, command.com) 과 기타 필요한 파일을 플로피 디스크에서 USB메모리에 복사합니다.
  • 아래의 내용을 syslinux.cfg로 만들어 USB 메모리에 저장합니다.
    default dos
    prompt 1
    timeout 100
    label dos
    kernel dos.bss
  • 부팅합니다.

데비안 설치 USB 만들기 : 간단한 부팅 커널 및 부트 로더 복사

데비안 설치 USB 만들기 : ISO 이미지 추가해서 만들기

  • 부트로더가 설치된 파티션을 마운트합니다.
    # mount /dev/sdb1 /media/disk
  • 데비안 아카이브에서 다음 파일을 USB 메모리로 복사하십시오
    vmlinuz (커널 바이너리)
    initrd.gz (최초 램디스크 이미지)
    syslinux.cfg (SYSLINUX 설정 파일)
    추가 커널 모듈
    파일 이름을 바꾸려면, SYSLINUX에서는 DOS 파일이름만 (8.3 방식) 사용할 수 있다는 점을 주의하십시오.
  • syslinux.cfg 설정
    다음 두 줄이 들어 있어야 합니다:
    default vmlinuz
    append initrd=initrd.gz
  • ISO 이미지를 USB메모리에 복사하기
    데비안 ISO 이미지(비지니스카드, 네트워크 설치 심지어 전체 CD이미지)
    이미지의 파일 이름은 .iso로 끝나야 합니다.
    ISO 이미지 없이 네트워크로 설치하려면, ISO 이미지를 복사할 필요가 없습니다. 또 최초 램디스크로 hd-media 디렉토리에 있는 파일 말고, netboot 디렉토리에 있는 파일을 사용해야 합니다. hd-media/initrd.gz 이미지는 네트워크를 지원하지 않습니다.