[SOLVED] dual boot win7/slackware 14.2 64bit in legacy mode on gpt disk
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: slackware 15.0 64bit, 14.2 64 and 32bit and arm, ubuntu and rasbian
Posts: 495
Rep:
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.
Distribution: slackware 15.0 64bit, 14.2 64 and 32bit and arm, ubuntu and rasbian
Posts: 495
Original Poster
Rep:
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.
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.
Distribution: slackware 15.0 64bit, 14.2 64 and 32bit and arm, ubuntu and rasbian
Posts: 495
Original Poster
Rep:
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)
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)?
Distribution: slackware 15.0 64bit, 14.2 64 and 32bit and arm, ubuntu and rasbian
Posts: 495
Original Poster
Rep:
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~
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.
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?
Distribution: slackware 15.0 64bit, 14.2 64 and 32bit and arm, ubuntu and rasbian
Posts: 495
Original Poster
Rep:
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
Distribution: slackware 15.0 64bit, 14.2 64 and 32bit and arm, ubuntu and rasbian
Posts: 495
Original Poster
Rep:
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.
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.
Distribution: slackware 15.0 64bit, 14.2 64 and 32bit and arm, ubuntu and rasbian
Posts: 495
Original Poster
Rep:
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.