Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Why does LILO screw up my partitions? HIDDEN

13 views
Skip to first unread message

fa...@email.com

unread,
Aug 12, 2001, 8:33:36 PM8/12/01
to
Why does LILO screw up my partitions? I just installed Mandrake on a
hard drive split in thirds. There was a 4-gig C a 4-gig D then a 4
gig linux and swap partition. I have Windows 98 with some
applications on the d drive.

But after I install Linux the d drive is gone. I look in partition
magic and it says it's "HIDDEN". I unhide it and reboot. But guess
what happends. I get back in windows and the d drive is MIA again.
So I go in with fdisk and wipe out the linux partition then MBR it.
When I reboot the windows applications work fine.

What is LILO doing and how do I stop it.

Thanks Rooney

Kenneth Heffington

unread,
Aug 12, 2001, 10:03:12 PM8/12/01
to
fa...@email.com wrote:


I don't really think that the problem is LILO. You have too many primary
partitions. Windows can only accept that the drive will have one primary
partition. You would be better off using an extended partition for Linux.


John Hull

unread,
Aug 13, 2001, 12:32:27 AM8/13/01
to
What version of Partition Magic are you running? I have been told that
only V6 will properly set up linux partitions, especially if they are on
the back side of drives. I know it works because I used it to do a 12
gig partition on the back side of my 30 gig Win98 drive. If you're not
VERY familiar with PM and its quirks, I'd suggest finding someone who is
to fix things (I've been using it since V1 was in beta).

Achim Linder

unread,
Aug 13, 2001, 5:17:31 AM8/13/01
to
On Mon, 13 Aug 2001 02:03:12 GMT, Kenneth Heffington wrote:

> You have too many primary partitions. Windows can only accept that
> the drive will have one primary partition. You would be better off
> using an extended partition for Linux.

Windows does accept several primary partitions. It hides the second
primary Windows partition, but a primary Linux partition is no problem.

Achim

fa...@email.com

unread,
Aug 13, 2001, 11:10:22 AM8/13/01
to
On Mon, 13 Aug 2001 11:17:31 +0200, achim....@nikocity.de (Achim
Linder) wrote:

>Windows does accept several primary partitions. It hides the second
>primary Windows partition, but a primary Linux partition is no problem.

I have no problem until I install Mandrake. I just removed the
partitions and Fdisk/mbr ed the disk and it's fine now.

Is there a reason LILO would do something like this? It's working
now. It has to be LILO.

Mandrake people? Any info on this?


Achim Linder

unread,
Aug 13, 2001, 12:49:49 PM8/13/01
to
On Mon, 13 Aug 2001 15:10:22 GMT, fa...@email.com wrote:

> I have no problem until I install Mandrake. I just removed the
> partitions and Fdisk/mbr ed the disk and it's fine now.
>
> Is there a reason LILO would do something like this? It's working
> now. It has to be LILO.

Unlikely. Did you use the boot manager you're using now
when lilo was installed?

Achim

Achim Linder

unread,
Aug 13, 2001, 3:21:43 PM8/13/01
to
On Mon, 13 Aug 2001 15:10:22 GMT, fa...@email.com wrote:

> I have no problem until I install Mandrake. I just removed the
> partitions and Fdisk/mbr ed the disk and it's fine now.

BTW: Why did you put lilo into the MBR? In most cases it's much better
to install it into the boot sector of the Linux root partition because
Windows tends to regard the MBR as private property.

Achim

fa...@email.com

unread,
Aug 13, 2001, 4:21:55 PM8/13/01
to

I don't use a boot manager now. I just used FDISK/MBR on LILO. It
boots right to windows. There was no problem before I installed
mandrake.

>BTW: Why did you put lilo into the MBR? In most cases it's much better
>to install it into the boot sector of the Linux root partition because
>Windows tends to regard the MBR as private property.

I put it in the MBR because that's where it goes. How would it boot
into LILO if it wasn't in the MBR? You would have to use a disk.
I've never had a problem with LILO being on the MBR.

But I do remember in order to do what it does it has to do a little
shell game with the boot code for each of it's options. So each
choice you make in LILO changes boot sectors to make each choice
bootable.

EX If you make the choice for Windows it changes the Windows partition
to bootable then jumps to it. So maybe when it does this it changes
the status of the other partitions?

???

Gremlin

unread,
Aug 13, 2001, 4:39:34 PM8/13/01
to
In article <9l90o0$21ui$1...@wrath.news.nacamar.de>, "Achim Linder"
<achim....@nikocity.de> wrote:

ok, now that u've all got the poor guy thinking he's losing his mind i
will jump in and say it IS lilo, it's a known "feature" there's 2 way to
fix this, installing grub (i didn't like that option) or this was posted
back on 6/27 by petter white and it did the job for me ........
gremlin

Hey, I thought I'd give something back for a change, so here's a tried and
tested fix for the problem of Linux hiding windows partitions. This came
from a combination of Mandrake tech support and searching the Suze
knowledgebase!

Symptom: Install Linux after Windows as dual boot. In Windows, some windows
partitions are not displayed (or in NT Disk Administrator they are marked
"unknown").

Cause: Lilo makes the affected FAT 16 and/or HPFS/NTFS partitions "hidden".

Fix: run fdisk <drive> (e.g. fdisk /dev/hda). Type "p" to print the
partition info. You might see something like:
hda1 ....... FAT 16
hda2 ....... Hidden FAT 16
hda3 ....... Hidden HPFS/NTFS

Type "t" followed by the partition number to change the partition "type".
Enter the correct code for the "non-hidden" FAT 16 or whatever you need.
Repeat for other hidden partitions. Type "w" to write the info.

Now edit /etc/lilo.conf and add the following to lines at the end of the
'global section', but before the first 'image = /boot/vmlinuz':

change-rules
reset

Then start Lilo with command "lilo" to commit the changes.

Then boot into windows and you should see your partitions.

Well ... it worked for me anyhow.

Cheers

Pete.

Achim Linder

unread,
Aug 13, 2001, 5:50:36 PM8/13/01
to
On Mon, 13 Aug 2001 20:21:55 GMT, fa...@email.com wrote:
> On Mon, 13 Aug 2001 18:49:49 +0200, achim....@nikocity.de (Achim
> Linder) wrote:

>>BTW: Why did you put lilo into the MBR? In most cases it's much better
>>to install it into the boot sector of the Linux root partition because
>>Windows tends to regard the MBR as private property.
>
> I put it in the MBR because that's where it goes. How would it boot
> into LILO if it wasn't in the MBR?

The original MBR code starts the boot sector of the first active
partition, e.g. the boot sector of the Linux partition with lilo in it
or the boot sector of a Windows NT partition that will start the NT
bootmanager.

> EX If you make the choice for Windows it changes the Windows partition
> to bootable then jumps to it. So maybe when it does this it changes
> the status of the other partitions?

lilo doesn't touch the partition table unless you tell it to do so
and it will start any specified partition boot sector, whether the
partition is active ("bootable") or not. If lilo is compiled with the
-DREWRITE_TABLE option, it _can_ be used to set active flags or unhide
partitions - to make Windows happy.

Achim

Jim Shaffer, Jr.

unread,
Aug 13, 2001, 7:24:21 PM8/13/01
to
On Mon, 13 Aug 2001 11:17:31 +0200, achim....@nikocity.de (Achim Linder)
wrote:

>Windows does accept several primary partitions. It hides the second


>primary Windows partition, but a primary Linux partition is no problem.

No, Windows isn't hiding anything, it's LILO. The solution is to insert into
your /etc/lilo.conf file the lines

change-rules
reset

before the first "image=" line, then re-run lilo.

Now, as to *why* LILO has developed such idiotic behavior in the first place, I
have no idea. Nobody has seemed to want to explain it to me. But I first
encountered it with Mandrake 8.


Achim Linder

unread,
Aug 13, 2001, 7:45:48 PM8/13/01
to
On Mon, 13 Aug 2001 16:39:34 -0400, Gremlin wrote:
> In article <9l90o0$21ui$1...@wrath.news.nacamar.de>, "Achim Linder"
><achim....@nikocity.de> wrote:

> ok, now that u've all got the poor guy thinking he's losing his mind i
> will jump in and say it IS lilo, it's a known "feature"

> change-rules
> reset

According to the documentation, this should only delete some
predefined rules who won't have an effect anyhow as long as there's no
set command in lilo.conf. If there's no set command and this change
(or building lilo without -DREWRITE_TABLE) will fix the problem, then
it's a justified conclusion that there's an _undocumented_ default in
recent lilo versions to change partition types. This would be a
horrible bug, no doubt about it.

Achim

[BeoWulf]

unread,
Aug 14, 2001, 1:54:01 AM8/14/01
to
Being a real smartass, I simply couldn't resist replying to the post in
which *Achim Linder* so boldly stated the following:

Quite natural behavior, in full respect of its creators... ;-)

>
> Achim

As to the putting LILO in the bootsector of the GNU/Linux partition :
on all dual boot systems with DOS-based Windows versions
(Windows95/98/ME) and GNU/Linux, you *need* to put LILO in the hard
disk's MBR *unless* you have an alternative bootloader such as XOSL,
BootMagic or the likes...

Considering that DOS-based Windows versions need to sit in the active
primary partition, there would be no other way of bootstrapping into
GNU/Linux, short of using a bootfloppy...

Installing LILO in the GNU/Linux partition's bootsector is for when you
want to run a dual-boot system with WindowsNT/2000/XP and use the MS
bootloader instead (which would require some extra steps, namely
copying the GNU/Linux partition's boot sector (containing the LILO
code) into a file and copying that file onto the Windows C: drive and
lastly, modifying the Windows C:\boot.ini file to be able to address
this file...)

;-)

--

With sincere regards,
*[BeoWulf]*.

Registered GNU/Linux User *#223157*
Registered GNU/Linux Computer *#106233*

JWDougherty

unread,
Aug 14, 2001, 2:44:44 AM8/14/01
to
fa...@email.com wrote:

> ...


>
>>BTW: Why did you put lilo into the MBR? In most cases it's much better
>>to install it into the boot sector of the Linux root partition because
>>Windows tends to regard the MBR as private property.
>
> I put it in the MBR because that's where it goes. How would it boot
> into LILO if it wasn't in the MBR? You would have to use a disk.
> I've never had a problem with LILO being on the MBR.
>

Lilo can go into the Linux ?/boot or ?/root partition prvoided that you are
using a boot manager such as Bootmagic or System Commander. I have it in
the MBR, but that's because I use it as the system boot manager.

jwdougherty

Achim Linder

unread,
Aug 14, 2001, 5:55:09 AM8/14/01
to
On Tue, 14 Aug 2001 05:54:01 GMT, [BeoWulf] wrote:

> As to the putting LILO in the bootsector of the GNU/Linux partition :
> on all dual boot systems with DOS-based Windows versions
> (Windows95/98/ME) and GNU/Linux, you *need* to put LILO in the hard
> disk's MBR *unless* you have an alternative bootloader such as XOSL,
> BootMagic or the likes...
>
> Considering that DOS-based Windows versions need to sit in the active
> primary partition, there would be no other way of bootstrapping into
> GNU/Linux, short of using a bootfloppy...

You can have several active primary partitions, the MBR code will
start the boot sector of the first one (for a long time this was
almost inevitably the Linux /boot or root partition if lilo was used,
because of the 1024 cylinder problem). Granted, the first one is
usually a Windows partition nowadays. Are you sure that the active
flag is needed by Windows 95/98/ME, once the DOS boot sector is
started? DOS/Win3.1 didn't need the active flag.

Achim

[BeoWulf]

unread,
Aug 14, 2001, 7:07:34 AM8/14/01
to
Being a real smartass, I simply couldn't resist replying to the post in
which *Achim Linder* so boldly stated the following:

> On Tue, 14 Aug 2001 05:54:01 GMT, [BeoWulf] wrote:

Actually they still needed the active flag, hence the *table* entry in
LILO, though the BIOS could be fooled by the bootloader to believe that
even an inactive primary partition *[1]* is signalled as being active...

In some similar way, I think this is also what the OS/2 Boot Manager
did. It could even boot OS/2 off an extended logical partition (I've
done that myself on an old 386 once)...


*[1]* I recall having read in an old HowTo about having DOS 6.22
installed in a logical extended partition, with Windows95 in the
primary partition and GNU/Linux in between them, and LILO being able to
boot even DOS, telling it that it was on an activated primary
partition, and being able to see the (FAT16) Windows95 partition as ...
the D: drive...

Required some tricks out of a big hat to be pulled on that one, but the
guy had actually managed to get it to work.... ;-)

Achim Linder

unread,
Aug 14, 2001, 8:49:08 AM8/14/01
to
On Tue, 14 Aug 2001 11:07:34 GMT, [BeoWulf] wrote:
> Being a real smartass, I simply couldn't resist replying to the post in
> which *Achim Linder* so boldly stated the following:

>> Are you sure that the active flag is needed by Windows 95/98/ME, once


>> the DOS boot sector is started? DOS/Win3.1 didn't need the active
>> flag.

> Actually they still needed the active flag,

Your own experience? Seems as if trusting the docs can be misleading. ;)

> hence the *table* entry in LILO,

I don't see the relation between this and the active flag.
Any references?

> though the BIOS could be fooled by the bootloader to believe that
> even an inactive primary partition *[1]* is signalled as being active...

Making DOS see a primary Windows partition on the first disk as D:
sure needs some tweaking; booting DOS from an inactive partition is no
problem.

Achim

[BeoWulf]

unread,
Aug 14, 2001, 9:05:44 AM8/14/01
to
Being a real smartass, I simply couldn't resist replying to the post in
which *Achim Linder* so boldly stated the following:

> On Tue, 14 Aug 2001 11:07:34 GMT, [BeoWulf] wrote:
> > Being a real smartass, I simply couldn't resist replying to the post
> > in which *Achim Linder* so boldly stated the following:
>
> >> Are you sure that the active flag is needed by Windows 95/98/ME,
> >> once the DOS boot sector is started? DOS/Win3.1 didn't need the
> >> active flag.
>
> > Actually they still needed the active flag,
>
> Your own experience? Seems as if trusting the docs can be misleading.
> ;)

No, I don't have a dual boot system... ;-) I just read the DOCS and
HowTos... But let there be no mistake on what I am saying... DOS and
DOS-based Windows versions can be fooled by applying some LILO magic...
;-) (reciting from memory here... :-))

> > hence the *table* entry in LILO,
>
> I don't see the relation between this and the active flag.
> Any references?

The *table* reference tells the boot loader to search for the bootable
partition in the hard disk's partition table.


> > though the BIOS could be fooled by the bootloader to believe that
> > even an inactive primary partition *[1]* is signalled as being
> > active...
>
> Making DOS see a primary Windows partition on the first disk as D:
> sure needs some tweaking; booting DOS from an inactive partition is no
> problem.
>
> Achim

It's all in fooling the BIOS actually. I'm no expert on those but as I
did recall, the HowTo provided some astonishing details (and
expertise!). If only I can remember which one it was. I believe it
was one of the HowTos on LILO in my Linux Mandrake 6.0 distro...

Achim Linder

unread,
Aug 14, 2001, 10:38:25 AM8/14/01
to
On Tue, 14 Aug 2001 13:05:44 GMT, [BeoWulf] wrote:
> Being a real smartass, I simply couldn't resist replying to the post in
> which *Achim Linder* so boldly stated the following:

>> > hence the *table* entry in LILO,


>>
>> I don't see the relation between this and the active flag.
>> Any references?
>
> The *table* reference tells the boot loader to search for the bootable
> partition in the hard disk's partition table.

"TABLE=<device> Specifies the device that contains the partition table.
LILO does not pass partition information to the booted operating
system if this variable is omitted. (Some operating systems have other
means to determine from which partition they have been booted. E.g.
MS-DOS usually stores the geometry of the boot disk or partition in
its boot sector.)"

Sounds more like geometry stuff. In any case, DOS doesn't seem to care
too much for bootable flag information, since I can boot DOS via lilo,
with the Linux partition being the only one with an active flag, and
C: is correctly assigned to the inactive DOS partition.

Achim

[BeoWulf]

unread,
Aug 14, 2001, 3:09:54 PM8/14/01
to

In which case, I stand corrected, Sir! ;-))

See, this is the great thing about GNU/Linux : not only can you do lots
of stuff with it, you can even do stuff you never even knew was
possible on other types of operating systems...

It's like an endless journey through a whole library of information,
but the information comes while you play with it and interact with
other people using the same system. And it really never ends... ;-)

We *all* learn something new every day... ;-)

Achim Linder

unread,
Aug 14, 2001, 5:30:04 PM8/14/01
to
On Tue, 14 Aug 2001 19:09:54 GMT, [BeoWulf] wrote:

> In which case, I stand corrected, Sir! ;-))

Why should you be better off than me? ;)

> It's like an endless journey through a whole library of information,
> but the information comes while you play with it and interact with
> other people using the same system.

Sometimes, even the *.c "Documentation" is readable. ;)
Unfortunately, this doesn't apply to lilo, although the *.S stuff is
much better.

Achim

Ted Berg

unread,
Aug 20, 2001, 10:29:24 PM8/20/01
to
In article <d9ogntsdu4h58atq9...@4ax.com>, "Jim Shaffer,
Jr." <jmsh...@alltel.net> wrote:

> On Mon, 13 Aug 2001 11:17:31 +0200, achim....@nikocity.de (Achim
> Linder) wrote:
>
>>Windows does accept several primary partitions. It hides the second
>>primary Windows partition, but a primary Linux partition is no problem.
>
> No, Windows isn't hiding anything, it's LILO. The solution is to insert
> into your /etc/lilo.conf file the lines
>
> change-rules
> reset
>
> before the first "image=" line, then re-run lilo.

*thank* *you*!

I just made the change. I'll find out in a bit if it worked.

> Now, as to *why* LILO has developed such idiotic behavior in the first
> place, I have no idea. Nobody has seemed to want to explain it to me.
> But I first encountered it with Mandrake 8.
>

Agreed on all counts. I never had a problem with this configuration
until I upgraded to MDK 8. IMO that was a bad move, as it managed to
break a number of programs I had installed.

Again, thanks for posting your fix. It's nice to see someone took the
question seriously.

ted

0 new messages