1

When I boot up there are six options listed, when I think perhaps there should only be four? 1+2 and 5+6 seem to refer to different Lubuntu versions.

  1. Ubuntu
  2. Advanced options for Ubuntu
  3. Memory test
  4. Memory test serial console
  5. Ubuntu 18.04.1 LTS (18.04 on /dev/sd65)
  6. Advanced options for Ubuntu 18.04.1 LTS (18.04 on /dev/sd65)

5 and 6 appear to prompt me with a username I abandoned because I wasn't letting me do updates (some super-small partition for unknown reasons) and did a fresh install wiping out Windows Vista as well as my 1st install of Lubuntu.

This seems to be an echo of it and I want to clear up space and avoid confusion. File Manager PCManFM mentions a 3.7 GB Volume which might be the culprit.

Notes & System Info

  • When my computer automatically starts up, it stalls on a black screen and I'm not brought to the login screen. Choosing "Advanced" from the start-up menu and then "Recovery Mode" and then "Resume Normal Boot" seems to bring it up for me, I'm not sure where.

  • When I go into "Advanced" there are 4 options now (there used to be 2 yesterday!) for the normal/recovery of both 4.15.0-34 and 4.15-0.29. I chose 34 since that sounded like the more recent update. 4.15.0.29 is also the version which shows up if going into the Advanced Options for Ubuntu 18.04.1 LTS. If 29 is outdated I'd like to get rid of both 29s and just have 34 run, but have it not go into a black screen, even if that means it auto-runs Recovery Mode every time upon start-up instead of non-Recovery mode.

$ sudo lsblk -f
NAME                   FSTYPE LABEL               UUID                                   MOUNTPOINT
sda
└─sda1
  ├─LVM2_m                                        GNFcFZ-msHQ-7StI-abZJ-sNGC-LFnZ-k0RfGA
  ├─lubuntu--vg-root   ext4                       082b416e-387c-41f5-89c2-a2346900e7e4   /
  └─lubuntu--vg-swap_1 swap                       afc0be1d-6a95-487c-9168-eb0d410faf3e   [SWAP]
sdb
├─sdb1                 ntfs   HP_PAVILION Adjacent Reserve 1/2   24483AB0483A809A        /media/jay 
├─sdb2
└─sdb5                 ext4                       7a6647ec-d9ef-456f-9a47-baf96238738e   /media/jay
sr0

$ sudo os-prober
/dev/sdb5:Ubuntu 18.04.1 LTS (18.04):Ubuntu:linux

/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 recordfail {
  set recordfail=1
  # GRUB lacks write support for lvm, so recordfail support is disabled.
}
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 lvm
insmod ext2
set root='lvmid/HORLtD-crE4-d90f-Nthf-cpUz-pHKh-jjsFCl/bHSqxy-di5E-WSMS-HeIu-XBEx-XCn3-CNMu0O'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint='lvmid/HORLtD-crE4-d90f-Nthf-cpUz-pHKh-jjsFCl/bHSqxy-di5E-WSMS-HeIu-XBEx-XCn3-CNMu0O'  082b416e-387c-41f5-89c2-a2346900e7e4
else
  search --no-floppy --fs-uuid --set=root 082b416e-387c-41f5-89c2-a2346900e7e4
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=en_CA
  insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
  set timeout=30
else
  if [ x$feature_timeout_style = xy ] ; then
    set timeout_style=hidden
    set timeout=10
  # Fallback hidden-timeout code in case the timeout_style feature is
  # unavailable.
  elif sleep --interruptible 10 ; then
    set timeout=0
  fi
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
    set gfxpayload="${1}"
    if [ "${1}" = "keep" ]; then
        set vt_handoff=vt.handoff=1
    else
        set vt_handoff=
    fi
}
if [ "${recordfail}" != 1 ]; then
  if [ -e ${prefix}/gfxblacklist.txt ]; then
    if hwmatch ${prefix}/gfxblacklist.txt 3; then
      if [ ${match} = 0 ]; then
        set linux_gfx_mode=keep
      else
        set linux_gfx_mode=text
      fi
    else
      set linux_gfx_mode=text
    fi
  else
    set linux_gfx_mode=keep
  fi
else
  set linux_gfx_mode=text
fi
export linux_gfx_mode
menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-082b416e-387c-41f5-89c2-a2346900e7e4' {
    recordfail
    load_video
    gfxmode $linux_gfx_mode
    insmod gzio
    if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
    insmod part_msdos
    insmod lvm
    insmod ext2
    set root='lvmid/HORLtD-crE4-d90f-Nthf-cpUz-pHKh-jjsFCl/bHSqxy-di5E-WSMS-HeIu-XBEx-XCn3-CNMu0O'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint='lvmid/HORLtD-crE4-d90f-Nthf-cpUz-pHKh-jjsFCl/bHSqxy-di5E-WSMS-HeIu-XBEx-XCn3-CNMu0O'  082b416e-387c-41f5-89c2-a2346900e7e4
    else
      search --no-floppy --fs-uuid --set=root 082b416e-387c-41f5-89c2-a2346900e7e4
    fi
        linux   /boot/vmlinuz-4.15.0-34-generic root=/dev/mapper/lubuntu--vg-root ro  quiet splash $vt_handoff
    initrd  /boot/initrd.img-4.15.0-34-generic
}
submenu 'Advanced options for Ubuntu' $menuentry_id_option 'gnulinux-advanced-082b416e-387c-41f5-89c2-a2346900e7e4' {
    menuentry 'Ubuntu, with Linux 4.15.0-34-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.15.0-34-generic-advanced-082b416e-387c-41f5-89c2-a2346900e7e4' {
        recordfail
        load_video
        gfxmode $linux_gfx_mode
        insmod gzio
        if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
        insmod part_msdos
        insmod lvm
        insmod ext2
        set root='lvmid/HORLtD-crE4-d90f-Nthf-cpUz-pHKh-jjsFCl/bHSqxy-di5E-WSMS-HeIu-XBEx-XCn3-CNMu0O'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint='lvmid/HORLtD-crE4-d90f-Nthf-cpUz-pHKh-jjsFCl/bHSqxy-di5E-WSMS-HeIu-XBEx-XCn3-CNMu0O'  082b416e-387c-41f5-89c2-a2346900e7e4
        else
          search --no-floppy --fs-uuid --set=root 082b416e-387c-41f5-89c2-a2346900e7e4
        fi
        echo    'Loading Linux 4.15.0-34-generic ...'
            linux   /boot/vmlinuz-4.15.0-34-generic root=/dev/mapper/lubuntu--vg-root ro  quiet splash $vt_handoff
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.img-4.15.0-34-generic
    }
    menuentry 'Ubuntu, with Linux 4.15.0-34-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.15.0-34-generic-recovery-082b416e-387c-41f5-89c2-a2346900e7e4' {
        recordfail
        load_video
        insmod gzio
        if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
        insmod part_msdos
        insmod lvm
        insmod ext2
        set root='lvmid/HORLtD-crE4-d90f-Nthf-cpUz-pHKh-jjsFCl/bHSqxy-di5E-WSMS-HeIu-XBEx-XCn3-CNMu0O'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint='lvmid/HORLtD-crE4-d90f-Nthf-cpUz-pHKh-jjsFCl/bHSqxy-di5E-WSMS-HeIu-XBEx-XCn3-CNMu0O'  082b416e-387c-41f5-89c2-a2346900e7e4
        else
          search --no-floppy --fs-uuid --set=root 082b416e-387c-41f5-89c2-a2346900e7e4
        fi
        echo    'Loading Linux 4.15.0-34-generic ...'
            linux   /boot/vmlinuz-4.15.0-34-generic root=/dev/mapper/lubuntu--vg-root ro recovery nomodeset 
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.img-4.15.0-34-generic
    }
    menuentry 'Ubuntu, with Linux 4.15.0-29-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.15.0-29-generic-advanced-082b416e-387c-41f5-89c2-a2346900e7e4' {
        recordfail
        load_video
        gfxmode $linux_gfx_mode
        insmod gzio
        if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
        insmod part_msdos
        insmod lvm
        insmod ext2
        set root='lvmid/HORLtD-crE4-d90f-Nthf-cpUz-pHKh-jjsFCl/bHSqxy-di5E-WSMS-HeIu-XBEx-XCn3-CNMu0O'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint='lvmid/HORLtD-crE4-d90f-Nthf-cpUz-pHKh-jjsFCl/bHSqxy-di5E-WSMS-HeIu-XBEx-XCn3-CNMu0O'  082b416e-387c-41f5-89c2-a2346900e7e4
        else
          search --no-floppy --fs-uuid --set=root 082b416e-387c-41f5-89c2-a2346900e7e4
        fi
        echo    'Loading Linux 4.15.0-29-generic ...'
            linux   /boot/vmlinuz-4.15.0-29-generic root=/dev/mapper/lubuntu--vg-root ro  quiet splash $vt_handoff
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.img-4.15.0-29-generic
    }
    menuentry 'Ubuntu, with Linux 4.15.0-29-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.15.0-29-generic-recovery-082b416e-387c-41f5-89c2-a2346900e7e4' {
        recordfail
        load_video
        insmod gzio
        if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
        insmod part_msdos
        insmod lvm
        insmod ext2
        set root='lvmid/HORLtD-crE4-d90f-Nthf-cpUz-pHKh-jjsFCl/bHSqxy-di5E-WSMS-HeIu-XBEx-XCn3-CNMu0O'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint='lvmid/HORLtD-crE4-d90f-Nthf-cpUz-pHKh-jjsFCl/bHSqxy-di5E-WSMS-HeIu-XBEx-XCn3-CNMu0O'  082b416e-387c-41f5-89c2-a2346900e7e4
        else
          search --no-floppy --fs-uuid --set=root 082b416e-387c-41f5-89c2-a2346900e7e4
        fi
        echo    'Loading Linux 4.15.0-29-generic ...'
            linux   /boot/vmlinuz-4.15.0-29-generic root=/dev/mapper/lubuntu--vg-root ro recovery nomodeset 
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.img-4.15.0-29-generic
    }
}

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

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

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

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry 'Memory test (memtest86+)' {
    insmod part_msdos
    insmod lvm
    insmod ext2
    set root='lvmid/HORLtD-crE4-d90f-Nthf-cpUz-pHKh-jjsFCl/bHSqxy-di5E-WSMS-HeIu-XBEx-XCn3-CNMu0O'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint='lvmid/HORLtD-crE4-d90f-Nthf-cpUz-pHKh-jjsFCl/bHSqxy-di5E-WSMS-HeIu-XBEx-XCn3-CNMu0O'  082b416e-387c-41f5-89c2-a2346900e7e4
    else
      search --no-floppy --fs-uuid --set=root 082b416e-387c-41f5-89c2-a2346900e7e4
    fi
    knetbsd /boot/memtest86+.elf
}
menuentry 'Memory test (memtest86+, serial console 115200)' {
    insmod part_msdos
    insmod lvm
    insmod ext2
    set root='lvmid/HORLtD-crE4-d90f-Nthf-cpUz-pHKh-jjsFCl/bHSqxy-di5E-WSMS-HeIu-XBEx-XCn3-CNMu0O'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint='lvmid/HORLtD-crE4-d90f-Nthf-cpUz-pHKh-jjsFCl/bHSqxy-di5E-WSMS-HeIu-XBEx-XCn3-CNMu0O'  082b416e-387c-41f5-89c2-a2346900e7e4
    else
      search --no-floppy --fs-uuid --set=root 082b416e-387c-41f5-89c2-a2346900e7e4
    fi
    linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Ubuntu 18.04.1 LTS (18.04) (on /dev/sdb5)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-7a6647ec-d9ef-456f-9a47-baf96238738e' {
    insmod part_msdos
    insmod ext2
    set root='hd1,msdos5'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 --hint-efi=hd1,msdos5 --hint-baremetal=ahci1,msdos5  7a6647ec-d9ef-456f-9a47-baf96238738e
    else
      search --no-floppy --fs-uuid --set=root 7a6647ec-d9ef-456f-9a47-baf96238738e
    fi
    linux /boot/vmlinuz-4.15.0-29-generic root=UUID=7a6647ec-d9ef-456f-9a47-baf96238738e ro quiet splash $vt_handoff
    initrd /boot/initrd.img-4.15.0-29-generic
}
submenu 'Advanced options for Ubuntu 18.04.1 LTS (18.04) (on /dev/sdb5)' $menuentry_id_option 'osprober-gnulinux-advanced-7a6647ec-d9ef-456f-9a47-baf96238738e' {
    menuentry 'Ubuntu (on /dev/sdb5)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.15.0-29-generic--7a6647ec-d9ef-456f-9a47-baf96238738e' {
        insmod part_msdos
        insmod ext2
        set root='hd1,msdos5'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 --hint-efi=hd1,msdos5 --hint-baremetal=ahci1,msdos5  7a6647ec-d9ef-456f-9a47-baf96238738e
        else
          search --no-floppy --fs-uuid --set=root 7a6647ec-d9ef-456f-9a47-baf96238738e
        fi
        linux /boot/vmlinuz-4.15.0-29-generic root=UUID=7a6647ec-d9ef-456f-9a47-baf96238738e ro quiet splash $vt_handoff
        initrd /boot/initrd.img-4.15.0-29-generic
    }
    menuentry 'Ubuntu, with Linux 4.15.0-29-generic (on /dev/sdb5)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.15.0-29-generic--7a6647ec-d9ef-456f-9a47-baf96238738e' {
        insmod part_msdos
        insmod ext2
        set root='hd1,msdos5'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 --hint-efi=hd1,msdos5 --hint-baremetal=ahci1,msdos5  7a6647ec-d9ef-456f-9a47-baf96238738e
        else
          search --no-floppy --fs-uuid --set=root 7a6647ec-d9ef-456f-9a47-baf96238738e
        fi
        linux /boot/vmlinuz-4.15.0-29-generic root=UUID=7a6647ec-d9ef-456f-9a47-baf96238738e ro quiet splash $vt_handoff
        initrd /boot/initrd.img-4.15.0-29-generic
    }
    menuentry 'Ubuntu, with Linux 4.15.0-29-generic (recovery mode) (on /dev/sdb5)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.15.0-29-generic-root=UUID=7a6647ec-d9ef-456f-9a47-baf96238738e ro recovery nomodeset-7a6647ec-d9ef-456f-9a47-baf96238738e' {
        insmod part_msdos
        insmod ext2
        set root='hd1,msdos5'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 --hint-efi=hd1,msdos5 --hint-baremetal=ahci1,msdos5  7a6647ec-d9ef-456f-9a47-baf96238738e
        else
          search --no-floppy --fs-uuid --set=root 7a6647ec-d9ef-456f-9a47-baf96238738e
        fi
        linux /boot/vmlinuz-4.15.0-29-generic root=UUID=7a6647ec-d9ef-456f-9a47-baf96238738e ro recovery nomodeset
        initrd /boot/initrd.img-4.15.0-29-generic
    }
}

set timeout_style=menu
if [ "${timeout}" = 0 ]; then
  set timeout=10
fi
### 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 ###
David Foerster
  • 36,264
  • 56
  • 94
  • 147
  • I've included those 3 as well as added some more details about what happens during bootup. I'm not sure how to make grub.cfg contents more legible though, it doesn't appear to recognize new lines, should I edit in double-spacing for you or leave as-is? Thanks for your help! – VistaRefugee Sep 21 '18 at 03:22
  • You write /dev/sd65 in option 5 and 6. Do you mean /dev/sdb5 ? In that case, you have it mounted on /media/jay and could verify is it looks like an old Linux installation. – Soren A Sep 21 '18 at 09:23
  • SorenA: yes, I believe I wrote down sdb5 originally but the vertical pillar of the "b" was slightly forward-diagonal so I confused it for a "6" when reading my hand-written note so I mistakenly input "sd65" instead, nice catch :) – VistaRefugee Sep 21 '18 at 19:23

1 Answers1

0

You can use the output of sudo lsblk -f and sudo os-prober to detect available Linux installations and distinguish them from the currently running installation.

  • os-prober finds one Ubuntu installation on /dev/sdb5.

    Strangely enough it doesn’t find the currently running installation (more later).

  • lsblk shows that the virtual volume lubuntu--vg-root is mounted at /, which means that it is the (main) location of the currently running Ubuntu/Linux installation. It also shows a swap partition on lubuntu--vg-swap_1. It also shows that both virtual volumes are backed by the drive partition /dev/sdb1 (although the full path is omitted).

  • lsblk also shows the ext4 file system on sdb5 that belongs to a different Ubuntu/Linux installation according to os-prober.

You can safely format or remove the partition with the file system UUID 7a6647ec-d9ef-456f-9a47-baf96238738e at /dev/sdb5 with your favourite partition manager and run sudo update-grub to update the Grub menu. Obviously you’re going to lose all data on that partition in the process.

David Foerster
  • 36,264
  • 56
  • 94
  • 147
  • David Foerster: thanks for formatting the code. I'll try the pastie service next time until I can understand the instructions in the first link. Re "os-prober", would I be able to safely delete the /dev/sdb5 installation? If so, I'm not sure what command to run to do that. Re "lsblk" it sounds like I shouldn't mess with the virtual volume. Do I need the swap partition or to back them up on the drive? Re "lsblk" it sounds like this supports os-prober that the ext4 file system is also superfluous and may be deleted? I don't think I have any important data on that partition, it's small
    – VistaRefugee Sep 21 '18 at 19:27
  • Yeah I noticed I couldn't do new lines or paragraph spacing in comments... posted the new question at https://askubuntu.com/questions/1077504/how-do-i-remove-duplicate-versions-of-lubuntu-followup thanks for your help! – VistaRefugee Sep 22 '18 at 15:04