[ I can not mount filesystem in FreeBSD 9.0 RC-1 ]
Hi all, now I install FreeBSD 9.0 RC-1 don't use "bsdinstall".
I create USB Flash from FreeBSD-9.0-RC1-i386-memstick.img.
Reboot my laptop and load from My USB choose <Live CD> in "Welcome" window.
Use gpart software I destroy my HDD (/dev/ada0). After, I create GPT scheme and next partition view:
* For boot sector I use -t freebsd-boot, from swap - freebsd-swap, for other - freebsd-ufs.
Me need mount all sectors and repack: base.txz, kernel.txz, doc.txz, ports.txz, src.txz from /usr/freebsd-dist in My HDD.
* For that I loved BSDINSTALL (against SYSINSTALL) - because you can turn off BSDINSTALL!
I don't understand.
Where Is my bad? (Non in DNA (deoxyribonucleic acid) - even told the doctor)
That's all that I could do:
Hi all, now I install FreeBSD 9.0 RC-1 don't use "bsdinstall".
I create USB Flash from FreeBSD-9.0-RC1-i386-memstick.img.
Reboot my laptop and load from My USB choose <Live CD> in "Welcome" window.
Use gpart software I destroy my HDD (/dev/ada0). After, I create GPT scheme and next partition view:
* For boot sector I use -t freebsd-boot, from swap - freebsd-swap, for other - freebsd-ufs.
Code:
# gpart show -l ada0
=> 34 625142381 ada0 GPT (298G)
34 256 1 boot (128k)
290 8388608 2 swap (4.0G)
8388898 4194304 3 root (2.0G)
12583202 8388608 4 var (4.0G)
20971810 8388608 5 tmp (4.0G)
29360418 67108864 6 usr (32G)
96469282 528673133 7 home (252G)
# gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada0
* For that I loved BSDINSTALL (against SYSINSTALL) - because you can turn off BSDINSTALL!
Code:
# mkdir -p /mnt/f9
I don't understand.
Code:
# mount -t ufs /dev/ad0p3 /mnt/f9
mount: /dev/ad0p3 : Invalid argument
# mount -t ufs /dev/ada0p3 /mnt/f9
mount: /dev/ada0p3 : Invalid argument
# mount /dev/gpt/root /mnt/f9
mount: /dev/gpt/root : Invalid argument
That's all that I could do:
Code:
Install FreeBSD 9.0 RC-1
Create USB Flash.
=================
Now I have FreeBSD any version, and ftp/wget.
1. Download FreeBSD-9.0-RC1-i386-memstick.img,
# mkdir ~/freebsd && cd ~/freebsd
# wget "ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/i386/
ISO-IMAGES/9.0/FreeBSD-9.0-RC1-i386-memstick.img"
2. Connect your USB Flash device and clear it.
* My Flash detect how /dev/da0:
# dd if=/dev/zero of=/dev/da0 bs=512 count=4
3. Create LiveUSB FreeBSD 9.0 RC-1 Flash.
# dd if=FreeBSD-9.0-RELEASE-i386-memstick.img of=/dev/da0 bs=64k
4. Rewrite parameters of your LiveUSB FreeBSD 9.0 Flash.
* My Flash has one slice - it detected how /dev/da0s1:
# moutn -t ufs /dev/da0s1 /mnt
# echo "/dev/ufs/FreeBSD_Install / ufs rw,noatime 1 1" > /mnt/etc/fstab
* I added opportunity write in root (and others) sectors on LiveUSB.
** If you have 4K block size in your HDD, add it parameters in
loader.conf. If it is not - go to the "Create partition on your HDD"
section.
# echo 'kern.cam.ada.0.quirks="1"' >> /mnt/boot/loader.conf
* ! My HDD detected how /dev/ada0, If you used GPT scheme and your
block size be have 4096b ~ 4Kb. If you have device /dev/ada1 - you
must write how: kern.cam.ada.1.quirks="1" .. etc.
Create partition on your HDD.
=============================
1. Run LiveUSB FreeBSD 9.0.
# umount /mnt
# reboot now
* ! No the disconnect your FreeBSD LiveUSB.
* Enter in your BIOS to boot from USB device.
2. You are run LiveUSB FreeBSD 9.0 and choose button <LiveCD> in "Welcome"
window. Okay, you have root access in virtual OS FreeBSD 9.0.
*Sorry for my English.
Enter login: root
password: <empty>
3. To check the settings.
If you use 4k b/s in your HDD, and added 'kern.cam.ada.0.quirks="1" in
loader.conf:
# geom disk list ada0
Geom name: ada0
Providers:
1. Name: ada0
Mediasize: 320072933376 (298G)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r0w0e0
descr: ST9320423AS
ident: (null)
fwsectors: 63
fwheads: 16
* We can see "Stripesize: 4096", else you see "Stripesize: 512".
4. Clear all partitions of my HDD.
# gpart show ada0
=> 63 312581745 ipsd0 MBR (298G)
63 11293632 1 !12 [active] (5.4G)
11293695 301288113 - free - (298G)
Now I have one partition:
# gpart delete -i 1 ada0
** If you have some others partition (2, 3, 4 ... 128) - remove it. If
you do not do this - You can not run gpart destroy ada0. You will
receive a message: "Device busy!".
# gpart delete -i 2 ada0
# gpart delete -i 3 ada0
...
# gpart delete -i 128 ada0
Delete MBR sector (or other old scheme).
# gpart destroy ada0
5. Create new partition scheme on your HDD.
Create GPT table.
# gpart create -s GPT ada0
Create BOOT sector ~ 128Kb.
* If you use 4k boot size on your HDD, use first seek in 40 blocks
(etc: -b 40) to align the sections. I have a 512b block size on my
HDD, I use -b 34 blocks seek.
(in -b and -s flags use next cliche: Xk for Kb, Xm for Mb, Xg for Gb or
empty, etc X - for bloks).
# gpart add -b 34 -s 128k -t freebsd-boot -l "boot" ada0
Create SWAP ~ 4G.
# gpart add -b 290 -s 4g -t freebsd-swap -l "swap" ada0
Creste ROOT sector ~ 2G.
* Use freebsd-zfs type if you use ZFS. In FreeBSD 8 you should be load:
kldload /mnt2/boot/kernel/opensolaris.ko
kldload /mnt2/boot/kernel/zfs.ko
I be used UFS file system.
# gpart add -b 8388898 -s 2g -t freebsd-ufs -l "root" ada0
Create VAR sector ~ 4G.
# gpart add -b 12583202 -s 4g -t freebsd-ufs -l "var" ada0
Create TMP sector ~ 4G.
# gpart add -b 20971810 -s 4g -t freebsd-ufs -l "tmp" ada0
Create USR sector ~ 32G.
# gpart add -b 29360418 -s 32g -t freebsd-ufs -l "usr" ada0
Create HOME sector ~ OTHER.
# gpart add -b 96469282 -t freebsd-ufs -l "home" ada0
* This moment, I realized that the flag -b I could not write.
Result.
# gpart show -l ada0
=> 34 625142381 ada0 GPT (298G)
34 256 1 boot (128k)
290 8388608 2 swap (4.0G)
8388898 4194304 3 root (2.0G)
12583202 8388608 4 var (4.0G)
20971810 8388608 5 tmp (4.0G)
29360418 67108864 6 usr (32G)
96469282 528673133 7 home (252G)
Install protective Protected MBR (pmbr) from programs that do not know
GPT, and GPART loader gptzfsboot.
# gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 ada0
Install FreeBSD 9.0 on your HDD.
================================
* For that I loved BSDINSTALL (against SYSINSTALL) - because you can turn
off BSDINSTALL!
Do not reboot and continue to work on!
Now my device HDD has look:
/dev/ad0
/dev/ad0p1 - boot
/dev/ad0p2 - swap
... (3 - root, 4 - var, 5 - tmp, 6 - usr)
/dev/ad0p7 - home
1. Mount all sectors (slices) for your system.
# mkdir -p /mnt/f9
!!!!!!!!!!!!!! I do not know how to mount !!!!!!!!!!!!!!!