V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
fuxkcsdn
V2EX  ›  Linux

Debian 7 in VirtualBox,无法进入系统, grub rescue 模式下提示 out of partition

  •  
  •   fuxkcsdn · 2016-11-10 23:05:03 +08:00 · 3756 次点击
    这是一个创建于 2939 天前的主题,其中的信息可能已经有所发展或是发生改变。

    Windows 8.1 64 位企业版宿主机上运行 VirtualBox 5.0.10 ,虚拟机是 Debian 7 amd64

    虚拟机去年安装的,天天在用,一直好好的,今天下午 putty 连上去也一直正常,要下班时想退出 putty ,运行 exit 提示找不到命令,然后发现所有命令都找不到了,打开 VirtualBox 上看, mount 发现挂载成只读

    强制重启,进入 grub rescue 模式 显示

    GRUB loading.
    Welcome to GRUB!
    
    error: out of partition.
    Entering rescue mode...
    # 根据 google 到的信息输入
    grub rescue> ls
    (hd0) (hd0,msdos5) (hd0,msdos1)
    grub rescue> ls (hd0,msdos1)/
    ./ ../ lost+found/ var/ etc/ media/ vmlinuz sbin/ usr/ lib/ lib64/ selinux/ bin/ boot/
    proc/ mnt/ tmp/ dev/ home/ root/ sys/ run/ srv/ opt/ initrd.img keybase/ lib32/ core
    grub rescue> ls (hd0,msdos1)/boot/
    
    error: out of partition.
    grub rescue> ls (hd0)/
    error: unknown filesystem
    grub rescue> ls (hd0,msdos5)/
    error: unknown filesystem
    grub rescue> set root=(hd0,msdos1)
    grub rescue> set prefix=(hd0,msdos1)/boot/grub
    grub rescue> insmod normal
    error: out of partition.
    grub rescue> normal
    Unknow command 'normal'
    grub rescue> 
    

    使用从官网下载的 debian-7.11.0-amd64-netinst.iso 启动到 rescue mode ,但在最后选择挂载系统的时候就出错了,不管选择哪个都提示

    An error occurred while mounting the device you entered for your root file system (/dev/sda1) on /target
    Please check the syslog for more information.
    

    选择不挂载分区进入 rescue mode 后,/var/log/syslog 信息如下

    rescue-mode: partitions found: /dev/sda1, /dev/sda2, /dev/sda5
    rescue-mode: selected root device '/dev/sda1'
    rescue: umount: can't umount /target: Invalid argument
    kernel: EXT2-fs (sda1): error: couldn't mount because of unsupported optional features (244)
    kernel: EXT3-fs (sda1): error: couldn't mount because of unsupported optional features (240)
    kernel: EXT4-fs (sda1): ext4_check_descriptors: Block bitmap for group 128 not in group (block 811458560)!
    kernel: EXT4-fs (sda1): group descriptors corrupted!
    kernel: FAT-fs (sda1): utf8 is not a recommented IO charset for FAT filesystems, filesystem will be case sensitive!
    rescue: mount: mounting /dev/sda1 on /target failed: Invalid argument
    rescue-mode: mount '/dev/sda1' /target failed
    kernel: atkbd serio0: Spurious NAK on isa0060/serio0. Some program migh be trying access hardware directly.
    rescue-mode: partitions found: /dev/sda1, /dev/sda2, /dev/sda5
    rescue-mode: selected root device '/dev/sda2'
    rescue: umount: can't umount /target: Invalid argument
    kernel: isofs_fill_super: bread failed, dev=sda2, iso_blknum=16, block=32
    kernel: EXT2-fs (sda2): error: unable to read superblock
    kernel: EXT3-fs (sda2): error: unable to read superblock
    kernel: EXT4-fs (sda2): unable to read superblock
    kernel: REISERFS warning (device sda2): sh-2006 read_super_block: bread failed (dev sda2, block 8, size 1024)
    kernel: REISERFS warning (device sda2): sh-2006 read_super_block: bread failed (dev sda2, block 64, size 1024)
    kernel: FAT-fs (sda2): utf8 is not a recommented IO charset for FAT filesystems, filesystem will be case sensitive!
    rescue: mount: mounting /dev/sda2 on /target failed: Invalid argument
    rescue-mode: mount '/dev/sda2' /target failed
    rescue-mode: partitions found: /dev/sda1, /dev/sda2, /dev/sda5
    rescue-mode: selected root device '/dev/sda5'
    rescue: umount: can't umount /target: Invalid argument
    kernel: FAT-fs (sda5): utf8 is not a recommented IO charset for FAT filesystems, filesystem will be case sensitive!
    rescue: mount: mounting /dev/sda5 on /target failed: Invalid argument
    rescue-mode: mount '/dev/sda5' /target failed
    

    系统可以不要,代码可都在这机器里啊...虽然大部分都有 push 到 git 上,但也还有很多配置都没导出来啊 TAT

    现在尝试在 rescue 模式下重装 grub 试试...

    6 条回复    2016-11-11 22:19:27 +08:00
    ilovesusu
        1
    ilovesusu  
       2016-11-11 13:44:41 +08:00
    重装 grub 可以搞定的
    开机 grub rescue> 一般修复 grub 引导可以 是在不行话也可以在添加一个硬盘然后装系统,然后把之前的硬盘挂在上就可以,最好先把虚拟硬盘文件备份下
    希望你能弄好
    ryd994
        2
    ryd994  
       2016-11-11 14:29:33 +08:00
    先别管 grub 了,上网下个 livecd 或者 rescuecd
    挂进去把数据拷出来再说
    数据备份好的话随便折腾
    fuxkcsdn
        3
    fuxkcsdn  
    OP
       2016-11-11 14:34:34 +08:00
    @ilovesusu
    @ryd994
    今早备份了 vhd 文件,现在用 slacko64-6.3.0.iso 进 livecd 里,但里面的 pmount 挂载不上硬盘
    /var/log/message 里显示的错误信息是

    EXT4-fs (sda1): ext4_check_descriptors: Block bitmap for group 128 not in group (block 811458560)!
    EXT4-fs (sda1): group descriptors corrupted!

    现在尝试用 fsck.ext4 进行修复,一大堆的 Fixed? ....

    想不通咋突然说坏就坏...我宿主机系统的硬盘检测是正常的,重启了宿主机也都很正常...
    ryd994
        4
    ryd994  
       2016-11-11 17:30:29 +08:00
    @fuxkcsdn 多半是非正常关机
    你 fstab 里没加什么奇怪的 writeback 吧?
    运气不好的话就算 fsck 过了也是废了
    fuxkcsdn
        5
    fuxkcsdn  
    OP
       2016-11-11 17:36:13 +08:00
    @ryd994 用 fsck.ext4 -ycf 修复好了,但 /boot 里是空的, vmlinuz 自然也不存在了,好在资料是正常的(至少看了几个都是正常的)

    fstab 一直没去动过,非正常关机有可能...因为是运行在后台的,经常关 windows 的时候忘记先关虚拟机了...不过好几次都没事就对了...
    quxinna
        6
    quxinna  
       2016-11-11 22:19:27 +08:00
    vbox 好像不可靠
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1293 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 22ms · UTC 17:55 · PVG 01:55 · LAX 09:55 · JFK 12:55
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.