Installation via Cardreader

michaelffm

Well-Known Member
Hi,

ich versuche FreeBSD 7.2RC2 auf meinen Alix zu bekommen.
Nachdem weder die pxeboot noch die nanoBSD Variante bei mir funktioniert, habe ich die Methode mal versucht, die biser OpenBSD bei mir erfolgreich installiert hatte.

Ich habe FreeBSD von DVD gebootet und bei der Installation den Cardreader als Zielmedium gewählt (da0)

Nachdem die Installation fertig war habe ich in der /etc/fstab den Eintrag von da0 auf ad0 gesetzt und neu gebootet.

Leider (war ja klar) hat das nicht funktioniert - es kommt beim booten einfach nur ein "-"

Code:
01F0 Master 848A SanDisk SDXXX3-2048
Phys C/H/S 3970/16/63 Log C/H/S 992/64/63
-

Wo kann denn hier das Problem sein?

BTW: Kann das sein dass FreeBSD und sinnvolle Fehlermeldungen irgendwie nicht so zusammenpassen? ;)

Gruß + danke
 
Hi, du hast auf eine Speicherkarte installiert und dann versucht von der Speicherkarte zu booten aber vorher noch schnell in der fstab die Deviceeintraege von USB-Speicher auf Festplatte umgestellt?
- Hoert sich fuer mich nach totalem Unfug an.
Wie die Meldung "SanDisk bla mit xyz Geometrie gefunden" zu der Aussage passt, das nichts anderes als "-" beim Booten kommt verstehe ich jetzt auch nicht wirklich.
 
Hi, du hast auf eine Speicherkarte installiert und dann versucht von der Speicherkarte zu booten aber vorher noch schnell in der fstab die Deviceeintraege von USB-Speicher auf Festplatte umgestellt?
Bei OpenBSD funktioniert dieser Unfug aber.
Ist doch logisch - wenn ich FreeBSD auf die Speicherkarte installiere dann steht in der fstab ja da0 drin.
Wenn ich die Speicherkarte in den ALIX stecke, wird die vom ALIX als ad0 erkannt (nicht via USB angeschlossen) - dann gibts logischerweise kein da0.
Also muss ich den Eintrag im fstab ändern

Wie die Meldung "SanDisk bla mit xyz Geometrie gefunden" zu der Aussage passt, das nichts anderes als "-" beim Booten kommt verstehe ich jetzt auch nicht wirklich.
Der erste Teil mit "SanDisk bla mit xyz Geometrie gefunden" kommt immer. BIOS.
 
Zuletzt bearbeitet:
da hast du eigentlich gemacht, was gehen sollte.
Ich schenke mir mal die Frage, ob du einen Bootmanager nutzt und vergessen hast, den einzustellen oder, ob du einen MBR genommen hast, der direkt das System booten soll, denn eines von diesen brauchst du natürlich.
Ich habe mir damals einen Stick gamcht.
Also, ähnlich wie du nun, eine "Systeminstallation" auf einen Stick. Allerdings brauchte ich dazu nur das Filesystem und den MBR. Danach mountete ich ein bootonly.iso lokal und kopierte mir den Inhalt auf den Stick.
So hatte ich einen bootbaren Stick, der im Alix funktionierte und mit dem ich dann ein System auf die installierte CF-Karte legen konnte.
Es gelang mir so nicht, eine cd1 oder gar DVD zu installieren. Wenn Sysinstall nach dem Installationsmedium fragt, kann der Stick nicht ausgewählt werden und die Angabe CD führt ins nichts.
Über Netz oder ftp gelingt es aber und bei einem Alix wirst du vielleicht nicht so viele Pakete brauchen.

Nebenher: Mein Alix lief etwa sechs oder sieben Monate ohne Unterbrechung von CF-Karte und geht immer noch. Es ist allerdings nicht ratsam, ein System von CF-Karte zu betreiben. Modelle, die Ramdisk nutzen, sind hier sicher besser. Oder eine Installation auf Stick. Mein Alix hat eingebaute USB-Anschlüsse, an die ich einen Stick anlöten könnte. Beim Alix eines Cousins fehlen diese aber.

Nachfolgend was, das ich damals gefunden und auch probiert hatte, aber das mir nicht gelingen wollte. Ich halte es aber für einen eleganten Ansatz.
---------->
Building bootable FreeBSD/i386 images
From time to time I hear people complain at how hard it is to build an image from the FreeBSD sources. This week, I'll explain how I built a bootable i386 image on a USB flash device and also make some observations about the results.

Recently, I needed to create a bootable i386 image. The easiest way was to build one on my amd64. Here's what I did. I setup my environment for the build (steps 1-3), built FreeBSD/i386 userland and kernel (steps 4 and 5), prepared the flash (steps 6-11), installed userland and the kernel (steps 12 and 13), added the extra files needed for boot (steps 14-18). The detailed commands follow:

setenv MAKEOBJDIRPREFIX /blah
setenv TARGET i386
setenv TARGET_ARCH i386
make buildworld
make buildkernel KERNCONF=GENERIC
fdisk -I da0
fdisk -B da0
bsdlabel -w da0s1 auto
bsdlabel -B da0s1
newfs /dev/da0s1a
mount /dev/da0s1a /mnt
make installworld DESTDIR=/mnt
make installkernel DESTDIR=/mnt KERNCONF=GENERIC INSTALL_NODEBUG=t
make distrib-dirs DESTDIR=/mnt
make distribution DESTDIR=/mnt
echo /dev/da0s1a / ufs rw 1 1 > /mnt/etc/fstab
echo ifconfig_DEFAULT=DHCP > /mnt/etc/rc.conf
echo hostname=demo >> /mnt/etc/rc.conf

I put all this on an SD card and inserted that into an usb adapater and booted the laptop with it. FreeBSD's base system isn't too big these days, only 205MB for a full system.

% df /mnt
Filesystem 1024-blocks Used Avail Capacity Mounted on
/dev/da0s1a 484822 205570 240468 46% /mnt

This can easily be trimmed, but with a 512MB SD card for $5 at Office Max, there's little point in trimming for the project I needed the flash for. I just needed something that I could boot to transition my FreeBSD/amd64 laptop to a FreeBSD/i386 laptop.

If one needed to reduce the amount of space used by an installation, then there's a number of options than can be used to reduce the footprint of the system. In my experience, it is best to build everything without these options, then use the WITHOUT_* options on the installworld step to keep the image size down. It is easy to cut FreeBSD's footprint in half with these options. In addition, the kernel is 28MB with all its modules, and this can easily be reduced below 5MB in most cases.

nanobsd can be used to automate this process, as can TinyBSD. I'll save for another column the techniques I have used in the past to reach 16MB.
Posted by Warner Losh
at 11:46 PM

9 comments:
Destari said...

Also, in many cases, removable devices can boot with a different device name than it did originally. For instance, it may come up as da0, or da1, or daX, sometimes even adX (think: virtual machines).
In these cases, I label my UFS file system while doing the newfs command with the -L option:

newfs -L "usbroot" /dev/...

or something similar. Then, instead of using /dev/daXXX in the /etc/fstab, I use:

/dev/ufs/usbroot ...

and I also make sure I add GEOM_LABEL into my kernel config (or load as a module). It's relatively small, and very useful.

Eric
7:35 PM
Anonymous said...

There is a typo in the echo for fstab. The partition a is missing.
3:51 AM
Anonymous said...

Funny thing is: you could skip the fdisk part and put a label on adX directly, which gives you adXa, adXb, adXc. I've been using that for some time now and works like a charm.
<------------
 
Zurück
Oben