Parrot Linux 启动到黑屏并闪烁下划线:可以使用 ctrl + alt + F1 获取 shell

Parrot Linux 启动到黑屏并闪烁下划线:可以使用 ctrl + alt + F1 获取 shell

因此,我最近移动了 Linux 交换分区,并调整了硬盘上 Parrot 安装的根分区的大小,以增加可用空间。使用 GParted 应用编辑后,我无法使用图形界面启动。相反,初始化后屏幕会变黑,左上角有一个闪烁的光标。据我推测,这与 GRUB 中的错误有关。在过去的两周里,我研究了如何处理这个问题的各种选择,但没有找到解决方案。使用 Ctrl+Alt+F1 获得 shell 后,我使用 apt-get、grub 和 initramfs 运行更新脚本。还可能存在与数组分段有关的错误。长话短说,我还遇到了连接 CDROM 驱动器的一根 SATA 电缆出现故障的情况。替换后,ata1: error:消息不再出现,但按照各种来源的建议mdadm: No arrays found in config file or automatically运行后bootinfoscript,问题仍然存在。我在这里不知所措,因为我尝试了各种想法但没有看到结果。

以下是解决该问题的一些资源:

bootinfoscript:

Boot Info Script 0.76      [13 April 2017]

Identifying MBRs...
Computing Partition Table of /dev/sda...
Searching sda1 for information... 
Searching sda2 for information... 
Searching sda4 for information... 
                  Boot Info Script 0.76      [13 April 2017]


============================= Boot Info Summary: ===============================

 => Grub2 (v2.00) is installed in the MBR of /dev/sda and looks at sector 1 of 
    the same hard drive for core.img. core.img is at this location and looks 
    for (,msdos1)/boot/grub. It also embeds following components:

    modules
    ---------------------------------------------------------------------------
    fshelp ext2 part_msdos biosdisk
    ---------------------------------------------------------------------------

sda1: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  Parrot GNU/Linux 4.0
    Boot files:        /boot/grub/grub.cfg /etc/fstab 
                       /boot/grub/i386-pc/core.img

sda2: __________________________________________________________________________

    File system:       swap
    Boot sector type:  -
    Boot sector info: 

sda4: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  
    Boot files:        

============================ Drive/Partition Info: =============================

Drive: sda _____________________________________________________________________
Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 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

Partition  Boot  Start Sector    End Sector  # of Sectors  Id System

/dev/sda1    *          2,048   697,952,255   697,950,208  83 Linux
/dev/sda2         697,952,256   697,972,735        20,480  82 Linux swap / Solaris
/dev/sda4       1,748,725,760 1,953,525,167   204,799,408  83 Linux


"blkid" output: ________________________________________________________________

Device           UUID                                   TYPE       LABEL

/dev/sda1        b7ff9eea-13c4-4b30-8104-b41cc3258364   ext4       
/dev/sda2        bff285cd-4db4-4ad7-8656-e86cf811808e   swap       
/dev/sda4        8583fa2e-35fe-4064-a277-201e72982afc   ext4       

========================= "ls -l /dev/disk/by-id" output: ======================

total 0
lrwxrwxrwx 1 root root  9 Jun  3 01:37 ata-ASUS_DRW-24F1ST_a_S10K68EF300420 -> ../../sr0
lrwxrwxrwx 1 root root  9 Jun  3 01:37 ata-TOSHIBA_DT01ACA100_Y3GYH74NS -> ../../sda
lrwxrwxrwx 1 root root 10 Jun  3 01:37 ata-TOSHIBA_DT01ACA100_Y3GYH74NS-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Jun  3 01:37 ata-TOSHIBA_DT01ACA100_Y3GYH74NS-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Jun  3 01:37 ata-TOSHIBA_DT01ACA100_Y3GYH74NS-part4 -> ../../sda4
lrwxrwxrwx 1 root root  9 Jun  3 01:37 wwn-0x5000039ff7cd67ef -> ../../sda
lrwxrwxrwx 1 root root 10 Jun  3 01:37 wwn-0x5000039ff7cd67ef-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Jun  3 01:37 wwn-0x5000039ff7cd67ef-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Jun  3 01:37 wwn-0x5000039ff7cd67ef-part4 -> ../../sda4

================================ Mount points: =================================

Device           Mount_Point              Type       Options

/dev/sda1        /                        ext4       (rw,relatime,errors=remount-ro,data=ordered)
/dev/sda1        /var/lib/docker/overlay2 ext4       (rw,relatime,errors=remount-ro,data=ordered)
/dev/sda1        /var/lib/docker/plugins  ext4       (rw,relatime,errors=remount-ro,data=ordered)


=========================== sda1/boot/grub/grub.cfg: ===========================

--------------------------------------------------------------------------------
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  set have_grubenv=true
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}
function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  b7ff9eea-13c4-4b30-8104-b41cc3258364
else
  search --no-floppy --fs-uuid --set=root b7ff9eea-13c4-4b30-8104-b41cc3258364
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=C
  insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
  set timeout=30
else
  if [ x$feature_timeout_style = xy ] ; then
    set timeout_style=menu
    set timeout=5
  # Fallback normal timeout code in case the timeout_style feature is
  # unavailable.
  else
    set timeout=5
  fi
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  b7ff9eea-13c4-4b30-8104-b41cc3258364
else
  search --no-floppy --fs-uuid --set=root b7ff9eea-13c4-4b30-8104-b41cc3258364
fi
insmod png
if background_image /usr/share/desktop-base/parrot-theme/grub/grub-4x3.png; then
  true
else
  set menu_color_normal=cyan/blue
  set menu_color_highlight=white/blue
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
    set gfxpayload="${1}"
}
set linux_gfx_mode=
export linux_gfx_mode
menuentry 'Parrot GNU/Linux' --class parrot --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-b7ff9eea-13c4-4b30-8104-b41cc3258364' {
    load_video
    insmod gzio
    if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos1'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  b7ff9eea-13c4-4b30-8104-b41cc3258364
    else
      search --no-floppy --fs-uuid --set=root b7ff9eea-13c4-4b30-8104-b41cc3258364
    fi
    echo    'Loading Linux 4.16.0-parrot12-amd64 ...'
    linux   /boot/vmlinuz-4.16.0-parrot12-amd64 root=UUID=b7ff9eea-13c4-4b30-8104-b41cc3258364 ro noautomount quiet
    echo    'Loading initial ramdisk ...'
    initrd  /boot/initrd.img-4.16.0-parrot12-amd64
}
submenu 'Advanced options for Parrot GNU/Linux' $menuentry_id_option 'gnulinux-advanced-b7ff9eea-13c4-4b30-8104-b41cc3258364' {
    menuentry 'Parrot GNU/Linux, with Linux 4.16.0-parrot12-amd64' --class parrot --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.16.0-parrot12-amd64-advanced-b7ff9eea-13c4-4b30-8104-b41cc3258364' {
        load_video
        insmod gzio
        if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
        insmod part_msdos
        insmod ext2
        set root='hd0,msdos1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  b7ff9eea-13c4-4b30-8104-b41cc3258364
        else
          search --no-floppy --fs-uuid --set=root b7ff9eea-13c4-4b30-8104-b41cc3258364
        fi
        echo    'Loading Linux 4.16.0-parrot12-amd64 ...'
        linux   /boot/vmlinuz-4.16.0-parrot12-amd64 root=UUID=b7ff9eea-13c4-4b30-8104-b41cc3258364 ro noautomount quiet
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.img-4.16.0-parrot12-amd64
    }
    menuentry 'Parrot GNU/Linux, with Linux 4.16.0-parrot12-amd64 (recovery mode)' --class parrot --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.16.0-parrot12-amd64-recovery-b7ff9eea-13c4-4b30-8104-b41cc3258364' {
        load_video
        insmod gzio
        if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
        insmod part_msdos
        insmod ext2
        set root='hd0,msdos1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  b7ff9eea-13c4-4b30-8104-b41cc3258364
        else
          search --no-floppy --fs-uuid --set=root b7ff9eea-13c4-4b30-8104-b41cc3258364
        fi
        echo    'Loading Linux 4.16.0-parrot12-amd64 ...'
        linux   /boot/vmlinuz-4.16.0-parrot12-amd64 root=UUID=b7ff9eea-13c4-4b30-8104-b41cc3258364 ro single noautomount
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.img-4.16.0-parrot12-amd64
    }
    menuentry 'Parrot GNU/Linux, with Linux 4.16.0-parrot5-amd64' --class parrot --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.16.0-parrot5-amd64-advanced-b7ff9eea-13c4-4b30-8104-b41cc3258364' {
        load_video
        insmod gzio
        if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
        insmod part_msdos
        insmod ext2
        set root='hd0,msdos1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  b7ff9eea-13c4-4b30-8104-b41cc3258364
        else
          search --no-floppy --fs-uuid --set=root b7ff9eea-13c4-4b30-8104-b41cc3258364
        fi
        echo    'Loading Linux 4.16.0-parrot5-amd64 ...'
        linux   /boot/vmlinuz-4.16.0-parrot5-amd64 root=UUID=b7ff9eea-13c4-4b30-8104-b41cc3258364 ro noautomount quiet
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.img-4.16.0-parrot5-amd64
    }
    menuentry 'Parrot GNU/Linux, with Linux 4.16.0-parrot5-amd64 (recovery mode)' --class parrot --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.16.0-parrot5-amd64-recovery-b7ff9eea-13c4-4b30-8104-b41cc3258364' {
        load_video
        insmod gzio
        if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
        insmod part_msdos
        insmod ext2
        set root='hd0,msdos1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  b7ff9eea-13c4-4b30-8104-b41cc3258364
        else
          search --no-floppy --fs-uuid --set=root b7ff9eea-13c4-4b30-8104-b41cc3258364
        fi
        echo    'Loading Linux 4.16.0-parrot5-amd64 ...'
        linux   /boot/vmlinuz-4.16.0-parrot5-amd64 root=UUID=b7ff9eea-13c4-4b30-8104-b41cc3258364 ro single noautomount
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.img-4.16.0-parrot5-amd64
    }
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###

### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
### END /etc/grub.d/30_uefi-firmware ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
--------------------------------------------------------------------------------

=============================== sda1/etc/fstab: ================================

--------------------------------------------------------------------------------
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda1 during installation
/dev/sda1 /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
/dev/sda2 none            swap    sw              0       0
/dev/sr0        /media/cdrom0   udf,iso9660 user,noauto     0       0
--------------------------------------------------------------------------------

=================== sda1: Location of files loaded by Grub: ====================

           GiB - GB             File                                 Fragment(s)

 187.522518158 = 201.350770688  boot/grub/grub.cfg                             3
   4.466430664 = 4.795793408    boot/grub/i386-pc/core.img                     1
 190.794677734 = 204.864225280  boot/vmlinuz-4.16.0-parrot12-amd64             1
 116.404052734 = 124.987899904  boot/vmlinuz-4.16.0-parrot5-amd64              1
 190.794677734 = 204.864225280  vmlinuz                                        1
 116.404052734 = 124.987899904  vmlinuz.old                                    1
   7.262573242 = 7.798128640    boot/initrd.img-4.12.0-parrot6-amd64.old-dkms  3
 131.342136383 = 141.027545088  boot/initrd.img-4.13.0-parrot4-amd64.dpkg-bak  2
 185.904907227 = 199.613874176  boot/initrd.img-4.13.0-parrot4-amd64.old-dkms  1
  19.698547363 = 21.151154176   boot/initrd.img-4.14.0-parrot13-amd64.old-dkms  5
  55.503704071 = 59.596648448   boot/initrd.img-4.15.0-parrot17-amd64.old-dkms  1
  91.322883606 = 98.057199616   boot/initrd.img-4.16.0-parrot12-amd64          2
  85.414760590 = 91.713400832   boot/initrd.img-4.16.0-parrot5-amd64           4
  91.322883606 = 98.057199616   initrd.img                                     2
  85.414760590 = 91.713400832   initrd.img.old                                 4

=============================== StdErr Messages: ===============================

mdadm: No arrays found in config file or automatically

答案1

** 使用 GParted 应用编辑后,我无法使用图形界面启动。相反,初始化后屏幕会变黑,左上角有一个闪烁的光标。 **

我有类似的问题,但不完全相同,您可能想尝试这个:[修复 grub 启动后的黑屏(屏幕/视频设置不匹配)]

相关内容