Bug 5567 - Upgrade tries to mount NTFS partition as ext2, hangs
Summary: Upgrade tries to mount NTFS partition as ext2, hangs
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: installer
Version: 6.1
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jay Turner
QA Contact:
URL:
Whiteboard:
: 5477 5552 5627 5628 5838 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-10-05 07:48 UTC by bgjestva
Modified: 2015-01-07 23:38 UTC (History)
23 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 1999-10-20 18:55:49 UTC
Embargoed:


Attachments (Terms of Use)

Description bgjestva 1999-10-05 07:48:29 UTC
During the upgrade of a RedHat 5.2 to 6.0, while in the
"Searching for RedHat Linux installations..." phase, the
install program gives a message "Error mounting ext2
filesystem on hdb5: Invalid argument".  But, hdb5 is an NTFS
(i.e. Window$NT) partition. After clicking OK, the whole
process hangs while still in the "Searching for RedHat Linux
installations..." phase.

Comment 1 Bill Nottingham 1999-10-05 15:25:59 UTC
*** Bug 5586 has been marked as a duplicate of this bug. ***

Installer crashes & burns if there's an NTFS/HPFS partition
on the first disk (hda in my case).

Comment 2 Bill Nottingham 1999-10-05 15:26:59 UTC
*** Bug 5477 has been marked as a duplicate of this bug. ***

In the graphical install shell, I wanted to perform an
update of 6.0 to 6.1. While "checking for previous Red Hat
installations", setup tried to check or mount my
/dev/sdb6, which is an NTFS partition, and it said:

error mounting ext2 partition: invalid option.

After that, it hung. It did so even in expert mode.

------- Additional Comments From teg.no  10/05/99 07:48 -------
PATCH:

--- /mnt/cdrom/misc/src/anaconda/balkan/dos.c   Sat Sep 11 17:47:28
1999
+++ dos.c       Tue Oct  5 13:34:16 1999
@@ -139,6 +139,7 @@

              case 0x7:
                table->parts[i].type = BALKAN_PART_NTFS;
+               break;

              case 0x83:
                table->parts[i].type = BALKAN_PART_EXT2;

Comment 3 Bill Nottingham 1999-10-05 15:27:59 UTC
*** Bug 5563 has been marked as a duplicate of this bug. ***

problem manifests in python installer script in /site-
packages/ directory

from todo.py

...
    def upgradeFindRoot (self):
        rootparts = []
        if not self.setupFilesystems: return [
self.instPath ]
        win = self.intf.waitWindow (_("Searching"),
                                    _("Searching for Red
Hat Linux installations..."))

        drives = self.drives.available ().keys ()
        self.ddruid = FakeDDruid ()
        for drive in drives:
            isys.makeDevInode(drive, '/tmp/' + drive)

            try:
                table = _balkan.readTable ('/tmp/' + drive)
            except SystemError:
                pass
            else:
                self.ddruid.append (drive, table)
                for i in range (len (table)):
                    (type, sector, size) = table[i]
                    # 2 is ext2 in balkan speek
                    if size and type == 2:
...

balkan returns type == 2 for NTFS volumes, thus the rest of
this function will attempt to mount the partition and fail
out when that doesn't work. Need to fix balkan or whatever
to return a different value for NTFS or otherwise check the
partition type before trying to mount it. Oh yes - "speek"
is, oph kourse, speeled "speak" :-)

-greg

Comment 4 Bill Nottingham 1999-10-05 18:55:59 UTC
*** Bug 5507 has been marked as a duplicate of this bug. ***

Anacondas balkan falls through in NTFS-patrition detection,
which causes NTFS-partitions to be detected as EXT2. This in
turn breaks the install in upgradeFindRoot, causing a jammed
upgrade. Fix by adding the missing 'break' statement into
.../misc/src/anaconda/balkan/dos.c line #142 (I think! :).


------- Additional Comments From   10/05/99 06:19 -------
I can confirm this problem (hda1 is NTFS, anaconda stops and hangs
there while searching my root fs for upgrading).

------- Additional Comments From teg.no  10/05/99 07:58 -------
Here is a patch, which should apply to bugs 5507, 5555, 5563, 5552 and
5567 (making changes to several of these at once didn't work).

A break statement is missing after detecting a NTFS-partition, thus
identifying it as an EXT2FS-partition.
--- /mnt/cdrom/misc/src/anaconda/balkan/dos.c   Sat Sep 11 17:47:28
1999
+++ dos.c       Tue Oct  5 13:34:16 1999
@@ -139,6 +139,7 @@

              case 0x7:
                table->parts[i].type = BALKAN_PART_NTFS;
+               break;

              case 0x83:
                table->parts[i].type = BALKAN_PART_EXT2;






------- Additional Comments From   10/05/99 08:48 -------
I just run into the same bug on the 6.1 Cartman.
hda1 is NTFS, install stops, complains something like no ext2fs on
hda1, and hangs.

Also, seen on colleagues machine: hda1 was an old swap partition,
install (Cartman) complained of lack of space, and kept trying to
format the / partition... Sorry, no precise details on this. Related?



   Heikki Levanto, Index Data, Denmark
   heikki

Comment 5 Bill Nottingham 1999-10-05 21:26:59 UTC
*** Bug 5552 has been marked as a duplicate of this bug. ***

One of my systems is dual-boot
   /dev/sda1 NT 4.0
   /dev/sdb2 Linux ext2fs (redhat 6.0)

While attempting to install, the error "sda1 incorrect
parameter" locks the install process.

With some investifation, I find that it has
mknoded /tmp/sda and /tmp/sda1 (the NTFS part)
I am not a python programmer, but from what I can see,
the "else:" on line 1120 of todo.py seems to have fallen in
with the wrong "if".  It is indented, but with [TAB]'s and
that would explain the behavior I see...

by my roconing, the program enters line 1116 with drive
equal to 'sda' .  Then when the program determines that the
part is of type 4, not 2, it skips to line 1120.  Next it
creates '/tmp/' + '0(first time through)+1' = '/tmp/sda1'
When it attempts to mount this FS to grab the /etc/fstab,
it dies :(

------- Additional Comments From teg.no  10/05/99 07:59 -------
Here is a patch, which should apply to bugs 5507, 5555, 5563, 5552 and
5567 (making changes to several of these at once didn't work).

A break statement is missing after detecting a NTFS-partition, thus
identifying it as an EXT2FS-partition.
--- /mnt/cdrom/misc/src/anaconda/balkan/dos.c   Sat Sep 11 17:47:28
1999
+++ dos.c       Tue Oct  5 13:34:16 1999
@@ -139,6 +139,7 @@

              case 0x7:
                table->parts[i].type = BALKAN_PART_NTFS;
+               break;

              case 0x83:
                table->parts[i].type = BALKAN_PART_EXT2;

Comment 6 Bill Nottingham 1999-10-05 21:27:59 UTC
*** Bug 5581 has been marked as a duplicate of this bug. ***

The upgrade complains about hda5 and it not being ext2fs its
NTFS and then the searching box reappears forever .. Well a
long time anyway...

Disk layout is. 2x10 GB disks, Linux, NT and 98 installed..

disk 1 has a 2GB boot drive (98), the linux swap and NT
partitions ( hda5 is the one singled out by the installer )
disk 2 has a /boot and / partition.

disk 1
Disk /dev/hda: 255 heads, 63 sectors, 1232 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hda1   *         1       260   2088418+   6  FAT16
/dev/hda2           261       277    136552+  82  Linux swap
/dev/hda3           278      1024   6000277+   5  Extended
/dev/hda5           278      1024   6000246    7  HPFS/NTFS

disk 2
Disk /dev/hdb: 255 heads, 63 sectors, 1232 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hdb1             1         3     24066   83  Linux
/dev/hdb2             4      1232   9871942+  83  Linux


------- Additional Comments From   10/05/99 15:30 -------
With Windows NT / OS/2 HPFS partitions present the installer for
RedHat 6.1 fails to upgrade, as it trys to mount the HPFS partition as
an EXT2 fs partition, attempting to find the root partition to
upgrade.  This has been verified to fail on 2 different systems so
far.

Comment 7 Bill Nottingham 1999-10-06 14:48:59 UTC
*** Bug 5621 has been marked as a duplicate of this bug. ***

The problem occurred when I tried to upgrade my system from
RH 6.0 to RH 6.1. The installation program could not mount
the ext2 partition and aborted. It probably got confused
because I have 6 partition and only one IDE hard drive. The
partitions are
hda1  -  DOS
hda2  -  NTFS
hda3  - extended partition
hda4 - ext2
hda5, hda6 - Linux swap
If you need more details please e-mail me.*** Bug 5627 has been marked as a duplicate of this bug. ***

My root partition is on /dev/hda10. When I try to upgrade,
it tries to mount the root partition on /dev/hda1 (which is
normally the windows partition). On the text upgrade screen
it then comes up with a list of errors and asks the user to
reboot. On the graphical upgrade screen, it hangs saying it
is trying to find the root linux partition.

Comment 8 Bill Nottingham 1999-10-06 14:51:59 UTC
*** Bug 5613 has been marked as a duplicate of this bug. ***

Select 'upgrade' as the installation type from the gtk-based
install, and an error box pops up saying it failed to mount
/dev/hda6 (this is an ntfs partition) due to an invalid
option or something (i assume to the mount command) and this
caused some kind of system error.  No more info was
apparent.  I've got Rh 6.0 installed on /dev/hda7, but the
install didn't make it past this error.  I'm not sure if
this means the other installation methods will freeze too,
but I'm heading back to the text-based install method for
now.  The gtk-based install is looking good though guys.

Comment 9 Bill Nottingham 1999-10-06 15:05:59 UTC
*** Bug 5628 has been marked as a duplicate of this bug. ***

I was try to upgrade my 6.0 install with a 6.1 upgrade
installation. I booted from the cd and started the
installation.  When it asked what kind of installation: ie
custom, upgrade... i choose upgrade.  This is where the
error is.  IT trys to mount hda1.  6.0 is set up on my
machine on the second drive.  I have bootmagic handle the
boot stuff and made a ext2 boot partition on the main
drive.  It automatically tried to mount that drive and then
craps out b/c that is my ntfs drive on my winnt ws 4.0.  it
then just stops and you have to reboot manually.

Comment 10 Bill Nottingham 1999-10-07 14:24:59 UTC
*** Bug 5671 has been marked as a duplicate of this bug. ***

On my system are 4 partitions. /dev/hda1 is ext2 mounted as
/boot. /dev/hda2 is NTFS. /dev/hda3 is ext2 mounted as /.
/dev/hda4 is linux swap. Installed is RH 5.2. Every time
I try to upgrade, anaconda fails with a message box
complaining about invalid mount flags for /dev/hda2. If I
switch to the log console, there are many python script
errors. Then the setup hangs with the message box
"Searching for Linux Installations".

I assume the problem is, that /dev/hda2 is recognized as
OS/2 HPFS and that the setup tried to mount it that way.

Comment 11 Bill Nottingham 1999-10-07 18:01:59 UTC
*** Bug 5688 has been marked as a duplicate of this bug. ***

If you upgrade your system, redHat 6.1 will crash if the
installer encounters an NTFS partition before it finds your
root partition, (I have an NTFS partition on /dev/sdb5 and
my root is /dev/sdb6, for example).

The bug is in /misc/src/anaconda/balkan/dos.c, where
you guys forgot a "break" instruction after line 141:

	    switch (table->parts[i].type) {
	      case 0x01:
	      case 0x04:
	      case 0x06:
	      case 0x0b:
	      case 0x0c:
	      case 0x0e:
	      case 0x0f:
		table->parts[i].type = BALKAN_PART_DOS;
		break;

	      case 0x7:
		table->parts[i].type = BALKAN_PART_NTFS;
+               break;    // <<<<<<<<<<<<<<< add this!

	      case 0x83:
		table->parts[i].type = BALKAN_PART_EXT2;
		break;

Comment 12 andreas.leitner 1999-10-09 12:20:59 UTC
same problem for me here. i changed the file dos.h and did a make;
make install in misc/src/anaconda (after dling the complete 6.1 dist
from ftp) and tried to upgrade again. the same problem occured. i
think the make; make install did not work. is there anything i need to
do additionaly?

------- Additional Comments From   10/14/99 11:52 -------
The latest RawHide version has the bug fix e.g. the "break" statement
in the right place. I wonder when up-to-date images will be out for
6.1.

------- Additional Comments From   10/14/99 12:27 -------
misc/src/anaconda/balkan/dos.c line 141 needs a break; statement
after it.  The missing break; converts all NTFS partitions to EXT2
partitions as far as balkan is concerned.

Comment 13 Jay Turner 1999-10-20 18:55:59 UTC
Please see bug #5555 for more details of this bug.  Am closing this
bug as details are in #5555

Comment 14 Bill Nottingham 1999-10-22 16:25:59 UTC
*** Bug 5840 has been marked as a duplicate of this bug. ***

I have just attempted to upgrade my work machine from RH6.0
to RH6.1. The install program crashes at the point where it
is trying to find the existing installation. It fails when
trying to check out partition /dev/sda6 which is an NTFS
partition. The root partition is actually on /dev/sda1.

I was not able to work around this bug by using expert mode
either, as the search for existing installations is still
done automatically.

The error message is:

  Error mounting ext2 filesystem on
  sda6: Invalid argument

The traceback is:

  File "/usr/bin/anaconda.real", line 225, in ?
    intf.run ( todo, test = test)
  File "/tmp/lib/python1.5/site-packages/text.py", line
1000, in run
    rc = apply (step[1](), step[2])
  File "/tmp/lib/python1.5/site-packages/text.py", line
222, in __call__
    parts = todo.upgradeFindRoot()
  File "/tmp/lib/python1.5/site-packages/todo.py", line
1130, in upgradeFindRoot
    isys.umount('/mnt/sysimage')
  File "/tmp/lib/python1.5/site-packages/isys.py", line 8,
in umount
    return _isys.umount(what)
  SystemError: (22, 'Invalid argument')


------- Additional Comments From notting  10/11/99 12:40 -------


*** This bug has been marked as a duplicate of 5677 ***

Comment 15 Bill Nottingham 1999-10-22 16:26:59 UTC
*** Bug 5838 has been marked as a duplicate of this bug. ***

I have NT installed on hda (which I use infrequently thanks
to you guys), and Red Hat 6.0 installed on hdb, when I try
to upgrade, it fails (visual, text, and expert) on the hdb,
and gives a python script traceback which I could not
capture. I am more than willing to help debug / capture
anything you guys need.

------- Additional Comments From notting  10/11/99 12:18 -------


*** This bug has been marked as a duplicate of 5677 ****** Bug 6217 has been marked as a duplicate of this bug. ***

Similar to many other bugs entered on the installer - begs
the questions - was the installer ever tested and _when_
will they be fixed so I can finish my upgrade?

Upgrading from 6.0 to 6.1 from local hard disk.

Get to the point of the dialog with "Searching for..." after
selecting a device and directory to install from. Get the
messages:

Error mounting ext2 filesystem on sda1: Invalid argument

Then the traceback:

/usr/bin/anaconda.real line 225 in ?
  intf.run (todo, test = test)
/tmp/lib/python1.5/site-packages/text.py line 1000 in run
  rc = apply(step[1](), step[2])
/tmp/lib/python1.5/site-packages/text.py line 222 in
__call__
  parts = todo.upgradeFindRoot()
/tmp/lib/python1.5/site-packages/todo.py line 1130 in
upgradeFindRoot
  isys.umount('/mnt/sysimage')
/tmp/lib/python1.5/site-packages/isis.py line 8 in umount
  return _isys.umount(what)
SystemError = (22, 'Invalid Argument')

install exited abnormally....
you may safely reboot...

The disk it was trying to mount - sda1 - is *not* an ext2
partition, it's an NT partition.



------- Additional Comments From notting  10/22/99 10:37 -------


*** This bug has been marked as a duplicate of 5677 ***

Comment 16 David Lawrence 1999-10-26 20:54:59 UTC
*** Bug 6001 has been marked as a duplicate of this bug. ***

Tried to upgrade from 6.0 to 6.1 using UPGRADE option/FTP
option with bootnet.img

scsi disk with
root partition /dev/sda6
boot partition /dev/sda3
swap at /dev/sda5
NTFS at /dev/sda1
dos at /dev/sda2

After it ftps the second part of the image, the install
program tries to update the /dev/sda1 partition (NTFS) and
crashes out of the install.


Note You need to log in before you can comment on or make changes to this bug.