Plop Boot Managerの取得
以下から取得。USBドライバが含まれていて、BIOS側でUSB起動に対応していない場合でも内部のドライバを使ってUSBからOSを起動することが可能。
Plop Boot Manager取得
QEMUで検証
百均に行った所、CD-Rしか無く、焼き損じたら無駄になるので試しにQEMUで起動できるか確かめる。
軽めのFreeDOSをUSBとして認識させて、Plop Boot Manager経由で起動する。
FreeDOS取得
qemu-system-i386 \
-cdrom plpbt.iso \
-boot d \
-usb \
-device usb-ehci,id=ehci \
-device usb-storage,drive=usbdrive \
-drive if=none,id=usbdrive,file=FD14LITE.img,format=raw
CDへ焼く
焼き損じる可能性を減らす為、一度ドライブで擬似的に焼いてみて確かめる。
wodim dev=/dev/sr0 speed=4 -v -dummy plpbt.iso
書き込みには成功した。
結果
linuxlite ~ kaihatsu wodim dev=/dev/sr0 speed=4 -v -dummy plpbt.iso
wodim: No write mode specified.
wodim: Assuming -tao mode.
wodim: Future versions of wodim may have different drive dependent defaults.
TOC Type: 1 = CD-ROM
wodim: Operation not permitted. Warning: Cannot raise RLIMIT_MEMLOCK limits.
scsidev: '/dev/sr0'
devname: '/dev/sr0'
scsibus: -2 target: -2 lun: -2
Linux sg driver version: 3.5.27
Wodim version: 1.1.11
SCSI buffer size: 64512
Device type : Removable CD-ROM
Version : 5
Response Format: 2
Capabilities :
Vendor_info : 'PLDS '
Identification : 'DVD+-RW DS-8A8SH'
Revision : 'KD11'
Device seems to be: Generic mmc2 DVD-R/DVD-RW.
Current: 0x0009 (CD-R)
Profile: 0x002B (DVD+R/DL)
Profile: 0x001B (DVD+R)
Profile: 0x001A (DVD+RW)
Profile: 0x0016 (DVD-R/DL layer jump recording)
Profile: 0x0015 (DVD-R/DL sequential recording)
Profile: 0x0014 (DVD-RW sequential recording)
Profile: 0x0013 (DVD-RW restricted overwrite)
Profile: 0x0012 (DVD-RAM)
Profile: 0x0011 (DVD-R sequential recording)
Profile: 0x0010 (DVD-ROM)
Profile: 0x000A (CD-RW)
Profile: 0x0009 (CD-R) (current)
Profile: 0x0008 (CD-ROM)
Profile: 0x0002 (Removable disk)
Using generic SCSI-3/mmc CD-R/CD-RW driver (mmc_cdr).
Driver flags : MMC-3 SWABAUDIO BURNFREE FORCESPEED
Supported modes: TAO PACKET SAO SAO/R96P SAO/R96R RAW/R16 RAW/R96P RAW/R96R
Drive buf size : 732160 = 715 KB
Beginning DMA speed test. Set CDR_NODMATEST environment variable if device
communication breaks or freezes immediately after that.
FIFO size : 12582912 = 12288 KB
Track 01: data 0 MB padsize: 56 KB
Total size: 0 MB (00:04.02) = 302 sectors
Lout start: 1 MB (00:06/02) = 302 sectors
Current Secsize: 2048
ATIP info from disk:
Indicated writing power: 4
Is unrestricted
Is not erasable
Disk sub type: Medium Type A, low Beta category (A-) (2)
ATIP start of lead in: -11634 (97:26/66)
ATIP start of lead out: 359849 (79:59/74)
Disk type: Short strategy type (Phthalocyanine or similar)
Manuf. index: 3
Manufacturer: CMC Magnetics Corporation
Blocks total: 359849 Blocks current: 359849 Blocks remaining: 359547
Forcespeed is OFF.
Speed set to 1765 KB/s
Starting to write CD/DVD at speed 10.0 in dummy TAO mode for single session.
Last chance to quit, starting dummy write in 0 seconds. Operation starts.
Waiting for reader process to fill input buffer ... input buffer ready.
Starting new track at sector: 0
Track 01: 0 of 0 MB written.
Track 01: writing 56 KB of pad data.
Track 01: Total bytes read/written: 557056/614400 (300 sectors).
Writing time: 10.536s
Average write speed 0.4x.
Fixating...
WARNING: Some drives don't like fixation in dummy mode.
Fixating time: 0.008s
BURN-Free was never needed.
wodim: fifo had 9 puts and 9 gets.
wodim: fifo was 0 times empty and 0 times full, min fill was 100%.
次は実際に書き込む
wodim dev=/dev/sr0 speed=4 -v -eject plpbt.iso
結果
linuxlite ~ kaihatsu wodim dev=/dev/sr0 speed=4 -v -eject plpbt.iso
wodim: No write mode specified.
wodim: Assuming -tao mode.
wodim: Future versions of wodim may have different drive dependent defaults.
TOC Type: 1 = CD-ROM
wodim: Operation not permitted. Warning: Cannot raise RLIMIT_MEMLOCK limits.
scsidev: '/dev/sr0'
devname: '/dev/sr0'
scsibus: -2 target: -2 lun: -2
Linux sg driver version: 3.5.27
Wodim version: 1.1.11
SCSI buffer size: 64512
Device type : Removable CD-ROM
Version : 5
Response Format: 2
Capabilities :
Vendor_info : 'PLDS '
Identification : 'DVD+-RW DS-8A8SH'
Revision : 'KD11'
Device seems to be: Generic mmc2 DVD-R/DVD-RW.
Current: 0x0009 (CD-R)
Profile: 0x002B (DVD+R/DL)
Profile: 0x001B (DVD+R)
Profile: 0x001A (DVD+RW)
Profile: 0x0016 (DVD-R/DL layer jump recording)
Profile: 0x0015 (DVD-R/DL sequential recording)
Profile: 0x0014 (DVD-RW sequential recording)
Profile: 0x0013 (DVD-RW restricted overwrite)
Profile: 0x0012 (DVD-RAM)
Profile: 0x0011 (DVD-R sequential recording)
Profile: 0x0010 (DVD-ROM)
Profile: 0x000A (CD-RW)
Profile: 0x0009 (CD-R) (current)
Profile: 0x0008 (CD-ROM)
Profile: 0x0002 (Removable disk)
Using generic SCSI-3/mmc CD-R/CD-RW driver (mmc_cdr).
Driver flags : MMC-3 SWABAUDIO BURNFREE FORCESPEED
Supported modes: TAO PACKET SAO SAO/R96P SAO/R96R RAW/R16 RAW/R96P RAW/R96R
Drive buf size : 732160 = 715 KB
Beginning DMA speed test. Set CDR_NODMATEST environment variable if device
communication breaks or freezes immediately after that.
FIFO size : 12582912 = 12288 KB
Track 01: data 0 MB padsize: 56 KB
Total size: 0 MB (00:04.02) = 302 sectors
Lout start: 1 MB (00:06/02) = 302 sectors
Current Secsize: 2048
ATIP info from disk:
Indicated writing power: 4
Is unrestricted
Is not erasable
Disk sub type: Medium Type A, low Beta category (A-) (2)
ATIP start of lead in: -11634 (97:26/66)
ATIP start of lead out: 359849 (79:59/74)
Disk type: Short strategy type (Phthalocyanine or similar)
Manuf. index: 3
Manufacturer: CMC Magnetics Corporation
Blocks total: 359849 Blocks current: 359849 Blocks remaining: 359547
Forcespeed is OFF.
Speed set to 1765 KB/s
Starting to write CD/DVD at speed 10.0 in real TAO mode for single session.
Last chance to quit, starting real write in 0 seconds. Operation starts.
Waiting for reader process to fill input buffer ... input buffer ready.
Performing OPC...
Starting new track at sector: 0
Track 01: 0 of 0 MB written.
Track 01: writing 56 KB of pad data.
Track 01: Total bytes read/written: 557056/614400 (300 sectors).
Writing time: 9.178s
Average write speed 1.6x.
Fixating...
Fixating time: 25.107s
BURN-Free was never needed.
wodim: fifo had 9 puts and 9 gets.
wodim: fifo was 0 times empty and 0 times full, min fill was 100%.
USB書き込み
lsblk
sudo umount /dev/sdb*
sudo dd if=FD14LITE.img of=/dev/sdb bs=4M status=progress conv=fsync
QEMU上で書き込んだUSBから起動してみる
sudo qemu-system-i386 -drive file=/dev/sdc,format=raw
次はもう少し小さいUSBメモリを用意して再挑戦してみる。
Plop Boot Managerの書き込み自体は成功している。
検証環境
機種 : 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
※実家に帰省中。昔のパソコン。
夜1:07追記
鳥取に行って帰って来てからもう一度実験
nasm -f bin boot.asm -o boot.bin
qemu-system-i386 \
-cdrom plpbt.iso \
-boot d \
-usb \
-device usb-storage,drive=usbdrive \
-drive if=none,id=usbdrive,file=boot.bin,format=raw
bits 16
org 0x7c00
start:
; 画面消す
mov ah, 0x06 ; スクロールアップ関数
mov al, 0x00 ; 全行削除
mov bh, 0x07 ; 属性: 白文字黒背景
mov cx, 0x0000 ; 左上 (0,0)
mov dx, 0x184f ; 右下 (24,79)
int 0x10
; カーソル位置を (0,0) に
mov ah, 0x02
mov bh, 0x00 ; ページ0
mov dx, 0x0000 ; 行0, 列0
int 0x10
; 文字 'P' を表示
mov ah, 0x0e ; TTY出力
mov al, 'P' ; 文字
mov bh, 0x00 ; ページ0
mov bl, 0x07 ; 色: 白
int 0x10
hang:
jmp hang
times 510-($-$$) db 0
dw 0xaa55

