0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

起動可能なEl Torito no-emulation DVD作成

0
Posted at

起動ISOの作成

nasm -f bin boot.asm -o boot.bin

mkdir iso
cp boot.bin iso/

xorriso -as mkisofs \
  -o os.iso \
  -b boot.bin \
  -c boot.cat \
  -no-emul-boot \
  -boot-load-size 4 \
  iso

qemu-system-i386 -cdrom os.iso -m 512
boot.asm
BITS 16
ORG 0

start:
    cli
    cld

    xor ax, ax
    mov ss, ax
    mov sp, 0x7C00

    push cs
    pop ds

    call here
here:
    pop si
    add si, msg - here

    mov ax, 0xB800
    mov es, ax
    xor di, di

.print:
    lodsb
    test al, al
    jz .hang

    mov ah, 0x07        ; 属性(白)
    stosw               ; [ES:DI] = AX (文字+属性)
    jmp .print

.hang:
    cli
    hlt
    jmp .hang

msg db "Hello------", 0

times 2048-($-$$) db 0

起動

qemu

qemu-system-i386 -cdrom os.iso -m 512
image

実機

前回書き込んだデータが残っている場合は一旦初期化する。

 linuxlite  ~  kaihatsu  sudo dvd+rw-format -blank=fast /dev/sr0
[sudo] password for linuxlite: 
* BD/DVD±RW/-RAM format utility by <appro@fy.chalmers.se>, version 7.1.
* 4.7GB DVD-RW media in Sequential mode detected.
* blanking 100.0%

-dry-runをつけて試してから、DVDに書き込む。

 linuxlite  ~  kaihatsu  sudo growisofs -dry-run -dvd-compat -Z /dev/sr0=os.iso
Executing 'builtin_dd if=os.iso of=/dev/sr0 obs=32k seek=0'
 linuxlite  ~  kaihatsu  sudo growisofs -dvd-compat -Z /dev/sr0=os.iso
Executing 'builtin_dd if=os.iso of=/dev/sr0 obs=32k seek=0'
/dev/sr0: "Current Write Speed" is 2.0x1352KBps.
builtin_dd: 192*2KB out @ average infx1352KBps
/dev/sr0: flushing cache
/dev/sr0: updating RMA
/dev/sr0: closing disc
/dev/sr0: reloading tray

※CDに書き込む場合は以下を試す
PuppyLinuxを試す

c65630911699b

検証環境

機種 : VOSTRO 1540
CPU : Intel(R) Celeron(R) CPU P4600 @ 2.00GHz
MEM : 1.8Gi
OS : Linux Lite 6.6
NASM : 2.15.05
GDB : GNU gdb (Ubuntu 12.1-0ubuntu1~22.04.2) 12.1
※実家に帰省中。昔のパソコン。

903464b4cc64a
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?