ubuntu can't start up--fix grub using ubuntu live cd
2016-01-17 21:10
330 查看
Ubuntu could't start up and it stoped at the ui just after VMWare logo.
before this issue happened, i modified /etc/default/grub. so it should be caused by this modification.
fix this problem/fix grub using ubuntu live cd.
1. vm--setting--cd/dvd
using iso image, select ubuntu iso image ubuntu-12.04.5-desktop-amd64.iso.
2. modify ubuntu.vmx in vmware dir
add a line:
bios.forceSetupOnce = "TRUE"
on start up Ubuntu, it will enter BISO.
set booting from cd/dvd, save and exit.
after this time, bios.forceSetupOnce to be set as "FALSE" automaticly.
3. mount ubuntu rootfs to /mnt
sudo su
fdisk -l// determine ubuntu rootfs is located on which device.
mount /dev/sda5 /mnt// mine is /dev/sda5. swap can't be mounted.
mount --bind /proc /mnt/proc
mount --bind /dev /mnt/dev
mount --bind /sys /mnt/sys
chroot /mnt
// after it, /mnt is root dir.
4. intall and update new grub
grub-install --root-directory=/mnt /dev/sda5
grub-mkconfig -o /boot/grub/grub.cfg
5. exit chroot and unmounting
exit // exit chroot
umount /mnt/proc
umount /mnt/dev
umount /mnt/sys
umount /mnt
power off and set booting from hard disk in BIOS.
6. configure routes of ubuntu kernel and initrd(rootfs)
it entered grub command line:
grub>
entering the below command to set the route of kernel and initrd(rootfs):
grub>linux /boot/vmlinuz-2.6.31.14 root=/dev/sda5// kernel and rootfs device. my ubuntu rootfs is on dev/sda5
grub>initrd /boot/initrd.img-2.6.31.14// initrd(rootfs)
grub>boot// boot this designated ubuntu(on my vmware, two ubuntu total).
it booted successful!
saved this dying ubuntu successful!
references:
http://www.xitongzhijia.net/xtjc/20141208/32106.html http://www.2cto.com/os/201501/370983.html
before this issue happened, i modified /etc/default/grub. so it should be caused by this modification.
fix this problem/fix grub using ubuntu live cd.
1. vm--setting--cd/dvd
using iso image, select ubuntu iso image ubuntu-12.04.5-desktop-amd64.iso.
2. modify ubuntu.vmx in vmware dir
add a line:
bios.forceSetupOnce = "TRUE"
on start up Ubuntu, it will enter BISO.
set booting from cd/dvd, save and exit.
after this time, bios.forceSetupOnce to be set as "FALSE" automaticly.
3. mount ubuntu rootfs to /mnt
sudo su
fdisk -l// determine ubuntu rootfs is located on which device.
mount /dev/sda5 /mnt// mine is /dev/sda5. swap can't be mounted.
mount --bind /proc /mnt/proc
mount --bind /dev /mnt/dev
mount --bind /sys /mnt/sys
chroot /mnt
// after it, /mnt is root dir.
4. intall and update new grub
grub-install --root-directory=/mnt /dev/sda5
grub-mkconfig -o /boot/grub/grub.cfg
5. exit chroot and unmounting
exit // exit chroot
umount /mnt/proc
umount /mnt/dev
umount /mnt/sys
umount /mnt
power off and set booting from hard disk in BIOS.
6. configure routes of ubuntu kernel and initrd(rootfs)
it entered grub command line:
grub>
entering the below command to set the route of kernel and initrd(rootfs):
grub>linux /boot/vmlinuz-2.6.31.14 root=/dev/sda5// kernel and rootfs device. my ubuntu rootfs is on dev/sda5
grub>initrd /boot/initrd.img-2.6.31.14// initrd(rootfs)
grub>boot// boot this designated ubuntu(on my vmware, two ubuntu total).
it booted successful!
saved this dying ubuntu successful!
references:
http://www.xitongzhijia.net/xtjc/20141208/32106.html http://www.2cto.com/os/201501/370983.html
相关文章推荐
- 数据库连接driverClass和jdbcUrl大全
- setKeepAliveTimeout
- Callable和Future
- POJ 1458 Common Subsequence
- 【转】CentOS 7.0系统安装配置图解教程 | 系统运维(除了网络)
- PAT 1011
- 判断图是否有环
- trap命令--在脚本中处理信号
- linux搭建ntp服务
- nginx同时监听本机ipv4/ipv6端口
- 如何对测试对象进行定位
- jQuery UI 实例 - 自动完成(Autocomplete)
- eatwhatApp开发实战(九)
- 从比特币到区块链的未来
- CGContext 总结
- code vs玉蟾宫
- 使用AsyncTask下载图片
- 设置Hadoop+Hbase集群pid文件存储位置
- Windows cmd命令搜索顺序
- Python 基础【一】