rtr7 / router7

router7 is a small home internet router completely written in Go. It is implemented as a gokrazy appliance.
https://router7.org
Apache License 2.0
2.69k stars 109 forks source link

cannot boot from usb #79

Open soitun opened 1 year ago

soitun commented 1 year ago

I operate as follows: first, Create an instance go install github.com/gokrazy/tools/cmd/gok@main go install github.com/rtr7/tools/cmd/…@latest mkdir /tmp/recovery gok -i router7 new gok -i router7 edit secend, Modify config.json to { "Hostname": "router7", "Packages": [ "github.com/gokrazy/fbstatus", "github.com/gokrazy/hello", "github.com/gokrazy/serial-busybox", "github.com/gokrazy/breakglass" "github.com/rtr7/router7/cmd/…" ], "SerialConsole": "ttyS0,115200", "GokrazyPackages": [ "github.com/gokrazy/gokrazy/cmd/ntp", "github.com/gokrazy/gokrazy/cmd/randomd" ], "KernelPackage": "github.com/rtr7/kernel", "FirmwarePackage": "github.com/rtr7/kernel", "EEPROM Package": "" } Then, build an image: GOARCH=amd64 gok -i router7 overwrite --full /dev/sdc sdc is usb stick

Insert the usb into the pc, start the boot, but the following error occurs, /dev/root: Can't open blockdev VFS: cannot open root device "sdc2" or unknown-block(0,0): error -6 please append a correct "root=" boot option; here are the avilable partitions: 0810 500107608 sdb driver: sd full log click here How to solve it, thank you

stapelberg commented 1 year ago

Probably you need to set the rootdelay= kernel option to a high-enough value for your USB stick to show up. See https://github.com/gokrazy/gokrazy/issues/165 for more details

soitun commented 1 year ago

thanks a lot