LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-21-2019, 01:49 PM   #1
dspit1664
LQ Newbie
 
Registered: Aug 2019
Posts: 13

Rep: Reputation: Disabled
Smile Ubuntu - grub.cfg


Ubuntu 16.04 boots into grub prompt.

When get back to ssh I find that /etc/default/grub doesn’t exist.
grub.cfg and menu.lst does.
When I do an ‘uname -r’ I see the current active kernel but when I check grub.cfg it doesn’t show up. But it does in menu.lst.
Questions:
Must a ubuntu16.04 have an /etc/default/grub?
and
Must grub.cfg file contain the active kernel ?
 
Old 08-21-2019, 02:00 PM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,883
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Quote:
Originally Posted by dspit1664 View Post
Ubuntu 16.04 boots into grub prompt.

When get back to ssh I find that /etc/default/grub doesn’t exist.
grub.cfg and menu.lst does.
When I do an ‘uname -r’ I see the current active kernel but when I check grub.cfg it doesn’t show up. But it does in menu.lst.
Questions:
Must a ubuntu16.04 have an /etc/default/grub?
and
Must grub.cfg file contain the active kernel ?
Welcome to LQ dspit1664,

Grub is not an operating system, it is a bootloader.

Therefore it is incorrect to say that Ubuntu 16.04 boots into grub prompt. Ubuntu either boots into Ubuntu Linux or it fails to boot and you have been left at the grub prompt. Please explain if this is what you're experiencing.

The grub.cfg file is in /boot/grub/grub.cfg
 
1 members found this post helpful.
Old 08-21-2019, 02:32 PM   #3
dspit1664
LQ Newbie
 
Registered: Aug 2019
Posts: 13

Original Poster
Rep: Reputation: Disabled
Yes correct I should have been clearer

Yes correct what I should have said was:
Have working Ubuntu 16.04 however recently after applying recent kernel update and rebooted. Reboot did not return to Ash but in to grub prompt.
After working out how to exit at grub cli rebooted in to ssh however am concerned that if I reboot again it will go back into grub prompt again so after some debugging identified as I posted.
Any thoughts ?
 
Old 08-21-2019, 02:40 PM   #4
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by dspit1664 View Post
Must a ubuntu16.04 have an /etc/default/grub?
and
Must grub.cfg file contain the active kernel ?
1. I guess not strictly, but I've never seen one with grub installed that doesn't have that file.
2. It should after running 'grub-mkconfig -o /boot/grub/grub.cfg'

Btw, what do you mean "get back to ssh"?
 
1 members found this post helpful.
Old 08-21-2019, 02:51 PM   #5
dspit1664
LQ Newbie
 
Registered: Aug 2019
Posts: 13

Original Poster
Rep: Reputation: Disabled
I meant (I’m still learning) - worked out how to see below

I meant I worked out how to use find and set where it could find the kernel and issuing a boot (I think it is) it rebooted from grub to regular ssh login prompt.
Thanks for info I may try it but it’s a work system and I need to be sure it won’t barf again.

👍
 
Old 08-21-2019, 02:52 PM   #6
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,883
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Quote:
Originally Posted by dspit1664 View Post
after applying recent kernel update and rebooted. Reboot did not return to Ash but in to grub prompt.
What do you mean by Ash?
The Linux shell?
Also, what kernel version did you update to?
And did that work? Please check the kernel version you are running if you can.
Quote:
Originally Posted by dspit1664 View Post
After working out how to exit at grub cli rebooted in to ssh
ssh is a protocol, you either are stuck at the grub prompt, or the Linux kernel loaded. If there are network services, and the protocol is enabled, you may be able to use ssh. Sounds as if this is how you access the system, it boots and you can perform an ssh to remotely attach to it. Is this correct?
Quote:
Originally Posted by dspit1664 View Post
After working out how to exit at grub cli ... am concerned that if I reboot again it will go back into grub prompt again
What did you do when you worked out how to get out of the grub prompt? Do you remember what you typed? And what was the result? Did Linux boot? Or do you not know? Did you try a few commands, end up rebooting, and just got lucky?

I feel this may result in a recommendation for you to inspect your boot logs and determine if they show anything unusual. They may show that there was a point where the system needed to recover, and did so, or they may show a recurring problem where once you fix it, it will no longer be a problem.

I fully understand your concern that you are wary that this can occur again. Best I can recommend is to see if you can recall how you dealt with it before and if there were specific commands which got the system operating, please retain those for future reference as well as including them with your question here. Next, if you do not know what got things working, or even further, if the system seems to boot now without getting stuck at the grub prompt, then I do suggest checking the boot logs to see if there are any existing complaints as the system boots.
 
1 members found this post helpful.
Old 08-21-2019, 03:09 PM   #7
dspit1664
LQ Newbie
 
Registered: Aug 2019
Posts: 13

Original Poster
Rep: Reputation: Disabled
Lol apologies using iPhone to type meant 'ssh'.
Yes I meant - I'll work out the cmds I used soon not at work now.
I got it to boot from grub using a available cmds in grub (there are I believe some limited options ) anyhow it booted back in to the kernel and was able to login using ssh.
I'll try and work out what cmds I used and update the post with more info.
 
Old 08-21-2019, 07:25 PM   #8
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,838
Blog Entries: 1

Rep: Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071
This seems like maybe your 16.04 was installed in addition to a previously installed Linux OS that was using Grub Legacy instead of Grub2. Then something went wrong WRT bootloader update and/or partitioning to break the 16.04 bootloader. Grub Legacy uses menu.lst, which constitutes the entirety of boot configuration, and does not use either grub.cfg or /etc/default/grub.

If you upload output from bootinfoscript we can see if this suspicion applies, and other things relevant to getting your normal 16.04 booting recovered.

There is also a possibility, though very slight, that your 16.04 was being booted by Grub Legacy, as a result of having existed as a result a series of upgrades dating back many years. 9.04 was the last to use it by default, while Debian and some of its variants can still use it instead of Grub2 even now.
 
1 members found this post helpful.
Old 08-22-2019, 01:12 AM   #9
dspit1664
LQ Newbie
 
Registered: Aug 2019
Posts: 13

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by mrmazda View Post
This seems like maybe your 16.04 was installed in addition to a previously installed Linux OS that was using Grub Legacy instead of Grub2. Then something went wrong WRT bootloader update and/or partitioning to break the 16.04 bootloader. Grub Legacy uses menu.lst, which constitutes the entirety of boot configuration, and does not use either grub.cfg or /etc/default/grub.
This is a system built as Ubu16.04 to my knowledge it's a single boot 16.04.

Quote:
If you upload output from bootinfoscript we can see if this suspicion applies, and other things relevant to getting your normal 16.04 booting recovered.
So if I upload the above and run it the output will provide detail?
[/QUOTE]

Quote:
There is also a possibility, though very slight, that your 16.04 was being booted by Grub Legacy, as a result of having existed as a result a series of upgrades dating back many years. 9.04 was the last to use it by default, while Debian and some of its variants can still use it instead of Grub2 even now.
This system has only ever been 16.04
 
Old 08-22-2019, 01:23 AM   #10
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,838
Blog Entries: 1

Rep: Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071
Quote:
Originally Posted by dspit1664 View Post
So if I upload the above and run it the output will provide detail?
If you download the above and run it it will report what its README says it will report. That should help us help you, if you still need help.
 
1 members found this post helpful.
Old 08-22-2019, 03:51 AM   #11
dspit1664
LQ Newbie
 
Registered: Aug 2019
Posts: 13

Original Poster
Rep: Reputation: Disabled
Here is the output:
Seems that `grub` is being used and `grub2` at least from the first bit below?

Boot Info Script 0.77 [10 June 2018]


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

=> Grub Legacy (v0.97) is installed in the MBR of /dev/xvda and looks on the
same drive in partition #1 for /grub/stage2 and /grub/menu.lst.
=> libparted MBR boot code is installed in the MBR of /dev/xvdb.

xvda1: _________________________________________________________________________

File system: ext3
Boot sector type: -
Boot sector info:
Operating System:
Boot files: /grub/menu.lst /grub/grub.cfg

xvda2: _________________________________________________________________________

File system: ext4
Boot sector type: -
Boot sector info:
Operating System: Ubuntu 16.04.3 LTS
Boot files: /etc/fstab

xvdb1: _________________________________________________________________________

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

xvdh: __________________________________________________________________________

File system: vfat
Boot sector type: FAT16
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files:

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

Drive: xvda _____________________________________________________________________
Disk /dev/xvda: 25 GiB, 26843545600 bytes, 52428800 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

Partition Boot Start Sector End Sector # of Sectors Id System

/dev/xvda1 * 2,048 526,335 524,288 83 Linux
/dev/xvda2 526,336 52,428,766 51,902,431 83 Linux


Drive: xvdb _____________________________________________________________________
Disk /dev/xvdb: 2 GiB, 2147483648 bytes, 4194304 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

Partition Boot Start Sector End Sector # of Sectors Id System

/dev/xvdb1 63 4,192,964 4,192,902 82 Linux swap / Solaris


"blkid" output: ________________________________________________________________

Device UUID TYPE LABEL

/dev/xvda1 0dc09b69-6144-4a25-b1ca-455b33ca8bd5 ext3 cloudimg-bootfs
/dev/xvda2 2fcba7a1-77bf-4d12-b01b-d1ff410d1a0a ext4 cloudimg-rootfs
/dev/xvdb1 d51fcca0-6b10-4934-a572-f3898dfd8840 swap SWAP-xvdb1
/dev/xvdh 9796-932E vfat config-2

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

Device Mount_Point Type Options

/dev/xvda1 /boot ext3 (rw,relatime,data=ordered)
/dev/xvda2 / ext4 (rw,relatime,data=ordered)


============================= xvda1/grub/menu.lst: =============================

--------------------------------------------------------------------------------
# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-legacy-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not use 'savedefault' or your
# array will desync and will not let you boot your system.
default 0

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 3

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
hiddenmenu

# Pretty colours
#color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
## kopt_2_6_8=root=/dev/hdc1 ro
## kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=2fcba7a1-77bf-4d12-b01b-d1ff410d1a0a ro console=hvc0

## default grub root device
## e.g. groot=(hd0,0)
# groot=2fcba7a1-77bf-4d12-b01b-d1ff410d1a0a

## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=elevator=noop

## should update-grub lock old automagic boot options
## e.g. lockold=false
## lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all

## specify if running in Xen domU or have grub detect automatically
## update-grub will ignore non-xen kernels when running in domU and vice versa
## e.g. indomU=detect
## indomU=true
## indomU=false
# indomU=true

## should update-grub create memtest86 boot option
## e.g. memtest86=true
## memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

## ## End Default Options ##

title Ubuntu 16.04.3 LTS, kernel 4.4.0-159-generic
uuid 2fcba7a1-77bf-4d12-b01b-d1ff410d1a0a
kernel /vmlinuz-4.4.0-159-generic root=UUID=2fcba7a1-77bf-4d12-b01b-d1ff410d1a0a ro console=hvc0 elevator=noop
initrd /initrd.img-4.4.0-159-generic
quiet

title Ubuntu 16.04.3 LTS, kernel 4.4.0-159-generic (recovery mode)
uuid 2fcba7a1-77bf-4d12-b01b-d1ff410d1a0a
kernel /vmlinuz-4.4.0-159-generic root=UUID=2fcba7a1-77bf-4d12-b01b-d1ff410d1a0a ro console=hvc0 single
initrd /initrd.img-4.4.0-159-generic

title Ubuntu 16.04.3 LTS, kernel 4.4.0-89-generic
uuid 2fcba7a1-77bf-4d12-b01b-d1ff410d1a0a
kernel /vmlinuz-4.4.0-89-generic root=UUID=2fcba7a1-77bf-4d12-b01b-d1ff410d1a0a ro console=hvc0 elevator=noop
initrd /initrd.img-4.4.0-89-generic
quiet

title Ubuntu 16.04.3 LTS, kernel 4.4.0-89-generic (recovery mode)
uuid 2fcba7a1-77bf-4d12-b01b-d1ff410d1a0a
kernel /vmlinuz-4.4.0-89-generic root=UUID=2fcba7a1-77bf-4d12-b01b-d1ff410d1a0a ro console=hvc0 single
initrd /initrd.img-4.4.0-89-generic

### END DEBIAN AUTOMAGIC KERNELS LIST
--------------------------------------------------------------------------------

============================= xvda1/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
if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; 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
}

terminal_input console
terminal_output console
if [ "${recordfail}" = 1 ] ; then
set timeout=0
else
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=0
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=0
fi
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
### 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=7
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 'GNU/Linux' --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-2fcba7a1-77bf-4d12-b01b-d1ff410d1a0a' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root 0dc09b69-6144-4a25-b1ca-455b33ca8bd5
else
search --no-floppy --fs-uuid --set=root 0dc09b69-6144-4a25-b1ca-455b33ca8bd5
fi
linux /vmlinuz-4.15.0-23-generic root=UUID=2fcba7a1-77bf-4d12-b01b-d1ff410d1a0a ro console=tty1 console=ttyS0
initrd /initrd.img-4.15.0-23-generic
}
submenu 'Advanced options for GNU/Linux' $menuentry_id_option 'gnulinux-advanced-2fcba7a1-77bf-4d12-b01b-d1ff410d1a0a' {
menuentry 'GNU/Linux, with Linux 4.15.0-23-generic' --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.15.0-23-generic-advanced-2fcba7a1-77bf-4d12-b01b-d1ff410d1a0a' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root 0dc09b69-6144-4a25-b1ca-455b33ca8bd5
else
search --no-floppy --fs-uuid --set=root 0dc09b69-6144-4a25-b1ca-455b33ca8bd5
fi
echo 'Loading Linux 4.15.0-23-generic ...'
linux /vmlinuz-4.15.0-23-generic root=UUID=2fcba7a1-77bf-4d12-b01b-d1ff410d1a0a ro console=tty1 console=ttyS0
echo 'Loading initial ramdisk ...'
initrd /initrd.img-4.15.0-23-generic
}
menuentry 'GNU/Linux, with Linux 4.15.0-23-generic (recovery mode)' --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.15.0-23-generic-recovery-2fcba7a1-77bf-4d12-b01b-d1ff410d1a0a' {
recordfail
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root 0dc09b69-6144-4a25-b1ca-455b33ca8bd5
else
search --no-floppy --fs-uuid --set=root 0dc09b69-6144-4a25-b1ca-455b33ca8bd5
fi
echo 'Loading Linux 4.15.0-23-generic ...'
linux /vmlinuz-4.15.0-23-generic root=UUID=2fcba7a1-77bf-4d12-b01b-d1ff410d1a0a ro recovery nomodeset
echo 'Loading initial ramdisk ...'
initrd /initrd.img-4.15.0-23-generic
}
menuentry 'GNU/Linux, with Linux 4.4.0-128-generic' --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-128-generic-advanced-2fcba7a1-77bf-4d12-b01b-d1ff410d1a0a' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root 0dc09b69-6144-4a25-b1ca-455b33ca8bd5
else
search --no-floppy --fs-uuid --set=root 0dc09b69-6144-4a25-b1ca-455b33ca8bd5
fi
echo 'Loading Linux 4.4.0-128-generic ...'
linux /vmlinuz-4.4.0-128-generic root=UUID=2fcba7a1-77bf-4d12-b01b-d1ff410d1a0a ro console=tty1 console=ttyS0
echo 'Loading initial ramdisk ...'
initrd /initrd.img-4.4.0-128-generic
}
menuentry 'GNU/Linux, with Linux 4.4.0-128-generic (recovery mode)' --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-128-generic-recovery-2fcba7a1-77bf-4d12-b01b-d1ff410d1a0a' {
recordfail
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root 0dc09b69-6144-4a25-b1ca-455b33ca8bd5
else
search --no-floppy --fs-uuid --set=root 0dc09b69-6144-4a25-b1ca-455b33ca8bd5
fi
echo 'Loading Linux 4.4.0-128-generic ...'
linux /vmlinuz-4.4.0-128-generic root=UUID=2fcba7a1-77bf-4d12-b01b-d1ff410d1a0a ro recovery nomodeset
echo 'Loading initial ramdisk ...'
initrd /initrd.img-4.4.0-128-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/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 ###
--------------------------------------------------------------------------------

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

GiB - GB File Fragment(s)

0.127949715 = 0.137384960 grub/menu.lst 1
0.130375862 = 0.139990016 grub/grub.cfg 2
0.131175995 = 0.140849152 grub/stage2 4
0.131096840 = 0.140764160 vmlinuz-4.4.0-159-generic 9
0.130406380 = 0.140022784 vmlinuz-4.4.0-89-generic 11
0.131112099 = 0.140780544 initrd.img-4.4.0-159-generic 12
0.127459526 = 0.136858624 initrd.img-4.4.0-89-generic 12

=============================== xvda2/etc/fstab: ===============================

--------------------------------------------------------------------------------
LABEL=cloudimg-rootfs / ext4 defaults,relatime 0 0

# Added by Cloud Image build process
LABEL=cloudimg-bootfs /boot ext3 defaults,relatime 0 0
# CLOUD_IMG: This file was created/modified by the Cloud Image build process
# Mount the metadata disk for cloud-init, if present
LABEL=METADATA /var/lib/cloud/seed/config_drive vfat defaults,nofail 0 0
LABEL=SWAP-xvdb1 none swap sw,comment=cloudconfig 0 2
none /dev/shm tmpfs nosuid,nodev,noexec 0 0
--------------------------------------------------------------------------------

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

GiB - GB File Fragment(s)

0.381096840 = 0.409199616 vmlinuz 9
0.380406380 = 0.408458240 vmlinuz.old 11
0.381112099 = 0.409216000 initrd.img 12
0.377459526 = 0.405294080 initrd.img.old 12

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

mdadm: No arrays found in config file or automatically


Current active / running kernel is
```
$ uname -r
4.4.0-159-generic
```

Last edited by dspit1664; 08-22-2019 at 03:53 AM.
 
Old 08-22-2019, 04:34 AM   #12
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,838
Blog Entries: 1

Rep: Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071
The cloud involvement that output shows makes it impossible for me to be further material help. I have no cloud or xen experience.
 
1 members found this post helpful.
Old 08-22-2019, 04:49 AM   #13
dspit1664
LQ Newbie
 
Registered: Aug 2019
Posts: 13

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by mrmazda View Post
The cloud involvement that output shows makes it impossible for me to be further material help. I have no cloud or xen experience.


Ok thanks anyway
 
Old 08-22-2019, 05:13 AM   #14
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,541

Rep: Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496
Quote:
Seems that `grub` is being used and `grub2` at least from the first bit below?
Grub Legacy is being used, installed to the MBR of the drive. The problem or interesting part of Grub Legacy on this system is that Ubuntu has been using Grub2 on all its releases for 10 years, beginning with release 9.10. So the question is, how did Grub Legacy get there? Your grub.cfg file menuentry lists "GNU/Linux" as the OS rather than Ubuntu which I've never seen before on an Ubuntu installation. THis should not prevent booting as it is just the title and the kernel and initrd lines are different in grub.cfg compared to menu.lst. Check which kernel version(s) you have. You should be able to re-install grub2 using the methods described at the Ubuntu site at the link below under Section 2.2 under Contents.

https://help.ubuntu.com/community/Grub2/Installing
 
1 members found this post helpful.
Old 08-22-2019, 06:43 AM   #15
dspit1664
LQ Newbie
 
Registered: Aug 2019
Posts: 13

Original Poster
Rep: Reputation: Disabled
Which line(s) indicates using grub and not grub2? I guess I also need to find out why this system is not using grub2 ��

Thanks

Last edited by dspit1664; 08-22-2019 at 12:11 PM. Reason: Adding more detail
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
GRUB menu not getting updated even after changing /boot/grub/grub.cfg KNSI Linux From Scratch 4 06-20-2018 09:13 PM
GRUB menu not getting updated even after changing /boot/grub/grub.cfg KNSI Linux - Newbie 6 06-20-2018 01:54 PM
Files in /etc/grub.d not included in /boot/grub/grub.cfg. stf92 Slackware 21 05-27-2018 04:38 PM
Infinite Grub Loop: GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB... beeblequix MEPIS 2 11-02-2013 10:56 PM
[SOLVED] how to the give path of the part.cfg file in %include command in ks.cfg. YOGESHAS87 Linux - Newbie 2 01-11-2011 04:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration