LinuxQuestions.org
Visit Jeremy's Blog.
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 06-26-2010, 12:46 PM   #1
wingman358
Member
 
Registered: Mar 2008
Location: Northeast US
Distribution: Mint, Ubuntu, Backtrack
Posts: 77

Rep: Reputation: 16
LILO/GRUB issue? Dual boot half broken


Hello all

I've run Debian on my laptop for quite some time now with no problems.
I installed Slack to a new partition created in the free space of my hard drive, and I thik this was my mistake: I let Slack automatically configure the MBR with lilo (can't remember - I should stop operating on the MBR at 4 AM.) Now Slack runs just fine, but upon bootup I would like to be able to boot either Debian or Slack, but instead I just have a Slack splash and the only option is to press enter to boot Slack.

FYI:


Code:
root@slacjb400:~# lilo -A /dev/sda
/dev/sda1
I believe sda1 is the root directory of my Debian install.


Code:
root@slacjb400:~# fdisk -l

[...]

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          43      345366   83  Linux
/dev/sda2              44       14962   119836867+   5  Extended
/dev/sda3           14963       22432    60002775   83  Linux
/dev/sda5              44         651     4883728+  83  Linux
/dev/sda6             652        1016     2931831   83  Linux
/dev/sda7            1017        2460    11598898+  82  Linux swap
/dev/sda8            2461        2509      393561   83  Linux
/dev/sda9            2510       13518    88429761   83  Linux
/dev/sda10          13519       14962    11598898+  82  Linux swap
In the above table, sda10 is the swap I created for Slack and sda3 is the root directory for Slack. All other partitions were there before (my initial Debian install).

Thus my partitions are apparently intact and visible by the MBR (is it correct that the MBR holds the list of partitions on a disk?) but for some reason I don't have the option to boot Debian at all - just Slack.

I have a feeling this is a LILO/GRUB issue, but I don't know where to start.


EDIT: more poking around seems to reveal that it is the configuration of LILO that is the problem. Observe the following output:

Code:
root@slacjb400:~# cat /etc/lilo.conf
# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
# Append any additional kernel parameters:
append=" vt.default_utf8=0"
boot = /dev/sda

[...]

# Linux bootable partition config begins

image = /boot/vmlinuz
  root = /dev/sda3
  label = Linux
  read-only

# Linux bootable partition config ends

Last edited by wingman358; 06-26-2010 at 12:56 PM. Reason: appended more information
 
Old 06-26-2010, 01:29 PM   #2
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
Suggestion

Log on Slackware and make sda3 "chainloadable" by command
Code:
lilo -b /dev/sda3
Then try Task B5 of Just booting tips in my signature. No need to use a Live CD. Just do it from Lilo and mount sda1 and do a grub-install to sda to get back your Debian in the MBR.

Inside Debian's /boot/grub/menu.lst add this entry to fire up Slackware
Code:
title slackware in sda3
root (hd0,2)
chainloader +1
You can also make Debian chainloadable by Lilo if the Grub-install is pointed to sda1 instead of sda. In which case you add entry to /etc/lilo.conf to boot Debian
Code:
other=/dev/sda1
label=Debian_in_sda1
and re-compile Lilo by command
Code:
lilo -b /dev/sda
Lilo and Grub can be used in any way you want. In fact you can have both of the above schemes implemented so that you can jump between Lilo and Grub menus.

Last edited by saikee; 06-26-2010 at 01:33 PM.
 
Old 06-28-2010, 12:51 AM   #3
wingman358
Member
 
Registered: Mar 2008
Location: Northeast US
Distribution: Mint, Ubuntu, Backtrack
Posts: 77

Original Poster
Rep: Reputation: 16
In Slack I tried making sda3 "chainloadable":

Code:
root@slacjb400:~# lilo -b /dev/sda3

Warning: Ignoring entry 'boot'
Warning: LBA32 addressing assumed
Warning: Partition 3 on /dev/sda is not marked Active.
Added Linux *
3 warnings were issued.
and then:

Code:
root@slacjb400:~# fdisk -l

[...]

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          43      345366   83  Linux
/dev/sda2              44       14962   119836867+   5  Extended
/dev/sda3           14963       22432    60002775   83  Linux
/dev/sda5              44         651     4883728+  83  Linux
/dev/sda6             652        1016     2931831   83  Linux
/dev/sda7            1017        2460    11598898+  82  Linux swap
/dev/sda8            2461        2509      393561   83  Linux
/dev/sda9            2510       13518    88429761   83  Linux
/dev/sda10          13519       14962    11598898+  82  Linux swap
so I decided to activate sda3 and verified it with fdisk -l:

Code:
root@slacjb400:~# lilo -A /dev/sda 3

pt[1] ->  0
pt[3] -> 80
The partition table has been updated.

root@slacjb400:~# fdisk -l  

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1          43      345366   83  Linux
/dev/sda2              44       14962   119836867+   5  Extended
/dev/sda3   *       14963       22432    60002775   83  Linux
/dev/sda5              44         651     4883728+  83  Linux
/dev/sda6             652        1016     2931831   83  Linux
/dev/sda7            1017        2460    11598898+  82  Linux swap
/dev/sda8            2461        2509      393561   83  Linux
/dev/sda9            2510       13518    88429761   83  Linux
/dev/sda10          13519       14962    11598898+  82  Linux swap
I then rebooted and at the Slack splash screen, pressed <Tab> to bring up the LILO prompt. I was presented with

Code:
Linux
boot:
and typed "mount sda1" which returned "No such image. [Tab] shows a list."

Any ideas?
 
Old 06-28-2010, 01:49 AM   #4
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
You mount sda1 "inside" a Linux not before you boot up one.

Following Task B5 and adjust the device name to suit your own situation.
 
Old 06-30-2010, 11:54 PM   #5
wingman358
Member
 
Registered: Mar 2008
Location: Northeast US
Distribution: Mint, Ubuntu, Backtrack
Posts: 77

Original Poster
Rep: Reputation: 16
Saikee, I followed your directions up to the "grub-install" part where it threw me the error Could not find device for /boot: Not found or not a block device."

I then followed the directions below: (taken from http://ubuntuforums.org/showthread.php?t=504678 )

Boot from the liveCD and open a terminal window. Do:
Code:
sudo grub
That should change the prompt to "grub". Then the following:

Code:
find /boot/grub/stage1 < the "1" is the number one
That will return a value that looks like

(hdX,Y)

where X and Y are numbers. Remember the values. Then:

Code:
root (hdX,Y)
where X and Y are the values returned by the find command. This tells GRUB where the boot partition of your linux installation is now located. Then:
Code:
setup (hd0) < the "0" is the number zero.
This writes the updated GRUB stub loader (now with the correct boot partition location) to the MBR (first 512 bytes) of the current boot drive.

Code:
quit
to exit the grub terminal,
 
  


Reply


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
getting rid of grub for lilo - dual boot mutexe Slackware - Installation 12 06-21-2010 11:11 PM
Dual Boot Slackware and SUSE - Grub or Lilo? nix2ways Slackware 7 09-26-2006 03:26 AM
GRUB broken on dual boot laptop matulike Linux - General 3 08-21-2006 03:35 PM
Messed up an attempt at dual boot install- GRUB on one, LILO on the other 0mn1z10n Linux - General 4 12-04-2005 11:57 AM
Getting Grub to dual boot with Morphix running Lilo Momboking Linux - Newbie 3 03-08-2004 09:17 PM

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

All times are GMT -5. The time now is 01:26 AM.

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