首页
统计
留言版
壁纸
更多
相册
友人帐
直播
Search
1
jellfin、emby、kodi:电影、电视剧、字幕命名规范
134 阅读
2
群晖ssh修改sn码和mac地址
68 阅读
3
podman安装青龙
66 阅读
4
图片压缩网站与软件
66 阅读
5
pve设置开机挂载虚拟硬盘(适用基于debian的linux系统)
61 阅读
默认分类
小主机
资源工具
登录
Search
标签搜索
pve
podman
debian
linux
硬盘挂载
Power Query
Excel
Feng
累计撰写
7
篇文章
累计收到
1
条评论
首页
栏目
默认分类
小主机
资源工具
页面
统计
留言版
壁纸
相册
友人帐
直播
搜索到
2
篇与
的结果
2023-01-17
pve设置开机挂载虚拟硬盘(适用基于debian的linux系统)
挂载的原因每次开机需要使用指令挂载新分区mount /dev/sdb6 /mnt/pve/memory很不方便,尤其是意外断电重启的时候,一时半会找不到指令,或者回来发现pve状态不对。操作步骤备份旧的配置文件cp /etc/fstab /etc/fstab.bak查看分区的UUIDblkid可以看到输出的结果包含/dev/sdb6: UUID="9860a84b-2e5f-4a94-9687-76701c786336" UUID_SUB="36ec44e0-309f-4539-9dad-c6ed8ef95d2a" BLOCK_SIZE="4096" TYPE="btrfs" PARTUUID="ccd58c0b-42ae-ff43-96ee-ec584a6abfd2"其中 UUID 为9860a84b-2e5f-4a94-9687-76701c786336分区文件格式为brtfs写入配置文件echo UUID=9860a84b-2e5f-4a94-9687-76701c786336 /mnt/pve/memory btrfs defaults 0 0 >> /etc/fstab参数为挂载分区UUID、挂载路径、分区格式注:如果配置文件信息有误,重启云服务器时会进入维护模式,需要修改配置信息正确才能正常进入操作系统。通过将信息写入etc/fstab中进行自动化挂载云硬盘操作时,建议不要使用盘符以及分区id,建议使用文件系统的UUID,因为当云硬盘涉及到挂载和卸载操作时盘符会产生改变或者漂移。查看新的配置文件(检查)cat /etc/fstab/etc/fstab文件参数说明字段定义/etc/fstab 文件包含了如下字段,通过空格或 Tab 分隔:【file system】 【dir】 【type】 【options】 【dump】 【pass】【file systems】 - 要挂载的分区或存储设备.【dir】 - 【file systems】的挂载位置。【type】 - 要挂载设备或是分区的文件系统类型,支持许多种不同的文件系统:ext2, ext3, ext4, reiserfs, xfs, jfs, smbfs, iso9660, vfat, ntfs, swap 及 auto。 设置成auto类型,mount 命令会猜测使用的文件系统类型,对 CDROM 和 DVD 等移动设备是非常有用的。【options】 - 挂载时使用的参数,注意有些mount 参数是特定文件系统才有的。一些比较常用的参数有:auto - 在启动时或键入了 mount -a 命令时自动挂载。noauto - 只在你的命令下被挂载。exec - 允许执行此分区的二进制文件。noexec - 不允许执行此文件系统上的二进制文件。ro - 以只读模式挂载文件系统。rw - 以读写模式挂载文件系统。user - 允许任意用户挂载此文件系统,若无显示定义,隐含启用 noexec, nosuid, nodev 参数。users - 允许所有 users 组中的用户挂载文件系统.nouser - 只能被 root 挂载。owner - 允许设备所有者挂载.sync - I/O 同步进行。async - I/O 异步进行。dev - 解析文件系统上的块特殊设备。nodev - 不解析文件系统上的块特殊设备。suid - 允许 suid 操作和设定 sgid 位。这一参数通常用于一些特殊任务,使一般用户运行程序时临时提升权限。nosuid - 禁止 suid 操作和设定 sgid 位。noatime - 不更新文件系统上 inode 访问记录,可以提升性能(参见 atime 参数)。nodiratime - 不更新文件系统上的目录 inode 访问记录,可以提升性能(参见 atime 参数)。relatime - 实时更新 inode access 记录。只有在记录中的访问时间早于当前访问才会被更新。(与 noatime 相似,但不会打断如 mutt 或其它程序探测文件在上次访问后是否被修改的进程。),可以提升性能(参见 atime 参数)。flush - vfat 的选项,更频繁的刷新数据,复制对话框或进度条在全部数据都写入后才消失。defaults - 使用文件系统的默认挂载参数,例如 ext4 的默认参数为:rw, suid, dev, exec, auto, nouser, async.【dump】 dump 工具通过它决定何时作备份. dump 会检查其内容,并用数字来决定是否对这个文件系统进行备份。 允许的数字是 0 和 1 。0 表示忽略, 1 则进行备份。大部分的用户是没有安装 dump 的 ,对他们而言 【dump】 应设为 0。【pass】 fsck 读取 【pass】 的数值来决定需要检查的文件系统的检查顺序。允许的数字是0, 1, 和2。 根目录应当获得最高的优先权 1, 其它所有需要被检查的设备设置为 2. 0 表示设备不会被 fsck 所检查。参考链接
2023年01月17日
61 阅读
0 评论
0 点赞
2022-05-02
小主机
安装PVEPVE直通Intel CPUshell里面输入命令:nano /etc/default/grub在里面找到:GRUB_CMDLINE_LINUX_DEFAULT="quiet"然后修改为GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on"在更新一下update-grub重启一下reboot添加内核模块修改文件 /etc/modules 加入如下的行(默认为空):vfio vfio_iommu_type1 vfio_pci vfio_virqfdPVE升级后台选择 更新 选择 存储库选择 enterprise.proxmox.com/debian/pve 点击 禁用添加 No-Subscription 然后会增加一个download.proxmox.com/debian/pve 即为成功选择 更新 点击 升级等待完成即可PVE设置WIFI 参考文章pve热点方案查看无线网卡是否被检测到 lspci -nn查看无线网卡调用的设备模块 lspci -k -nn -d 168c:0042 其中"168c:0042"是上一条指令出来的编码查看无线网卡驱动是不是正常加载名称 ip link show无线安装需要模块 apt-get install iw net-tools wireless-tools查看是否支持AP iw list | grep -A 30 'Frequencies:'查看是否支持多SSID iw list | grep -A 2 'valid interface combinations'安装热点包 apt-get install hostapd输入 nano /etc/default/hostapd 编辑文件,添加 DAEMON_CONF="/etc/hostapd/hostapd.conf"(配置文件位置)hostpad介绍 配置文件如下:备用网址 用vim编辑/etc/hostapd/hostapd.conf添加以下内容后保存# pve bridge bridge=vmbr0 # AP netdevice name (without 'ap' postfix, i.e., wlan0 uses wlan0ap for # management frames); ath0 for madwifi interface=wlp1s0 # Driver interface type (hostap/wired/madwifi/test/none/nl80211/bsd); # default: hostap). nl80211 is used with all Linux mac80211 drivers. # Use driver=none if building hostapd as a standalone RADIUS server that does # not control any wireless/wired driver. driver=nl80211 # SSID to be used in IEEE 802.11 management frames ssid=MyWiFi # Operation mode (a = IEEE 802.11a, b = IEEE 802.11b, g = IEEE 802.11g, # ad = IEEE 802.11ad (60 GHz); a/g options are used with IEEE 802.11n, too, to # specify band) # Default: IEEE 802.11b hw_mode=g wme_enabled=1 ieee80211n=1 ht_capab=[HT40+][SHORT-GI-40][DSSS_CCK-40] # Channel number (IEEE 802.11) # (default: 0, i.e., not set) # Please note that some drivers do not use this value from hostapd and the # channel will need to be configured separately with iwconfig. # # If CONFIG_ACS build option is enabled, the channel can be selected # automatically at run time by setting channel=acs_survey or channel=0, both of # which will enable the ACS survey based algorithm. channel=1 # Station MAC address -based authentication # Please note that this kind of access control requires a driver that uses # hostapd to take care of management frame processing and as such, this can be # used with driver=hostap or driver=nl80211, but not with driver=madwifi. # 0 = accept unless in deny list # 1 = deny unless in accept list # 2 = use external RADIUS server (accept/deny lists are searched first) macaddr_acl=0 # IEEE 802.11 specifies two authentication algorithms. hostapd can be # configured to allow both of these or only one. Open system authentication # should be used with IEEE 802.1X. # Bit fields of allowed authentication algorithms: # bit 0 = Open System Authentication # bit 1 = Shared Key Authentication (requires WEP) auth_algs=3 # Send empty SSID in beacons and ignore probe request frames that do not # specify full SSID, i.e., require stations to know SSID. # default: disabled (0) # 1 = send empty (length=0) SSID in beacon and ignore probe request for # broadcast SSID # 2 = clear SSID (ASCII 0), but keep the original length (this may be required # with some clients that do not support empty SSID) and ignore probe # requests for broadcast SSID ignore_broadcast_ssid=0 # Enable WPA. Setting this variable configures the AP to require WPA (either # WPA-PSK or WPA-RADIUS/EAP based on other configuration). For WPA-PSK, either # wpa_psk or wpa_passphrase must be set and wpa_key_mgmt must include WPA-PSK. # Instead of wpa_psk / wpa_passphrase, wpa_psk_radius might suffice. # For WPA-RADIUS/EAP, ieee8021x must be set (but without dynamic WEP keys), # RADIUS authentication server must be configured, and WPA-EAP must be included # in wpa_key_mgmt. # This field is a bit field that can be used to enable WPA (IEEE 802.11i/D3.0) # and/or WPA2 (full IEEE 802.11i/RSN): # bit0 = WPA # bit1 = IEEE 802.11i/RSN (WPA2) (dot11RSNAEnabled) wpa=2 # WPA pre-shared keys for WPA-PSK. This can be either entered as a 256-bit # secret in hex format (64 hex digits), wpa_psk, or as an ASCII passphrase # (8..63 characters) that will be converted to PSK. This conversion uses SSID # so the PSK changes when ASCII passphrase is used and the SSID is changed. # wpa_psk (dot11RSNAConfigPSKValue) # wpa_passphrase (dot11RSNAConfigPSKPassPhrase) # wpa_psk=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef wpa_passphrase=toseeyou # Set of accepted key management algorithms (WPA-PSK, WPA-EAP, or both). The # entries are separated with a space. WPA-PSK-SHA256 and WPA-EAP-SHA256 can be # added to enable SHA256-based stronger algorithms. # (dot11RSNAConfigAuthenticationSuitesTable) # wpa_key_mgmt=WPA-PSK WPA-EAP wpa_key_mgmt=WPA-PSK # Set of accepted cipher suites (encryption algorithms) for pairwise keys # (unicast packets). This is a space separated list of algorithms: # CCMP = AES in Counter mode with CBC-MAC [RFC 3610, IEEE 802.11i/D7.0] # TKIP = Temporal Key Integrity Protocol [IEEE 802.11i/D7.0] # Group cipher suite (encryption algorithm for broadcast and multicast frames) # is automatically selected based on this configuration. If only CCMP is # allowed as the pairwise cipher, group cipher will also be CCMP. Otherwise, # TKIP will be used as the group cipher. # (dot11RSNAConfigPairwiseCiphersTable) # Pairwise cipher for WPA (v1) (default: TKIP) # wpa_pairwise=TKIP CCMP wpa_pairwise=TKIP # Pairwise cipher for RSN/WPA2 (default: use wpa_pairwise value) rsn_pairwise=CCMP调试 hostapd /etc/hostapd/hostapd.conf 测试是否能收到WIFI桥接无线网卡,直接到网络设置操作如果您启停hostapd服务出现类似Failed to start hostapd.service: Unit hostapd.service is masked.等错误,请执行下面命令。systemctl unmask hostapd systemctl enable hostapd systemctl start hostapd更换更新源pvetools安装ROS官网下载chr版本,使用帐号登陆激活试用安装 OpenWRT双软路由方案旁路由将ROS的DHCP服务器网关设置成OpenWRT的IP,OpenWRT关闭DHCP,并将网关设置为ROS。ROS本身网关设置为光猫。DHCP的DNS服务器设置为ROS,ROS将DNS设置为OpenWRT,并开启缓存。以便启用 AdGuard Home 的DNS。OpenWRT的DNS设置为外网的DNS 119.29.29.29等OSPF通信路由表OSPF在OpenWRT安装bird,但是bird的路由下一跳有问题(暂时不用)黑群晖安装6.2.3版本隐藏启动盘全盘映射读取硬盘IDls /dev/disk/by-id找到硬盘ID复制输入qm set 100 -sata1 /dev/disk/by-id/ata-WDC_WD10SPCX-24HWST1_WD-WXJ1AA5J8E18 若返回以下值,说明成功update VM 100: -sata1 /dev/disk/by-id/ata-WDC_XXXX_XXXX_XXXXwin10需要加载的虚拟驱动PVE安装win时,需要加载虚拟驱动盘,下载地址:https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/latest-virtio/virtio-win.iso在安装时,如果找不到磁盘,加载虚拟光盘的这里:光驱virtio-win.isovioscsiw10amd64安装win成功后进系统打驱动这一步很多教程都是进设备管理器,一个一个添加,其实不用,直接运行光驱virtio-win-guest-tools.exe会安装驱动PVE安装win后,QEMU Guest Agent安装出现错误代码的解决方法这个是镜像原因,一般精简的系统容易出现这个问题guest agent还是比较重要的,安装成功才能的虚拟后台直接开关机系统。windows打开空密码远程虚拟机里面的win如果没有密码,一般远程时会提示错误,打开允许空密码远程就可以“win+R”,输入GPEDIT.MSC,找到“计算机配置-WINDOWS设置-安全设置-本地策略-安全选项”“帐户:使用空白密码的本地帐户只允许进行控制台登录”,将其设置为“已停用”。
2022年05月02日
46 阅读
0 评论
0 点赞