Hello all,
Here I would like to talk about the creation of USB media installation FreeBSD 9.0 RC-1 without bsdinstall and others.
The entire text of my work, I will bring in a convenient location in the text file.
* or am I just linyus its format.
-= The work version! =-
How to use this device in the further work can be found here!
Here I would like to talk about the creation of USB media installation FreeBSD 9.0 RC-1 without bsdinstall and others.
The entire text of my work, I will bring in a convenient location in the text file.
* or am I just linyus its format.
-= The work version! =-
Code:
Install freebsd on USB Flash
(installation option)
Ukraine
12.11.2011
Valsorym
------------------------------------------------------------------------------
Required tools.
------------------------------------------------------------------------------
1. CD/DVD Disk FreeBSD 9.0 (or ISO file).
>> my device /cdrom
2. USB Flash.
>> my device /dev/da0
* My stick has 4G size.
------------------------------------------------------------------------------
Create partition on your USB FLash.
------------------------------------------------------------------------------
Use dd or gpart software - destroy your USB Flash.
# gpart destroy -F da0
# dd if=/dev/zero of=/dev/da0 bs=512k count=2
* Read this article: http://wonkity.com/~wblock/docs/html/disksetup.html
A. Create new partitions.
I want to create a universal carrier. USB flash drive must have a slice
that will be seen from the other OS. And this slice must be mounted in
a working system. Accordingly, we use next partition:
M/P Size F/S
-----------------------
/ 2G UFS
/home other MSDOS
Create it:
# fdisk -BI da0
# bsdlabel -w -B da0s1
# bsdlabel -e da0s1
Use your editor edit it to:
~~~
# /dev/da0s1:
8 partitions:
# size offset fstype [fsize bsize bps/cpg]
a: 2G 16 4.2BSD 0 0 # for /.
b: * * 4.2BSD # for /home.
c: 7823592 0 unused 0 0 # "raw" part, don't edit
~~~
Save it, I use vi - :wq
# ls /dev/
...
da0 da0s1 da0s1a da0s1b
Formatting a partitions:
# newfs -L f9root -U /dev/da0s1a
# newfs_msdos -L f9home -F32 /dev/da0s1b
B. Mount temporary partition.
# mkdir -p /mnt/f9
# mount /dev/da0s1a /mnt/f9
# mkdir -p /mnt/f9/usr/home
# mount -t msdosfs /dev/da0s1b /mnt/f9/usr/home
------------------------------------------------------------------------------
Install FreeBSD 9.0.
------------------------------------------------------------------------------
A. Unpack system to your USB Flash.
# mkdir -p /cdrom
# mount -t cd9660 -o -e /dev/cd0 /cdrom
# cd /cdrom/usr/freebsd-dist/
# cat base.txz | tar --unlink -xpJf - -C /mnt/f9/
# cat kernel.txz | tar --unlink -xpJf - -C /mnt/f9/
* If you use amd64 unpack:
# cat lib32.txz | tar --unlink -xpJf - -C /mnt/f9/
* If you want, install other files: doc.txz ports.txz src.txz
B. In order for our USB flash drive had the status of "installation" - you
must copy the installation files.
# cp -R /cdrom/usr/freebsd-dist /mnt/f9/usr/
* When we perform the installation of the system from USB flash drives,
we use these files.
------------------------------------------------------------------------------
Configure system.
------------------------------------------------------------------------------
A. Create /etc/fstab.
Open and rewrite /mnt/f9/etc/fstab:
/dev/da0s1a / ufs rw 1 1
/dev/da0s1b /usr/home msdos rw 0 0
B. Disconnect.
# umount /mnt/f9/usr/home
# umount /mnt/f9
# umount /cdrom
* Remove the CD and.
# shutdown -r now
How to use this device in the further work can be found here!