status: use partuuid-based path in mkfs instruction
fixes https://github.com/gokrazy/gokrazy/issues/12
This commit is contained in:
parent
b93a58e5c8
commit
2398e37f70
@ -64,7 +64,13 @@ unaccounted
|
|||||||
<h2>storage</h2>
|
<h2>storage</h2>
|
||||||
|
|
||||||
{{ if eq .PermAvail 0 }}
|
{{ if eq .PermAvail 0 }}
|
||||||
|
|
||||||
|
{{ if ne .PARTUUID "" }}
|
||||||
|
No permanent storage mounted. To create a filesystem for permanent storage, plug the SD card into a Linux computer and use <code>mkfs.ext4 /dev/disk/by-partuuid/{{ .PARTUUID }}-04</code>.
|
||||||
|
{{ else }}
|
||||||
No permanent storage mounted. To create a filesystem for permanent storage, plug the SD card into a Linux computer and, if your SD card is <code>/dev/sdb</code>, use <code>mkfs.ext4 /dev/sdb4</code>.
|
No permanent storage mounted. To create a filesystem for permanent storage, plug the SD card into a Linux computer and, if your SD card is <code>/dev/sdb</code>, use <code>mkfs.ext4 /dev/sdb4</code>.
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<strong>{{ .PermDev }}</strong>: {{ gigabytes .PermTotal }} total, {{ gigabytes .PermUsed }} used, {{ gigabytes .PermAvail }} avail<br>
|
<strong>{{ .PermDev }}</strong>: {{ gigabytes .PermTotal }} total, {{ gigabytes .PermUsed }} used, {{ gigabytes .PermAvail }} avail<br>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
2
go.mod
2
go.mod
@ -14,3 +14,5 @@ require (
|
|||||||
golang.org/x/sys v0.0.0-20200406155108-e3b113bbe6a4
|
golang.org/x/sys v0.0.0-20200406155108-e3b113bbe6a4
|
||||||
rsc.io/goversion v1.2.0
|
rsc.io/goversion v1.2.0
|
||||||
)
|
)
|
||||||
|
|
||||||
|
replace github.com/gokrazy/internal => /home/stream/gohack/github.com/gokrazy/internal
|
||||||
|
File diff suppressed because one or more lines are too long
@ -231,6 +231,7 @@ func initStatus(services []*service) {
|
|||||||
Meminfo map[string]int64
|
Meminfo map[string]int64
|
||||||
Hostname string
|
Hostname string
|
||||||
Model string
|
Model string
|
||||||
|
PARTUUID string
|
||||||
}{
|
}{
|
||||||
Services: services,
|
Services: services,
|
||||||
PermDev: rootdev.Partition(rootdev.Perm),
|
PermDev: rootdev.Partition(rootdev.Perm),
|
||||||
@ -243,6 +244,7 @@ func initStatus(services []*service) {
|
|||||||
Meminfo: parseMeminfo(),
|
Meminfo: parseMeminfo(),
|
||||||
Hostname: hostname,
|
Hostname: hostname,
|
||||||
Model: model,
|
Model: model,
|
||||||
|
PARTUUID: rootdev.PARTUUID(),
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user