Git Product home page Git Product logo

mfsbsd's Introduction

mfsBSD

Copyright (c) 2019 Martin Matuska

Version 2.4

Description

This is a set of scripts that generates a bootable image, ISO file or boot files only, that create a working minimal installation of FreeBSD. This minimal installation gets completely loaded into memory.

The image may be written directly using dd(1) onto any bootable block device, e.g. a hard disk or a USB stick e.g. /dev/da0, or a bootable slice only, e.g. /dev/ada0s1

Build-time requirements

  • FreeBSD 11 or higher installed, tested on i386 or amd64
  • base.txz and kernel.txz from a FreeBSD 11 or higher distribution

Runtime requirements

  • a minimum of 512MB system memory

Other information

See BUILD and INSTALL for building and installation instructions.

Project homepage: http://mfsbsd.vx.sk

This project is based on the ideas of the depenguinator project: http://www.daemonology.net/depenguinator/

mfsbsd's People

Contributors

andatche avatar daelf avatar dch avatar endyman avatar gronke avatar jaseface avatar keltia avatar laszlo-kiss avatar ltning avatar mgeb avatar mmatuska avatar mmoll avatar ndwns avatar royger avatar rubenk avatar tdb avatar tomhukins avatar vrwmiller avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mfsbsd's Issues

bsdinstall fails with CAM status : Command timeout during installation

Hello,

I'm trying to install FreeBSD 10 amd64 using mfsbsd booted using PXE/tftpboot on our servers and bsdinstall installer fails with "CAM status : Command timeout" error, computer becomes irresponsible. Check out this screenshot of KVM display - http://funkyimg.com/i/Ju3h.png

I've checked the disk and it seems fine, I also tried to enable IDE compatibility in BIOS but it made no effect. We experienced the same problem with servers of different configurations.

Please, let me know how this can be fixed.

Best regards

problem with roothack on head (10-current)

cc -O2 -pipe -O2 -fno-strict-aliasing -pipe -march=amdfam10 -std=gnu99 -Qunused-arguments -fstack-protector -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wmissing-variable-declarations -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -c /usr/home/avg/work/hc-git/mfsbsd/tools/roothack/roothack.c
/usr/home/avg/work/hc-git/mfsbsd/tools/roothack/roothack.c:107:2: error: 'archive_read_support_compression_all' is deprecated [-Werror,-Wdeprecated-declarations]
        archive_read_support_compression_all(a);
        ^
/usr/include/archive.h:311:15: note: 'archive_read_support_compression_all' declared here
__LA_DECL int archive_read_support_compression_all(struct archive *)
              ^
/usr/home/avg/work/hc-git/mfsbsd/tools/roothack/roothack.c:111:11: error: 'archive_read_open_file' is deprecated [-Werror,-Wdeprecated-declarations]
        if ((r = archive_read_open_file(a, filename, 10240)))
                 ^
/usr/include/archive.h:440:15: note: 'archive_read_open_file' declared here
__LA_DECL int archive_read_open_file(struct archive *,
              ^
2 errors generated.
*** Error code 1

The obvious fix / workaround is to add

CFLAGS+=-Wno-deprecated-declarations

to the respective Makefile.

But I think that in general it would be better to drop roothack program and to use a shell script instead. This can be achieved using init's built-in facility that can be configured via loader.conf. For example:

init_path="/rescue/init"
init_shell="/rescue/sh"
init_script="/rw.rc"
init_chroot="/rw"

unable to pxe boot with GPT partitions in image

I'm unable to pxe boot an image created with GPT partitions. I've tried multiple memdisk options, partition sizes and even the publicly available usb image. This problem does not happen when images are created with BSD style partitions. Is there something easy I'm missing? A cursory search of google hasn't really been helpful.

Generating SSH host keys fails on 11.0-STABLE/12.0-CURRENT

dsa and rsa1 have been disabled by [email protected], which causes issues if/when mfsbsd is used on an ^/stable/11 or recent ^/head machine. Example:

Generating SSH host keys ...ssh-keygen -t rsa1 -b 1024 -f /home/tftp/isi-mfsbsd-ngie/tmp/mfs/etc/ssh/ssh_host_key -N '' > /dev/null
Saving key "/home/tftp/isi-mfsbsd-ngie/tmp/mfs/etc/ssh/ssh_host_key" failed: unknown or unsupported key type
*** Error code 1

Stop.
make: stopped in /home/tftp/isi-mfsbsd-ngie
        6.20 real         2.99 user         3.12 sys

incorrect naming of produced artifacts

I made a .iso file using stable/9 source tree on machine that runs head, the resulting iso was named mfsbsd-se-10.0-CURRENT-amd64.iso.
This is obviously incorrect.

Create without roothack fails

Create without roothack fails with:-

Creating FreeBSD distribution image ...cp: /data/bootcdrom/pkg/mpukcore/files/usr/local/installs/dev/mfsbsd-2.0/tmp/mfs/boot/kernel and /data/bootcdrom/pkg/mpukcore/files/usr/local/installs/dev/mfsbsd-2.0/tmp/mfs/boot/kernel are identical (not copied).
*** Error code 1

The following patch fixes it:-
diff -u Makefile.orig Makefile
--- Makefile.orig 2012-07-26 16:19:59.000000000 +0000
+++ Makefile 2012-07-26 16:54:50.000000000 +0000
@@ -237,7 +237,7 @@
.if defined(SE)
@echo -n "Creating FreeBSD distribution image ..."
@${MKDIR} ${WRKDIR}/dist

  •   @${CP} -rp ${_BOOTDIR}/kernel ${_DESTDIR}/boot
    
  •   @if [ "${_BOOTDIR}" != "${_DESTDIR}/boot" ]; then ${CP} -rp ${_BOOTDIR}/kernel ${_DESTDIR}/boot; fi
    @cd ${_DESTDIR} && ${FIND} . -depth 1 \
            -exec ${TAR} -r ${EXCLUDE} -f ${WRKDIR}/dist/${RELEASE}-${TARGET}.tar {} \; 
    @echo " done"
    
    @@ -245,7 +245,7 @@
    @echo "Compressing FreeBSD distribution image ..."
    @${COMPRESS_CMD} -v ${WRKDIR}/dist/${RELEASE}-${TARGET}.tar
    . endif
  •   @${RM} -rf ${_DESTDIR}/boot/kernel
    
  •   @if [ "${_BOOTDIR}" != "${_DESTDIR}/boot" ]; then ${RM} -rf ${_DESTDIR}/boot/kernel; fi
    
    .endif
    @${CHFLAGS} -R noschg ${_DESTDIR} > /dev/null 2> /dev/null || exit 0
    .if !defined(WITHOUT_RESCUE)

img size is always 46mb on FreeBSD 10

I followed the guide here
https://www.freebsd.org/doc/en/articles/remote-install/article.html

I am not able to create an image that is less than 45mb

-rw-r--r--  1 root  wheel  46137344 Feb  4 10:41 mfsbsd-10.1-RELEASE-amd64.img

The guide seems not correct either. I had to do a few other steps to get things to work. I am not trying to add my own packages or anything.

Also, from the guide,

make BASE=DIST

gives the error that DIST/base was not found. So i just ran make without BASE argument.

Cannot setup ZFS with 4k sectors

When using the zfsinstall script it seems to assume 512k sector size drives and the finished zfs pool gives an ashift of 9. I am not sure if this can be fixed by using gnop or gpart with -a 4k.

Kickstart support

Add support for autoloading shell scripts which will do the installation.

FreeBSD 10.3 failing to load kernel components at boot: geom_uzip and tmpfs.

Hello,

I've tried to create an image for the 10.3-RELEASE (amd64) and some annoyances appears on the boot process. Specifically after the loading of /boot/kernel/kernel, those two errors show up at the start of kernel loading:

can't find 'geom_uzip'
can't find 'tmpfs'

This is should be really an annoyance since everything appears to work fine.

boot fails - FreeBSD 10.3

Hi,

After compilation trying to boot with FreeBSD 10.3 from PXE menu, it gets stuck at following error

image

mfsbsd doesn't understand INSTKERNNAME

The code in Makefile assumes that the kernel path is always kernel, but in cases where one provides a custom src.conf , the kernel could be installed to /boot/kernel.amd64, for instance.

pkg-static not found at: tools/pkg-static

Dear Martin,
I am trying to create mfsBSD from a 10.2-RELEASE distribution. There is the problem of pkg-static missing:

$ make iso
Extracting base and kernel ... done
Removing selected files from distribution ... done
Installing configuration scripts and files ... done
Generating SSH host keys ... done
Configuring boot environment ... done
Installing pkgng ...pkg-static not found at: tools/pkg-static
*** [/home/sudakov/src/mfsbsd/tmp/.packages_done] Error code 1

Stop in /home/sudakov/src/mfsbsd.
$
Am I supposed to put it manually to the tools/ subdir?

add net/mosh to base build

this would really be awesome; not sure if its possible to do this; I'm often working behind low-quality links.

UEFI-compatible img build

I'm helping a friend doing recovery on his hard-disk on his brand new UEFI-only system, and he reports that mfsBSD image doesn't boot, while FreeBSD’s UEFI-memstick does work nicely.
I will try and see if I can manage to build it, but it would be nice to have it on the official website too.

bsdinstall under tmux is broken

I encountered a problem when launching bsdinstall under tmux session on mfsbsd-10.3-RELEASE-amd64.iso and mfsbsd-mini-10.3-RELEASE.iso.

The bsdinstall is displayed as black screen with only select and cancel button. In this state, bsdinstall is almost unusable inside tmux.

I hope this can be fixed.

FreeBSD 11 - custom build failure?

Any thoughts on this one? It's trying to build on a clean, stock, install of 11. TIA.

$ uname -a FreeBSD freebsd11 11.0-RELEASE-p1 FreeBSD 11.0-RELEASE-p1 #0 r306420: Thu Sep 29 01:43:23 UTC 2016 [email protected]:/usr/obj/usr/src/sys/GENERIC amd64

sudo make CUSTOM=1 BUILDWORLD=1 BUILDKERNEL=1

/usr/obj/usr/src/tmp/usr/bin/ld: /usr/obj/usr/src/tmp/usr/bin/../lib/clang/3.8.0/lib/freebsd/libclang_rt.ubsan _standalone-x86_64.a: No such file: No such file or directory cc: error: linker command failed with exit code 1 (use -v to see invocation) *** Error code 1

[PATCH] for /var in tmpfs

Dear maintainer,

Could you, please, add /var directory to tmpfs in /etc/fstab? After this modification it's possible for example to install packages after booting mfsBSD.

--- Makefile.bak    2015-02-09 16:23:25.811630051 +0100
+++ Makefile    2015-02-09 16:24:09.747632177 +0100
@@ -384,6 +384,7 @@
 #  ${_v}${SED} -I -E 's/\(ttyv[2-7].*\)on /\1off/g' ${_DESTDIR}/etc/ttys
 .if !defined(ROOTHACK)
    ${_v}echo "/dev/md0 / ufs rw 0 0" > ${_DESTDIR}/etc/fstab
+   ${_v}echo "tmpfs /var tmpfs rw,mode=1755 0 0" >> ${_DESTDIR}/etc/fstab
    ${_v}echo "tmpfs /tmp tmpfs rw,mode=1777 0 0" >> ${_DESTDIR}/etc/fstab
 .else
    ${_v}${TOUCH} ${_DESTDIR}/etc/fstab

Regards,
Kamil Czekirda

is it possible to boot mfsBSD from a EFI partition?

My most common use of mfsBSD at the moment seems to be regaining access to a UEFI-only system drive. Having to drop in a CD each time for this is annoying. Is there any way to get mfsBSD to boot from the /EFI (FAT) partition?

[PATCH] pkg always prompts

This code...

.if defined(PKGNG)
        @if [ -d "${_DESTDIR}/packages" ]; then \
                cd ${_DESTDIR}/packages && for FILE in *; do \
                        ${PKG} -c ${_DESTDIR} add /packages/$${FILE}; \
                done; \
        fi
.else

Should be changed to call ${PKG} -y -c ... to avoid unnecessary prompting from pkgng.

Submitted by: Russell Cattelan [email protected]
Sponsored by: EMC / Isilon Storage Division

Some *.ko are missing in SE iso.

Hello.

Congratulation, msfBSD is working like charm.
It is used for the polYdev disto.(https://forums.freebsd.org/threads/53085/)

Is it possible to add in your SE iso some missing libraries for loading the mmc.ko and mmcsd.ko (for access memory sticks)?

adhi.ko, ti_mmshs.ko and other are missing.

Other thing... do you know what compilers are needed to re-compile FreeBSD or src from package?

I removed some C compilers from prune list but it did no do the trick.

May thanks.

Fre;D

[PATCH] Items in ${PRUNELIST} don't need to be extracted

Patch provided below...

diff --git a/Makefile b/Makefile
index 5defd15..dacbae7 100644
--- a/Makefile
+++ b/Makefile
@@ -167,8 +167,11 @@ INSTALLENV?= ${BUILDENV} \
 .if defined(FULLDIST)
 NO_PRUNE=1
 NO_RESCUE_LINKS=1
+DO_PRUNE=
 .endif

+DO_PRUNE?=-X ${PRUNELIST}
+
 all: image

 destdir: ${_DESTDIR} ${_BOOTDIR}
@@ -192,7 +195,7 @@ ${WRKDIR}/.extract_done:
                exit 1; \
        fi
        @echo "Extracting base and kernel ..."
-       ${TAR} --unlink -xpf ${BASEFILE} -C ${_DESTDIR}
+       ${TAR} --unlink -xp -f ${BASEFILE} ${DO_PRUNE} -C ${_DESTDIR}
        if [ -f ${KERNELFILE} ]; then \
                ${TAR} --unlink -xpf ${KERNELFILE} -C ${_ROOTDIR}; \
        fi

Submitted by: Russell Cattelan [email protected]
Sponsored by: EMC / Isilon Storage Division

unable to create more than 6 partitions

Hi,

I am trying to create more than 6 partitions but it fails with " no space on device "9" ". While doing investigation on "do_gpt.sh" , I found that do_gpt creates "gpt"

---do_gpt.sh output---
gpart create -s gpt ${unit}
gpart add -t freebsd-boot -b 40 -l boot -s 512K ${unit}
gpart bootcode -b ${BOOTDIR}/pmbr -p ${BOOTDIR}/gptboot -i 1 ${unit}
gpart add -t freebsd-ufs -l rootfs ${unit}

but when I see on the Server it creates "MBR" , I believe there is some bug which does not allow to create gpt using mfsbsd.

I tried manually it works fine

Add Package to SE for install

Im trying to figure out how to add a package to the generated SE iso so that when i boot
the package is actually installed on the host with the os with zfsinstall.... any clues?

I can build an SE iso with packages, yet they appear in the live booted system, not in the installed system.

add a package?

Hello,

first of all, congratulations and a lot of thanks for your great work.

I am trying to build a version of mfsbsd with bash installed. I am not very sure I understand correctly what you refer to by "If you want any packages installed, copy the .tbz files that should be
automatically installed into the packages/ directory"

I have tried putting my bash (+dependencies) tbzs in the 9.0-RELEASE folder pointed at by BASE (make BASE=(...)/9.0-RELEASE. I get a working version of mfsbsd but without bash support.

I then gunzipped mfsroot.gz, mounted and modified mfsroot, gzipped and burned a new image. No luck either

I mounted an nfs share with the packages then copied the logic of scripts/packages and succesfully installed the packages in a plain vanilla mfsbsd session using /usr/sbin/pkg_add, but it would be nice to know where I can put the packages to find them once I have booted.

Thanks for everything,

matias

Cound not build 9.2 RELEASE images

Hello all,

I tried to use mfsbsd building FreeBSD 9.2 image.
After booting and select normal boot, it shows
"kernel trap 12 with interrupts disabled", then reboot.

How to solve this issue?

Thanks a lot.

pkg-static No such file or directory

Hi there!

I've got an issue while installing mfsBSD.
When trying to sudo make iso -DPKGNG BASE=/mnt/cd/usr/freebsd-dist/
There were an error:

Installing pkgng ...pkg-static not found at: tools/pkg-static
make: exec(exit) failed (No such file or directory)
*** Error code 1

Stop.

That's all because there were no pkg-static in tools folder.
I even tried to put pkg-1.2.6.txz to packages - still noting, because condition of existing pkg-static comes first ;)
Also tried both version, from git, and from http://mfsbsd.vx.sk/
Btw, project seems pretty good.
My great appreciate to you for making suck a good thing!
Would be very helpful for me, to made samba.liveUSB

Thanks!

Memorycard image for an old i386 pc

I have an old laptop with x32 intel CPU and old BIOS. BIOS can't recognize GPT so I use pc with i386 FreeBSD 9.1 build on ZFS (MBR with BSD slice) for a log time. A few days ago I tried to update my OS for latest 10.3 and had done that. But also I tried to upgrade zfs pool and zfsboot. I successfully update BSD slice bootsector but cannot update s1a part of zfsboot besides of kern.geom.debugflags=0x10.

I found i386 images only for 10.0 and now newer. I boot into it and update zfsboot succesfully after scping zfsboot from 10.3 /boot. Later I start to update system packages and after some time my OS stop boot with kernel panic just after triing to mount root.

I can't import zfs pool whith 10.0 mfsbsd and I try to build newer image with mfsbsd 2.2.

First I found that it's built with gpt by default after I try to build with -DBSDPART it can't boot with error on load tmpfs and geom_uzip, I add modules to BOOTMODULES and get kernel panic just after loading kernel and modules. And I have no idea now what I can do except disassembling laptop to get HDD.

Unfortunately official images with 10.3 are also gpt only and I can't boot them too.

Is there any way to build newer i386 images? I even can't see an error during boot after kernel start.

write failed, filesystem is full, but when retried, it succeeded

Tried on both FreeBSD and PcBSD, and meet the same issue.

===> zlib (install)
install -o root -g wheel -m 555 zlib.ko /root/mfsbsd-2.1/tmp/mfs/boot/kernel
install -o root -g wheel -m 555 zlib.ko.symbols /root/mfsbsd-2.1/tmp/mfs/boot/kernel
kldxref /root/mfsbsd-2.1/tmp/mfs/boot/kernel
Creating base.txz and kernel.txz ... done
Removing selected files from distribution ... done
Installing configuration scripts and files ... done
Generating SSH host keys ... done
Configuring boot environment ... done
Compressing usr .../bin/rm -rf /root/mfsbsd-2.1/tmp/mfs/usr && /bin/mkdir -p /root/mfsbsd-2.1/tmp/mfs/usr
done
Creating and compressing mfsroot ... done
Copying FreeBSD installation image ... done
Creating image file ...
/root/mfsbsd-2.1/tmp/mnt: write failed, filesystem is full
*** Error code 1

Stop.
make: stopped in /root/mfsbsd-2.1
[root@pcbsd-2066] ~/mfsbsd-2.1# make BASE=/root/10.1-RELEASE/10.1.0 SRC_DIR=/root/10.1-RELEASE/10.1.0 CUSTOM=1 -DSE
Creating image file ... done
-rw-r--r-- 1 root wheel 180355072 Jan 20 10:10 mfsbsd-se-10.1-RELEASE-p8-amd64.img
[root@pcbsd-2066] ~/mfsbsd-2.1#

Force while using pkgng

There exists a problem while adding packages using pkgng. If the package exists in the host system, pkgng will stop with an error, saying this package can not be added twice. So you have to add the force flag to "pkg add".

- ${PKG} -c ${_DESTDIR} add /packages/$${FILE}; \
+ ${PKG} -c ${_DESTDIR} add -f /packages/$${FILE}; \

FreeBSD 9.3 does not boot up

Altough ISO and IMG files are created just fine (mfsBSD 2.1), then resulting files
are only partialy bootable. They stop after line "gcc version" and never
resume. 9.2 ISOs/IMGs available from your site boot properly.

Tested on VirtualBox only.

mfsbsd

Update mfsBSD for FreeBSD 10 pkgng

mfsBSD works great on FreeBSD 10 except when trying to add custom packages to an image. The pkg_add command is depreciated and replaced with pkg add (no underscore).

install on existing

Hello
Allow me describe situation
I have server with broken bsd on it (some files was accidentally deleted, no snapshot's or copys). However, situation is hard, because disk is spited on 4 part's 1)boot 2) system(8gb) 3) swap(4gb) and 4) data (100+GB). All are ZFS
My question is - how to use zfsinstall on existing partitions, without loosing data and making big changes?

make fbsddist fails on the new version

11c6862 doesn't seem to work properly, make fbsddist BASE=/media/cd/usr/freebsd-dist/ fails with:

Configuring boot environment ...cp: /tmp/mfsbsd/tmp/mfs/rw/boot.config: No such file or directory
*** Error code 1

Stop.
make: stopped in /tmp/mfsbsd

According to find /tmp/mfsbsd -name boot.config, /tmp/mfsbsd/tmp/mfs/boot.config exists, so it's looking at the wrong path.

$MAKEJOBS not used to buildkernel

Hello,

I'm playing around with mfsbsd and was wondering why the build process is so damn slow. It turns out that $MAKEJOBS is passed to buildworld , but not to buildkernel .

4551 root 20 0 9208 4944 R 0.0 0.2 0:00.67 htop
2016 root 52 0 31660 28316 S 0.0 1.4 0:01.68 make -m /usr/src/share/mk KERNEL=kernel all -DNO_MODULES_OBJ
94620 root 52 0 5036 1368 S 0.0 0.1 0:00.02 make -m /usr/src/share/mk -f Makefile.inc1 TARGET=amd64 TARGET_ARCH=amd64 buildkernel
94597 root 52 0 5036 1000 S 0.0 0.0 0:00.01 make buildkernel KERNCONF=VNET TARGET=amd64

Can you add this to buildkernel as well ?

support latest ZFS features - 4k, lz4, atime

I've worked through the manual steps & this is all possible. I might get to a PR for it but it's week 2 with freebsd so I'm a little hesitant if this will work for raidz as well, I've not enough to test properly.

Changes needed:

compression

  • add an option to switch from lzjb to lz4 compression.

labels

  • add label and alignment to swap in #L213 -l freebsd-swap -a 4k
  • add labels and alignment to each future vdev in the mirror/raidz2 set in #L225 with e.g. -l ${POOL}-${DEV}

alignment

4k partitions seem to be tricky as drives don't report correctly despite getting the alignment right above, and a simple zpool create -o ashift=12 doesn't work.

The workaround is to gnop create -s 4096 /dev/gpt/${POOL}-${DEV} for each vdev, and then create the vdevs from those aligned vdevs with a .nop suffix. The the pool should be exported, the .nop deleted, and the pool re-imported now with its correct ashift present.

gnop create -S 4096 /dev/gpt/tank0
gnop create -S 4096 /dev/gpt/tank1
zpool create pool tank /dev/gpt/tank0.nop /dev/gpt/tank0.nop

zpool export tank
gnop destroy /dev/gpt/tank0.nop
gnop destroy /dev/gpt/tank1.nop
# zpool upgrade -a tank should not be required
zpool import tank

atime

as simple as zfs set atime=off ${POOL} once.

If the logic above looks right, I will have a crack at it next week.

mfsroot over 45MB does not work

mfsroot that's over 45MB still makes the kernel to panic.

To be able to make a 9.0-RELEASE mfsboot.img that does not kernel panic, you can add this line to the tools/prunelist file :

usr/bin/clang-*


/usr/bin/clang-cpp is about 31MB in the 9.0-RELEASE system, and we don't need this for a temporary boot in memory.
the .usr.tar.xz was 19MB with this exe
it's 11MB without, which is enough to make the mfsroot image to be less than 45MB (it was 46MB with the clang-cpp exe in the .usr.tar.xz)

How to build 10.0-CURRENT amd64

Hi,

How i can build

# FreeBSD 10.0-CURRENT
# svn checkout svn://svn.freebsd.org/base/head/ /usr/src
# cd /usr/src
# make -s -j6 build{world,kernel}
# cd ~
# fetch https://github.com/mmatuska/mfsbsd/archive/master.zip
# tar xfz master.zip
# cd mfsbsd-master
# make iso COMPRESS=xz CUSTOM=1 SE=1 ARCH=amd64 RELEASE=10.0-CURRENT MAKEJOBS=6

?

need SSD-Trim support on ZFS (only beta 10.0-CURRENT support)

installed package's rc scripts don't get run

Hi Martin,

If one of the optional packages put in the packages directory installs a startup script into /usr/local/etc/rc.d then it doesn't get run at mfsbsd boot time because rcorder runs before the rc.d/package script gets to mount /usr/local and install the packages.

A semi-decent workaround is to have another file in scripts called something like localpackages that runs near the end of the rc.d scripts and runs the stuff in /usr/local/etc/rc.d. It may not be quite right in the handling if it should honor the .sh thing for not running in a subshell. Maybe there's a shell function for that, I'm not super expert on FreeBSD initialization.

!/bin/sh

$Id$

PROVIDE: localpackages

REQUIRE: LOGIN

KEYWORD: FreeBSD

. /etc/rc.subr

name="localpackages"
start_cmd="localpackages_start"
stop_cmd=":"

localpackages_start()
{
for file in /usr/local/etc/rc.d/*
do
echo $file start
sh $file start
done
}

load_rc_config $name
run_rc_command "$1"
adsb (master) scripts $

.gitignore missing locations

mfsbsd 2.3 while running 'make tar' generates .tar for me. Not sure were it intended to generate .tar.gz or not but .tar is good for me). The problem is that .gitignore do not include .tar so I added it by myself.

Also it doesn't ignore created .conf files in conf/ dir and customfiles/

My edits amatsumara@7aa7a3a

Kernel 9.1, 9.2 is not loading

Hi!
I tryed to load a kernels of FreeBSD from 8.1 to 9.1 versions in memory throught Grub2pxe. The kernel which is less or equal 9.0 is loading well, but the kernel 9.1 gives me different errors (for example: `error: address 0x94438 is out of range'). The kernel 9.2 gives me only reboot with boot throught Grub (before licence question about copyrate).

Persistence across reboots?

Hi folks.

Firstly, thank you for the efforts you have put forth for this awesome tool.

Right now, I'm using Debian Live (squeeze) on 4 (home) servers--2 are NAS boxes (with NFS shares), 2 host containers (jails). All boot from either a disk-on-module or internal USB slot (single image build with host-specific configs in a snapshot on the boot medium). Debian Live (from squeeze) uses a /live/cow overlay (to /), loading it from a snapshot (live-snapshot.cpio.gz on DOM or USB) on boot and saving it on shutdown/reboot/cron to carry over changes. Is there a similar mechanism for use with mfsBSD?

I'm looking to move away from Debian (you guessed it, I'm a systemd refugee). I've got the services I need figured out (jails and nfs), but would like to be able to have something similar to persistence so that I can again build a single image and use a snapshot/partition or something similar for individual host configs and changes.

Thank you in advance for any help you can provide.

Cheers!
Randall

[PATCH] tools/do_gpt.sh calls makefs in an inefficient manner

According to one of our internal developers, calling makefs as-is in tools/do_gpt.sh is very slow. I've provided the patch below.

I would go one step further and say that the filesystem disk should be created in a sparse manner, not as a densely populated disk image.

Also, the block size is small (1kB). It could and should be larger (1MB at least).

A lot of this should be fixed/improved with the mkimg utility in 11+, but that's a different utility for a different day...

commit e10947989b275767e1e2e5a4e0bd89b8b342f788
Author: Russell Cattelan 
Date:   Wed May 21 14:51:19 2014 -0500

    Speed up the disk.img creation.

    Pointing makefs directly at the md mapped disk
    image is really slow. So use a temp file to create
    the file system image and then dd that directly
    to the md<>p2 partition
--- a/tools/do_gpt.sh
+++ b/tools/do_gpt.sh
@@ -1,9 +1,6 @@
 #!/bin/sh
 #
-# $FreeBSD: src/release/scripts/doFS.sh,v 1.60 2004/08/25 01:39:52 kensmith Exp $
-#
-
-set -ex
+set -e

 FSIMG=$1
 FSPROTO=$2
@@ -41,7 +38,7 @@ fi
 echo "FSIMG ${FSIMG} FSPROTO ${FSPROTO} FSSIZE ${FSSIZE}"

 dd of=${FSIMG} if=/dev/zero count=${FSSIZE} bs=1k
-mdconfig -t vnode -f ${FSIMG}
+dd of=${FSIMG}.$$ if=/dev/zero count=${FSSIZE} bs=1k

 export unit=`mdconfig -a -t vnode -f ${FSIMG}`
 if [ $? -ne 0 ]; then
@@ -49,12 +46,16 @@ if [ $? -ne 0 ]; then
   exit 1
 fi

+set -x
 gpart create -s gpt ${unit}
 gpart add -t freebsd-boot -b 34 -l boot -s 512K ${unit}
 gpart bootcode -b ${FSPROTO}/boot/pmbr -p ${FSPROTO}/boot/gptboot -i 1 ${unit}
 gpart add -t freebsd-ufs -l rootfs ${unit}

-makefs -B little /dev/${unit}p2 ${FSPROTO}
+time makefs -B little ${FSIMG}.$$ ${FSPROTO}
+time dd if=${FSIMG}.$$ of=/dev/${unit}p2 bs=16384
+set +x
+rm ${FSIMG}.$$
 if [ $? -ne 0 ]; then
   echo "makefs failed"
   exit_with 1

Makefile unable to compile custom kernel - FreeBSD 10.1-STABLE

I ran into issues today using the 10-RELEASE ISO and the 2.1 build scripts. I found the error was in the Makefile was missing a few options. I also modified the MSFMODULES to contain geom_eli. I was running into issues with encrypting the filesystem from the installer.

< KERNCONF=GENERIC

KERNCONF?= GENERIC
79c77

< MFSMODULES=geom_mirror geom_nop geom_eli opensolaris zfs ext2fs snp smbus ipmi ntfs nullfs tmpfs

MFSMODULES=geom_mirror geom_nop opensolaris zfs ext2fs snp smbus ipmi ntfs nullfs tmpfs
223c221

< ${INSTALLENV} make installkernel KERNCONF=${KERNCONF} DESTDIR="${_ROOTDIR}" TARGET=${TARGET}

${INSTALLENV} make installkernel DESTDIR="${_ROOTDIR}" TARGET=${TARGET}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.