NCpiro
发表于 2016-4-3 12:40
顶。。。。。。。。。。。。。。。。。。。。。。。
MasterFay
发表于 2016-4-3 15:41
Mark备用
NCpiro
发表于 2016-4-10 10:17
freebsd硬盘分区gpart命令常用参数
1. 删除ad0上所有分区
# gpart destroy -F ad0
注: 没有数据情况才可以这样
2. 创建gpt分区信息表
# gpart create -s gpt ad0
3. 创建分区
# gpart add -b 34 -s 64k -t freebsd-boot ad0
# gpart add -s 4096m -t freebsd-swap -l swap0 ad0
# gpart add -s 608174080 -t freebsd-zfs -l root0 ad0
-b 开始扇区,可省略
-s 分区大小,单位可用扇区,K,M等
-t 分区类型, 还有freebsd-ufs
-l 给分区打标签
4. 显示信息
# gpart show ad0
5. 删除分区
# gpart delete -i 2
NCpiro
发表于 2016-4-10 10:17
Resizing and Growing Disks
Originally contributed by Allan Jude.
A disk's capacity can increase without any changes to the data already present. This happens commonly with virtual machines, when the virtual disk turns out to be too small and is enlarged. Sometimes a disk image is written to a USB memory stick, but does not use the full capacity. Here we describe how to resize or grow disk contents to take advantage of increased capacity.
Determine the device name of the disk to be resized by inspecting /var/run/dmesg.boot. In this example, there is only one SATA disk in the system, so the drive will appear as ada0.
List the partitions on the disk to see the current configuration:
# gpart show ada0
=> 3483886013ada0GPT(48G)
34 128 1freebsd-boot(64k)
16279691648 2freebsd-ufs(38G)
79691810 4194236 3freebsd-swap(2G)
83886046 1 - free -(512B)
Note: If the disk was formatted with the GPT partitioning scheme, it may show as “corrupted” because the GPT backup partition table is no longer at the end of the drive. Fix the backup partition table with gpart:
# gpart recover ada0
ada0 recovered
Now the additional space on the disk is available for use by a new partition, or an existing partition can be expanded:
# gpart show ada0
=> 34102399933ada0GPT(48G)
34 128 1freebsd-boot(64k)
162 79691648 2freebsd-ufs(38G)
79691810 4194236 3freebsd-swap(2G)
83886046 18513921 - free -(8.8G)
Partitions can only be resized into contiguous free space. Here, the last partition on the disk is the swap partition, but the second partition is the one that needs to be resized. Swap partitions only contain temporary data, so it can safely be unmounted, deleted, and then recreated after resizing other partitions.
# swapoff /dev/ada0p3
# gpart delete -i 3 ada0
ada0p3 deleted
# gpart show ada0
=> 34102399933ada0GPT(48G)
34 128 1freebsd-boot(64k)
162 79691648 2freebsd-ufs(38G)
79691810 22708157 - free -(10G)
Warning: There is risk of data loss when modifying the partition table of a mounted file system. It is best to perform the following steps on an unmounted file system while running from a live CD-ROM or USB device. However, if absolutely necessary, a mounted file system can be resized after disabling GEOM safety features:
# sysctl kern.geom.debugflags=16
Resize the partition, leaving room to recreate a swap partition of the desired size. This only modifies the size of the partition. The file system in the partition will be expanded in a separate step.
# gpart resize -i 2 -a 4k -s 47G ada0
ada0p2 resized
# gpart show ada0
=> 34102399933ada0GPT(48G)
34 128 1freebsd-boot(64k)
162 98566144 2freebsd-ufs(47G)
98566306 3833661 - free -(1.8G)
Recreate the swap partition:
# gpart add -t freebsd-swap -a 4k ada0
ada0p3 added
# gpart show ada0
=> 34102399933ada0GPT(48G)
34 128 1freebsd-boot(64k)
162 98566144 2freebsd-ufs(47G)
98566306 3833661 3freebsd-swap(1.8G)
# swapon /dev/ada0p3
Grow the UFS file system to use the new capacity of the resized partition:
Note: Growing a live UFS file system is only possible in FreeBSD 10.0-RELEASE and later. For earlier versions, the file system must not be mounted.
# growfs /dev/ada0p2
Device is mounted read-write; resizing will result in temporary write suspension for /.
It's strongly recommended to make a backup before growing the file system.
OK to grow file system on /dev/ada0p2, mounted on /, from 38GB to 47GB? Yes
super-block backups (for fsck -b #) at:
80781312, 82063552, 83345792, 84628032, 85910272, 87192512, 88474752,
89756992, 91039232, 92321472, 93603712, 94885952, 96168192, 97450432
Both the partition and the file system on it have now been resized to use the newly-available disk space.
NCpiro
发表于 2016-4-10 10:34
https://www.freebsd.org/doc/handbook/disks-growing.html
xman981
发表于 2016-4-11 01:03
NCpiro 发表于 2016-4-10 10:34
https://www.freebsd.org/doc/handbook/disks-growing.html
感谢补充,追求完善^sh^
BSDIvi
发表于 2016-5-6 14:16
感謝樓主!贊贊!
god3333
发表于 2016-5-6 14:35
为了学习破解,尼玛linux真不是普通人玩的,光是装个系统就难倒了N多人,更新源国内的速度也慢的要命关键是这个依赖那个依赖吐血,新手进去就是被虐的还有命令
wsmilex
发表于 2016-5-6 21:14
mark,有空试试
xman981
发表于 2016-5-15 01:05
god3333 发表于 2016-5-6 14:35
为了学习破解,尼玛linux真不是普通人玩的,光是装个系统就难倒了N多人,更新源国内的速度也慢的要命关键是 ...
所以,你应该明白我发此贴,花了多少时间和精力
就那个在线更新源,就是个变太方式,好还,最后通过光盘文件解决了^sh^
hckk123
发表于 2016-5-31 21:11
国内没找到pkg的源,从网上安装包慢的很。
zm423
发表于 2016-6-2 15:30
echo "exec /usr/local/bin/gnome-session" > ~/.xinitrc 少了这个命令
tcog
发表于 2016-6-14 10:15
多谢 。。。楼主。。。。。
woshiwxg
发表于 2016-6-14 10:39
这个是需要的不止一天两天的时间
takill
发表于 2016-6-14 11:04
这个系统,大多数人除了装逼之外没什么用
takill
发表于 2016-6-14 11:04
这个系统,大多数人除了装逼之外没什么用
maomaozrm
发表于 2016-6-15 09:54
刘英被查
fancylemon
发表于 2016-7-21 16:28
谢谢分享~~
plgkm6
发表于 2016-8-20 09:05
xman981 发表于 2015-9-24 14:52
在安装桌面服务包的过程中,查阅和泡了N多个坛,还有官方的Handbook,发现他们的教程,
都是10.0以前的版 ...
没明白,rc.conf和xorg.conf有什么关系?为什么每次修改rc.conf都要重新拷贝xorg.conf??
xman981
发表于 2016-8-20 12:42
plgkm6 发表于 2016-8-20 09:05 static/image/common/back.gif
没明白,rc.conf和xorg.conf有什么关系?为什么每次修改rc.conf都要重新拷贝xorg.conf??
因为参数改变,重新拷贝,是为了让系统重新校验,相当于Windows的刷新.
plgkm6
发表于 2016-8-20 20:47
不知道lz是否知道如何设置gnome3或者kde4的分辨率?网上修改xorg.conf的方法都会导致启动失败
arabianights
发表于 2016-9-22 21:45
freebsd is no good
上恒
发表于 2016-11-22 13:52
请问下楼主gnome如何用镜像安装?镜像包要提前下载么?
Simontune
发表于 2017-2-5 16:00
感谢分享,国内弄FreeBSD的比较少。。。
gig168
发表于 2017-2-28 22:29
不错
x10000
发表于 2017-3-22 09:59
用bsd玩桌面 难以理解
NCpiro
发表于 2017-3-28 20:33
FreeBSD有国内源了。。。见贴吧
wzdyjn
发表于 2018-9-29 21:34
我装完了 也配置完了 ,,但是启动不起来麻烦哪位大神看下,谢谢
xman981
发表于 2018-10-3 09:45
wzdyjn 发表于 2018-9-29 21:34 static/image/common/back.gif
我装完了 也配置完了 ,,但是启动不起来麻烦哪位大神看下,谢谢
你看我贴子的步骤来检查,看那步没搞对,还有就是注意桌面环境,是KDE还是Xfce 还是Gnome?不同桌面,方法有区别的