使用mfsbsd制作FreeBSD内存盘系统

使用mfsbsd制作FreeBSD内存盘系统

项目github地址:https://github.com/mmatuska/mfsbsd

项目主页:http://mfsbsd.vx.sk/

root password for all images: mfsroot
All images have mfsbsd.autodhcp set - all network cards are configured for DHCP.

mfsBSD

Copyright (c) 2007-2016 Martin Matuska

Version 2.3

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 10 or higher installed, tested on i386 or amd64
  • Base and kernel from a FreeBSD 10 or higher distribution (release or snapshots, e.g mounted CDROM disc1 or ISO file)

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 building instructions

Copyright (c) 2007-2016 Martin Matuska

Configuration

Read hints in the sample configuration files in the conf/ directory, copy these files to files without .sample ending and make modifications to suit your needs.

Additional packages and files

If you want any packages installed, copy the .tbz files that should be automatically installed into the packages/ directory.

Add any additional files into the customfiles/ directory. These will be copied recursively into the root of the boot image.

WARNING: Your image should not exceed MFSROOT_MAXSIZE in total. Please adjust the variable for larger images.

Distribution or custom world and kernel

You may choose to build from a FreeBSD distribution (e.g. CDROM), or by using make buildworld / buildkernel from your own world and kernel configuration.

To use a distribution (e.g. FreeBSD cdrom), you need access to it (e.g. a mounted FreeBSD ISO via mdconfig) and use BASE=/path/to/distribution

To use your own but already built world and kernel, use CUSTOM=1 If you want this script to do make buildworld and make buildkernel for you, use BUILDWORLD=1 and BUILDKERNEL=1

Creating images

You may create three types of output: disc image for use by dd(1), ISO image or a simple .tar.gz file

##Examples

  1. disc image
make PKG_STATIC=/usr/local/sbin/pkg-static BASE=/cdrom/usr/freebsd-dist
make PKG_STATIC=/usr/local/sbin/pkg-static BASE=/cdrom/10.2-RELEASE
make PKG_STATIC=/usr/local/sbin/pkg-static CUSTOM=1 BUILDWORLD=1 BUILDKERNEL=1
  1. bootable ISO file:
make iso PKG_STATIC=/usr/local/sbin/pkg-static BASE=/cdrom/usr/freebsd-dist
make iso PKG_STATIC=/usr/local/sbin/pkg-static BASE=/cdrom/10.2-RELEASE
make iso PKG_STATIC=/usr/local/sbin/pkg-static CUSTOM=1 BUILDWORLD=1 BUILDKERNEL=1
  1. .tar.gz file:
make tar PKG_STATIC=/usr/local/sbin/pkg-static BASE=/cdrom/usr/freebsd-dist
make tar PKG_STATIC=/usr/local/sbin/pkg-static BASE=/cdrom/10.2-RELEASE
make tar PKG_STATIC=/usr/local/sbin/pkg-static CUSTOM=1 BUILDWORLD=1 BUILDKERNEL=1
  1. roothack edition:
make iso PKG_STATIC=/usr/local/sbin/pkg-static CUSTOM=1 BUILDWORLD=1 BUILDKERNEL=1 ROOTHACK=1
  1. special edition (with FreeBSD distribution):
make iso PKG_STATIC=/usr/local/sbin/pkg-static BASE=/cdrom/11.0-RELEASE RELEASE=11.0-RELEASE ARCH=amd64
  1. GCE-compatible .tar.gz file:
make gce PKG_STATIC=/usr/local/sbin/pkg-static BASE=/cdrom/11.0-RELEASE
make gce PKG_STATIC=/usr/local/sbin/pkg-static CUSTOM=1 BUILDWORLD=1 BUILDKERNEL=1

mfsBSD installation (deployment) instructions

Copyright (c) 2007-2015 Martin Matuska

Build

For customized build please see the BUILD file

Deploy

Scenario 1

You have a linux server without console access and want to install FreeBSD on this server.

  1. modify your configuration files (do this properly, or no ssh access)
  2. create an image file (e.g. make PKG_STATIC=/usr/local/sbin/pkg-static BASE=/cdrom/11.0-RELEASE)
  3. write image with dd to the bootable harddrive of the linux server
  4. reboot
  5. ssh to your machine and enjoy :)

Scenario 2

You want a rescue CD-ROM with a minimal FreeBSD installation that doesn‘t need to remain in the tray after booting.

  1. modify your configuration files
  2. create an iso image file (e.g. make iso PKG_STATIC=/usr/local/sbin/pkg-static BASE=/cdrom/11.0-RELEASE)
  3. burn ISO image onto a writable CD
  4. boot from the CD and enjoy :)

Scenario 3

You want a rescue partition on your FreeBSD system so you can re-partition all harddrives remotely.

  1. modify your configuration files
  2. create an .tar.gz file (e.g. make tar PKG_STATIC=/usr/local/sbin/pkg-static BASE=/cdrom/11.0-RELEASE)
  3. create your UFS partition with sysinstall or gpart (e.g. ada0p2)
  4. create a filesystem on the partition (e.g. newfs /dev/ada0p2)
  5. mount the partition and extract your .tar.gz file on it
  6. configure a bootmanager (e.g. gpart bootcode -b /poot/pmbr -p /boot/gptboot -i 1 ada0)
  7. boot from your rescue system and enjoy :)

原文地址:https://www.cnblogs.com/lsgxeva/p/8641628.html

时间: 2024-10-04 01:50:42

使用mfsbsd制作FreeBSD内存盘系统的相关文章

Linux 手动制作U盘系统

这两天学习了Linux的系统方面的东西,学会了一些简单的排错和用现成的文件来制作一个U盘的Linux系统,下面就来演示一下详细的步骤. 1.在centos6.9上插入u盘 看下U盘的相关信息 (这边为了方便操作我就切换到xshell上进行操作) 2.利用fdisk命令对U盘进行分区格式化 [[email protected] ~]# fdisk /dev/sdb WARNING: DOS-compatible mode is deprecated. It's strongly recommend

UltraISO 制作U盘系统安装盘

UltraISO 1.打开->选择系统映像文件,插入U盘 2.启动->写入硬盘映像 3.格式化U盘,选择写入方式:USB-ZIP+ V2 4.写入 5.U盘系统安装工具制作完成 UltraISO 制作U盘系统安装盘

制作Linux启动盘并安装Linux系统到实体机

对于通过U盘安装系统想必大家都知道怎么做,通过老毛桃.大白菜什么的制作一个U盘启动盘,开机进入BIOS设置第一启动项为USB,不知道的童鞋看看这个http://blog.csdn.net/poetic_vienna/article/details/45181623,虽然是在虚拟机上安装的... 接下来说一下怎么制作Linux的U盘启动盘,确切来说应该是安装盘,因为它不像安装Windows那样进去以后有一个PE可用,而是直接进入安装界面.安装盘做好以后,无论你要安装到实体机,U盘或是移动硬盘其实都

mac制作mac启动盘 mac u盘安装系统

mac u盘重装系统具体怎么操作呢?mac制作mac启动盘难不难?为了方便Mac电脑重装,我们都备用着U盘,把macOS 系统装到U盘里,都需要什么工具呢,macdown 小编给大家带来了mac u盘启动盘制作方法,以及mac u盘安装系统详细教程. macOS制作U盘启动盘的操作步骤 1.下载macOS安装文件 方法一:在Mac电脑的app Store搜索 Mac ,第一次在下的时候会提示本机已经安装了macOS请在更新中更新系统,点击继续,继续下载 方法二:macdown 提供多个系统版本供

project02 U盘系统与排错系统

U盘系统与排错系统 制作U盘系统的两个主要目的: 1.以U盘为救援系统来修复有故障无法启动操作系统 修复步骤: 1)选尝试从单用户模式启动(内核和基本服务,可以参考/etc/rc.d/rc1.d/S..) 2)如果单用户模式也无法正常启动,可以考虑从光盘或者是U盘启一个linux操作系统,首选使用U盘 2.通过U盘系统的制作让你更了解一个主机上linux系统组成,以及启动流程 LINUX操作系统的组成: 内核 SHELL 应用程序 文件系统 内核 核心文件    vmlinuz 临时根文件  i

制作Windows+Ubuntu多系统安装盘

一般制作多系统启动盘的教程都会要用到rub4dos+grubinst+ultraiso+msgdiyerl等等工具,很多的时候都是用U盘量产来实现,这样做的坏处就是:制作繁琐对U盘伤害较大且不可逆,让人望 而生畏.本教程采用完全不同于传统的方法制作多系统启动U盘,方法原理简单,操作方便. 废话不多说,下面看正题: 其实大白菜里已经对这些工具做了非常好的封装,利用大白菜+FbinstTool+Windows+Ubuntu,我们就可以方便的制作出功能丰富的启动U盘. 懂grub一些开机引导命令,会更

[Mac] Mac book pro换SSD硬盘、制作启动U盘、TimeMachine恢复 小记

Mac book pro 硬盘故障.换SSD硬盘.启动U盘制作 小记 2012年买的Mbp又出硬盘故障了,虽然各种功能都能用,但经常频繁的出现鼠标风火轮,已经下好的电影在本地播放时都会隔个几分钟卡一下.拿到AppStore检测,说是硬盘的问题,"SMARTStatus:FAIL",建议是要换硬盘.好吧,我的保修期已过,就准备自己动手换盘了. 准备步骤为: 1.    使用Time Machine制作系统备份.(Mac OS神器) 2.    制作启动U盘.(还有系统光盘的同学可以省去这

制作启动U盘与定制多系统启动

制作启动U盘与定制多系统启动 说明:本文将讲述有关bootmgr引导启动与grub引导启动制作的相关经验,文中提到的知识谈不上完全正确,只是一些个人在制作U盘启动获得的心得,但我会尽力正确的解释清楚. 制作启动U盘 所需工具: Bootice:部署U盘/硬盘启动,必须. grub4dos:grub引导必备,必须. grubinst:功能类似Bootice,可选. HPUSBFW:惠普U盘存储格式化工具,可选. NTBOOTautofix:自动修复启动项,功能类似Bootice,可选. 其它工具类

内存盘

一.简介 大多数的Linux发行版本中,内存盘默认使用的是/dev/shm 路径,文件系统类型为tmpfs,默认大小是内存实际的大小,操作这个路径就是对内存的操作.   tmpfs是一种虚拟内存文件系统,特点是的存储空间在VM(virtual memory)中.linux下面VM的大小由RM(Real Memory)和swap组成,RM的大小就是物理内存的大小,而Swap的大小是由你自己决定的.Swap是通过硬盘虚拟出来的内存空间,因此它的读写速度相对RM(Real Memory)要慢许多,我们