LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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-05-2015, 12:00 AM   #1
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Debian 8.1 Fresh Install Grub Rescue


After a fresh install I'm stuck at the grub rescue> prompt.

Code:
error file '/boot/grub/i386-pc/normal.mod' not found
Entering rescue mode
grub rescue>
I didn't want Grub installed to the MBR of my first 500 GB HDD /dev/sda/ which is Slackware. Instead I told the installer to install Grub to my second 1 TB HDD which is /dev/sdb/.

I tried grub-install with the Live Debian DVD it only returns the grub rescue prompt again.

I tried ls and it shows me:
Code:
(hdo) (hdo,msdos2) (hdo,msdos1) (hd1) (hd1,msdos2) (hd1,msdos1)
I shouldn't assume but I think hd1,msdos2 is the 1TB drive?

I tried:
Code:
set prefix="(hd1,msdos2)/boot/grub"
That only returned me to the grub rescue prompt again.

I booted into Slackware to run fdisk -l and check on the partions's that I created for Debian. They are there and ok.

How do I fix this?
 
Old 07-05-2015, 12:39 AM   #2
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484

Original Poster
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
I tried Rescue Mode with the Live Debian DVD.

I tried:
Code:
grub install /dev/sdb1
Evidently I can't install Grub to the 1TB HDD / partition.

Code:
Warning File system 'ext2' doesn't support embedding

Warning Embedding is not possible. Grub can only be installed in this setup by using blocklist's.

However blocklists are unreliable and their use is discouraged
If I install Grub to the MBR which is Slackware's bootloader LILo isn't that going to create a mess?
 
Old 07-05-2015, 12:48 AM   #3
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,876

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
If you're already using lilo why install grub?
Just adjust your existing lilo conf to boot Debian as well.
 
Old 07-05-2015, 12:51 AM   #4
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484

Original Poster
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Quote:
Originally Posted by descendant_command View Post
If you're already using lilo why install grub?
Just adjust your existing lilo conf to boot Debian as well.
Do you mean make a menu entry in the lilo.config file?

If so, I have forgotten how:-
 
Old 07-05-2015, 12:54 AM   #5
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,876

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
Well, yes - you only need one bootloader.
As to how ... can't help sorry, I've never used lilo, but i'm sure it's documented somewhere.
 
Old 07-05-2015, 01:00 AM   #6
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484

Original Poster
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Quote:
Originally Posted by descendant_command View Post
Well, yes - you only need one bootloader.
As to how ... can't help sorry, I've never used lilo, but i'm sure it's documented somewhere.
I did it once before and forgot-jeeeeez:-

I think it's something like:
other=/dev/sdb
lablel=debian

but I'm not chances it I could be wrong.
I'll look online and see if I can find how to make a Menu Entry in Lilo-
 
Old 07-05-2015, 01:01 AM   #7
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,264
Blog Entries: 24

Rep: Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194
Quote:
Originally Posted by Ztcoracat View Post
Do you mean make a menu entry in the lilo.config file?

If so, I have forgotten how:-
What you need to do is chain load from Lilo.

First, since you have grub installed under Debian, just have it install to the root partition of the Debian install - /dev/sdb1 if I read your post correctly.

Then, boot to Slackware, and add this to the lilo.conf:

Code:
other = /dev/sdb1
label = Debian_1TB
...then run lilo.

"Assuming" (dangerous word) the device paths are correct and the same under both Slackware and Debian, that should do it. When you boot to the MBR of the first disk, you will have an option to go to the Debian partition of the second disk, from which grub will take over and boot Debian.

You can improve on this by replacing all /dev/sdx paths with UUIDs of the actual devices, then it won't matter if drive order changes (much - you may need to reset boot device in the BIOS).

*** Ah! We cross posted...

If grub installed to the MBR of the second drive then it will be other=/dev/sdb as you said. But it hurts nothing to add "other" stanzas for both then keep the one that works.

Note also that there is no guarantee that drive order as represented by /dev/sdx will be the same under different distros - although it usually is. If you get a boot failure post the message here.

Last edited by astrogeek; 07-05-2015 at 01:09 AM.
 
Old 07-05-2015, 01:06 AM   #8
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484

Original Poster
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Quote:
Originally Posted by astrogeek View Post
What you need to do is chain load from Lilo.

First, since you have grub installed under Debian, just have it install to the root partition of the Debian install - /dev/sdb1 if I read your post correctly.

Then, boot to Slackware, and add this to the lilo.conf:

Code:
other = /dev/sdb1
label = Debian_1TB
...then run lilo.

"Assuming" (dangerous word) the device paths are correct and the same under both Slackware and Debian, that should do it. When you boot to the MBR of the first disk, you will have an option to go to the Debian partition of the second disk, from which grub will take over and boot Debian.

You can improve on this by replacing all /dev/sdx paths with UUIDs of the actual devices, then it won't matter if drive order changes (much - you may need to reset boot device in the BIOS).
I don't have grub installed.
I tried to install it 3 times in rescue mode and it failed during the Debian install as well.

I'll make the menu entry you typed for me in the lilo.conf file.
Thank you, astrogeek I forgot how.

bb to let you know how it went.
 
Old 07-05-2015, 01:23 AM   #9
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,264
Blog Entries: 24

Rep: Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194
Quote:
Originally Posted by Ztcoracat View Post
I don't have grub installed.
I tried to install it 3 times in rescue mode and it failed during the Debian install as well.

I'll make the menu entry you typed for me in the lilo.conf file.
Thank you, astrogeek I forgot how.

bb to let you know how it went.
OK, it did not sink in that grub failed to install... duh...

I do not use grub at all so cannot help you with that part of it, and grub needs to be there for chain loading to work...

But let me anticipate you a little and see if we can't mount the Debian partitions under Slackware and create a full bootable lilo stanza for Debian.

Now, I also do not run Debian so I don't know if it uses an initrd, but lets assume not in these days of 64 bit monster kernels... so a starting point would be like this...

First mount the debian root partition under Slackware...

Code:
mkdir /mnt/deb
mount /dev/sdb1 /mnt/deb
ls /mnt/deb just to be sure it is what you expect...
Then add to lilo.conf

Code:
image = /mnt/deb/boot/vmlinuz !! This is the lilo-runtime-mounted path !!
root = /dev/sdb1 !! This is the boot-runtime device path !!
label = Debian
Then run lilo and see if it gives any warnings - if not see if it will boot!
 
Old 07-05-2015, 01:24 AM   #10
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484

Original Poster
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Editing the lilo.conf file was a success.

F11 while the machine boots gives me a GNU Menu to choose between Slackware and Debian.

UUID's should already be assigned to the 500 GB HDD and the 1 TB HDD, right?
 
Old 07-05-2015, 01:32 AM   #11
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484

Original Poster
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
descendant_command & astrogeek Thank you both for your help.-

Debian 8 is really nice! ! !

I have to install the firmware-realtek_0.43_all.deb to get the wifi working.
I tried setting up the wifi/dhcp during the fresh installation but it was unsuccessful.

Debain will keep me busy at least for the next hour or so:-
 
Old 07-05-2015, 01:36 AM   #12
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484

Original Poster
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Quote:
Originally Posted by astrogeek View Post
OK, it did not sink in that grub failed to install... duh...

I do not use grub at all so cannot help you with that part of it, and grub needs to be there for chain loading to work...

But let me anticipate you a little and see if we can't mount the Debian partitions under Slackware and create a full bootable lilo stanza for Debian.

Now, I also do not run Debian so I don't know if it uses an initrd, but lets assume not in these days of 64 bit monster kernels... so a starting point would be like this...

First mount the debian root partition under Slackware...

Code:
mkdir /mnt/deb
mount /dev/sdb1 /mnt/deb
ls /mnt/deb just to be sure it is what you expect...
Then add to lilo.conf

Code:
image = /mnt/deb/boot/vmlinuz !! This is the lilo-runtime-mounted path !!
root = /dev/sdb1 !! This is the boot-runtime device path !!
label = Debian
Then run lilo and see if it gives any warnings - if not see if it will boot!
I know Slackware very well so I'll give your proposal a go.
It's late so I'll let you know tomorrow, THANKS-
 
Old 07-05-2015, 01:37 AM   #13
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,264
Blog Entries: 24

Rep: Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194
Quote:
Originally Posted by Ztcoracat View Post
Editing the lilo.conf file was a success.

F11 while the machine boots gives me a GNU Menu to choose between Slackware and Debian.

UUID's should already be assigned to the 500 GB HDD and the 1 TB HDD, right?
Ah great! Did you actually boot to the Debian drive - just to be sure?

Yes, the UUIDs are generated by the filesystem creation process. You can find them under /dev/disk/by-uuid/...

Code:
ls -l /dev/disk/by-uuid/
The syntax is a little different for each use, as follows...

Code:
First, the image path must be mounted and accessible when you run lilo, for example:
image = /boot/vmlinuz
image = /mnt/deb/boot/vmlinuz

The boot device must be accessible via device path...

boot = /dev/disk/by-id/SOME-UNIQUE-ID-SYMLINK-TO-DISK for MBR installation...
boot = /dev/disk/by-uuid/SOME-UNIQUE-UUID-SYMLINK-TO-PARTITION for boot partition installation...

The root partition should be referenced by quoted UUID only (i.e., no path)

root = "SOME-UNIQUE-UUID-FOR-ROOT-PARTITION"
Also, to make the drives order independent in multi-drive machines, change the references in /etc/fstab to also use UUIDs for all partitions. Then if your drives are reordered it will still boot!
 
Old 07-05-2015, 02:30 AM   #14
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,876

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
Just as a final step, if you really are booting Debian via lilo and NOT chainloading grub, then make sure the grub packages are removed from Debian, otherwise future kernel upgrades will try to reinstall grub and possibly bork your current setup.

edit: actually, no it won't - it will rewrite the grub config but not reinstall the actual bootloader...

Last edited by descendant_command; 07-05-2015 at 02:32 AM.
 
Old 07-05-2015, 02:37 PM   #15
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484

Original Poster
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Quote:
Originally Posted by descendant_command View Post
Just as a final step, if you really are booting Debian via lilo and NOT chainloading grub, then make sure the grub packages are removed from Debian, otherwise future kernel upgrades will try to reinstall grub and possibly bork your current setup.

edit: actually, no it won't - it will rewrite the grub config but not reinstall the actual bootloader...
To clarify booting into Debian......
When I boot up this desktop w/o tapping F11 it boot's directly into Slackware.
F11 takes me to a GNU Menu that boots me directly as a first choice into Debian with the choice of arrowing down to choose Slack from there. All attempts at installing Grub during the install failed. Several attempts to install Grub using the Debian DVD in Rescue Mode failed as well.

How can I be certain that LILO isn't chainloading grub?

-:-...-:-...-:-

astrogeek-

Quote:
Also, to make the drives order independent in multi-drive machines, change the references in /etc/fstab to also use UUIDs for all partitions. Then if your drives are reordered it will still boot!
I'm not familiar with changing the references in the /etc/fstab file but I'd like to change this to avoid misboots in the future. I'll pull the /etc/fstab file up in the terminal to view it to get what your saying:-

I have what looks to me as 4 uuid's-
By id I can tell the 1TB HDD from the 500 GB HDD but by looking at the uuid's by uuid; all 4 signatures are different and can not tell the difference.

Last edited by Ztcoracat; 07-05-2015 at 02:48 PM. Reason: Addition details
 
  


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
Debian wheezy server opening in grub rescue kgb200805 Linux - Server 6 09-02-2014 01:18 AM
Ubuntu 12.04 fresh install - grub rescue cannot see beyond root dir frndrfoe Ubuntu 3 07-22-2013 01:30 PM
Debian RAID Failure / Grub Rescue carlosinfl Linux - Server 2 02-14-2013 10:44 PM
Removing Debian 2.2, Grub, Starting Fresh... pazz33 Linux - Newbie 4 01-30-2007 06:09 AM
Need to (re)install GRUB: fedora c4 rescue cd (and GRUB) unable to see the harddisk whencat Fedora 4 03-05-2006 02:01 PM

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

All times are GMT -5. The time now is 12:55 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