centos 7 安装U盘文件

在VMware Workstation里安装centos7 64位

在电脑上插上U盘,把文件拷贝到centos7里

在centos7 

1.查看U盘

fdisk -l

报错:

fdisk: cannot open /dev/sda: Permission denied

切换

su root

插上U盘 再次 fdisk -l

/dev/sdb1 

将u盘挂载到mnt:

mount /dev/sdb1 /mnt/

检查是否挂载成功

ls /mnt/

拷贝文件:

cp /mnt/setup/ /root/

报错:

cp: omitting directory ‘/mnt/setup/’

解决办法:

cp -r /mnt/setup/ /root/

卸载U盘

umount /mnt/

第二次 重装虚拟机 重装centos7

执行:

./setup.sh

报错:

[root@localhost ~]# cd setup/
[root@localhost setup]# chmod +x *.sh
[root@localhost setup]# ./setup.sh 
stop firewall
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
install docker
Loaded plugins: fastestmirror, langpacks
Existing lock /var/run/yum.pid: another copy is running as pid 3039.
Another app is currently holding the yum lock; waiting for it to exit...
  The other application is: PackageKit
    Memory : 153 M RSS (575 MB VSZ)
    Started: Fri Jun 25 23:22:36 2021 - 15:27 ago
    State  : Sleeping, pid: 3039
Another app is currently holding the yum lock; waiting for it to exit...
  The other application is: PackageKit
    Memory : 153 M RSS (575 MB VSZ)
    Started: Fri Jun 25 23:22:36 2021 - 15:29 ago
    State  : Sleeping, pid: 3039

解决办法:

rm -f /var/run/yum.pid

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值