LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Lilo boot problem, lilo on mbr not found (https://www.linuxquestions.org/questions/slackware-14/lilo-boot-problem-lilo-on-mbr-not-found-4175450983/)

Exeunt 02-20-2013 11:47 AM

Lilo boot problem, lilo on mbr not found
 
Hi All,

I have installed Slackware 14 on a disk with 4096 byte physical sectors. Lilo installs OK because I dumped the boot sector to make sure it was there. I have Slack on sda and Win7 on sdb. When I try to boot I get the Win7 loader from sdb. The only way I can boot is to use the install disk specifying my installed root.

Has anyone else seen this problem?

Here is my drive as seen during boot:

Code:

ata1.00: ATA-8: ST500DM002-1BD142, KC45, max UDMA/133
ata1.00: 976773168 sectors, multi 16: LBA48 NCQ (depth 31/32)
ata1.00: configured for UDMA/133
scsi 2:0:0:0: Direct-Access    ATA      ST500DM002-1BD14 KC45 PQ: 0 ANSI: 5
sd 2:0:0:0: [sda] 976773168 512-byte logical blocks: (500 GB/465 GiB)
sd 2:0:0:0: [sda] 4096-byte physical blocks
sd 2:0:0:0: [sda] Write Protect is off
sd 2:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA

Here is the fdisk output:

Code:

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x26d7f011

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1  *        2048  629147647  314572800  83  Linux
/dev/sda2      629147648  645924863    8388608  82  Linux swap
/dev/sda3      645924864  976773167  165424152  83  Linux

Here is the lilo install output:

Code:

LILO version 23.2 (released 09-Apr-2011)
  * Copyright (C) 1992-1998 Werner Almesberger  (until v20)
  * Copyright (C) 1999-2007 John Coffman  (until v22)
  * Copyright (C) 2009-2011 Joachim Wiedorn  (since v23)
This program comes with ABSOLUTELY NO WARRANTY. This is free software
distributed under the BSD License (3-clause). Details can be found in
the file COPYING, which is distributed with this software.
Compiled at 14:13:34 on Aug 20 2012
Running Linux kernel 3.2.29-smp on i686

Warning: LBA32 addressing assumed
raid_setup returns offset = 00000000  ndisk = 0
 BIOS  VolumeID  Device 
Reading boot sector from /dev/sda
pf_hard_disk_scan: ndevs=3
  0800  26D7F011  /dev/sda
  0810  D97237F5  /dev/sdb
  0830  67F15ADC  /dev/sdd
device codes (user assigned pf) = 0
device codes (user assigned) = 0
device codes (BIOS assigned) = 0
device codes (canonical) = 7
Warning: Unable to determine video adapter in use in the present system.
Using MENU secondary loader
Calling map_insert_data
Secondary loader: 18 sectors (0x3600 dataend).
bios_boot = 0x80  bios_map = 0x80  map==boot = 0  map S/N: 26D7F011
Mapping message file /boot/boot_message.txt
Calling map_insert_file
Message: 1 sector.
BIOS data check will include auto-suppress check

Boot image: /boot/vmlinuz -> vmlinuz-huge-smp-3.2.29-smp
Setup length is 32 sectors.
Mapped 11838 sectors.
Added Slack-14  *

 BIOS  VolumeID  Device
  80    26D7F011    0800
  81    D97237F5    0810
  82    67F15ADC    0830
Writing boot sector.
/boot/boot.0800 exists - no boot sector backup copy made.
Map file size: 74752 bytes.
RAID device mask 0x0000
2 warnings were issued.

Ed

colorpurple21859 02-20-2013 12:14 PM

Check the boot order in the bios,

Didier Spaier 02-20-2013 01:10 PM

Please show /etc/lilo.conf

Also, make /dev/sdb not bootable. This won't prevent you to start W7 from lilo's menu, with appropriate settings.

Exeunt 02-21-2013 07:24 AM

Hi again,

Thanks for the replies. First of all here is my lilo.conf.

Code:

# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
boot = /dev/sda
#compact        # faster, but won't work on all systems.
# Standard menu.
message = /boot/boot_message.txt

# Append any additional kernel parameters:
append=" vt.default_utf8=0"
#prompt
#timeout = 5
# Normal VGA console
vga = normal
# ramdisk = 0    # paranoia setting
# End LILO global section
# Linux bootable partition config begins
image = /boot/vmlinuz
  root = /dev/sda1
  label = Slack-14
  read-only  # Partitions should be mounted read-only for checking
# Linux bootable partition config ends

Previously I had Fedora 13 (required by my job) on /dev/sda1 and Slackware on /dev/sda3. Fedora booted OK so I assume the boot order is correct. Now I am running Fedora in VirtualBox, a much better solution.

How do I make /dev/sdb unbootable?

Ed

Didier Spaier 02-21-2013 07:44 AM

Quote:

Originally Posted by Exeunt (Post 4896656)
Fedora booted OK so I assume the boot order is correct.

Do not assume, check.
Quote:

Originally Posted by Exeunt (Post 4896656)
How do I make /dev/sdb unbootable?Ed

Well, at first thought it was possible with fdsik or cfdisk but maybe you'd have to wipe out your MBR on /dev/sdb/ instead.

Please someone more knowledgeable, answer.

Anyhow, after that, to add Windows to LILO's menu, write this at the end of /etc/lilo.conf:
Code:

# Windows bootable partition config begins
other = /dev/sdb1
  label = Windows
  table = /dev/sdb
# Windows bootable partition config ends

I'm assuming that you have a Windows system partition on /dev/sdb1, else adapt accordingly. Then run lilo to install it.

EDIT. Also, as /dev/sda1 is bootable, you could edit 5th line of your /etc/lilo.conf this way:
Code:

boot = /dev/sda1
then run lilo. Of course other changes to /etc/lilo.conf are still necessary.

colorpurple21859 02-21-2013 08:35 AM

To check boot order, go into bios setup when computer is first turned on. Another option is to install lilo to mbr of sdb.

Didier Spaier 02-21-2013 08:44 AM

Quote:

Originally Posted by colorpurple21859 (Post 4896701)
To check boot order, go into bios setup when computer is first turned on. Another option is to install lilo to mbr of sdb.

I'd favor install lilo on linux' root partition (see the end of my last post), to preserve the MBR of /dev/sdb if possible.

For instance to install a Service Pack on Windows 7, I had to boot Windows on the MBR.


All times are GMT -5. The time now is 02:55 PM.