解决Linux开机出现A start job is running for ....(1min,30s),swap分区丢失的问题
2017-01-18 10:29
896 查看
电脑开机或重启后出现:a start job if running for …(1min,30s)
1.原因分析
使用命令:free -m
可看到swap的total和free为0,即swap分区丢失了
2.解决方法
添加swap分区即可
1)生成swapfile文件
执行:dd if=/dev/zero of=swapfile bs=1024 count=4194304
swapfile为文件名,自定义,count为swap分区的大小,count=1024*1024*4
生成的文件在执行命令的目录下;
2)swap格式化
sudo mkswap /srv/swapfile
这里的swapfile为上面生成的文件,应根据具体生成的位置写
查看文件使用情况:
swapon -s
3)设置开机自动启用swapfile
方法一:
sudo gedit /etc/rc.local
添加:
swapon /srv/swapfile
方法二:
sudo gedit /etc/rc.local
修改为:
4)重启后验证
free -m
1.原因分析
使用命令:free -m
可看到swap的total和free为0,即swap分区丢失了
2.解决方法
添加swap分区即可
1)生成swapfile文件
执行:dd if=/dev/zero of=swapfile bs=1024 count=4194304
swapfile为文件名,自定义,count为swap分区的大小,count=1024*1024*4
生成的文件在执行命令的目录下;
2)swap格式化
sudo mkswap /srv/swapfile
这里的swapfile为上面生成的文件,应根据具体生成的位置写
查看文件使用情况:
swapon -s
3)设置开机自动启用swapfile
方法一:
sudo gedit /etc/rc.local
添加:
swapon /srv/swapfile
方法二:
sudo gedit /etc/rc.local
修改为:
swap was on /dev/sda4 during installation
/srv/swapfile swap swap defaults 0 04)重启后验证
free -m
相关文章推荐
- A start job is running for Raise network interface(5min 13s )问题解决方法
- 解决a start job is running for dev-disk-by启动错误
- 一分30秒 kali 开机显示 a start job is running for dev-disk 处理
- Linux启动提示 a start job is running for
- CentOS7.4 a start job is running for wait for plymouth boot 解决办法
- Ubuntu 16.04 安装 VMware Tools后开机启动卡在A start job is running for LSB
- 【Linux】Ubuntu出现“the system is running in low-graphics mode”问题的解决办法
- VMware中archlinux开机遇到a start job is runing for sys-subsystem-net-device-VMnet8问题与不能联网问题
- 解决升级到最新版cocoaPods出现file was built for archive which is not the architecture being linked (x86_64)的问题
- firefox is already running..在linux中使用firfox出现的问题
- UBUNTU开机时出现“waiting for network configuration” 问题的解决
- 【Archlinux字符界面配置】Archlinux开关机出现:a start/stop is running for...方案贴汇总
- MacOS Sierra下运行react-native start出现Error watching file for changes: EMFILE问题解决
- UBUNTU开机时出现“waiting for network configuration” 问题的解决 (转)
- 解决问题:The run destination My Mac 64-bit is not valid for Running the scheme
- windows8开机出现start pxe over ipv4问题解决
- 启动ubuntu虚拟机,出现a start job is for raise network interfaces
- ubuntu 开机出现“ the disk drive for /media/XXXX is not ready yet or not present“解决
- mysql连接linux系统提示“登录出现1130 is not allowed to connect to this MySql server”问题,解决方法
- mysql连接linux系统提示“登录出现1130 is not allowed to connect to this MySql server”问题,解决方法