kernel replacement in installation media

Samuel Martín Moro faust64 at gmail.com
Sat Sep 11 00:58:30 UTC 2010


Hi,


I bought a QNAP ts-509.
I'ld like to set up a gate, with a RAID ; I'm still waiting for the disks,
5*2T - Samsung, ecogreen, 5400rpm - to be delivered.
I've seen managing a RAID may be quite difficult. That's my first one. I
don't want to loose everything 'cause of a mistake.

I've read zfs, and RAID-Z, may be helpfull, since there's no risk to loose
data on read, and since zfs handle variable blob (is that the correct word?)
size
The thing is, it only have a 128M flash disk (seen as /dev/da0)
GENERIC needs almost 250M.
I though about using mfsBSD. But I'm not sure my drivers would be there
(since at least the RAID one is quite new in FB-8).
I tried to build nanoBSD in a 128M disk, without configuring that much
(hoping it would be nano out-of-the-box), and it failed saying "no more
space on device"
Moreover, every small BSD with zfs I found was a custom FreeBSD. So I
decided to make mine.

First, from a USB stick, I installed FreeBSD on an other USB stick.
Then, I looked at what I would have to get in the kernel (mainly: da, usb,
ehci, kbd, vga, bge, ...)
So I build a custom kernel, deleting some lines from the GENERIC
configuration file.
As my USB stick doesn't seem to handle write access that well, I had to
compile the kernel on a VM, and the to send/extract the tarball on the NAS.
But once installed, I still have a lot of .ko in boot/kernel. I'm not sure I
actually removed something, except symbols.

Whatever, it worked I haven't that much time. Once I'll get some, I'll also
try to reduce the /usr size.


Then, I replaced the kernel from the installation stick with mine, updated
the .mtree and checksums files, ...
But, I didn't understood, what's the generic.inf file? How can I update it?
In doubt, I deleted it. And maybe I shouldn't have. (or is it because my
kernel is not called "GENERIC" any more, but "QNAP"?!)
The thing is, the install failed, I finished it with the Fixit shell, untar
my kernel, ... it's now "working"



So, first question, how can I be sure I removed modules from my kernel? is
there something to add to the config file? how can I have so much if_*.ko,
while I deleted almost all device lines?
Second one, how to generate .inf files for distribs? (I may have to do it at
least for base too)
And even if it's a dirty way to do it, is it ok to update a .img file (or
the created stick)? or should I rebuild everything? (on my VM...)




Regards,


Samuel Martín Moro
{EPITECH.} tek4
CamTrace S.A.S


More information about the freebsd-questions mailing list