HOWTO: Installing FreeBSD 8.x with USB Flash (use Grub4Dos).

valsorym

Well-Known Member

Reaction score: 20
Messages: 419

Installing FreeBSD 8.x with USB Flash
(using the tool Grub4Dos)

Preparing USB Flash:
--------------------
You need to format a USB Flash file system FAT32.
* My device is defined as /dev/da0
* If the device to turn on automatically - it must be turned off. My unit was
involved as /media/myflash:
Code:
    # umount /media/myflash
Cleaning and formatting:
Code:
    # dd if=/dev/zero of=/dev/da0s1 bs=512 count=1
    # newfs_msdos -L "FreeBSD" /dev/da0s1
Reconnect USB Flash. My device is identified as /media/FREEBSD.
* Or connect it manually:
Code:
    # mkdir -p /media/FREEBSD
    # mount -t msdosfs /dev/da0s1 /media/FREEBSD

Receiving the packet Grub4Dos.
------------------------------
You need download the Grub4Dos. Download last official release.
url (en): [url=http://www.themudcrab.com/acronis_grub4dos.php]http://www.themudcrab.com/acronis_grub4dos.php[/url]
url (ru): [url=http://www.greenflash.su/Grub4Dos/files/links.htm]http://www.greenflash.su/Grub4Dos/files/links.htm[/url]

* Program "wget" and "unzip" should be set in advance.
Code:
    $ mkdir -p ~/grub4dos
    $ cd ~/grub4dos
    $ wget "http://www.themudcrab.com/downloads/
                grub4dos-0.4.4-2009-03-31_(official_release).zip"
    $ ls
    grub4dos-0.4.4-2009-03-31_(official_release).zip

    $ unzip "grub4dos-0.4.4-2009-03-31_(official_release).zip"
    $ ls
    grub4dos-0.4.4  grub4dos-0.4.4-2009-03-31_(official_release).zip
Install Grub4Dos.
-----------------
Code:
    $ cd ~/grub4dos/grub4dos-0.4.4/
    $ cp grldr menu.lst defualt /media/FREEBSD

Write FreeBSD.
--------------
* To achieve the goal we need the following images:
- FreeBSD-8.2-RELEASE-i386-bootonly.iso
- FreeBSD-8.2-RELEASE-i386-disc1.iso (or FreeBSD-8.2-RELEASE-i386-dvd1.iso.xz
or have already recorded disc with FreeBSD 8.2).
Code:
    $ mkdir -p /media/FREEBSD/main
    $ cd /media/FREEBSD/main
    $ wget "ftp://ftp.freebsd.org/pub/FreeBSD/ISO-IMAGES-i386/8.2/
                FreeBSD-8.2-RELEASE-i386-bootonly.iso"
    $ mv FreeBSD-8.2-RELEASE-i386-bootonly.iso freebsd82bx86.iso
    $ ls
    freebsd82bx86.iso
Copy the folder 8.2-RELEASE from your ISO FreeBSD (FreeBSD-8.2-RELEASE-i386-disc1.iso or FreeBSD-8.2-RELEASE-i386-dvd1.iso.xz).
* I have a recorded disc with FreeBSD 8.2. (my CD-ROM mount in /cdrom).
Code:
    $ cp -R -f /cdrom/8.2-RELEASE /media/FREEBSD/
* Rewrite menu list:
Code:
    $ cat /media/FREEBSD/menu.lst
Code:
color white/black yellow/blue white/black white/black
timeout 10
default /default

title FreeBSD 8.2 x86.
fallback 1
map /main/freebsd82bx86.iso (hd32)
map --hook
root (hd32)
chainloader
boot

title Reboot your computer now.
fallback 2
reboot
* Configure your computer to boot from USB Flash.

*** In sysinstall: When selecting the source for installation, select MSDOS! ***
Good luck!
 
Top