0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

起動中の FreeBSD に新しい(初期化直後の) {SSD|HDD} に別の FreeBSD をインスコしてみる gpart 版

0
Posted at

これまたニッチなメモw

15.1-RELEASE amd64 を ada1 で認識しちょる記憶媒体へ手動インスコしてみる
念のため、コマンドはルートからの絶対パスで書いとるけん、パスが通ていれば省略しても(●`・ω・)ゞ<ok!

手を動かすよー📀

GPT で媒体を作成
/rescue/gpart create -s gpt ada1

ada1 created

bootパーティション作るん
/rescue/gpart add -t freebsd-boot -s 512k -l bootfs ada1

ada1p1 added

スワップパーティション作るん
/rescue/gpart add -t freebsd-swap -s 4g -l swapfs ada1

ada1p2 added

ufs パーティション作るん
/rescue/gpart add -t freebsd-ufs -l rootfs ada1

ada1p3 added

bootcode 書くん
/rescue/gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 ada1

partcode written to ada1p1
bootcode written to ada1

ufs で初期化するん
/rescue/newfs -j -O2 -U /dev/ada1p3

/dev/ada1p3: 77823.5MB (159382448 sectors) block size 32768, fragment size 4096
using 125 cylinder groups of 626.09MB, 20035 blks, 80256 inodes.
with soft updates
super-block backups (for fsck_ffs -b #) at:
192, 1282432, 2564672, 3846912, 5129152, 6411392, 7693632, 8975872, 10258112, 11540352, 12822592, 14104832, 15387072, 16669312,
17951552, 19233792, 20516032, 21798272, 23080512, 24362752, 25644992, 26927232, 28209472, 29491712, 30773952, 32056192, 33338432,
34620672, 35902912, 37185152, 38467392, 39749632, 41031872, 42314112, 43596352, 44878592, 46160832, 47443072, 48725312, 50007552,
51289792, 52572032, 53854272, 55136512, 56418752, 57700992, 58983232, 60265472, 61547712, 62829952, 64112192, 65394432, 66676672,
67958912, 69241152, 70523392, 71805632, 73087872, 74370112, 75652352, 76934592, 78216832, 79499072, 80781312, 82063552, 83345792,
84628032, 85910272, 87192512, 88474752, 89756992, 91039232, 92321472, 93603712, 94885952, 96168192, 97450432, 98732672, 100014912,
101297152, 102579392, 103861632, 105143872, 106426112, 107708352, 108990592, 110272832, 111555072, 112837312, 114119552,
115401792, 116684032, 117966272, 119248512, 120530752, 121812992, 123095232, 124377472, 125659712, 126941952, 128224192,
129506432, 130788672, 132070912, 133353152, 134635392, 135917632, 137199872, 138482112, 139764352, 141046592, 142328832,
143611072, 144893312, 146175552, 147457792, 148740032, 150022272, 151304512, 152586752, 153868992, 155151232, 156433472,
157715712, 158997952
Using inode 4 in cg 0 for 637534208 byte journal
newfs: Journal file fragmented.
newfs: soft updates journaling set

初期化した ufs パーティションをマウントするん
/rescue/mount -onoatime /dev/ada1p3 /mnt
お外から必要なバイナリの tarball 取ってそのまま吐き出すん
/rescue/fetch -qo - https://download.freebsd.org/releases/amd64/amd64/15.1-RELEASE/kernel.txz | /rescue/tar xf - -C /mnt/
/rescue/fetch -qo - https://download.freebsd.org/releases/amd64/amd64/15.1-RELEASE/base.txz | /rescue/tar xf - -C /mnt/
/rescue/fetch -qo - https://download.freebsd.org/releases/amd64/amd64/15.1-RELEASE/ports.txz | /rescue/tar xf - -C /mnt/
/rescue/fetch -qo - https://download.freebsd.org/releases/amd64/amd64/15.1-RELEASE/src.txz | /rescue/tar xf - -C /mnt/
/rescue/fetch -qo - https://download.freebsd.org/releases/amd64/amd64/15.1-RELEASE/tests.txz | /rescue/tar xf - -C /mnt/
/rescue/fetch -qo - https://download.freebsd.org/releases/amd64/amd64/15.1-RELEASE/lib32.txz | /rescue/tar xf - -C /mnt/
アンマウントするん
/rescue/umount /mnt

お試しあれ

壊してもエエ環境で実験しんさいよー🥰

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?