LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-14-2016, 06:04 AM   #1
timsoft
Member
 
Registered: Oct 2004
Location: scotland
Distribution: slackware 15.0 64bit, 14.2 64 and 32bit and arm, ubuntu and rasbian
Posts: 495

Rep: Reputation: 144Reputation: 144
Question dual boot win7/slackware 14.2 64bit in legacy mode on gpt disk


target: dual booting win7 and slackware64 14.2 on gpt partitioned disk in legacy mode

position/what has been tried
I have a new acer laptop which comes with windows7 pro 64bit preinstalled in legacy mode but on a gfi partitioned disk. If I change to UEFI mode, win7 does not start (it freezes on startup). Installing slackware on some freed up space ( a swap partition and a root partition) has difficulties because it freezes in certain (bios) modes, even booting with the kms kernel option. Because win7 refuses to boot in uefi mode, and manually removing the gpt partitioning and protective mbr and re-writing a "dos" mbr (using gdisk), trying to install windows in legacy mode, windows for some weird reason formats the disk as gpt, I am a bit stuck. I have restored the windows installation, and am going to try getting slackware on again, but am not sure how lilo handles gpt. because windows does not start in uefi mode I can't use the normal eufi partition on the gpt disk for booting.

Question
My question is, can lilo be forced to write to the "boot sector" of a gpt partition, so I can use the instructions here http://alien.slackbook.org/blog/addi...ws7-boot-menu/ in order to dual boot.

Last edited by timsoft; 11-14-2016 at 08:35 AM. Reason: minor typo
 
Old 11-14-2016, 01:56 PM   #2
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
According to this SlackDoc, gpt should work seamlessly with lilo.
 
Old 11-19-2016, 12:35 PM   #3
timsoft
Member
 
Registered: Oct 2004
Location: scotland
Distribution: slackware 15.0 64bit, 14.2 64 and 32bit and arm, ubuntu and rasbian
Posts: 495

Original Poster
Rep: Reputation: 144Reputation: 144
i tried with lilo and get the following error.
Added linux *
Warning 0x0800: Inconsistet partition table, 3rd entry
CHS address in PT: 0:0:0 --> LBA (-1)
LBA address in PT: 0 --> CHS (0:0:1)
Fatal: Either FIX-TABLE or IGNORE-TABLE must be specified
If not sure, first try IGNORE-TABLE (-P ignore)
I have tried lilo -P ignore but get the same message with an additional
Warning: the partition table is *NOT* being adjusted.
Fatal: Partition entry not found

my partitions (as created by the manufacturers recovery stick (plus my linux parts) is as follows (output from fdisk -l /dev/sda )
Code:
Device         Start       End   Sectors   Size Type
/dev/sda1       2048    206847    204800   100M EFI System
/dev/sda2     286848    230615     32768    16M Microsoft reserver
/dev/sda3     239616 632479743 632240128 301.5G Microsoft basic data
/dev/sda4  632479744 633503743   1924999   500M Windows recovery environment
/dev/sda5  633503744 650280959  16777216     8G Linux swap
/dev/sda6  650280960 904468479 254187520 121.2G Linux filesystem
/dev/sda7  904468480 976773119  72304640  34.5G Windows recovery environment
The linux entry in lilo is
image = /boot/vmlinuz
root = /dev/sda7
label = linux
and the windows entry is
other = /dev/sda3
label = win7
table = /dev/sda

I have tried with /dev/sda2 for win7, and have tried commenting out the table line as well, but with no success.
 
Old 11-19-2016, 01:39 PM   #4
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by timsoft View Post
Code:
Device         Start       End   Sectors   Size Type
/dev/sda1       2048    206847    204800   100M EFI System
/dev/sda2     286848    230615     32768    16M Microsoft reserver
/dev/sda3     239616 632479743 632240128 301.5G Microsoft basic data
/dev/sda4  632479744 633503743   1924999   500M Windows recovery environment
/dev/sda5  633503744 650280959  16777216     8G Linux swap
/dev/sda6  650280960 904468479 254187520 121.2G Linux filesystem
/dev/sda7  904468480 976773119  72304640  34.5G Windows recovery environment
The linux entry in lilo is
image = /boot/vmlinuz
root = /dev/sda7
label = linux
and the windows entry is
other = /dev/sda3
label = win7
table = /dev/sda

I have tried with /dev/sda2 for win7, and have tried commenting out the table line as well, but with no success.
According to this, you have your root partition for Linux listed as a "Windows recovery environment". Shouldn't your linux entry be pointing to /dev/sda6? Can you post your whole /etc/lilo.conf?

Also, I see you have an EFI partition. Do you have your "BIOS" in legacy mode so you can use lilo? Otherwise, you'd need to use elilo, if you're doing UEFI booting.
 
Old 11-19-2016, 04:58 PM   #5
timsoft
Member
 
Registered: Oct 2004
Location: scotland
Distribution: slackware 15.0 64bit, 14.2 64 and 32bit and arm, ubuntu and rasbian
Posts: 495

Original Poster
Rep: Reputation: 144Reputation: 144
yes, it should, I've fixed it. full lilo.conf below (comment and blank lines omitted as I am typing it in manually). and yes, the bios is in legacy mode (otherwise win7 does not start)
Code:
lba32
boot = /dev/sda
append=" vt.default_utf8=0"
prompt
timeout = 50
vga = normal
image = /boot/vmlinuz
root = /dev/sda6
label = linux
read-only
other = /dev/sda3
label = win7
table = /dev/sda
 
Old 11-19-2016, 05:12 PM   #6
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
What error (if any) do you get when running lilo with this lilo.conf? If you do get an error, can you post the output of lilo -t -v 2 (it will be a lot of text, it might be better to pipe it to a file and save that file to a usb drive so you can post it here)?
 
Old 11-20-2016, 12:42 PM   #7
timsoft
Member
 
Registered: Oct 2004
Location: scotland
Distribution: slackware 15.0 64bit, 14.2 64 and 32bit and arm, ubuntu and rasbian
Posts: 495

Original Poster
Rep: Reputation: 144Reputation: 144
output of lilo -t -v 2 as requested.
(sorry for the delay)
Code:
LILO version 24.2 (test mode)
  * Copyright (C) 1992-1998 Werner Almesberger  (until v20)
  * Copyright (C) 1999-2007 John Coffman  (until v22)
  * Copyright (C) 2009-2015 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.
Running Linux kernel 4.4.14 on x86_64

raid_setup returns offset = 00000000  ndisk = 0
 BIOS   VolumeID   Device
Reading boot sector from /dev/sda
pf_hard_disk_scan: ndevs=2
  0800  100F59DC  /dev/sda
  0810  04030201  /dev/sdb
device codes (user assigned pf) = 0
device codes (user assigned) = 0
device codes (BIOS assigned) = 0
device codes (canonical) = 3
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: 100F59DC
BIOS data check will include auto-suppress check

Boot image: /boot/vmlinuz -> vmlinuz-huge-4.4.14
Setup length is 34 sectors.
Mapped 14905 sectors.
Added linux  *

Boot other: /dev/sda3, on /dev/sda, loader CHAIN
Warning: Device 0x0800: Inconsistent partition table, 3rd entry
  CHS address in PT:  0:0:0  -->  LBA (-1)
  LBA address in PT:  0  -->  CHS (0:0:1)
Fatal: Either FIX-TABLE or IGNORE-TABLE must be specified
If not sure, first try IGNORE-TABLE (-P ignore)
Removed temporary file /boot/map~
 
Old 11-20-2016, 02:39 PM   #8
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
According to this post, you might be able to fix it by running the command on the bottom of this post, however, according to lilo's manpage, you should try to ignore it first.

Code:
-P {fix|ignore|<global-option}>
           Fix or ignore 'corrupt' partition tables, e.g. partition tables with linear and cylinder/head/sector addresses that do
           not correspond. Always try ignore first, as fix will re-write the partition table, possibly destroying all partitions
           on the disk.
Code:
lilo -P fix
 
Old 11-20-2016, 04:56 PM   #9
timsoft
Member
 
Registered: Oct 2004
Location: scotland
Distribution: slackware 15.0 64bit, 14.2 64 and 32bit and arm, ubuntu and rasbian
Posts: 495

Original Poster
Rep: Reputation: 144Reputation: 144
i have tried lilo -P fix and get the following output
Code:
Added linux *
Warning: Device 0x0800: Inconsistent partition table, 3rd entry
  CHS address in PT:  0:0:0  -->  LBA (-1)
  LBA address in PT:  0  -->  CHS (0:0:1)
Writing modified partition table to device 0x0800
Fatal: Partition entry not found.
 
Old 11-20-2016, 07:03 PM   #10
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
I'm wondering if this is related to the table entry. If Windows installed it's bootloader into the partition header like lilo, it could've been that lilo overwrote it. Unfortunately, it's been many years since I've dual-booted, so I have little experience with it and no experience on fixing it.

Out of curiosity, if you comment out the Windows entry, does lilo work properly?
 
Old 11-21-2016, 02:17 AM   #11
timsoft
Member
 
Registered: Oct 2004
Location: scotland
Distribution: slackware 15.0 64bit, 14.2 64 and 32bit and arm, ubuntu and rasbian
Posts: 495

Original Poster
Rep: Reputation: 144Reputation: 144
lilo runs without reporting an error, but on reboot it does not offer the lilo menu, but boots straight to win7!
that is odd. I know slackware runs in uefi mode with secure boot when I add the linux/slackware kernel in the efi partition to the "ok" certificates list, (as I've tried it),but, then win7 doesn't boot, and even with a oem install of win7, win7 doesn't install. I had to revert to the recovery stick.
An update on my remarks of slackware/linux freezing on startup. That appears to be incorrect. It is the built in keyboard which stops working. plugging in an external usb keyboard and it is not freezing. I have been running all the recent tests using an ecternal keybaord. (just mentioning it in case it is relevant)
I will try running elilo instead and post back, even though the bios says it is in legacy boot mode

Last edited by timsoft; 11-21-2016 at 02:18 AM. Reason: fix comment
 
Old 11-28-2016, 05:15 PM   #12
timsoft
Member
 
Registered: Oct 2004
Location: scotland
Distribution: slackware 15.0 64bit, 14.2 64 and 32bit and arm, ubuntu and rasbian
Posts: 495

Original Poster
Rep: Reputation: 144Reputation: 144
well, at last here is an update for those that may have the same problem..
I booted from the slackware install dvd, then reinstalled lilo to the mbr, and also separately to root (/dev/sda6), and also ran elilo.
Then I copied the bootsectors to files
dd if=/dev/sda6 bs=512 count=1 of=/linux.bin
dd if=/dev/sda bs=512 count=1 of=/linux2.bin
then copied them to a memory stick (as there is no write access to ntfs (or ntfs-3g) from the slackware install image.
then I restarted laptop, which booted into windows (no sign of lilo). I ran bcdedit as per http://alien.slackbook.org/blog/addi...ws7-boot-menu/
On restart, it would boot into win7 but the linux option failed with status 0xc000007b so I changed the partition to \Device\HarddiskVolume1 (which is the efi boot partition), and selected \EFI\Slackware\elilo.efi as the path.
If I select linux from the bcd menu, I still get an error message, but if I press Escape on that error message page, it boots to lilo, and thus to slackware.
So not ideal, but at least I can dual boot. Thanks everyone for the input, including Eric's blog for the bcdedit info. I can only assume that the bios is broken and legacy mode is not a proper legacy mode, but a mixture of legacy and uefi that only works for Windows. At least I don't have to write off the laptop, or run win7 in a vm from slackware, which would be a bit slow for opengl and directx games.
 
Old 12-10-2016, 06:21 PM   #13
Fat_Elvis
Member
 
Registered: Oct 2016
Distribution: FreeDOS 1.2
Posts: 309

Rep: Reputation: 92
Quote:
Originally Posted by timsoft View Post
well, at last here is an update for those that may have the same problem..
I booted from the slackware install dvd, then reinstalled lilo to the mbr, and also separately to root (/dev/sda6), and also ran elilo.
Then I copied the bootsectors to files
dd if=/dev/sda6 bs=512 count=1 of=/linux.bin
dd if=/dev/sda bs=512 count=1 of=/linux2.bin
then copied them to a memory stick (as there is no write access to ntfs (or ntfs-3g) from the slackware install image.
then I restarted laptop, which booted into windows (no sign of lilo). I ran bcdedit as per http://alien.slackbook.org/blog/addi...ws7-boot-menu/
On restart, it would boot into win7 but the linux option failed with status 0xc000007b so I changed the partition to \Device\HarddiskVolume1 (which is the efi boot partition), and selected \EFI\Slackware\elilo.efi as the path.
If I select linux from the bcd menu, I still get an error message, but if I press Escape on that error message page, it boots to lilo, and thus to slackware.
So not ideal, but at least I can dual boot. Thanks everyone for the input, including Eric's blog for the bcdedit info. I can only assume that the bios is broken and legacy mode is not a proper legacy mode, but a mixture of legacy and uefi that only works for Windows. At least I don't have to write off the laptop, or run win7 in a vm from slackware, which would be a bit slow for opengl and directx games.
Ouch. I remember using that same solution for that same problem. What a nightmare.

Have you tried using Wine? It works very well for most Windows games. It can run Win32 version of Steam too.
 
Old 12-11-2016, 04:44 PM   #14
timsoft
Member
 
Registered: Oct 2004
Location: scotland
Distribution: slackware 15.0 64bit, 14.2 64 and 32bit and arm, ubuntu and rasbian
Posts: 495

Original Poster
Rep: Reputation: 144Reputation: 144
unfortunately wine doesn't play nicely with my favourite windows game, age of empires 2. ( and doesn't work with sage accounts either), and I haven't persuaded myself to go multilib, as I look after a few slackbuilds which need to be tested on pure 32 or 64bit, and use graphics ( so a vm is less ideal). thanks for the suggestion though.
 
Old 12-11-2016, 05:14 PM   #15
Gerard Lally
Senior Member
 
Registered: Sep 2009
Location: Leinster, IE
Distribution: Slackware, NetBSD
Posts: 2,180

Rep: Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763
Quote:
Originally Posted by timsoft View Post
unfortunately wine doesn't play nicely with my favourite windows game, age of empires 2. ( and doesn't work with sage accounts either), and I haven't persuaded myself to go multilib, as I look after a few slackbuilds which need to be tested on pure 32 or 64bit, and use graphics ( so a vm is less ideal). thanks for the suggestion though.
If you install the extensions VMWare Player is quite good as far as graphics are concerned. A lot better than Virtualbox and KVM.
 
  


Reply

Tags
dual boot, slackare64, windows 7



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
How to dual boot a CentOS on a Win7 64b already installed SSD-GPT disk ? malain Linux - Laptop and Netbook 2 12-28-2015 12:01 PM
Partition/format advice: SSD + HDD, MBR/GPT mixture, win7 x64 dual-boot dad_ Linux - Hardware 6 01-17-2015 12:34 PM
[SOLVED] dual boot Slackware + Win7 dracolich Slackware 10 04-17-2014 08:28 AM
Dual boot Gentoo + Windows 7 on a GPT disk Hammett Linux - General 0 01-11-2012 03:03 PM
Disk Partitions for dual boot with Windows 7 GPT/EFI motiv8d1 Linux - General 2 01-10-2011 06:22 PM

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

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