kirei / flashboot Goto Github PK
View Code? Open in Web Editor NEWOpenBSD Flashboot
Home Page: http://www.mindrot.org/projects/flashboot/
License: Other
OpenBSD Flashboot
Home Page: http://www.mindrot.org/projects/flashboot/
License: Other
Is there any plan to support 6.2 ? thanks !
I have enabled sshd using sshd_flags="" in /flash/conf/etc/rc.conf.local. The daemon starts, and allows connections, but after root's password is accepted, I see the following error on the client side:
debug1: Entering interactive session.
PTY allocation request failed on channel 0
tset: standard error: Inappropriate ioctl for device
sshd logs the following error to the system console:
Jun 12 13:16:46 benny sshd[15419]: error: openpty: No such file or directory
Jun 12 13:16:46 benny sshd[15419]: error: session_pty_req: session 0 alloc failed
The patch at http://www.nmedia.net/flashrd/amd64_include_pmap_h.diff allows NKL2_KIMG_ENTIRES to be redefined. This gives you ability to set option NKL2_KIMG_ENTRIES=16 in the kernel config. On amd64, NKL2_KIMG_ENTRIES appears to be similar to NKPTP_MIN (i386), as it sets an absolute minimum. The i386 port has a user-definable nkptp option which can be set at boot time, amd64 does not. Setting NKL2_KIMG_ENTRIES=16 allows flashrd to boot with a 3.5MB ramdisk attached to a full GENERIC kernel. It would have a similar effect for flashboot users that want to use the amd64 port.
After adjusting the kernel config per issue 19, my Soekris 4801 boots, but never gives me a login prompt. I have tried two different terminals (cu and screen). The console still accepts keyboard input. The system responds to pings on sis0.
comBIOS ver. 1.31 20070408 Copyright (C) 2000-2007 Soekris Engineering.
net4801
0128 Mbyte Memory CPU Geode SC1100 267 Mhz
Pri Mas SanDisk SDCFB-64 LBA 978-4-32 62 Mbyte
Slot Vend Dev ClassRev Cmd Stat CL LT HT Base1 Base2 Int
-------------------------------------------------------------------
0:00:0 1078 0001 06000000 0107 0280 00 00 00 00000000 00000000
0:06:0 100B 0020 02000000 0107 0290 00 3F 00 0000E101 A0000000 10
0:07:0 100B 0020 02000000 0107 0290 00 3F 00 0000E201 A0001000 10
0:08:0 100B 0020 02000000 0107 0290 00 3F 00 0000E301 A0002000 10
0:18:2 100B 0502 01018001 0005 0280 00 00 00 00000000 00000000
0:19:0 0E11 A0F8 0C031008 0117 0280 08 38 00 A0003000 00000000 11
1 Seconds to automatic boot. Press Ctrl-P for entering Monitor.
Using drive 0, partition 3.
Loading.....
probing: pc0 com0 com1 pci mem[639K 127M a20=on]
disk: hd0+
>> OpenBSD/i386 BOOT 3.21
switching console to com0
>> OpenBSD/i386 BOOT 3.21
boot>
booting hd0a:/bsd: 53915540+477336 [52+146736+139968]=0x34259c4
entry point at 0x200120
[ using 287128 bytes of bsd ELF symbol table ]
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California. All rights reserved.
Copyright (c) 1995-2013 OpenBSD. All rights reserved. http://www.OpenBSD.org
OpenBSD 5.3 (SOEKRIS4801) #0: Tue Jun 11 10:12:02 MDT 2013
[email protected]:/obj/SOEKRIS4801
cpu0: Geode(TM) Integrated Processor by National Semi ("Geode by NSC" 586-class) 267 MHz
cpu0: FPU,TSC,MSR,CX8,CMOV,MMX
real mem = 133754880 (127MB)
avail mem = 76910592 (73MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 20/70/08, BIOS32 rev. 0 @ 0xf7840
pcibios0 at bios0: rev 2.0 @ 0xf0000/0x10000
pcibios0: pcibios_get_intr_routing - function not supported
pcibios0: PCI IRQ Routing information unavailable.
pcibios0: PCI bus #0 is the last bus
bios0: ROM list: 0xc8000/0x9000
cpu0 at mainbus0: (uniprocessor)
cpu0: TSC disabled
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 0 function 0 "Cyrix GXm PCI" rev 0x00
sis0 at pci0 dev 6 function 0 "NS DP83815 10/100" rev 0x00, DP83816A: irq 10, address 00:00:24:c2:c3:d0
nsphyter0 at sis0 phy 0: DP83815 10/100 PHY, rev. 1
sis1 at pci0 dev 7 function 0 "NS DP83815 10/100" rev 0x00, DP83816A: irq 10, address 00:00:24:c2:c3:d1
nsphyter1 at sis1 phy 0: DP83815 10/100 PHY, rev. 1
sis2 at pci0 dev 8 function 0 "NS DP83815 10/100" rev 0x00, DP83816A: irq 10, address 00:00:24:c2:c3:d2
nsphyter2 at sis2 phy 0: DP83815 10/100 PHY, rev. 1
pcib0 at pci0 dev 18 function 0 "NS SC1100 ISA" rev 0x00
"NS SC1100 SMI" rev 0x00 at pci0 dev 18 function 1 not configured
pciide0 at pci0 dev 18 function 2 "NS SCx200 IDE" rev 0x01: DMA, channel 0 wired to compatibility, channel 1 wired to compatibility
wd0 at pciide0 channel 0 drive 0: <SanDisk SDCFB-64>
wd0: 1-sector PIO, LBA, 61MB, 125184 sectors
wd0(pciide0:0:0): using PIO mode 1
geodesc0 at pci0 dev 18 function 5 "NS SC1100 X-Bus" rev 0x00: iid 6 revision 3 wdstatus 0
ohci0 at pci0 dev 19 function 0 "Compaq USB OpenHost" rev 0x08: irq 11, version 1.0, legacy support
isa0 at pcib0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
com0: console
com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard
nsclpcsio0 at isa0 port 0x2e/2: NSC PC87366 rev 9: GPIO VLM TMS
gpio0 at nsclpcsio0: 29 pins
gscsio0 at isa0 port 0x15c/2: SC1100 SIO rev 1:
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
usb0 at ohci0: USB revision 1.0
uhub0 at usb0 "Compaq OHCI root hub" rev 1.00/1.00 addr 1
root on rd0a swap on rd0b dump on rd0b
********* flashboot
/dev/rwd0a: file system is clean; not checking
/dev/rwd0a: file system is clean; not checking
Copying additional configuration files from flash to ramdisk
setting tty flags
building ps databases: dev.
net.inet.tcp.ecn: 0 -> 1
ddb.panic: 1 -> 0
ddb.console: 0 -> 1
kern.splassert: 1 -> 2
pf enabled
starting network
WARNING: /etc/hostname.em0 is insecure, fixing permissions
WARNING: /etc/hostname.rl0 is insecure, fixing permissions
WARNING: /etc/hostname.sis0 is insecure, fixing permissions
WARNING: /etc/hostname.vr0 is insecure, fixing permissions
Daemons: starting system logger
inetd cron.
********* executing /etc/rc.pkg
********* finished /etc/rc.pkg
********* finished /etc/rc
Jun 7 13:48:50 localhost init: kernel security level changed from 0 to 1
Should act like the live-cd and use the screen
I'll say up front, this may be a 'me' problem rather than a 'you' problem, I am working on a 5.4 amd64 based system attempting to produce a 5.4 i386 flashboot image.
When the kvm_mkdb step of 'list' runs, it complains that it can't find an executable - I'm guessing this is because of the arch differences but I have so far been unable to find any documentation that would explain this.
Otherwise it seems like everything seems to work - it actually does produce the bsd image (and I'm pretty confident that it's producing the filesystem et all correctly.
I haven't tried compiling for MIPS or anything else yet however, so if one of those works I'll update here.
Otherwise, great stuff - you've saved me a lot of boilerplate effort! Thanks!
I have just used the lastest flashboot code to create an image for a net4501.
I created a disk image and when I try to change the password I get the following error message:
[root@localhost]# passwd
passwd:passwd: undefined symbol _yp_check
lazy binding failed!
Segmentation fault
[root@localhost root]# uname -a
OpenBSD localhost 5.3 SOEKRIS4501#0 i386
This problem persists even when adding:
YP=no
to /etc/mk.conf
There seems to be a problem with the kernel for Soekris 4501. The kernel hangs during boot.
The following dmesg is reported
+462784 [61+128624+120370]=0x33add34
entry point at 0x200120
[ using 249472 bytes of bsd ELF symbol table ]
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California. All rights reserved.
Copyright (c) 1995-2012 OpenBSD. All rights reserved. http://www.OpenBSD.org
OpenBSD 5.1 (SOEKRIS4501) #0: Thu May 3 16:09:19 MDT 2012
[email protected]:/obj/SOEKRIS4501
cpu0: AMD Am486DX4 W/B or Am5x86 W/B 150 ("AuthenticAMD" 486-class)
cpu0: FPU
real mem = 66646016 (63MB)
avail mem = 12099584 (11MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 20/80/03, BIOS32 rev. 0 @ 0xf7840
pcibios0 at bios0: rev 2.0 @ 0xf0000/0x10000
pcibios0: pcibios_get_intr_routing - function not supported
pcibios0: PCI IRQ Routing information unavailable.
pcibios0: PCI bus #0 is the last bus
bios0: ROM list: 0xc8000/0x9000
cpu0 at mainbus0: (uniprocessor)
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
elansc0 at pci0 dev 0 function 0 "AMD ElanSC520 PCI" rev 0x00: product
0 stepping 0.1, CPU clock 133MHz, reset 0
gpio0 at elansc0: 32 pins
sis0 at pci0 dev 18 function 0 "NS DP83815 10/100" rev 0x00, DP83815D:
irq 10, address 00:00:24:c0:38:f4
nsphyter0 at sis0 phy 0: DP83815 10/100 PHY, rev. 1
sis1 at pci0 dev 19 function 0 "NS DP83815 10/100" rev 0x00, DP83815D:
irq 11, address 00:00:24:c0:38:f5
nsphyter1 at sis1 phy 0: DP83815 10/100 PHY, rev. 1
sis2 at pci0 dev 20 function 0 "NS DP83815 10/100" rev 0x00, DP83815D:
irq 5, address 00:00:24:c0:38:f6
nsphyter2 at sis2 phy 0: DP83815 10/100 PHY, rev. 1
isa0 at mainbus0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
com0: console
com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard
wdc0 at isa0 port 0x1f0/8 irq 14
wd0 at wdc0 channel 0 drive 0: <CF Card 128MB>
wd0: 1-sector PIO, LBA, 123MB, 253440 sectors
wd0(wdc0:0:0): using BIOS timings
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
another dmesg
Using drive 0, partition 3.
Loading...
probing: pc0 com0 com1 pci mem[639K 63M a20=on]
disk: hd0+
OpenBSD/i386 BOOT 3.17
OpenBSD/i386 BOOT 3.17
boot>
booting hd0a:/bsd: 53477108+462784 [61+128624+120370]=0x33add34
entry point at 0x200120
[ using 249472 bytes of bsd ELF symbol table ]
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California. All rights
reserved.
Copyright (c) 1995-2012 OpenBSD. All rights reserved.
http://www.OpenBSD.org
OpenBSD 5.1 (SOEKRIS4501) #0: Thu May 3 16:09:19 MDT 2012
[email protected]:/obj/SOEKRIS4501
cpu0: AMD Am486DX4 W/B or Am5x86 W/B 150 ("AuthenticAMD" 486-class)
cpu0: FPU
real mem = 66646016 (63MB)
avail mem = 12099584 (11MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 20/31/19, BIOS32 rev. 0 @ 0xf7840
pcibios0 at bios0: rev 2.0 @ 0xf0000/0x10000
pcibios0: pcibios_get_intr_routing - function not supported
pcibios0: PCI IRQ Routing information unavailable.
pcibios0: PCI bus #1 is the last bus
bios0: ROM list: 0xc8000/0xa000
cpu0 at mainbus0: (uniprocessor)
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
elansc0 at pci0 dev 0 function 0 "AMD ElanSC520 PCI" rev 0x00: product 0
stepping 1.1, CPU clock 100MHz, reset 1
gpio0 at elansc0: 32 pins
"TI PCI1410 CardBus" rev 0x02 at pci0 dev 9 function 0 not configured
sis0 at pci0 dev 18 function 0 "NS DP83815 10/100" rev 0x00, DP83816A:
irq 11, address 00:00:24:c1:f3:58
nsphyter0 at sis0 phy 0: DP83815 10/100 PHY, rev. 1
sis1 at pci0 dev 19 function 0 "NS DP83815 10/100" rev 0x00, DP83816A:
irq 5, address 00:00:24:c1:f3:59
nsphyter1 at sis1 phy 0: DP83815 10/100 PHY, rev. 1
isa0 at mainbus0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
com0: console
com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard
wdc0 at isa0 port 0x1f0/8 irq 14
wd0 at wdc0 channel 0 drive 0:
wd0: 4-sector PIO, LBA, 1953MB, 4001760 sectors
wd0(wdc0:0:0): using BIOS timings
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
Could it be something with the tty rate?
I attempted to do build-release.sh with all the tarballs from the 5.4 cdroms in diststuff (with src/sys from the ftp mirror). The error I got is below (do you know why I would have an error like this, that would have prevented builds for other people? is this a flashboot problem at-all? or does the 5.4 release just have some compiler warnings left-in?):
===> sys/arch/i386/stand/boot
cc -m32 -fno-pie -I/usr/src/sys/arch/i386/stand/boot/../../../.. -I/usr/src/sys/arch/i386/stand/boot/../libsa -I. -I/usr/src/sys/arch/i386/stand/boot -DSOFTRAID -DBOOTMAGIC=0xc001d00d -DLINKADDR=0x40120 -DSLOW -DSMALL -DNOBYFOUR -DNO_GZIP -DDYNAMIC_CRC_TABLE -DHEAP_LIMIT=0x90000 -I/usr/src/sys/arch/i386/stand/boot/../../../../stand/boot -c /usr/src/sys/arch/i386/stand/boot/srt0.S
cc -Os -Wall -Werror -fno-stack-protector -Wall -Wpointer-arith -Wuninitialized -Wstrict-prototypes -Wmissing-prototypes -Wunused -Wsign-compare -Wbounded -Wshadow -Wdeclaration-after-statement -m32 -D_STANDALONE -nostdinc -fno-builtin -fpack-struct -D__INTERNAL_LIBSA_CREAD -fno-pie -I/usr/src/sys/arch/i386/stand/boot/../../../.. -I/usr/src/sys/arch/i386/stand/boot/../libsa -I. -I/usr/src/sys/arch/i386/stand/boot -DSOFTRAID -DBOOTMAGIC=0xc001d00d -DLINKADDR=0x40120 -DSLOW -DSMALL -DNOBYFOUR -DNO_GZIP -DDYNAMIC_CRC_TABLE -DHEAP_LIMIT=0x90000 -I/usr/src/sys/arch/i386/stand/boot/../../../../stand/boot -c /usr/src/sys/arch/i386/stand/boot/../../../../stand/boot/boot.c
cc -Os -Wall -Werror -fno-stack-protector -Wall -Wpointer-arith -Wuninitialized -Wstrict-prototypes -Wmissing-prototypes -Wunused -Wsign-compare -Wbounded -Wshadow -Wdeclaration-after-statement -m32 -D_STANDALONE -nostdinc -fno-builtin -fpack-struct -D__INTERNAL_LIBSA_CREAD -fno-pie -I/usr/src/sys/arch/i386/stand/boot/../../../.. -I/usr/src/sys/arch/i386/stand/boot/../libsa -I. -I/usr/src/sys/arch/i386/stand/boot -DSOFTRAID -DBOOTMAGIC=0xc001d00d -DLINKADDR=0x40120 -DSLOW -DSMALL -DNOBYFOUR -DNO_GZIP -DDYNAMIC_CRC_TABLE -DHEAP_LIMIT=0x90000 -I/usr/src/sys/arch/i386/stand/boot/../../../../stand/boot -c /usr/src/sys/arch/i386/stand/boot/../../../../stand/boot/cmd.c
cc1: warnings being treated as errors
/usr/src/sys/arch/i386/stand/boot/../../../../stand/boot/cmd.c: In function 'read_conf':
/usr/src/sys/arch/i386/stand/boot/../../../../stand/boot/cmd.c:141: warning: comparison between signed and unsigned
/usr/src/sys/arch/i386/stand/boot/../../../../stand/boot/cmd.c: In function 'docmd':
/usr/src/sys/arch/i386/stand/boot/../../../../stand/boot/cmd.c:218: warning: comparison between signed and unsigned
/usr/src/sys/arch/i386/stand/boot/../../../../stand/boot/cmd.c: In function 'readline':
/usr/src/sys/arch/i386/stand/boot/../../../../stand/boot/cmd.c:307: warning: comparison between signed and unsigned
*** Error 1 in sys/arch/i386/stand/boot (<sys.mk>:87 'cmd.o')
*** Error 1 in sys/arch/i386/stand (<bsd.subdir.mk>:48 'all')
*** Error 1 in sys/arch/i386 (<bsd.subdir.mk>:48 'all')
*** Error 1 in sys (<bsd.subdir.mk>:48 'all')
*** Error 1 in . (<bsd.subdir.mk>:48 'all')
*** Error 1 in /usr/src (Makefile:89 'build')
DONE! Now build kernel.
... and that’s the cause of some serious bit-bloat.
Evidence: ramdisk includes libkrb5 and dependencies, just as an example.
Any plan for that version ? is there any blocker ? (time, money, hardware, etc?)
Under OpenBSD 5.3, SOEKRIS4801 kernel panics with BUFCACHEPERCENT=1. Valid settings per sys/kern/vfs_bio.c:190 are:
5 <= BUFCACHEPERCENT <= 90
I adjusted my SOEKRIS4801 config file to BUFCACHEPERCENT=5 for testing, and will leave it to someone more qualified than I to decide if this is the correct fix.
i'm experiencing problem with openbsd 5.0+ and flashboot on a commell LE-565 board (http://www.commell.com.tw/Product/SBC/LE-565.HTM) . The board has 4 RTL8110S Network card, the problem is that when i attach the fourth network card the kernel says:
re3 Watchdog timeout
the interface is unusable (no response to ping, ssh and dhclient request ecc)
Until openbsd/flashboot 4.9 no problem experienced.
Openbsd 5.3 (no flashboot) runs normally on that motherboard.
this output is from dmesg:
re0 at pci0 dev 11 function 0 "Realtek 8169" rev 0x10: RTL8110S (0x0400), irq 10, address 00:03:1d:04:50:78
rgephy0 at re0 phy 7: RTL8169S/8110S PHY, rev. 0
re1 at pci0 dev 12 function 0 "Realtek 8169" rev 0x10: RTL8110S (0x0400), irq 10, address 00:03:1d:04:50:79
rgephy1 at re1 phy 7: RTL8169S/8110S PHY, rev. 0
re2 at pci0 dev 13 function 0 "Realtek 8169" rev 0x10: RTL8110S (0x0400), irq 10, address 00:03:1d:04:50:7a
rgephy2 at re2 phy 7: RTL8169S/8110S PHY, rev. 0
re3 at pci0 dev 14 function 0 "Realtek 8169" rev 0x10: RTL8110S (0x0400), irq 10, address 00:03:1d:04:50:7b
rgephy3 at re3 phy 7: RTL8169S/8110S PHY, rev. 0
It doesn't compile properly on OpenBSD 5.5
The flag -Werror is passed to cc while compiling the kernel (./build-kernel.sh SOEKRIS4501), and because a source file generates a warning, the kernel doesn't get compiled.
When booting on computers with SSD drive the USB kernel are assuming that USB stick has device sd0 but that device is the internal ssd and the mount failures
Some kind of logic that remaps boot information must be implemented when a ssd is present
The current pendrive image was not possible to download from Github since github returned a error message when trying.
Will replace it with a new one
Changelog is out-of-sync with the actual code. This shall be either removed or maintained properly.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.