Re: Dual boot problem



On Sat, 31 Dec 2005 02:53:26 +0100, mayayana <mayayanaXX1a@xxxxxxxxxxxxxxxx> wrote:

>     It turns out that two Linux installs can, indeed,
> cause a conflict.
>
>    I was installing Suse after
> Mandrake. I never did figure out for sure whether
> the Mandrake install was confusing the Suse
> boot loader, but I found an interesting thing
> when booting into Mandrake: The boot would work
> OK, and Mandrake was fine, but if I then browsed
> to the Suse install partition, the ambiguous double
> root mounts disoriented Mandrake. From that point on
> Mandrake would begin to be unable to find
> files...windows wouldn't open....if I managed to
> get to the main menu to call the logout window,
> that came up and worked but the text was just
> squares. Then if I logged out it bumped me back
> to console mode. ....Interesting.

You are making me really curious about what you are doing and how.
What you describe is more or less what we usually discard as "impossible",
it is just not "how it works".  But of course I know you are experiencing
what you say.

Well, it's a pleasure to find a civilized response in among those answering posts. :)

Oh, thanks. I think I know what you are talking about... :)

 I guess the problem is (almost certainly) the concepts and
the terminology.  Or the mental picture you are having of what goes on,
being sufficiently different from what we would describe it as, so it
is hard for me to translate.

You say

   "Mandrake was fine, but if I then browsed
   to the Suse install partition, the ambiguous double
   root mounts disoriented Mandrake."

What exactly do you mean by "browsed to the Suse install partition"?

   I was trying to check, from Mandrake, what
had actually transpired on the partition where
Suse was going. So I opened a window (specifically,
I started at the "Home" shortcut) and
clicked a small icon for devices, along the left
side. (Sorry but I'm not familiar with the names
for these things yet. If I remember correctly I
had to fiddle around in the window menu in order
to get a split view - treeview and folder view - with
the small options along the left side of the window.)

    Clicking the devices icon (tri-color RGB)
gave me a tree-view of the partitions (hdaxx, hdaxx, etc.)


Arghhh, I don't seem to have that tre-view.  (I don't usually use
the graphical interface much.)  Perhaps you were using KDE?  I'm
having Gnome as my desktop.

Selecting the one I knew to be the Suse partition
opened the Suse partition in the right-hand window,
but once I'd done that things went bad and I began to
get messages that this or that was "not found".

   I tried the same thing 2 or 3 times and still got
the same results.

Ah, so KDE (or what ever desktop you are using) mounted the partition! (I don't know, I am speculating over what may have happened.)

You said Mandrake added the device to fstab.  That makes more sense:
KDE mounts the device where /etc/fstab says it should go!  So the culprit
is Mandrake!

Now I would hope that the kernel would refuse to mount a device on a
directory that is already the mount point for a device. But I just
tried it, and, to my amazement, it worked. I mounted in turn two
otherwise long unused filesystems on /mnt, and I could "ls" (list files)
and see the files in the last mounted filesystem.

Oh, another question: Did you log in as root?  I would say KDE should
not run as root.  This is a security policiy issue.  While Linux is
not so often targeted by virus writers and such, it is not immune.
Keeping large complicated programs running as a user prevents exploits
gaining so much power.

If KDE (or whatever) was able to mount a new fs on top of "/" without
root privileges... It is possible to enable users to mount devices
by specifying "user" in the fstab options. It would be interesting
to know if Mandrake also added that option in fstab.

Yeah, that could produce interesting results if KDE mounts a random
idle filesystem in "/"!

Suppose for example that you had a separate filesystem mounted in /var.
After mounting a second filesystem in /, when you navigate to /var, you
get the /var of the newly mounted fs.  But the old mounted /var fs, is
mounted in the directory /var of the old "/".  The fact that there is a
mount, is kept as an annotation in the "inode" data structure in the
kernel, in the inode of the old /var.  Try to write a file to /var/tmp,
and you will get the ENOENT error, "No such file or directory".

A desktop system like KDE or Gnome relies on a number of named pipes
and the like in /tmp. After the new fs has been mounted, they will
all be gone!  Lots of programs will continue to work in more or less
precarious ways thanks to the files and pipes they already have open,
but they will no longer be able to make new connections to the other
parts of the desktop system.

Near all programs need som configuration data in the users home directory.
If the new root fs system relied on mounting a separate /home filesystem,
the programs will find none.  If it does have the /home directories
incorporated, the programs will find the home directories of the users
of the other installation.  Unless the two systems have the same usernames
each with the same user id (a small number), the programs will find
that the home directory, if it exists, belongs to some other user,
and that access is denied.


In this process, you reach the Suse install partition. How do you know?

Because I know where I installed it and was able to confirm by finding a few files with "suse" in the name, within that folder.

Even with respect to the ensuing problems, it would be helpfull for
us to know not only "Mandrake is disoriented", but exactly what happens.
"Be unable to find files" is of course a lot better, but it does not
help much yet, because it sounds almost like a magician trick.  I'm
stupefied.  Would you please tell us exactly what you did, and what
resulted?  In what way did you have Mandrake "find files", and in what
way do you determine that it "fails to find it", and how exactly do
you know the file is there and should have been found?

     I can't tell you much more than I described above.
I don't remember the names of things not found. It
was just that after I opened the suse partition view
in the "file explorer" window, nothing else worked.
I got the "not found" message when trying to open
a new window from a Desktop shortcut. Since shortcuts
no longer functioned I decided to log out. That's when I
got the logout window full of squares, instead of text.
And logging out dumped me into what I gather was
run level 3. At that point, trying  telinit 5 did nothing.
Trying telinit 6 rebooted.

Heh, this may be partially unrelated. You were quite certainly still in runlevel 5, so telinit 5 would do no change.

In recent versions of /etc/inittab, I have seen it says

  x:5:once:/etc/X11/prefdm -nodaemon

note the word "once".  If the display manager fails and terminates,
it is not started again.  If you do

  telinit 3; sleep 5; telinit 5

it should start it again. This may work.  prefdm starts kdm
(if you use KDE) or gdm (Gnome) or xdm (traditional), whichever
starts X, and then the two communicate through a named pipe i /tmp.
X  creates the pipe, so if a new / has been mounted, it should be
created in the new /tmp, and {k,g,x}dm should find it there.

It is also concievable that kdm just kept running, and started a new
X, but falied to establish the communication if kdm has the old
/tmp/.X11-unix as its current working directory, and tries to open the
named pipe ":0" using a relative path. That will point to the old file,
while the new X server will create its named pipe in the new
/tmp/.X11-unix.

I means, just imagine that you are now the magician who has just sawed
a lady in two in front of our eyes, and put her back together.  With
the difference that you are saying it's real, and I believe you mean
it.  Can you understand that the public want to find out how it is
possible?  First we need to understand what exactly are we in need of
explaining.  We start with some somewhat helpless or even impertinent
questions, like "what is the saw made of".


I had no idea that I was so talented. :) I don't mean to waste people's time here. It just seemed to me to be an aberration to be aware of. I don't have enough experience with Linux to know what *really* happened. I'm just theorizing that Mandrake was disoriented by opening a second partition with a / mount....but not the same / mount. (There were no problems with Mandrake until I opened the Suse partition window.)

You wrote that Mandrake had put the new partitions in the /etc/fstab
file.  Would you mind posting the contents of the file, and point out
which lines are the original, and which are the added ones?  I would
like to know what mount options are in the added lines, what mount
point is used, and how is the device specified.  Come on, give us
something to go on!  And no, don't use the drop counter to supply the
information.

   I'm afraid that I've since deleted Mandrake and
installed Suse, so I don't have that file. But I pretty
much remember it. I didn't add any lines. Mandrake
wrote something like:

/dev/hda13 /

OK, so mandrake does write the device file name /dev/hda13 in the fstab. But they must have taken the mount point from the label, its the only place I know where they could have found it in a reasonbly general way.


After that I think it had "noauto" and maybe a bit more.

Makes sense.

But there was no file system entry before  the "/" and
not much after. (hda13 was the suse partition, while
Mandrake was on hda12.)

Strange. OK, the system does not really use a "/" option from /etc/fstab. After all it needs to mount the file system before it can open the file. I'm just so used to see it added to the file, for completeness or whatever. Some file-ssytem check routines uses the file, I forgot that. So the true "/" should be there. But never mind, you have already made "interesting" discoveries.


   This all started because I was having a lot of trouble
getting Suse to boot through my multi-boot, Windows-
based, boot loader, even though Mandrake was working
fine with it. The odd behavior in Mandrake was an
accidental discovery, resulting from trying to figure out
the boot problem.

    As it turned out, I don't think that was actually
causing a conflict, except in the situation I detailed
above. The problem seems, rather, to be with Suse's
boot loader install. When Mandrake installed it took
over the MBR without asking. I then re-installed my
boot loader and all was fine. With Suse, both Lilo
and Grub seemed to be temperamental about
installing, and neither of them worked when I assigned
their install to the Linux partition. If I install Lilo to
the MBR it works, but then it fails when I re-install my
boot loader. (BootIt NG - it booted Mandrake but
doesn't see a bootable volume in Suse.) There seems
to be a difference in the way that Mandrake and Suse
install Lilo.

The booting issues are of course a separate story. I have posted a good deal descriptions of how that works lately, to different people. I have mostly written about Grub, not Lilo. Some issues are not so different for the two loaders.

   Sorry I can't be more informative, but as you
can see I'm experimenting and fumbling around a
bit here.

You already have been informative, thanks you. This was fun to speculate over. I wonder if anybody else who is using Mandrake can look into any of this and confirm or refute any of my theories. I think this warrants a bug report to Mandrake.

Cheers!

-enrique
.



Relevant Pages

  • Re: Why I dumped Linux and Went Back to Windows.
    ... >> my brief stint with SuSE, Mandrake wouldn't install properly, Lycoris ... It won't stop displaying my KDE ...
    (alt.os.linux.suse)
  • Re: Linux Flavor: Mandrake or Suse?
    ... to me the choices are then limited to Suse and Mandrake. ... > WinXp, and already have the space partitioned for the install, so I am ... My SuSE Linux machine uptime: ...
    (alt.os.linux.suse)
  • Re: Linux Flavor: Mandrake or Suse?
    ... to me the choices are then limited to Suse and Mandrake. ... > WinXp, and already have the space partitioned for the install, so I am ... YaST's software update module is called YOU, ...
    (alt.os.linux.suse)
  • Re: Linux Flavor: Mandrake or Suse?
    ... I use SUSE 8.2 at home and Mandrake 9.2 at work. ... like Mandrake as much as SUSE, it's still so much better than Windows! ... YaST is well ...
    (alt.os.linux.suse)
  • Re: Dual boot problem
    ... >> the Mandrake install was confusing the Suse ... >> to the Suse install partition, ...
    (comp.os.linux.misc)