LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - Installation
User Name
Password
Slackware - Installation This forum is for the discussion of installation issues with Slackware.

Notices


Reply
  Search this Thread
Old 05-02-2013, 07:03 AM   #1
cbastos
LQ Newbie
 
Registered: Jul 2012
Posts: 8

Rep: Reputation: Disabled
Dual boot with separated disks and Windows 7


Hi there.

I'm stuck with a new installation of Slackware 14.0. I got Windows 7 installed and didn't wanted to mess the disk with Partition Magic, so I installed a second disc on my box. I did the install of Slackware and configured the lilo to boot both windows and Linux.

I rebooted the machine and checked Linux was booting ok, so I decided to check the boot for windows and I got a not nice surprise, I couldn't boot my windows anymore. Ouch... I have lots of documentation under this SO.

I booted into Linux once again and could see the windows C: drive is not the first partition, there is a reserved partition at /dev/sda1

Code:
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      206847      102400    7  HPFS/NTFS/exFAT
/dev/sda2          206848  1024002047   511897600    7  HPFS/NTFS/exFAT
So I edited the lilo.conf file and changed the windows settings to:

Code:
# Windows bootable partition config begins
other = /dev/sda2
label = win
table = /dev/sda
The fist time I tried to run the lilo command I got this warnings:

Code:
Warning: The boot sector and map file are on different disks.
Warning: Device 0x0800: Inconsistent partition table, 1st entry
  CHS address in PT:  0:32:33  -->  LBA (640)
  LBA address in PT:  2048  -->  CHS (0:107:16)
Fatal: Either FIX-TABLE or IGNORE-TABLE must be specified
If not sure, first try IGNORE-TABLE (-P ignore)
I installed the MBR once again using the -P ignore option of lilo command ant tried to boot. It still not boot the windows, so I used fdisk to make the second partition of the first disk bootable instead of the first one. New lilo install and boot and nothing changed.

I changed back all the settings and restored the MBR so I can boot into windows again.

This is the content of my lilo.conf

Code:
boot = /dev/sda
bitmap = /boot/slack.bmp
bmp-colors = 255,0,255,0,255,0
bmp-table = 60,6,1,16
bmp-timer = 65,27,0,255

append=" vt.default_utf8=0"
prompt
timeout = 50
vga = 791

other = /dev/sda1
label = win
table = /dev/sda

image = /boot/vmlinuz
root = /dev/sdb1
label = linux

Now I have a Slackware installation that can only be accessed using the DVD to boot and mount /dev/sdb1 as root partition.

Please, how can I fix this issue? I already used the liloconfig once again to configure lilo with no success.

Regards,
Carlos

Last edited by cbastos; 05-02-2013 at 07:26 AM.
 
Old 05-02-2013, 11:33 PM   #2
Erik_FL
Member
 
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 821

Rep: Reputation: 258Reputation: 258Reputation: 258
To fix your problems with LILO you need to add the "lba32" option to "lilo.conf" so that LILO will use Logical Block Addressing instead of the incorrect Cylinder/Head/Sector addresses. You should always include the "lba32" option in "lilo.conf"

Your first partition on the first hard disk has the Windows "bootmgr". That is the partition that must have the "boot" flag set. In "lilo.conf" You want to use "/dev/sda1" to boot Windows.

Code:
lba32
boot = /dev/sda
bitmap = /boot/slack.bmp
bmp-colors = 255,0,255,0,255,0
bmp-table = 60,6,1,16
bmp-timer = 65,27,0,255

append=" vt.default_utf8=0"
prompt
timeout = 50
vga = 791

other = /dev/sda1
label = win
table = /dev/sda

image = /boot/vmlinuz
root = /dev/sdb1
label = linux
Remember to run the "lilo" command after changing "lilo.conf".

When you install LILO to the MBR it may be writing over the disk signature used by Windows 7. That prevents Windows from booting.

If Windows does not boot after you install LILO, you can repair Windows booting. Boot the Windows 7 Setup disk and then press Shift + F10 to get a Windows command prompt. Type in these commands to repair your boot configuration.

Code:
bootrec /rebuildbcd
Another way to avoid the problem is to install LILO to the second hard disk. That way, you will not break Windows booting when installing LILO. Then add the LILO boot sector to the Windows boot menu.

To install LILO to the second hard disk here is what you would put in the LILO configuration file.

Code:
lba32
boot = /dev/sdb
bitmap = /boot/slack.bmp
bmp-colors = 255,0,255,0,255,0
bmp-table = 60,6,1,16
bmp-timer = 65,27,0,255

append=" vt.default_utf8=0"
prompt
timeout = 50
vga = 791

mage = /boot/vmlinuz
root = /dev/sdb1
label = linux
After installing LILO you have to create a copy of the boot sector in a file. For example:

Code:
dd if=/dev/sdb of=/tmp/linux.bin bs=512 count=1
You need to copy the boot sector file to the Windows partition (the second partition of the first hard disk). Using Linux you will probably have to temporarily copy the "linux.bin" file to a thumb drive or floppy disk. Boot Windows and copy the "linux.bin" file from the thumb drive or floppy disk to the Windows partition.

Here is a good explanation of how to add a boot sector file to the Windows boot menu.

Adding Linux to the Windows7 boot menu

Last edited by Erik_FL; 05-02-2013 at 11:43 PM.
 
2 members found this post helpful.
Old 05-22-2013, 12:36 PM   #3
cbastos
LQ Newbie
 
Registered: Jul 2012
Posts: 8

Original Poster
Rep: Reputation: Disabled
Hi Erik.

Tank you very much for your help.

Quote:
Originally Posted by Erik_FL View Post
To fix your problems with LILO you need to add the "lba32" option to "lilo.conf" so that LILO will use Logical Block Addressing instead of the incorrect Cylinder/Head/Sector addresses. You should always include the "lba32" option in "lilo.conf"
I had "lba32" added to my lilo.conf, I just missed it when copying the file content.


Quote:
Originally Posted by Erik_FL View Post
When you install LILO to the MBR it may be writing over the disk signature used by Windows 7. That prevents Windows from booting.

If Windows does not boot after you install LILO, you can repair Windows booting. Boot the Windows 7 Setup disk and then press Shift + F10 to get a Windows command prompt. Type in these commands to repair your boot configuration.

Code:
bootrec /rebuildbcd
I tryed the suggestion above and although Windows replied the fix was done, the box kept not booting into Windows.

So I'll try the procedure of adding the LILO boot sector to the Windows boot menu when I have time to do.

Last edited by cbastos; 05-22-2013 at 01:20 PM.
 
Old 06-03-2013, 06:37 AM   #4
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
Thanks Erik! I have just done an install while keeping windoze ( for the wife I hasten to add I wouldn't touch it with a 10' battle lance! ) and the auto lilo install seemed to work but windoze booted into the recovery partition, now that the correct partition is set both boot fine.
 
Old 06-03-2013, 09:17 AM   #5
cbastos
LQ Newbie
 
Registered: Jul 2012
Posts: 8

Original Poster
Rep: Reputation: Disabled
Hi.

Finaly I got the time to try the bcdedit solution, but unfortunately this did not solved the boot issue.
I followed the steps and when I tryed to boot into Linux it could not be found.

Here its what was configured on the Windows boot loader.

Code:
C:\Windows\system32>bcdedit /enum

Gerenciador de Inicialização do Windows
--------------------
identificador           {bootmgr}
device                  partition=\Device\HarddiskVolume1
description             Windows Boot Manager
locale                  pt-BR
inherit                 {globalsettings}
default                 {current}
resumeobject            {a436e354-1c78-11e2-a55f-9c8737630332}
displayorder            {current}
                        {a436e358-1c78-11e2-a55f-9c8737630332}
toolsdisplayorder       {memdiag}
timeout                 10

Carregador de Inicialização do Windows
-------------------
identificador           {current}
device                  partition=C:
path                    \Windows\system32\winload.exe
description             Windows 7
locale                  pt-BR
inherit                 {bootloadersettings}
recoverysequence        {a436e356-1c78-11e2-a55f-9c8737630332}
recoveryenabled         Yes
osdevice                partition=C:
systemroot              \Windows
resumeobject            {a436e354-1c78-11e2-a55f-9c8737630332}
nx                      OptIn

Setor de Inicialização em Modo Real
---------------------
identificador           {a436e358-1c78-11e2-a55f-9c8737630332}
device                  partition=C:
path                    \linux.bin
description             Linux

C:\Windows\system32>
 
Old 06-03-2013, 08:04 PM   #6
Erik_FL
Member
 
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 821

Rep: Reputation: 258Reputation: 258Reputation: 258
Quote:
Originally Posted by cbastos View Post
Hi.

Finaly I got the time to try the bcdedit solution, but unfortunately this did not solved the boot issue.
I followed the steps and when I tryed to boot into Linux it could not be found.

Here its what was configured on the Windows boot loader.

Code:
C:\Windows\system32>bcdedit /enum

Gerenciador de Inicialização do Windows
--------------------
identificador           {bootmgr}
device                  partition=\Device\HarddiskVolume1
description             Windows Boot Manager
locale                  pt-BR
inherit                 {globalsettings}
default                 {current}
resumeobject            {a436e354-1c78-11e2-a55f-9c8737630332}
displayorder            {current}
                        {a436e358-1c78-11e2-a55f-9c8737630332}
toolsdisplayorder       {memdiag}
timeout                 10

Carregador de Inicialização do Windows
-------------------
identificador           {current}
device                  partition=C:
path                    \Windows\system32\winload.exe
description             Windows 7
locale                  pt-BR
inherit                 {bootloadersettings}
recoverysequence        {a436e356-1c78-11e2-a55f-9c8737630332}
recoveryenabled         Yes
osdevice                partition=C:
systemroot              \Windows
resumeobject            {a436e354-1c78-11e2-a55f-9c8737630332}
nx                      OptIn

Setor de Inicialização em Modo Real
---------------------
identificador           {a436e358-1c78-11e2-a55f-9c8737630332}
device                  partition=C:
path                    \linux.bin
description             Linux

C:\Windows\system32>
The Windows boot loader configuration looks correct.

Please post the contents of your "lilo.conf" file and the contents of the "linux.bin" file. You can use this command in Linux to save the contents of "linux.bin" as a text file.

Code:
hexdump -C linux.bin > linux.txt
What error message do you see when you try to boot Linux?
 
Old 07-02-2013, 11:34 PM   #7
MCDewy
LQ Newbie
 
Registered: Jun 2013
Posts: 15

Rep: Reputation: Disabled
Not sure if this will help.

I have a 2TB windows Sata drive. I installed a 160gb sata drive for Slackware.

Installing slackware, I let it configure lilo for me. When I boot, it shows Windows as the primary option and linux as the second option. My lilo.conf file:
Code:
# Windows bootable partition config begins
other = /dev/sda1
  label = Windows
  table = /dev/sda
# Windows bootable partition config ends
# Linux bootable partition config begins
image = /boot/vmlinuz
  root = /dev/sdb2
  label = Linux
  read-only
# Linux bootable partition config ends
 
  


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
[SOLVED] dual boot two disks with separate /boot partitions [GOD]Anck Slackware 5 09-12-2009 03:32 PM
Two hard disks - dual boot ( XP - Linux ) using microsoft boot loader, not grub cristy88 Linux - General 2 12-17-2007 06:26 PM
Red Hat AS Windows Xp dual boot problem on separate disks parthiv108 Linux - Enterprise 1 06-13-2006 05:42 AM
Dual boot with two disks flame SUSE / openSUSE 1 04-26-2005 03:09 PM
Two hard disks better for dual boot? zigzago Linux - Hardware 5 03-18-2005 03:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - Installation

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