unix:freebsd:quick_tips
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| unix:freebsd:quick_tips [2023/11/23 01:03] – rodolico | unix:freebsd:quick_tips [2025/11/23 21:45] (current) – rodolico | ||
|---|---|---|---|
| Line 18: | Line 18: | ||
| <code bash> | <code bash> | ||
| + | |||
| + | ==== Format a Drive ==== | ||
| + | |||
| + | Following example will set up an empty drive (/dev/da23) with GPT as the schema and one slice (partition). The partition will have a label, // | ||
| + | |||
| + | When you label a slice, it can be found in /dev/gpt/ and mounted using that alias. | ||
| + | |||
| + | <code bash> | ||
| + | # create the GPT schema | ||
| + | gpart create -s GPT da23 | ||
| + | # show what is there (nothing yet) | ||
| + | gpart list /dev/da23 | ||
| + | # add a new slice of type UFS, and give it a label, sneakernet | ||
| + | # use all of the available disk space for this (ie, only one slice) | ||
| + | gpart add -t freebsd-ufs -l sneakernet da23 | ||
| + | # show what is up | ||
| + | gpart list /dev/da23 | ||
| + | # format the partition with UFS | ||
| + | newfs /dev/da23p1 | ||
| + | # it should now show up as an alias in /dev/gpt | ||
| + | ls /dev/gpt | ||
| + | # make a place to mount it | ||
| + | mkdir / | ||
| + | # mount it | ||
| + | mount / | ||
| + | # unmount it | ||
| + | umount / | ||
| + | # clean up | ||
| + | rmdir / | ||
| + | </ | ||
| ===== Monitoring ===== | ===== Monitoring ===== | ||
unix/freebsd/quick_tips.1700722997.txt.gz · Last modified: 2023/11/23 01:03 by rodolico
