hi there, i was wondering if some of the boot sector/fdisk magicians out there could lend me a hand in booting openbsd on the eee without access to a cd-rom drive. what i need is basically advice how to handcraft a boot sector on an usb media with a snapshot for the boot process to pick it up using exclusively xandros on the eee... thanks in advance. -f -- RULE SIX: the winning team shall be the first team that wins.
see recent thread, "Install OpenBSD from USB". Don't believe all of of what people said. :) (short version: just do a normal install to the flash disk) Nick.
how do i boot bsd.rd to make an install to the flash disk? chicken egg. i dont have an usb cdrom, nor floppy disk. only usb media. i need to create a bootable usb media... -f -- help you out? certainly! which way did you come in?
drive, a minimal install should fit, unless you have a very small drive -- Mark Mathias
see the referenced thread... Prep the install device on another machine. Other machine just needs a USB port, doesn't need to be bootable there or USB2 or anything else fancy, as long as OpenBSD recognizes it. Either that, or get me an eeepc so I can see what the existing environment is and what the BIOS can do, then we might be able to give you specific instructions to build a boot environment on the eeepc, but it would be cheaper to just prep it on another machine. :) (some people will say dd the floppy image onto the flash device, but the functionality of that depends upon your BIOS's USB boot code. 'course, the functionality of my process assumes a non-broken USB boot code in the BIOS, and I should know better). Nick.
should have been clearer probably... i am on the road. there is no other machine... all i have is the eee and the internet and the usb media. my understanding of the boot process process for i386 tells me, all i need is ia bootsector from someone who already has an openbsd bootable usb media and the instructions which bytes to change based on what :) (where is boot(8) on my usb media) OR something like the zaurus process... install a linux package and can run bsd.rd directly from linux. i think this one is becoming more and more needed for i386 too, in this world of floppyless, cdromless devices... a little utility that i definitely agree. but if someone is so intimate with the boot sector code that can give me this info, saves a lot of hassle for me. thats why i wrote to the list, maybe someone i havent tried this one yet, but just for the kicks i tried cd42.iso an that of course didnt work. -f -- recursive, adj.; see recursive
What about PXE Booting?
The problem is that installboot(8) writes biosboot(8) to the partition boot record and in that process "inserts the block number and offset of the inode of the second-stage boot program boot(8) so that the biosboot(8) program can load it". So although it is trivial to give you a PBR it is not simple to find out how to change it to load boot(8) on your particular USB media. Another problem is that for biosboot(8) and boot(8) to work they and /bsd or /bsd.rd must be on a Berkley Fast File System, OpenBSD's filesystem. So, to create the filesystem and prepare it for boot, you or someone else need both an OpenBSD machine and the USB media. I know of no ISOLINUX loadable bsd.rd, although it might be possible. The OpenBSD kernel is not of the same executable format as the Linux kernel, If someone would create a bootable USB media containing just a ffs root partition with /boot and /bsd (renamed bsd.rd), about 6 MByte should suffice, would it be enough to dd it into a binary image for you to somehow (have you got the means?) write it onto the USB media? If your Eee runs Linux as they are supposed to, it should be as simple as dd. If you haven't, try floppy42.fs instead. -- / Raimo Niskanen, Erlang/OTP, Ericsson AB
Hello, see man installboot and man biosboot: you can't do this easily because installboot will patch biosboot for the locationinfo of boot. And you don't dd floppy image does boot on the eee, but biosboot stops with "ERR M". Installing OpenBSD to an USB stick definitly works. One other solution might be "flashboot", see "http://www.mindrot.org/projects/flashboot/". There are binary images available at "http://tilde.se/flashboot/". "zcat GENERIC-RD.image | dd of=/dev/sd0" under Linux on the eee should give you a bootable USB-Stick (/dev/sd0 as an example). But I didn't try this myself. Anyway, OpenBSD will boot but ethernet does not work: The wired adapter is not suppoerted, and the wireless driver reports an error and does not work :-( Regards Stefan Kell
Then one could create such a bootable image and throw in the file sets too, that is: most of the /4.2/i386 download directory except install42.iso, but the size would be about 250 MByte. -- / Raimo Niskanen, Erlang/OTP, Ericsson AB
"wireless driver reports an error and does not work" is short on detail. It might just be that non-free firmware needs installing (eg the firmware for the iwi driver) to get it to work. -- Dennis Davis, BUCS, University of Bath, Bath, BA2 7AY, UK D.H.Davis@bath.ac.uk Phone: +44 1225 386101
people with Eee PC need to test -current snapshots, the wd/wdc changes which are in them (not yet committed) will affect you (hopefully to your advantage, there should be much lower cpu use during disk activity). http://marc.info/?l=openbsd-tech&m=120159790520579&w=2
Thanks for that info, I will check how -current works on the eee, if I got some time for this. Regards Stefan Kell
So, installed current from Jan 28 on an usb stick and booted. Ethernet works fine on the eee, but the wireless always reports ath0: unable to reset hardware; hal status 4096 when I want to set something. according to the manpage, this should not happen. dmesg follows... OpenBSD 4.2-current (GENERIC) #652: Mon Jan 28 14:04:36 MST 2008 email@example.com:/usr/src/sys/arch/i386/compile/GENERIC cpu0: Intel(R) Celeron(R) M processor 900MHz ("GenuineIntel" 686-class) 631 MHz cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,TM,SBF real mem = 527527936 (503MB) avail mem = 502153216 (478MB) mainbus0 at root bios0 at mainbus0: AT/286+ BIOS, date 01/04/08, BIOS32 rev. 0 @ 0xf0010, SMBIOS rev. 2.5 @ 0xf06c0 (37 entries) bios0: vendor American Megatrends Inc. version "0703" date 01/04/2008 bios0: ASUSTeK Computer INC. 701 apm0 at bios0: Power Management spec V1.2 apm0: AC on, battery charge unknown acpi at bios0 function 0x0 not configured pcibios0 at bios0: rev 3.0 @ 0xf0000/0x10000 pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xf76b0/176 (9 entries) pcibios0: PCI Interrupt Router at 000:31:0 ("Intel 82801FB LPC" rev 0x00) pcibios0: PCI bus #5 is the last bus bios0: ROM list: 0xc0000/0xf800! cpu0 at mainbus0 pci0 at mainbus0 bus 0: configuration mode 1 (no bios) pchb0 at pci0 dev 0 function 0 "Intel 82915GM Host" rev 0x04 agp0 at pchb0: aperture at 0xd0000000, size 0x10000000 vga1 at pci0 dev 2 function 0 "Intel 82915GM Video" rev 0x04 wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation) wsdisplay0: screen 1-5 added (80x25, vt100 emulation) "Intel 82915GM Video" rev 0x04 at pci0 dev 2 function 1 not configured azalia0 at pci0 dev 27 function 0 "Intel 82801FB HD Audio" rev 0x04: irq 5 azalia0: codec[s]: Realtek/0x0662 audio0 at ...
Did you have to do boot> boot -a to get it to boot properly off of sd0a, recompile kernel or something else? When I try, I never get it to see "root on sd0a swap on sd0b dump on sd0b" by itself, at least without boot -a or a kernel recompile... By chance, have you tried the same with non -current - just wondering if it boots and detects ok with root on sd0a? Thanks!
Okay, this is what I did. Got the snapshot from ftp2.de.openbsd.org and booted a pc with the iso image mounted. I used the complete stick for OpenBSD, creating 827mb for / and 128m for swap (a & b). Installed the whole set (except game*) on my 1gb usb stick (which was sd1 during install) and rebooted the pc. After that I mounted the stick and edited fstab and changed sd1a to sd0a. Took the stick, told the eee to boot from usb and the snapshot was up and running. Tried to access web and ssh via the integrated lii0 ethernet, it worked. Starting up X, using startx with no config file, it came up and runs. Nice. So, there was no need to recompile the kernel in the snapshot from the ftp mentioned above. If you are interested, I can take an original 4.2 and install it on the stick tomorrow and can than post the dmesg. -- andre
If you can, so long as it's not trouble for you that would be great! For me, it's on two standard PCs (i386 & AMD64 x2) that I've been having these weird issues with booting from USB after installing to sd0a, where it goes into ddb> unless I do the boot -a (or recompile kernel accordingly) and only then it sees the proper "root on sd0a", rather than trying "root wd0a". I didn't do a swap, but from the man pages should just exit with a >= 1 code and I wouldn't think that would be the cause. If you do test with standard release, please let me know the results, especially if it's on a standard PC - I'm out of systems to test with... :-( Thank you very much!
Here it comes, the following dmesg is again from eee, installed an original 4.2 from cd on the usb stick. While trying to use the ethernet, it didn't work, I was unable to see the interface. According to the manual of the lii, this driver will be new in 4.3, so it's nice that the driver in the snapshot is already working. The wireless is identified as ath0 again but setting it up freezes the eee. This didn't happen with the snapshot, but there I was unable to set it, too (hardware reset...). Short description for you, I booted the 4.2 install cd i386 in a vmware workstation and chose sd1 as install destination. Created the same as with the snapshot and rebooted again. Mount the stick an changed again in /etc/fstab from sd1a to sd0a an the 4.2 booted on the eee. So if you want to use OpenBSD on the eee, you should take the actual snapshot, maybe there will be some changes according to the wireless driver. If someone needs tests with changed drivers or anything, I can take a snapshot each week an try again if the wireless starts working. Oh yes, the dmesg... (original 4.2 CD-release) OpenBSD 4.2 (GENERIC) #375: Tue Aug 28 10:38:44 MDT 2007 firstname.lastname@example.org:/usr/src/sys/arch/i386/compile/GENERIC cpu0: Intel(R) Celeron(R) M processor 900MHz ("GenuineIntel" 686-class) 631 MHz cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,TM,SBF real mem = 527527936 (503MB) avail mem = 502427648 (479MB) mainbus0 at root bios0 at mainbus0: AT/286+ BIOS, date 01/04/08, BIOS32 rev. 0 @ 0xf0010, SMBIOS rev. 2.5 @ 0xf06c0 (37 entries) bios0: vendor American Megatrends Inc. version "0703 " date 01/04/2008 bios0: ASUSTeK Computer INC. 701 apm0 at bios0: Power Management spec V1.2 apm0: AC on, battery charge unknown apm0: flags 30102 dobusy 0 doidle 1 pcibios0 at bios0: rev 3.0 @ 0xf0000/0x10000 pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xf76b0/176 (9 entries) pcibios0: PCI Interrupt Router at 000:31:0 ("Intel ...
Hello Denis, Of course this is way too short, but I wanted to check the archives beforehand wether I did make a stupid error somewhere. Wireless is an ath-device which does not need non-free firmware AFAIK. Regards Stefan Kell
To get this nice little thingy working, of course.
booting that is) if it's not supported by OpenBSD. If so, then maybe you could PXE boot and install OpenBSD onto the USB media that way?
as far as i know, pxe needs another computer with openbsd or unix and i have no access to that. i am in inet cafes and libraries. nevertheless, the previous post very well pointed out that i will need to work with ffs from linux, and i dont know anything about that, not even if it is supported. -f -- our world: a 8000 mile in diameter spherical pile of dirt.
Like most BSDs, OpenBSD uses the Berkeley Fast File System. By default, GNU/Linux^W^W^WLinux (yes, Linux, motherfucker, Linux!) allows you to mount Fast File System partitions, but (at least on Ubuntu 7.10) it can by default only mount them read-only. For instance to mount an OpenBSD floppy on an Ubuntu 7.10 box, try this: sudo mkdir /media/floppy sudo mount -t ufs -o ufstype=44bsd -r /dev/fd0 /media/floppy Obviously, sudo umount /media/floppy when finished, and adapt the above as necessary if you're dealing with HDDs/USB sticks. Now you would have been able to figure this out by yourself with man mount -- but that requires the prior knowledge that (Berkeley) Fast File System = FFS = UFS = Unix File System to clue in to selecting the ufs type, and you then have to know that you need to also set the ufstype option to 44bsd. Thankfully, dmesg|tail is helpful if you don't set the ufstype option: [15809.331413] You didn't specify the type of your ufs filesystem [15809.331417] [15809.331418] mount -t ufs -o ufstype=sun|sunx86|44bsd|ufs2|5xbsd|old|hp|nextstep|nextstep-cd|openstep ... [15809.331421] [15809.331421] >>>WARNING<<< Wrong ufstype may corrupt your filesystem, default is ufstype=old If I read the above correctly, then it should even be possible to mount the ufs type with the ufstype=44bsd option as read+write, but when I tried this on Ubuntu 7.10, I got this: ropers@tranquility:~/Desktop$ sudo mount -t ufs -o ufstype=44bsd /dev/fd0 /media/floppy mount: wrong fs type, bad option, bad superblock on /dev/fd0, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so ropers@tranquility:~/Desktop$ dmesg|tail (...) [16157.855996] ufs was compiled with read-only support, can't be mounted as read-write ropers@tranquility:~/Desktop$ So maybe it's possible to compile in r+w support into your Linux kernel, or maybe your favourite distro already comes with write support ...
thans for the research... i am by no means a linux head, and i find their (eee xandros) man pages ... painful to read. so making kernels is way out of my league, done it for the last time maybe in 1999... and have no wish to start again. my aim is to create a kind of dual boot system with a usb stick until openbsd support is improved. doing high level stuff (opera, xterm) is acceptable, but since i left the linux world it became much more complicated, but much more user friendly admittedly. -f -- girls just wanna have fun... guys just wanna have girls.
i am trying to make this one work. but i dont know how the openbsd dd example translates into the linux one, there is no 'c' for all disk. if i do a # zcat image | dd of=/dev/sdd linux fdisk reports an invalid partition table. i tried to create an a6 bootable partition and then # zcat image | dd of=/dev/sdd1 but neither of these boot. the second one hangs, the first one gives a partition error... could someone please upload somewhere a basic install or just bsd.rd as an image already installed on the media? and the linux dd/fdisk dance around it? -f -- pi seconds is a nanocentury.
Since you probably will need the install sets as well, I have posted a compressed filesystem image of size 199864838 bytes at http://www.erlang.org/~raimo/OpenBSD/snapshots/i386/hd.fs.gz It contains the same as install42.iso snapshot Jan 29. Gunzip it (becomes 262144000 bytes). Load it to the USB media (in Linux): # dd if=hd.fs of=/dev/sdf bs=51200 count=5120 Change 'sdf' to what your USB media shows up as in dmesg. After that, cfdisk /dev/sdf should show an OpenBSD -- / Raimo Niskanen, Erlang/OTP, Ericsson AB
will try asap, thanks a lot. otherwise i'll ask the Andre chap with the usb install to post an image :))) i guess it wouldnt be really hard to provide these images along with the cd/floppy boot images, what's the official stance on this by the devs? as the subnotebook business gona explode after the eee's success this will be a really handy thing to do i think... -f -- i'm feeling rather blonde today.
Hello, I made some experiments booting the eee with following results: - installing OpenBSD to USB-stick on an other machine and then boot ist on the eee works. Release 4.2 has some problems with ethernet, -current might be better. - Using flashboot and dding Generic-rd.image from http://tilde.se to an USB-stick works but init-script inside this kernel has some problem with fsck. But this is an easy method for you to get a bootable USB-stick with only Linux running on the eee. - The eee CAN boot via PXE if you enable this option in the bios. This might be the most easy solution if you have the PXE-infrastructure. I will try a current snapshot and see how well this works in the next days. So in principle you don't need special images somewhere for download, it is all there already. Regards Stefan Kell
it works, thanks very much! now i can experiment some more. -f -- i'm feeling rather blonde today.
Great! Good for you. What kind of USB stick did you use? I used an old 265MByte stick I found in a pile of dust at home and mimiced its C/H/S values, so I am a bit curious to know how generally usable this image is. That it only works for BIOSes that are capable of booting from "USB hard drive" I know, but if it works for any size (>= 256MByte) USB sticks -- / Raimo Niskanen, Erlang/OTP, Ericsson AB
a generic bsd kernel ok, or needs to boot bsd.rd or similar? In other words, I can see it being able to boot bsd.rd without a problem, but will it load the root device ok with just /bsd?
Hi, Might be interesting on the eee, what boot device will be selected. AFAIK the internal disk ist master on the secondary IDE-channel. But of course you have "boot -a" at the boot prompt for selecting the root device. And I want to try the same the next days :-) Regards Stefan Kell
That brings up another question, hopefully there's an answer... rather than having to do boot -a (even from boot.conf) and be present to hit <enter> during root device selection, is there an easy way to tell it, yes, choose the default it sees after this? ie: if I do a full install on a USB flash, boot up normal, it panics into ddb> mode because of root device as wd0 when it should be sd0. If I do boot -a, it asks for default of sd0 rather than wd0 but expects manual intervention, such as pressing <enter>. Is there a way to bypass this other than recompile a new, custom kernel? TIA.
Not that I am certain it would solve your problem completely, but I would love having a boot(8) prompt command boot [image [root] [-acds]] and set root [value] It would then also be possible to set it in /etc/boot.conf. But as far as I know it is a missing feature. And I do not think the kernel is able to get root device as an argument (yet). Another not as good and still missing feature would be -- / Raimo Niskanen, Erlang/OTP, Ericsson AB
Hello, The Generic kernel on i386 tries hard to find the correct boot device and assumes the the rootfilesystem is on partition "a" on this device. So if your kernel and boot files are on the USB-stick, the kernel should not panic but use sd0a as rootfilesystem. Regards Stefan Kell
release(8)) and previous versions, all using GENERIC kernel. As a test, I install OpenBSD onto the USB Flash, using the whole device (sd0a) as /. Set the BIOS to boot off of USB, the install completes ok, then after the initial reboot, during bootup, it panics into ddb> mode and a few lines above, it shows "root device on wd0a" rather than sd0a. When I do a boot -a, it detects the proper root device and works ok this way, but of course requires the manual intervention of having to press <enter> or to be physically at the console. I've tried with boot sd0a:/bsd, boot hd0a:/bsd, etc. still no luck unless I do a boot -a. Is there a way to save the dmesg once in ddb> to a file on floppy or USB? On this system, I have OpenBSD running on a HD as well - and the other weird thing I noticed is that when I boot -a in order to properly boot off of the USB device, it sees it's own dmesg and a pre-pended dmesg of the OpenBSD install on the local HDD. Is the problem some how inter-related with already having an install on a local drive, on the same system?
i had a nother idea today, the eee comes with grub... the more knowledgable are already holding their heads :] because i dont have the boot sector and /boot, i thought grub could maybe load bsd.rd but all i got was the 'boot too old' message well known from the archives. it was worth a shot... is there another boot loader that can boot bsd.rd wihout chainbooting? i can use everything available in the linux world to boot a single bsd.rd: does bsd.rd work without /boot? until recently i thought /boot just handles the file system and starts /bsd but now i see some posts that it is handing over some bios data too... -f -- two most common in the universe elements: hydrogen, stupidity.
|Francis Moreau||Re: Disk geometry from /sys|
|Rafael J. Wysocki||[Bug #11407] suspend: unable to handle kernel paging request|
|Christoph Lameter||Re: [bug] SLUB + mm/slab.c boot crash in -rc9|
|Jeremy Fitzhardinge||Re: [2.6.25] compat VDSO option not disabling|
|Rafael J. Wysocki||[Bug #11551] Semi-repeatable hard lockup on 2.6.27-rc6|
|Pat Thoyts||[PATCH] git-gui: use themed tk widgets with Tk 8.5|
|Tait||Re: [PATCH] Replace hard-coded path with one from <paths.h>|
|Frans Pop||'git gc --aggressive' effectively unusable|
|Stephan Beyer||Re: git sequencer prototype|
|Lynn Lin||Re: clearcase migration to git|
|Robert||disklabel - cylinder rounding|
|nixlists||Re: Which laptops do the developers use?|
|L. V. Lammert||OT, .. but has anyone seen a crontab editor|
|Darrin Chandler||Re: That whole "Linux stealing our code" thing|
|Jorge Enrique Valbuena Vargas||Re: NAT, Firewall & pf|
|William Allen Simpson||[net-next-2.6 PATCH v8 0/7] TCPCT part 1: cookie option exchange|
|Eric Dumazet||Re: [PATCH net-next-2.6] net: Introduce skb_orphan_try()|
|David Miller||Re: [PATCH] IPv6: preferred lifetime of address not getting updated|
|Eric Dumazet||Re: [PATCH net-next-2.6] net: Introduce skb_orphan_try()|
|Mark McLoughlin||Re: [PATCH 2/3] virtio: fix delayed xmit of packet and freeing of old packets.|
|Linux Kernel Mailing List||.gitignore: ignore *.lzo files|
|Linux Kernel Mailing List||init: Open /dev/console from rootfs|
|Linux Kernel Mailing List||V4L/DVB (10826): cx88: Add IR support to pcHDTV HD3000 & HD5500|
|Linux Kernel Mailing List||tracing: Simplify trace_option_write()|
|Linux Kernel Mailing List||ARM: dma-mapping: fix for speculative prefetching|