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/29 04:41] hyphop [Custom disk create] |
software:oowow:how-to:oowow-autoinstall-disk [2023/08/29 04:42] (current) hyphop [Custom disk create] |
||
|---|---|---|---|
| Line 125: | Line 125: | ||
| <WRAP important > | <WRAP important > | ||
| - | Installation Disk must be prepared | + | This way for installation-disk preparation |
| </ | </ | ||
| Another way to create installation disk by script [[gh>/ | Another way to create installation disk by script [[gh>/ | ||
| - | /* | ||
| - | |||
| - | <WRAP important > | ||
| - | This way can used only with embeded oowow, and need boot device into oowow mode from SPI flash | ||
| - | </ | ||
| - | |||
| - | ```shell example | ||
| - | |||
| - | ~# DISK=/ | ||
| - | |||
| - | ``` | ||
| - | |||
| - | ```sh autoinstall-disk-create | ||
| - | #!/bin/sh | ||
| - | |||
| - | #= USAGE: DISK=/ | ||
| - | |||
| - | DISK=${DISK: | ||
| - | IMAGE=${IMAGE: | ||
| - | |||
| - | FAIL(){ | ||
| - | echo " | ||
| - | 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 /tmp/rescue | ||
| - | # copy image | ||
| - | |||
| - | CMD mount $P2 /tmp/dump | ||
| - | CMD cp " | ||
| - | |||
| - | ls -l1 /tmp/dump | ||
| - | |||
| - | # create config | ||
| - | CMD mount $P1 /tmp/rescue | ||
| - | C=/ | ||
| - | CMD mkdir -p $C | ||
| - | echo " | ||
| - | |||
| - | CMD umount $P1 $P2 | ||
| - | |||
| - | echo DONE | ||
| - | ``` | ||
| - | */ | ||