This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
software:oowow:how-to:oowow-autoinstall-disk [2023/08/24 06:45] nick [Custom disk create] |
software:oowow:how-to:oowow-autoinstall-disk [2023/08/29 04:42] (current) hyphop [Custom disk create] |
||
|---|---|---|---|
| Line 123: | Line 123: | ||
| ===== Custom disk create ===== | ===== Custom disk create ===== | ||
| - | |||
| - | Another way create installation disk by script | ||
| <WRAP important > | <WRAP important > | ||
| - | This way can used only with embeded oowow, and need boot device into oowow mode from SPI flash | + | This way for installation-disk preparation on user host PC |
| </ | </ | ||
| - | ```shell example | + | Another way to create |
| - | + | ||
| - | ~# DISK=/ | + | |
| - | + | ||
| - | ``` | + | |
| - | + | ||
| - | ```sh autoinstall-disk-create | + | |
| - | #!/bin/sh | + | |
| - | + | ||
| - | #= USAGE: DISK=/ | + | |
| - | + | ||
| - | DISK=${DISK: | + | |
| - | IMAGE=${IMAGE: | + | |
| - | + | ||
| - | FAIL(){ | + | |
| - | echo "[fail] $@">&2 | + | |
| - | exit 1 | + | |
| - | } | + | |
| - | CMD(){ | + | |
| - | echo "# $@">& | + | |
| - | sudo " | + | |
| - | } | + | |
| - | + | ||
| - | [ -s " | + | |
| - | + | ||
| - | # create parts | + | |
| - | cat <<EOF | CMD sfdisk $DISK | + | |
| - | label: dos | + | |
| - | 1 : start= | + | |
| - | 2 : start= | + | |
| - | EOF | + | |
| - | + | ||
| - | P1=${DISK}1 | + | |
| - | P2=${DISK}2 | + | |
| - | # format partiotions | + | |
| - | CMD mkfs.vfat -n rescue -i DEADBEEF $P1 | + | |
| - | CMD mkfs.exfat -n dumps $P2 | + | |
| - | + | ||
| - | CMD mkdir -p /tmp/dump / | + | |
| - | # copy image | + | |
| - | + | ||
| - | CMD mount $P2 /tmp/dump | + | |
| - | CMD cp " | + | |
| - | + | ||
| - | ls -l1 /tmp/dump | + | |
| - | + | ||
| - | # create config | + | |
| - | CMD mount $P1 / | + | |
| - | C=/ | + | |
| - | CMD mkdir -p $C | + | |
| - | echo " | + | |
| - | + | ||
| - | CMD umount $P1 $P2 | + | |
| - | + | ||
| - | echo DONE | + | |
| - | ``` | + | |