Quick Steps to produce a bootable USB stick with FreeBSD
Install FreeBSD, or use an existing FreeBSD installation, and follow these steps:
1) First, you need to prepare and format your USB stick:
fdisk -BI /dev/da0
bsdlabel -B -w da0s1
newfs -U -O1 /dev/da0s1a
boot0cfg -v -B da0
(“-U -O1″ ["O" like in Olympus, not zero] is for UFS1 which provides much faster copying than UFS2; if you decide for UFS2, type “-U -O2″ – but expect that the copying will be slower)
2) Then mount it: mount /dev/da0s1a /usb
3) Copy all directories (FreeBSD) to the stick
4) After copying, modify the /usb/boot/loader.conf (explained below)
5) In the /boot directory on your USB stick you must have MFS (Memory File System – mfsroot.gz), which you will make (instructions are below)
6) Modify your /etc/fstab in MFS and put the following line (only) there:
/dev/md0 / ufs rw 0 0
7) After you boot your computer with the stick, you will be in the MFS environment from which you will mount your USB stick with mount_nullfs (described below)
Modification of /boot/loader.conf on your USB stick
You must have the following lines in your /boot/loader.conf (some lines are optional):
mfsroot_load=”YES”
mfsroot_type=”mfs_root”
mfsroot_name=”/boot/mfsroot”
nullfs_load=”YES”
splash_bmp_load=”YES”
vesa_load=”YES”
geom_uzip_load=”YES”
geom_label_load=”YES”
bitmap_load=”YES”
bitmap_name=”/boot/splash.bmp”
snd_driver_load=”YES”
kern.maxfiles=”25000″
kern.maxusers=”64″
vfs.root.mountfrom=”/dev/md0″
# Additional filesystem drivers
udf_load=”YES”
linux_load=”YES”
fuse_load=”YES”
ntfs_load=”YES”
ext2fs_load=”YES”
reiserfs_load=”YES”
Making your own MFS
FreeBSD, after the kernel boots, can use the root file system in memory (mfsroot_load=”YES” command in /boot/loader.conf will do the trick). To build such a memory file system, type the command:
dd if = /dev/zero of = mfsroot bs = 1024k count = 42
The mfsroot file of about 40 MB in size will be created. You need to format it, mount it and copy the most important files into it from your FreeBSD system (/bin, /sbin, /etc, /root….):
mdconfig -a -f mfsroot md0
newfs /dev/md0
mount /dev/md0 /mnt
Once copied, you must unmount it and gzip it: gzip mfsroot
Optionally, you can chroot it to see if everything works, then copy the mfsroot.gz to /usb/boot onto your USB flash drive (or disk). If you think it may be a problem to pick the most important files for your MFS (from your FreeBSD installation), search for mfsbsd in Google and either use its toolset or the MFS image alone (contained in the downloadable ISO of mfsbsd).
After booting from the USB stick (you will jump into MFS), you must mount the physical USB stick:
/sbin/mount -o ro /dev/da0s1a /usb
/sbin/mount_nullfs /usb/boot /boot
/sbin/mount_nullfs /usb/usr /usr
The above commands will help you use the big /usr directory on your USB stick instead of the /usr dir in MFS. mount_nullfs /usb/boot /boot is optional, as in your MFS/boot directory only the following files are needed for the little MFS to boot (/boot/kernel directory in MFS): geom_label.ko, geom_uzip.ko, zlib.ko a their debug symbols (zlib.ko.symbols, etc.). By mounting the /usb/boot dir via mount_nullfs into the /boot directory in your MFS you will be able to load kernel modules.
About the Author
I have a website about FreeBSD and I propagate freedom.
|
|
USB 2 eSata SATA Dos Bootable IDE UDMA PCI Adapter Card $153.01 |
|
|
Ubuntu 10.04 USB Bootable Boot Flash Drive- Acer Aspire $11.99 |
|
|
Hiren’s Boot CD 15.1 on 4GB Bootable USB Flash Drive – Repair Your Computer $19.95 |
|
|
Puppy Live Linux 5.3.1 Slacko Bootable 8GB USB FLASH DRIVE – PLUG n’ GO $22.11 |
|
|
Backtrack Linux 5R1 Live Bootable 8GB Flash Drive – Run or Install from USB $14.99 |
|
|
WIFI CRACKING DECODING WEP PASSWORD BOOTABLE USB PASSWORD RECOVERY $22.11 |
|
|
Linux Mint 12 Bootable 8GB USB Drive or Micro SD Card NEW $14.95 |
|
|
~ Hirens Bootable *8 GB USB Flash Drive* 15.1 *Newest Verison* Computer Repair ~ $34.99 |
|
|
COMPUTER RESCUE 8GB USB BOOTABLE FOR WINDOWS 32-BIT RECOVER CRASH AND BSOD $17.99 |
|
|
Simplymepis 11.0 Linux 32GB USB Bootable Startup USB Flash Drive $53.73 |
|
|
Simplymepis 11.0 Linux 8GB USB Bootable Startup USB Flash Drive $22.11 |
|
|
Debian Linux 6.0.4 (Squeeze) 2GB Live Bootable Startup USB Flash Drive $12.63 |
|
|
Simplymepis 11.0 Linux 16GB USB Bootable Startup USB Flash Drive $33.18 |
|
|
PCLinuxOS 2012.2 Linux 8GB USB Bootable Startup USB Flash Drive $22.11 |
|
|
M200 Enclosure mini-ITX Computer Case USB Bootable CF Reader 2×2.5 inch Drives $64.83 |
|
|
EasyPeasy 1.6 on 4GB bootable USB for Netbooks Laptops & Desktops FREE GIFT $14.99 |
|
|
Linux XP UI 4GB USB Bootable Drive FREE GIFT $14.99 |
|
|
~ Hirens Bootable *8 GB USB Flash Drive* 15.1 *Newest Verison* Computer Repair ~ $34.99 |
|
|
USB slim BOOTABLE case CD-rom dvd-rom for IBM T40 T60 $9.99 |
|
|
Backtrack Linux 5R2 Live Bootable 8GB Flash Drive – Run or Install from USB $14.99 |
|
|
DBAN – Live Bootable 8 GB USB – Securely Erase/Nuke Your Hard Drives $14.99 |
|
|
Bootable USB stick with high anonymity configuration and lots of hacking tools $49.99 |
|
|
Puppy Linux 5.3 Slako 5.2 Wary Bootable 8 GB USB or Micro SD Card NEW $16.95 |
|
|
Ubuntu Linux 11.10 USB Bootable Flash Drive 8Gb Live Run/Install w/Getting Start $12.99 |
|
|
~~ Hirens Boot CD Bootable *4 GB USB Flash Drive* 15.1 *New* Computer Repair ~~ $20.99 |
|
|
Knoppix 6.7.1 Live Linux 2GB Bootable USB FLASH DRIVE – Simply PLUG ‘n GO $12.63 |
|
|
M200 Enclosure mini-ITX Computer Case USB Bootable CF Reader 2×2.5 inch Drives $79.57 |
|
|
M200 Enclosure mini-ITX Computer Case USB Bootable CF Reader 2×2.5 inch Drives $87.43 |
|
|
BackTrack Linux 3 Extended 2GB Bootable USB Flash Drive $11.99 |
|
|
BackTrack Linux 3 Extended 4GB Bootable USB Flash Drive $16.90 |
|
|
BackTrack Linux 4 2GB Bootable USB Flash Drive Hacking $11.99 |
|
|
Damn Small Linux 4.4.10 2GB Bootable USB Flash Drive $6.00 |
|
|
Damn Small Linux 4.4.10 4GB Bootable USB Flash Drive $16.90 |
|
|
Google Chromium OS on 2GB Bootable USB Flash Drive $14.49 |
|
|
Linux Mint 9 Live Install 2GB Bootable USB Flash Drive $6.19 |
|
|
Linux Mint 9 Live Install 4GB Bootable USB Flash Drive $16.90 |
|
|
Ubuntu Linux version 12.04 LTS bootable 8GB USB flash drive – US seller! USA $13.98 |
|
|
~ Hirens Bootable *16 GB USB Flash Drive 15.1 *Newest Verison* Computer Repair ~ $49.99 |
|
|
BOOTING TOOLS 4GB USB BOOTABLE FLASH DRIVE REPAIRS RECOVERS RESTORES FOR WINDOWS $17.99 |
|
|
Hiren’s BootCD 15.1@Sandisk 4GB Bootable█USB█Drive PC-Tools Antivirus█XP/Linux $29.92 |
|
|
~ Hirens Bootable *8 GB USB Flash Drive* 15.1 *Newest Verison* Computer Repair ~ $34.99 |
|
|
~ Hirens Bootable *8 GB USB Flash Drive* 14.1 *Newest Verison* Computer Repair ~ $34.99 |
|
|
PASSWORD RESET UNLOCK for WINDOWS XP VISTA 7 SERVER on BOOTABLE USB FLASH DRIVE $13.99 |
|
|
Ubuntu Linux 12.04 (Precise Pangolin) 2GB Bootable USB Flash Drive – PLUG N GO $12.95 |
|
|
Microsoft Windows 7 XP 2000 VISTA Server 32 64 bit PASSWORD RESET BOOTABLE USB!! $24.99 |
|
|
Bootable 8GB USB 4 Microsoft Windows Vista Home Premium Restore Recovery Repair $23.69 |
|
|
Ubuntu Linux 12.04 USB Bootable Flash Drive 8Gb Live Run/Install $12.99 |
|
|
USB to e-Sata IDE Dos Bootable Card For Vista Windows 7 $153.96 |
|
|
Bootable 2GB USB 4 Windows XP 7 Vista Recovery Fix Repair Boot Restore Rescue $14.21 |
|
|
WINDOWS SYSTEM RECOVERY + HIRENS HIREN’S BOOTABLE USB + LAPTOP PC REPAIR ON USB $38.95 |
|
|
8GB Bootable Recovery /installation for king of the jungle 10.7 USB flash drive $47.41 |
|
|
8GB Bootable USB flash drivedoes everything to recover your Windows 7 active $47.41 |
|
|
8GB Bootable USB flash drive does everything to recover your Windows Vista $47.41 |
|
|
8GB Bootable USB flash drive does everything to recover your XP PRO SP3 + SATA $47.41 |
|
|
Bootable 4GB USB 4 Microsoft Windows Vista Home Premium Restore Recovery Repair $22.11 |
|
|
Bootable 8GB USB 4 Windows 7 Home Premium Fix Rescue Repair Recovery Restore $28.44 |
|
|
~ Hirens Bootable *8 GB USB Flash Drive* 15.0 Computer Repair ~ $34.99 |
|
|
8GB Bootable Windows XP Pro SP3 + SATA Recovery/ installation USB flash drive $47.41 |
|
|
8GB Bootable Windows 7 Recovery/ installation USB flash drive, ready active $47.41 |
|
|
~ Hirens Bootable *8 GB USB Flash Drive* 15.1 *Newest Verison* Computer Repair ~ $34.99 |
|
|
BOOTING TOOLS 4GB USB BOOTABLE DRIVE REPAIRS RECOVERS BACKUPS BOOTING TOOLS BOOT $17.99 |
|
|
Bootable 8GB USB 4 Microsoft Windows Vista Home Premium Repair Restore Recovery $29.99 |
|
|
Bootable 8GB USB 4 Microsoft Windows 7 Repair Restore Recovery Netbook Notebook $29.99 |
|
|
Microsoft Windows 32/64 bit Bootable Password Reset USB Flash Drive! $19.95 |
|
|
Apple OSX 10.6.3 Bootable 16GB Corsair USB Flash Drive for Macbook/Pro/iMac $49.00 |
|
|
Bootable 8GB USB 4 Windows 7 Starter Repair Fix Recovery Restore notebook $23.69 |
|
|
Puppy Linux Live 5.3.3 2GB Bootable Startup USB Flash Drive – Runs from USB $17.95 |
|
|
Debian Linux 6.0.4 (Squeeze) Live Linux 2GB Bootable Startup USB Flash Drive $17.95 |
|
|
Knoppix 6.7.1 Live Linux 2GB Bootable Startup USB Flash Drive – Runs from USB $17.95 |
|
|
Fedora 16 (Verne) Linux Live 2GB Bootable Startup USB Flash Drive Runs from USB $17.95 |
|
|
Ubuntu Linux 12.04 (Precise Pangolin) 2GB Bootable USB Flash Drive – PLUG N GO $17.95 |
|
|
PCLinuxOS 2012.2 Linux Live 2GB Bootable Startup USB Flash Drive – Runs from USB $17.95 |
|
|
Simplymepis 11.0 Linux Live 2GB Bootable (Startup) USB Flash Drive Runs from USB $17.95 |
|
|
Damn Small Linux 4.4.10 Live 2GB Bootable Startup USB Flash Drive (Runs from CD) $17.95 |
|
|
Linux Mint 12 Live/Install 2GB Bootable (Startup) USB Flash Drive -Runs from USB $17.95 |
|
|
Ubuntu 12.04 Bootable 8 GB USB Drive or Micro SD Card NEW $14.95 |
|
|
Linux Mint 12 (Gnome) Live Bootable 8GB Flash Drive – Run or Install from USB $14.99 |
|
|
PC Technician’s Essential Bootable USB Drive – Watch video demo $44.26 |
|
|
Centon DataStick Pro 16GB USB 2.0 Ubuntu Bootable $27.99 |
|
|
Centon DataStick Pro 8GB USB 2.0 Ubuntu Bootable $17.49 |
|
|
SanDisk Cruzer Blade 4GB USB 2.0 Ubuntu Bootable $11.99 |
|
|
Ubuntu Linux 11.10 Live Bootable 8GB Flash Drive – Run or Install from USB $13.99 |
|
|
Fedora Linux 16 USB Bootable Flash Drive 8Gb Live Run/Install $12.99 |
|
|
Password Reset Unlock Windows XP,Vista, 7 Server Bootable USB Flash Drive $9.98 |
|
|
BOOTABLE USB DRIVE BOOTS ANY COMPUTER EVEN IF WINDOWS CRASHED 5-IN-1 FLASH DRIVE $43.95 |
|
|
Bootable USB DVD, Brand new in box. $28.99 |
|
|
~ Hirens Bootable *8 GB USB Flash Drive* 15.1 *Newest Verison* Computer Repair ~ $34.99 |
|
|
Hiren’s Boot CD 15.1 on 8GB Bootable USB Flash Drive – Repair Your Computer $25.00 |
|
|
★ FreeNAS 8 Bootable USB Drive ★ 32 or 64 Bit ★ $14.21 |
|
|
5 STARTUP REPAIR DISKS PACKED into 1 SUPER 4GB USB BOOTABLE DRIVE WITH AUTOSTART $43.95 |
|
|
WINDOWS 7 Vista XP PASSWORD RESET RECOVERY UNLOCK BOOTABLE USB FLASH DRIVE 4GB $15.95 |
|
|
BackTrack 5 R2 Bootable 8GB USB or Micro SD/SD Card NEW $14.95 |
|
|
**UBUNTU MINT KNOPPIX LINUX OR LATEST RELEASE BOOTABLE 4GB USB ONLY £8.99** $14.21 |
|
|
**UBUNTU MINT BACKTRACK LINUX OR LATEST RELEASE BOOTABLE 2GB USB ONLY £7.49** $12.63 |
|
|
Microsoft Windows 7 XP 2000 VISTA Server 32 64 bit PASSWORD RESET BOOTABLE USB! $14.90 |
|
|
Bootable 8GB USB 4 Windows 7 Repair Fix Recovery Restore $28.44 |
|
|
Kingston Digital 8 GB USB 2.0 Hi-speed Datatraveler Flash Drive DT101G2/8GBZET – Red $7.35 Kingston Digital 8 GB USB 2.0 Hi-Speed Datatraveler Flash Drive Red…. |
|
|
Kingston Digital DataTraveler 101 Generation 2 – 16 GB Flash Drive DT101G2/16GBZET $11.77 Kingston’s DataTraveler101 Generation 2 is a convenient storage companion that lets you take all of your data to your home, office, school and anywhere you travel. It comes with urDrive1, preloaded software that gives you a new and exciting way to look at your data. When you launch the software, the urDrive interface pops up like a desktop for your USB. It features drag-and-drop and double-click c… |
|
|
Kingston Digital DataTraveler 101 Generation 2 – 32 GB Flash Drive DT101G2/32GBZET $24.96 Product is available in many colors, items sent are based on availability…. |
|
|
Symantec Norton Ghost 15.0 – Single User $12.95 SYMANTEC NORTON GHOST 15.0 EN 1 USER MMNORTON GHOST 15.0 EN 1 USER MM Manufacturer : SYMANTEC UPC : 037648858120… |
|
|
Ultimate Boot CD / Disc Recovery Repair DOS Windows 7 XP Vista 95 98 2011 $5.97 For a full list of the freeware contents of my CD, which are all provided under the GNU license contact me and I will give you a personalized list with a link. Too much to list here. Bootable CD that contains a load of useful tools you can make use of in a variety of situations like analyzing, recovering and fixing your computer even if the primary operating system can not be booted. With little… |
|
|
Acronis True Image Home 2010 [Old Version] $49.99 Acronis True Image Home 2010 provides home users with reliable and timeless backup and recovery of systems, applications, settings, and personal files. From an intuitive graphical interface, users can easily define where, locally or online, and how often to back up a PC. In addition, Acronis Nonstop Backup delivers continuous system and data protection, preventing data loss. Acronis True Image Hom… |
|
|
How to install Windows 7 from pendrive in 10 minutes This book is a very simple step by step tutorial on how to install Windows 7 (or Windows XP or Vista) from a USB pendrive. This is very useful for people who can not install Windows from CD/DVD due to scratched CD/DVD or non-working CD/DVD drive…. |