LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 07-23-2019, 06:51 AM   #1
puertas12
LQ Newbie
 
Registered: Jan 2015
Posts: 17

Rep: Reputation: Disabled
Grub not showing debian partition


I have a hard drive sda with 3 OSs:
  • Windows 10
  • Debian
  • Ubuntu

After installing Ubuntu, Debian partition is not showing anymore. I tried to update the grub from Ubuntu:
Code:
sudo update-grub
The output of this command is in the attached file (output_update_grub)
Debian is detected in the sda6. However it is not displayed in the grub after restarting (see grub_entries)
Attached Thumbnails
Click image for larger version

Name:	output_update_grub.jpg
Views:	23
Size:	273.9 KB
ID:	30937   Click image for larger version

Name:	grub_entries.jpg
Views:	20
Size:	239.8 KB
ID:	30938  
 
Old 07-23-2019, 07:52 AM   #2
hazel
Senior Member
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 3,389
Blog Entries: 9

Rep: Reputation: 1894Reputation: 1894Reputation: 1894Reputation: 1894Reputation: 1894Reputation: 1894Reputation: 1894Reputation: 1894Reputation: 1894Reputation: 1894Reputation: 1894
I can't explain this either but I can think of two possible ways around it:

1) Put the Debian kernel and initrd into one of GRUB's custom files in /etc/grub.d.
2) Boot Ubuntu, chroot into Debian and run update-grub from there.

Actually I'd prefer to start with 2) if it were my computer, because I'd be very interested to see the outcome.

PS: another thing worth doing to perhaps find out what is going wrong is to look at the grub.cfg file in Ubuntu's /boot/grub. This file is actually the GRUB shell script that creates the visible menu. See if it mentions Debian at all.

Last edited by hazel; 07-23-2019 at 09:39 AM. Reason: Added PS
 
Old 07-23-2019, 12:38 PM   #3
colorpurple21859
Senior Member
 
Registered: Jan 2008
Location: florida panhandle
Distribution: slackware64-current, arch, ubuntu, others
Posts: 3,430

Rep: Reputation: 547Reputation: 547Reputation: 547Reputation: 547Reputation: 547Reputation: 547
If the /boot/grub/grub.cfg has a Debian menuentry, post it so maybe someone can figure out why it isn't being displayed.
 
Old 07-24-2019, 12:20 AM   #4
puertas12
LQ Newbie
 
Registered: Jan 2015
Posts: 17

Original Poster
Rep: Reputation: Disabled
Post

I installed the boot in another partition. This is the content in the boot partition:

Code:
drwxrwxrwx 1 root root   4096 Jul 20 15:21  .
drwxr-xr-x 4 root root   4096 Jul 20 15:03  ..
drwxrwxrwx 1 root root   8192 Jul 17 01:28  Boot
-rwxrwxrwx 1 root root 410802 Jul 17 00:59  bootmgr
-rwxrwxrwx 1 root root      1 Mär 19 05:44  BOOTNXT
drwxrwxrwx 1 root root      0 Jul 20 15:21  boot-repair
-rwxrwxrwx 1 root root   8192 Jul 17 06:00  BOOTSECT.BAK
drwxrwxrwx 1 root root      0 Jul 19 07:39 '$RECYCLE.BIN'
drwxrwxrwx 1 root root      0 Jul 19 05:57 'System Volume Information'
This is the content of the boot directory in Ubuntu:

Code:
drwxr-xr-x  3 root root     4096 Jul 19 07:45 .
drwxr-xr-x 24 root root     4096 Jul 19 07:37 ..
-rw-r--r--  1 root root   217065 Feb  7 12:10 config-4.18.0-15-generic
-rw-r--r--  1 root root   218357 Jun 27 09:04 config-4.18.0-25-generic
drwxr-xr-x  6 root root     4096 Jul 23 13:54 grub
-rw-r--r--  1 root root 39924024 Jul 19 07:44 initrd.img-4.18.0-15-generic
-rw-r--r--  1 root root 39937362 Jul 19 07:45 initrd.img-4.18.0-25-generic
-rw-r--r--  1 root root   182704 Jan 28  2016 memtest86+.bin
-rw-r--r--  1 root root   184380 Jan 28  2016 memtest86+.elf
-rw-r--r--  1 root root   184840 Jan 28  2016 memtest86+_multiboot.bin
-rw-------  1 root root  4268435 Feb  7 12:10 System.map-4.18.0-15-generic
-rw-------  1 root root  4268427 Jun 27 09:04 System.map-4.18.0-25-generic
-rw-r--r--  1 root root  8543992 Feb 10 01:25 vmlinuz-4.18.0-15-generic
-rw-------  1 root root  8552184 Jun 27 06:32 vmlinuz-4.18.0-25-generic


@hazel I executed chroot in the Debian partition from Ubuntu. However then I cannot execute the command update-grub. The command is not found :S

@colorpurple21859 This is the content of the Debian entry in /boot/grub/grub.cfg:

Code:
 ...
### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
if background_color 44,0,30,0; then
  clear
fi
### END /etc/grub.d/05_debian_theme ###
...

Last edited by puertas12; 07-24-2019 at 12:53 AM.
 
Old 07-24-2019, 04:48 AM   #5
colorpurple21859
Senior Member
 
Registered: Jan 2008
Location: florida panhandle
Distribution: slackware64-current, arch, ubuntu, others
Posts: 3,430

Rep: Reputation: 547Reputation: 547Reputation: 547Reputation: 547Reputation: 547Reputation: 547
The debian grub menu is incomplete. The first boot partition you posted is for windows, the second boot partition is for ubuntu. where is the boot partition for debian? From ubuntu use the boot-info script so we can get more info of what is going on. https://help.ubuntu.com/community/Boot-Info

Last edited by colorpurple21859; 07-25-2019 at 05:07 AM.
 
Old 07-25-2019, 05:04 AM   #6
mrmazda
Senior Member
 
Registered: Aug 2016
Location: USA
Distribution: openSUSE, Debian, Knoppix, Mageia, Fedora, others
Posts: 1,785

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
Most systems nowadays with Windows 10 are using UEFI mode to boot. Is yours? If Windows is, are both Ubuntu and Debian installed in UEFI mode as well? If all are using UEFI, then you should investigate use of the efibootmgr command for managing what menu you see after POSTing.
 
Old 08-01-2019, 06:39 PM   #7
djk44883
Member
 
Registered: Aug 2008
Location: Ohio
Distribution: debian
Posts: 83

Rep: Reputation: 22
When I mulit/dual booted lunix system, I "chainloaded" the secondary one. This is an overview, as it's been some time ago... I grub-install, for example to, /dev/sda2 - I installed to a partition, it warned me. So it would chainload into another grub boot menu, so if/when a grub-update was called, each system was independent of each other in this respect.

I had to create a menu entry in /etc/grub.d it was reasonably simple; savedefault, set root, chainload +1, boot that may not be complete.
 
Old 08-06-2019, 02:51 AM   #8
puertas12
LQ Newbie
 
Registered: Jan 2015
Posts: 17

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by djk44883 View Post
When I mulit/dual booted lunix system, I "chainloaded" the secondary one. This is an overview, as it's been some time ago... I grub-install, for example to, /dev/sda2 - I installed to a partition, it warned me. So it would chainload into another grub boot menu, so if/when a grub-update was called, each system was independent of each other in this respect.

I had to create a menu entry in /etc/grub.d it was reasonably simple; savedefault, set root, chainload +1, boot that may not be complete.
I executed the command
Code:
sudo grub-install /dev/sda6
. This is the output:
Quote:
Installing for i386-pc platform.
grub-install: warning: File system `ext2' doesn't support embedding.
grub-install: warning: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
grub-install: error: will not proceed with blocklists.
sda6 contains the Debian OS. I am surprised the warning about the file system ext2. This partition is formatted in ext4.
 
Old 08-06-2019, 03:52 AM   #9
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 12,507
Blog Entries: 9

Rep: Reputation: 3393Reputation: 3393Reputation: 3393Reputation: 3393Reputation: 3393Reputation: 3393Reputation: 3393Reputation: 3393Reputation: 3393Reputation: 3393Reputation: 3393
^ Please don't overthink this.
You just want to fix your problem.
I recommend going back to:
Quote:
Originally Posted by hazel View Post
2) Boot Ubuntu, chroot into Debian and run update-grub from there.

Actually I'd prefer to start with 2) if it were my computer, because I'd be very interested to see the outcome.
I'm sure you can find resources on how to chroot into your debian system from ubuntu, and we'll be happy to help along the way.

Choose one approach to solution, and stick with it until it's exhausted.
 
Old 08-07-2019, 01:59 AM   #10
puertas12
LQ Newbie
 
Registered: Jan 2015
Posts: 17

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
Originally Posted by hazel View Post
2) Boot Ubuntu, chroot into Debian and run update-grub from there.

Actually I'd prefer to start with 2) if it were my computer, because I'd be very interested to see the outcome.
This is what I've done:
1.- Mount the Debian partition in Ubuntu
2.- chroot the mounted partition:
Code:
sudo chroot mnt/debian/
3.- Execute grub-update bash:
Quote:
apt-get: command not found
I cannot execute the command "grub-update" from the Debian mounted "chrooted" partition. Am I doing smth wrong?
 
Old 08-07-2019, 02:05 AM   #11
puertas12
LQ Newbie
 
Registered: Jan 2015
Posts: 17

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by djk44883 View Post
When I mulit/dual booted lunix system, I "chainloaded" the secondary one. This is an overview, as it's been some time ago... I grub-install, for example to, /dev/sda2 - I installed to a partition, it warned me. So it would chainload into another grub boot menu, so if/when a grub-update was called, each system was independent of each other in this respect.

I had to create a menu entry in /etc/grub.d it was reasonably simple; savedefault, set root, chainload +1, boot that may not be complete.
After the partition is mounted I executed the following command:
Code:
grub-install /dev/sda6
This is the output:
Quote:
Installing for i386-pc platform.
grub-install: error: cannot delete `/boot/grub/i386-pc/legacycfg.mod': Permission denied.
 
Old 08-07-2019, 02:13 AM   #12
puertas12
LQ Newbie
 
Registered: Jan 2015
Posts: 17

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by mrmazda View Post
Most systems nowadays with Windows 10 are using UEFI mode to boot. Is yours? If Windows is, are both Ubuntu and Debian installed in UEFI mode as well? If all are using UEFI, then you should investigate use of the efibootmgr command for managing what menu you see after POSTing.
I am using BIOS mode to boot

Last edited by puertas12; 08-07-2019 at 02:14 AM.
 
Old 08-07-2019, 02:18 AM   #13
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 12,507
Blog Entries: 9

Rep: Reputation: 3393Reputation: 3393Reputation: 3393Reputation: 3393Reputation: 3393Reputation: 3393Reputation: 3393Reputation: 3393Reputation: 3393Reputation: 3393Reputation: 3393
Quote:
Originally Posted by puertas12 View Post
I cannot execute the command "grub-update" from the Debian mounted "chrooted" partition. Am I doing smth wrong?
It's "update-grub", not "grub-update".

Quote:
Originally Posted by puertas12 View Post
After the partition is mounted I executed the following command:
Code:
grub-install /dev/sda6
This is the output:
this command requires root permissions, so try it with sudo.

PS:
  • please use CODE tags for code/output, not QUOTE tags.
  • whenever you execute a command, also include the command itself with its output.

Last edited by ondoho; 08-07-2019 at 02:20 AM.
 
Old 08-07-2019, 02:22 AM   #14
mrmazda
Senior Member
 
Registered: Aug 2016
Location: USA
Distribution: openSUSE, Debian, Knoppix, Mageia, Fedora, others
Posts: 1,785

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
Quote:
Originally Posted by puertas12 View Post
This is what I've done:
1.- Mount the Debian partition in Ubuntu
2.- chroot the mounted partition:
Code:
sudo chroot mnt/debian/
3.- Execute grub-update bash:

I cannot execute the command "grub-update" from the Debian mounted "chrooted" partition. Am I doing smth wrong?
Possibly more than one thing:

1-was chroot correctly set up by bind mounting /sys, /proc & /dev first?
2-did you try update-grub?
3-AFAIK, update-grub does not exist in Debian
4-ISTR update-grub is a Ubuntu one line script that runs grub2-mkconfig
 
Old 08-07-2019, 02:26 AM   #15
puertas12
LQ Newbie
 
Registered: Jan 2015
Posts: 17

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by colorpurple21859 View Post
If the /boot/grub/grub.cfg has a Debian menuentry, post it so maybe someone can figure out why it isn't being displayed.
There is no grub.cfg under '/boot/grub/'
This are the files in the Debian grub:

Quote:
-rw-r--r-- 1 root root 350 Jul 16 20:24 device.map
-rw-r--r-- 1 root root 10266 Jul 16 20:24 xfs_stage1_5
-rw-r--r-- 1 root root 120100 Jul 16 20:24 stage2
-rw-r--r-- 1 root root 512 Jul 16 20:24 stage1
-rw-r--r-- 1 root root 10644 Jul 16 20:24 reiserfs_stage1_5
-rw-r--r-- 1 root root 8148 Jul 16 20:24 minix_stage1_5
-rw-r--r-- 1 root root 9600 Jul 16 20:24 jfs_stage1_5
-rw-r--r-- 1 root root 8628 Jul 16 20:24 fat_stage1_5
-rw-r--r-- 1 root root 8852 Jul 16 20:24 e2fs_stage1_5
-rw-r--r-- 1 root root 197 Jul 16 20:24 default
-rw-r--r-- 1 root root 3618 Jul 16 20:24 menu.lst
 
  


Reply

Tags
grub boot menu


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Infinite Grub Loop: GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB... beeblequix MEPIS 2 11-02-2013 10:56 PM
how to install 2nd debian instance from .deb file, showing up as separate grub entry bweaver Linux - Newbie 4 11-15-2011 09:07 AM
[SOLVED] Screen not showing on laptop but showing on projector when connected someshpr Linux - General 3 04-18-2011 04:58 PM
Booting my new ubuntu install = "GRUB GRUB GRUB GRUB GRUB" etc. dissolved soul Ubuntu 2 01-13-2007 12:55 PM
GRUB GRUB GRUB GRUB "Whats Going on?" Gaweph Linux - Newbie 6 03-26-2004 10:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 11:41 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration