误删ubuntu16.04内核

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
gpupdate
帖子: 26
注册时间: 2016-05-19 17:57
系统: ubuntu16.04

误删ubuntu16.04内核

#1

帖子 gpupdate » 2016-09-15 12:38

1.系统提示磁盘空间不足,删除系统内核结果把当前系统内核删掉了。现在系统没法进去。
2.重新做了一个16.04系统u盘启动盘,能进入u盘的试用Ubuntu桌面,请教一下怎样修复系统。
头像
vickycq
帖子: 4507
注册时间: 2011-03-20 13:12
系统: Debian
来自: 山东省寿光县
联系:

Re: 误删ubuntu16.04内核

#2

帖子 vickycq » 2016-09-15 12:50

假设本地磁盘中的 Ubuntu 16.04 根分区位于 /dev/sda1
进入试用桌面,连接互联网

代码: 全选

sudo su
mount /dev/sda1 /mnt
mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
cp /etc/resolv.conf /mnt/etc/resolv.conf
chroot /mnt
apt install linux-image-generic
exit
umount /mnt/sys
umount /mnt/proc
umount /mnt/dev
umount /mnt
重新启动计算机
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户
gpupdate
帖子: 26
注册时间: 2016-05-19 17:57
系统: ubuntu16.04

Re: 误删ubuntu16.04内核

#3

帖子 gpupdate » 2016-09-15 13:05

我试了试,不行啊,另外我的主分区是哪个?不太确定啊

file:///home/ubuntu/%E5%9B%BE%E7%89%87/2016-09-15%2005-00-26%E5%B1%8F%E5%B9%95%E6%88%AA%E5%9B%BE.png
file:///home/ubuntu/%E5%9B%BE%E7%89%87/2016-09-15%2005-01-44%E5%B1%8F%E5%B9%95%E6%88%AA%E5%9B%BE.png
gpupdate
帖子: 26
注册时间: 2016-05-19 17:57
系统: ubuntu16.04

Re: 误删ubuntu16.04内核

#4

帖子 gpupdate » 2016-09-15 13:09

root@ubuntu:/home/ubuntu# mount /dev/sda1/mnt
mount: can't find /dev/sda1/mnt in /etc/fstab

图片发不了,所以复制过来了
头像
vickycq
帖子: 4507
注册时间: 2011-03-20 13:12
系统: Debian
来自: 山东省寿光县
联系:

Re: 误删ubuntu16.04内核

#5

帖子 vickycq » 2016-09-15 13:40

gpupdate 写了:另外我的主分区是哪个?
进入试用桌面执行以下指令将结果全部复制贴上来,不要截图
搞清之前切勿盲目操作

代码: 全选

sudo fdisk -l
sudo parted -l
gpupdate 写了:root@ubuntu:/home/ubuntu# mount /dev/sda1/mnt
mount: can't find /dev/sda1/mnt in /etc/fstab
您少打一空格,命令实为

代码: 全选

mount /dev/sda1 /mnt
gpupdate 写了: file:///home/ubuntu/%E5%9B%BE%E7%89%87/2016-09-15%2005-00-26%E5%B1%8F%E5%B9%95%E6%88%AA%E5%9B%BE.png
file:///home/ubuntu/%E5%9B%BE%E7%89%87/2016-09-15%2005-01-44%E5%B1%8F%E5%B9%95%E6%88%AA%E5%9B%BE.png
图片发不了
贴图方法:完整编辑界面下方 “Choose File” - 添加文件 - 等待上传页面消失 - 置入文中

gpupdate 写了:图片发不了,所以复制过来了
建议优先选择复制文字发帖,以利阅读。另可节省论坛资源
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户
gpupdate
帖子: 26
注册时间: 2016-05-19 17:57
系统: ubuntu16.04

Re: 误删ubuntu16.04内核

#6

帖子 gpupdate » 2016-09-15 13:47

ubuntu@ubuntu:~$ sudo fdisk -l
Disk /dev/ram0: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram1: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram2: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram3: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram4: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram5: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram6: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram7: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram8: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram9: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram10: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram11: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram12: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram13: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram14: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram15: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/loop0: 1.3 GiB, 1433468928 bytes, 2799744 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sda: 698.7 GiB, 750156374016 bytes, 1465149168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x51873b7b

设备 启动 Start 末尾 扇区 Size Id 类型
/dev/sda1 * 2048 58593279 58591232 28G 83 Linux
/dev/sda2 58595326 1465142016 1406546691 670.7G f W95 扩展 (LBA)
/dev/sda5 662761638 931223789 268462152 128G 7 HPFS/NTFS/exFAT
/dev/sda6 931223853 1199686004 268462152 128G 7 HPFS/NTFS/exFAT
/dev/sda7 1199686068 1465142016 265455949 126.6G 7 HPFS/NTFS/exFAT
/dev/sda8 58595328 662761471 604166144 288.1G 82 Linux 交换 / Solaris

Partition 2 does not start on physical sector boundary.
Partition 5 does not start on physical sector boundary.
Partition 6 does not start on physical sector boundary.
Partition 7 does not start on physical sector boundary.
Partition table entries are not in disk order.




Disk /dev/sdb: 7.2 GiB, 7751073792 bytes, 15138816 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xcad4ebea

设备 启动 Start 末尾 扇区 Size Id 类型
/dev/sdb4 * 256 15138815 15138560 7.2G b W95 FAT32
gpupdate
帖子: 26
注册时间: 2016-05-19 17:57
系统: ubuntu16.04

Re: 误删ubuntu16.04内核

#7

帖子 gpupdate » 2016-09-15 13:50

ubuntu@ubuntu:~$ sudo parted -l
Model: ATA Hitachi HTS54757 (scsi)
磁盘 /dev/sda: 750GB
Sector size (logical/physical): 512B/4096B
分区表:msdos
Disk Flags:

数字 开始: End 大小 类型 文件系统 标志
1 1049kB 30.0GB 30.0GB primary ext4 启动
2 30.0GB 750GB 720GB extended lba
8 30.0GB 339GB 309GB logical linux-swap(v1)
5 339GB 477GB 137GB logical ntfs
6 477GB 614GB 137GB logical ntfs
7 614GB 750GB 136GB logical ntfs


Model: Kingston DataTraveler 3.0 (scsi)
磁盘 /dev/sdb: 7751MB
Sector size (logical/physical): 512B/512B
分区表:msdos
Disk Flags:

数字 开始: End 大小 类型 文件系统 标志
4 131kB 7751MB 7751MB primary fat32 启动
头像
vickycq
帖子: 4507
注册时间: 2011-03-20 13:12
系统: Debian
来自: 山东省寿光县
联系:

Re: 误删ubuntu16.04内核

#8

帖子 vickycq » 2016-09-15 13:51

gpupdate 写了: Disklabel type: dos
Disk identifier: 0x51873b7b

设备 启动 Start 末尾 扇区 Size Id 类型
/dev/sda1 * 2048 58593279 58591232 28G 83 Linux
/dev/sda2 58595326 1465142016 1406546691 670.7G f W95 扩展 (LBA)
/dev/sda5 662761638 931223789 268462152 128G 7 HPFS/NTFS/exFAT
/dev/sda6 931223853 1199686004 268462152 128G 7 HPFS/NTFS/exFAT
/dev/sda7 1199686068 1465142016 265455949 126.6G 7 HPFS/NTFS/exFAT
/dev/sda8 58595328 662761471 604166144 288.1G 82 Linux 交换 / Solaris
猜测 本地磁盘 /dev/sda 中 Ubuntu 占据 /dev/sda1

分区顺序:
sda1 - Ubuntu 16.04 根分区,28G
sda2 - 扩展分区,670.7G
\- sda8 - swap,288.1G
\- sda5 - HPFS/NTFS/exFAT,128G
\- sda6 - HPFS/NTFS/exFAT,128G
\- sda7 - HPFS/NTFS/exFAT,126.6G
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户
gpupdate
帖子: 26
注册时间: 2016-05-19 17:57
系统: ubuntu16.04

Re: 误删ubuntu16.04内核

#9

帖子 gpupdate » 2016-09-15 14:14

难道是因为空格吗,我真是醉了!谢谢大神,我已进系统!之前试过不行,我还以为是分区错了!总算不用重装了!另外我的分区好像不太合理,可以扩容ubuntu分区吗?或者分区需要调整的?系统使用中总是提示磁盘空间不足。同祝中秋佳节节日快乐,阖家团圆!
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 误删ubuntu16.04内核

#10

帖子 poloshiao » 2016-09-15 15:48

系统使用中总是提示磁盘空间不足
把下面指令 複製 貼進終端機 執行
sudo cat /etc/fstab
把結果全部直接 選取/複製/貼上來

如果能夠把 提示磁盘空间不足 的訊息文字 全部複製貼上來 可以縮短尋找分割區時間
回复