LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-21-2004, 04:10 AM   #1
drigz
Member
 
Registered: Apr 2004
Distribution: Gentoo ~x86
Posts: 407

Rep: Reputation: 30
Windows XP won't boot


These are the partition on my /dev/hda (I also have some on /dev/sda):
Code:
Device Boot      Start         End      Blocks   Id  System
/dev/hda1               1       12158    97656862+   7  HPFS/NTFS
/dev/hda2           12158       12407     2000790   82  Linux swap
/dev/hda3           12407       16142    30000885   83  Linux
/dev/hda4   *       16142       30516   115458225   83  Linux
Recently, (I haven't tried for a long time) I tried to boot windows and it just said "Loading WindowsXP" and then didnt do anything. It doesn't seem corrupted. Why is this happening? Here is my /etc/lilo.conf:

Code:
boot = /dev/hda
prompt
timeout = 100
bitmap = /boot/logo64a.bmp
change-rules
  reset
 vga = 791
delay = 100
default = WindowsXP
other = /dev/hda1
  label = WindowsXP
  table = /dev/hda
image = /boot/sl2.6.6
  root = /dev/hda4
  label = Slack10
  read-only
image = /boot/slack
  root = /dev/sda1
  label = Slackware
  read-only
image = /boot/slack.old
  root = /dev/sda1
  label = OldSlackware
  read-only
image = /boot/lfs2.4.26
  root = /dev/hda3
  label = LFS-2.4.26
  read-only
image = /boot/lfs2.6.6
  root = /dev/hda3
  label = LFS-2.6.6
  read-only
image = /boot/lfs2.6.6old
  root = /dev/hda3
  label = LFS-2.6.6-OLD
  read-only
 
Old 08-21-2004, 04:48 AM   #2
fancypiper
LQ Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 60
Some pre-installed Windows systems have been fscked with by the mfg and have a weird boot setup.

You might have to toggle /dev/hda1 with the bootable flag as well.
Code:
Sat Aug 21 05:46 AM fancy@uilleann ~ $ su -
Password:
Sat Aug 21 05:46 AM root@uilleann ~ # fdisk /dev/hda
 
The number of cylinders for this disk is set to 4865.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)
 
Command (m for help): m
Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)
 
Command (m for help): a
Partition number (1-9): 1
 

Command (m for help): p
 
Disk /dev/hda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 
   Device Boot    Start       End    Blocks   Id  System
/dev/hda1   *         1      1215   9755991    c  Win95 FAT32 (LBA)
/dev/hda2          1215      2429   9751455    7  HPFS/NTFS
/dev/hda3          2429      2446    140017+  83  Linux
/dev/hda4          2447      4865  19430617+   5  Extended
/dev/hda5          2447      2516    562243+  83  Linux
/dev/hda6          2517      3368   6843658+  83  Linux
/dev/hda7          3369      3795   3429846   83  Linux
/dev/hda8          3796      4222   3429846   83  Linux
/dev/hda9          4223      4865   5164866   83  Linux
 
Command (m for help): w
The partition table has been altered!
 
Calling ioctl() to re-read partition table.
 
WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.
 
Old 08-21-2004, 06:32 AM   #3
librano
Member
 
Registered: Jul 2004
Location: Here, there and everywhere.
Distribution: Arch+KDE, Linux Mint Fluxbox CE
Posts: 163

Rep: Reputation: 31
i dont really have a solution for this but there's a simple way to avoid this kind of problem.. thats by installing the boot loader on floppy... and setting the comp to check the floppy before hd while booting.. this way when you want windows take out the floppy.. and when u want linux put it in... no messing with windows boot loader or MBR..

i dont know about other distros but mandrake has the option of putting the boot loader on floppy during the install...
 
Old 08-21-2004, 07:39 AM   #4
fancypiper
LQ Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 60
To make a Linux boot floppy, see:

man mkbootdisk

Put formatted floppy in slot and make one, then You can remove lilo from the mbr with
/sbin/lilo -u or by using the Windows XP Recovery Console.
 
Old 08-22-2004, 05:10 AM   #5
Duukkis
Member
 
Registered: May 2003
Location: Finland
Distribution: Debian Sarge
Posts: 75

Rep: Reputation: 15
Quote:
Recently, (I haven't tried for a long time) I tried to boot windows and it just said "Loading WindowsXP" and then didnt do anything. It doesn't seem corrupted.
I have exactly the same problem.

/etc/lilo.conf:

lba32

boot=/dev/hde

root=/dev/hde2

# Install the specified file as the new boot sector.
# LILO supports built in boot sectory, you only need
# to specify the type, choose one from 'text', 'menu' or 'bitmap'.
# new: install=bmp old: install=/boot/boot-bmp.b
# new: install=text old: install=/boot/boot-text.b
# new: install=menu old: install=/boot/boot-menu.b or boot.b
# default: 'menu' is default, unless you have a bitmap= line
# Note: install=bmp must be used to see the bitmap menu.
install=menu

# Specifies the number of _tenths_ of a second LILO should
# wait before booting the first image. LILO
# doesn't wait if DELAY is omitted or if DELAY is set to zero.
# delay=20

# Prompt to use certaing image. If prompt is specified without timeout,
# boot will not take place unless you hit RETURN
prompt
timeout=150

# Specifies the location of the map file. If MAP is
# omitted, a file /boot/map is used.
map=/boot/map

# Specifies the VGA text mode that should be selected when
# booting. The following values are recognized (case is ignored):
# NORMAL select normal 80x25 text mode.
# EXTENDED select 80x50 text mode. The word EXTENDED can be
# abbreviated to EXT.
# ASK stop and ask for user input (at boot time).
# <number> use the corresponding text mode. A list of available modes
# can be obtained by booting with vga=ask and pressing [Enter].
vga=normal

default=DEB-2.6.6 # Boottaa /boot/vmlinuz-2.6.6-080804 kernelin oletuksena

image=/boot/vmlinuz-2.4.26-060804
label="DEB-2.4.26"
read-only

image=/boot/vmlinuz-2.6.6-080804
label="DEB-2.6.6"
read-only

image=/boot/vmlinuz-2.6.6-190704
label="DEB-2.6.6-old"
read-only

# M$ Windows XP

other=/dev/hdg1
label=WinXP


fdisk -l:

Disk /dev/hde: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hde1 * 1 6 48163+ 83 Linux
/dev/hde2 7 614 4883760 83 Linux
/dev/hde3 615 19457 151356397+ f W95 Ext'd (LBA)
/dev/hde5 615 1830 9767488+ 83 Linux
/dev/hde6 1831 5477 29294496 83 Linux
/dev/hde7 5478 6450 7815591 83 Linux
/dev/hde8 6451 7423 7815591 83 Linux
/dev/hde9 7424 19457 96663073+ 83 Linux

Disk /dev/hdg: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdg1 * 1 5099 40957686 7 HPFS/NTFS


As you can see Linux is on /dev/hde and Windows XP on /dev/hdg. Both hard drives are SATA and Linux is booting well. I want to boot Windows XP and Linux through Lilo without boot floppy.

Thanks in advance.
 
Old 08-23-2004, 07:04 AM   #6
Duukkis
Member
 
Registered: May 2003
Location: Finland
Distribution: Debian Sarge
Posts: 75

Rep: Reputation: 15
Sorry, I pushed the Save Changes button by accident

Last edited by Duukkis; 08-23-2004 at 07:10 AM.
 
Old 08-23-2004, 07:07 AM   #7
Duukkis
Member
 
Registered: May 2003
Location: Finland
Distribution: Debian Sarge
Posts: 75

Rep: Reputation: 15
I solved the problem. Now Windows XP and Linux are booting well with the M$ Windows section in /etc/lilo.conf:

other=/dev/hdg1
label=WinXP
table=/dev/hdg
map-drive=0x80
to=0x81
map-drive=0x81
to=0x80
 
Old 08-28-2004, 02:31 PM   #8
drigz
Member
 
Registered: Apr 2004
Distribution: Gentoo ~x86
Posts: 407

Original Poster
Rep: Reputation: 30
Tried that stuff, still doesn't work. Currently:
/etc/lilo.conf:
Code:
boot = /dev/hda
# message = /boot/boot_message.txt
prompt
timeout = 100
bitmap = /boot/logo64a.bmp
change-rules
  reset
 vga = 791
delay = 100
default = WindowsXP
other = /dev/hda1
  label = WindowsXP
  table = /dev/hda
  map-drive=0x80
  to=0x81
  map-drive=0x81
  to=0x80
image = /boot/sl2.6.6
  root = /dev/hda4
  label = Slack10
  read-only
image = /boot/slack
  root = /dev/sda1
  label = Slackware
  read-only
image = /boot/slack.old
  root = /dev/sda1
  label = OldSlackware
  read-only
image = /boot/lfs2.4.26
  root = /dev/hda3
  label = LFS-2.4.26
  read-only
image = /boot/lfs2.6.6
  root = /dev/hda3
  label = LFS-2.6.6
  read-only
image = /boot/lfs2.6.6old
  root = /dev/hda3
  label = LFS-2.6.6-OLD
  read-only
fdisk -l:
Code:
Disk /dev/hda: 251.0 GB, 251000193024 bytes
255 heads, 63 sectors/track, 30515 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1       12158    97656862+   7  HPFS/NTFS
/dev/hda2           12158       12407     2000790   82  Linux swap
/dev/hda3           12407       16142    30000885   83  Linux
/dev/hda4           16142       30516   115458225   83  Linux

Disk /dev/sda: 82.3 GB, 82348277760 bytes
255 heads, 63 sectors/track, 10011 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1        7296    58605088+  83  Linux
/dev/sda3            7297        7546     2008125   82  Linux swap
/dev/sda4            7547       10011    19800112+   c  W95 FAT32 (LBA)
Any other ideas? Where did you find out to do the map-drive stuff, Duukkis? Thanks.

BTW: Since the last working windows boot, I have been messing around with new distros installing and then giving up on and replacing many, culminating in the install of Slack 10, after giving up on everything else... While I tried not to write over the LILO on /dev/hda, at one point I accidentally wrote what was meant to be a boot floppy for slack 10 to /dev/hda.

Last edited by drigz; 08-28-2004 at 02:36 PM.
 
Old 09-11-2004, 06:49 PM   #9
drigz
Member
 
Registered: Apr 2004
Distribution: Gentoo ~x86
Posts: 407

Original Poster
Rep: Reputation: 30
I've fixed it. For anyone else who has this problem, follow these steps:
fdisk the drive. You should (if you have the same problem as me) get messages like "Partition # doesn't end on the cylinder boundary" (I can't remember word perfect...)
The problem arises from some partitioning programs only saving their changes to one of the forms of storing partition information, and while linux doesn't need the second, windows does.
I then basically messed up my whole computer, ended up losing a lot of my stuff, and all the stuff on every partition on that drive. However, from what I gather there are two solutions:
Should work: If you can somehow run Partition Magic on the drive, apparently it recognises and fixed the problem.
May work (guess): boot into knoppix or something, and then go into fdisk. Remember the start and end cylinders of the partitions, then delete and recreate every partition.
One of these steps should fix the problem.

EDIT: By the way, I noticed something very interesting while doing this. Because I had to reinstall windows, I soon discovered that despite hardware compatibility being windows' main selling point, it didn't recognise my ethernet card (a very common intel e100 one) out of the box, and so I had no internet access with which to get the driver. I had to get my laptop, find the floppy drive attachment, download the drivers from intel, create a driver disk, and then install them on windows. I never remembered windows as being like this....

Last edited by drigz; 09-11-2004 at 06:52 PM.
 
  


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
grub question changing boot order making windows boot first nfsutim Linux - Newbie 29 10-27-2012 12:53 PM
How do I dual boot Linux and Windows XP from Windows boot file andyri Linux - Newbie 4 08-04-2004 10:09 PM
Linux/Windows dual boot with Windows re-install dhowell1129 Linux - Newbie 6 04-25-2004 04:21 AM
On Windows and LInux dual boot - why install Windows first? yanar99 Linux - Newbie 13 12-18-2003 09:20 AM
How to add a boot record which used to startup windows under my Grub boot loader? yunxiang Linux - Newbie 6 02-01-2003 02:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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