LinuxQuestions.org
Help answer threads with 0 replies.
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 06-16-2012, 04:50 PM   #1
nyar
LQ Newbie
 
Registered: Jun 2012
Posts: 4

Rep: Reputation: Disabled
Dual boot setup of Slackware64 13.37 / Windows 7 - Windows does not boot


Hello all, I just did an installation of Slackware onto my Windows 7 laptop, which seemed to work fine. The system boots into Slackware and run without any complaints. However, if I try to boot into Windows, it goes to the 'starting windows' screen, thinks for a bit, and dumps back to the select OS menu.

I'll allow that repartitioning drives isn't my strongest point, so I think this may be where I broke something. The system shipped out with a recovery partition, a 250GB windows partition, and another 250 GB logical partition. I used Easeus Partition Master to shrink down the size of the Windows partition, rebooted, and then ran the Slackware installation.

Right now, CFDisk is showing me 4 partitions on the machine:
sda1 - primary - vfat - [recovery] - 17898 MB
sda2 - Boot - Primary - NTFS - [OS] - 209761 MB
sda3 - Boot - Primary - ext4 - 270447 MB
sda4 - Primary - swap - 2001 MB

Just to be sure, I redid the slackware installation, and didn't see any errors when setting up Lilo and installing it to the master boot record.
Any suggestions would be much appreciated.

-n
 
Old 06-16-2012, 05:36 PM   #2
caduqued
Member
 
Registered: Apr 2008
Location: Coventry, United Kingdom
Distribution: Slackware64, Slackware64 13.37, linuxslackware
Posts: 81

Rep: Reputation: 19
Hi Nyar,

I am not an expert, but will try to help out a bit.

I have a (somehow) similar installation. I see you have marked both partitions with flag "Boot". This is not necessary, as lilo in the MBR will be the one providing the option to select OS. In my case I have only marked as bootable the NTFS partition. I would change the Boot flag to your ext4 partition (for instance, using Cfdisk, as root of course), check the lilo.conf, re-run /sbin/lilo (making sure it is installed in the MBR) and I reckon that would do the trick.

However, I am assuming that your system is fairly new, then no big trouble if this bit does not work, forcing you to re-install both OS. If that is not the case (i.e. if you have critical data), first save your data before trying anything "daredevil"

Cheers,
 
Old 06-16-2012, 05:39 PM   #3
slackass
Member
 
Registered: Apr 2006
Location: SE Texas
Distribution: Slack64-C ML
Posts: 886

Rep: Reputation: 78
You didn't mention defraging windows.
If you did not defrag before shrinking windows then it may be broke and you may have to reinstall.
 
Old 06-16-2012, 09:28 PM   #4
comet.berkeley
Member
 
Registered: Dec 2009
Location: California
Distribution: Slackware current
Posts: 152

Rep: Reputation: Disabled
Quote:
Originally Posted by slackass View Post
You didn't mention defraging windows.
If you did not defrag before shrinking windows then it may be broke and you may have to reinstall.
Before reinstalling, get a friend with a good version of Windows 7 to create a recovery disk and then try to repair the system.

http://windows.microsoft.com/en-US/w...em-repair-disc
 
Old 06-16-2012, 09:40 PM   #5
Erik_FL
Member
 
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 797

Rep: Reputation: 247Reputation: 247Reputation: 247
The Windows boot configuration database stores information about the hard disk including the disk ID. It also stores information about the partitions containing BOOTMGR and the Windows directory. Windows might have a problem finding either one of those after you install something to the MBR.

Since you got as far as the OS menu it sounds like "BOOTMGR" was found and loaded correctly. If you also saw the Starting Windows screen then at least part of the Windows loading is being done.

The first thing I recommend is to use a Windows 7 boot DVD and use the CHKDSK command. Re-sizing the Windows NTFS partition may have left it in an un-mountable state that prevents Windows from mounting it during booting.

If you don't have a Windows 7 boot DVD you can legally download one from the Digital River site. You will be able to use it to repair Windows. You can also use it to install Windows if you have a valid CD key. You should have received a valid CD key with your pre-installed Windows system on your computer.

Here's a link to a site that mentions the Digital River downloads for Windows. http://www.mydigitallife.info/offici...digital-river/

You can press Shift with F10 to start a Windows command prompt from the boot DVD. Use this command to check the disk. NOTE: It is a different command than "chkdsk" from a normal Windows command prompt. The "/p" option only works on the boot DVD version.

Code:
chkdsk c: /p
If that does not solve the problem then the next thing to try is to repair the Windows boot configuration using the boot DVD. You can also use the "BCDEDIT" command to manually repair boot information. There are quite a few tutorials about "BCDEDIT" on-line. Use "BCDEDIT /enum all" or "BCDEDIT /enum all /v" to list out the current boot configuration.

The exact BCDEDIT commands to repair Windows depend on the problem, but these commands are examples of what you usually have to do.

Code:
bcdedit /set {bootmgr} device partition=C:
bcdedit /set {current} device partition=C:
bcdedit /set {current} osdevice partition=C:
For the first line replace the drive letter "C" with the letter of the drive where the Windows boot DVD sees the "BOOTMGR". In the other two lines replace "C" with the letter of the drive where the Windows boot DVD sees the "WINDOWS" folder. The drive letter should be based on where the boot DVD sees those, not where the normal Windows system will see them.

If none of those things help then your partition resizing program may have corrupted the NTFS partition. That is sometimes not possible to repair. In that case, copy all your important files from the partition first, then reinstall Windows.

Last edited by Erik_FL; 06-16-2012 at 09:42 PM.
 
Old 06-16-2012, 09:46 PM   #6
bassplayer69
Member
 
Registered: Jul 2007
Location: In a van down by the river...
Distribution: Slackware64 14.1 Multi-Lib
Posts: 125

Rep: Reputation: 22
Windows 7 has it's own utilities to shrink or extend a partition (see Disk Management, right click on a partition). I also have a windows 7/Slackware 64 13.37 dual boot machine. I had Windows 7 Ultimate installed and then shrank the C: drive for Slackware. Disk Management will only allow you to shrink free space. If there are non-movable files then you are limited up to the first non-movable file.

As stated above, only one partition needs to be marked as Boot. I also did the standard LILO installation during the Slackware install to the MBR and I can boot between the two, no issues.
 
Old 06-16-2012, 11:08 PM   #7
nyar
LQ Newbie
 
Registered: Jun 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
caduqued: I set only the NTFS partition to boot, but that didn't resolve the problem. I checked out the lilo.config file, and it looked OK to me, although it had an entry in the Windows portion for table=/dev/sda

slackass: I didn't think to defrag the thing after repartitioning, so that one's on me. In my defense, it was out of the box and running for all of about 20 minutes before I started this process. Lesson learned.

comet.berkeley: That's the one thing I did in Windows before starting the Slack install. The repair disks are reformatting the bejesus out of everything at the moment, so I'll get another crack at installing slack today.

Erik_FL: I'm downloading that Win 7 boot disk at the moment, thanks for the link. That seems to be the more elegant solution here, but my internets connection isn't all that hot, so I decided to try the repair install first.

Thanks for the help and suggestions, you guys are awesome. On the upside, the time it's taking windows to get it's act together is giving me more time to read through the slack documentation on setting up networking and such.

-n
 
Old 06-17-2012, 09:42 AM   #8
slackass
Member
 
Registered: Apr 2006
Location: SE Texas
Distribution: Slack64-C ML
Posts: 886

Rep: Reputation: 78
Quote:
Originally Posted by nyar View Post
caduqued:

slackass: I didn't think to defrag the thing after repartitioning, so that one's on me. In my defense, it was out of the box and running for all of about 20 minutes before I started this process. Lesson learned.


-n
If Windows was that fresh then not defragging before resizing had nothing to do with it.

I f you decide to reinstall everything you might consider installing Windows as a guest using VirtualBox. That way you can run windows from Slack without rebooting.
https://www.virtualbox.org/

Last edited by slackass; 06-17-2012 at 09:48 AM.
 
Old 06-17-2012, 12:13 PM   #9
nyar
LQ Newbie
 
Registered: Jun 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
So, I re-installed windows using the bootable disk, re-installed slackware, and then selecting Windows from the boot screen was just giving the plain text "Loading Windows" and stalling out.

Re-installed windows to it's partition, and that worked fine. Windows boots up and is happy. Checked the file system from the windows file browser, and it's not showing the other partition with linux on it, which is pretty much what I expect to see. Rebooted again to make sure, and windows comes right up.
So, I reinstalled slackware again on it's partition. No errors or anything that seems out of place. Now Windows doesn't load, and I get
"Loading Windows
LLoading Windows" in plain text if I try to boot Windows, and everything stalls there.

lilo.conf is showing this for the Windows bootable partition:

Other = /dev/sda1
label - Windows
table - /dev/sda

When I installed slack, the linux and linux swap partitions were already there, and i didn't move, delete, or change anything with the partitions, so I don't think that would blow things up. I'm going to do some more digging with bcdedit and see what that turns up.
 
Old 06-17-2012, 01:22 PM   #10
Erik_FL
Member
 
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 797

Rep: Reputation: 247Reputation: 247Reputation: 247
Here are some other suggestions that may help if you still have problems getting Windows to boot.

Do another clean installation of Windows (I know - rolls eyes). Use "BCDEDIT /enum all" and "BCDEDIT /enum all /v" to dump the boot configuration before making changes. You may also want to use "dd" in Linux and dump the first block of "/dev/sda" to a file. That's the Master Boot Record. Look at the partition table configuration before changing it. The important things to note are which partition has the "Boot" flag set, and the partition types. The first (OEM restore) partition may have a non-standard partition type. It is often "VFAT" with an extra bit set.

Install the LILO boot sector to the Linux partition rather than the MBR. You can still (in theory) set the "Boot" flag for the "Linux" partition and clear the other "Boot" flags to make LILO boot first. That will avoid changing the MBR.

The Windows boot database usually identifies a partition by the disk ID and partition number. You can sometimes avoid boot problems by using the BIOS boot device to identify the partitions for Windows.

bcdedit /set {bootmgr} device partition=boot
bcdedit /set {current} device partition=boot
bcdedit /set {current} osdevice partition=boot

Right click the "Command Prompt" in the Start Menu" and then click "Run as Administrator" in the menu. Then you can use the "BCDEDIT" command. You have to make the above changes before installing Linux. Make sure that Windows still boots before you install Linux.

If you do install LILO to the MBR, you may have to edit the MBR afterward and put back the correct disk signature. Dump the MBR before installing Linux. Here is link with good information about the Windows disk signature and MBR.

http://thestarman.pcministry.com/asm/mbr/W7MBR.htm

The OEM restore partition or BIOS may have software that assumes there is a Windows MBR. In that case you may not be able to install LILO to the MBR. Or, you may have to set the BIOS to NOT use the OEM restore feature, or remove/disable the OEM partition. Unfortunately every manufacturer has different restore partitions, and sometimes they are different on each model.

Last edited by Erik_FL; 06-17-2012 at 01:45 PM.
 
Old 06-17-2012, 01:54 PM   #11
slackass
Member
 
Registered: Apr 2006
Location: SE Texas
Distribution: Slack64-C ML
Posts: 886

Rep: Reputation: 78
Or.
If it's broke and your looking at a hose & reload anyhow something as simple as installing grub from /extra (32 bit version) may fix it.
I always install grub to a small separate partition.
note:
The 32 bit version will work on 64 bit if you install it to a separate partition.

Edit:
On second thought, the 32 bit may work on 64 system. I remember I had some sort of problem when I went from Slamd64 to Slack64 when it first came out. Maybe it was the ext3 / ext4 change.

Last edited by slackass; 06-17-2012 at 02:07 PM.
 
Old 06-17-2012, 07:32 PM   #12
nyar
LQ Newbie
 
Registered: Jun 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
So, since my basement decided to flood today, I decided to try a quick & dirty solution rather than doing the correct thing and figuring out what was getting broken in the MBR entries.
The current setup is: windows recovery partition installed by the OEM on sda1. In my case, this is kind of a joke, as it's a refurbished laptop and the included documentation ensures me that the recovery partition is little more than a clever way to waste my hard drive space.
Win 7 got installed on sda2 next, followed by Slack on the 3rd and 4th partitions. When I was installing Slack, I stuck Lilo on the Linux partition, rather than on the MBR.
After that, I rebooted into Win 7, installed EasyBCD and added the Linux partition to the MBR entries, and everything is peachy. Windows is booting fine, Slackware is coming up fine, and when I'm a little more comfortable with hacking around in the MBR files, I'm going to see if I can get Lilo to play nice when it's installed to the MBR.
Thanks again for the advice and helpful links everyone.

-n
 
1 members found this post helpful.
  


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
Reparing Windows XP on a dual boot setup Fried Egg Linux - Software 20 01-20-2010 08:20 AM
How do I remove Windows 7 from a Windows / Linux dual boot setup Tiree17 Linux - Newbie 4 12-19-2009 06:36 PM
I have windows XP and want to install XUbuntu on a dual boot setup, how do I do it? Mac_09 Linux - Newbie 4 05-07-2008 04:57 PM
dual boot - Grub won't boot Windows on /windows/D partition biosol Suse/Novell 9 04-09-2006 08:14 PM


All times are GMT -5. The time now is 06:59 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration