Wubi has unclear error message on NTFS dirty flag

Bug #226622 reported by JP Vossen on 2008-05-04
24
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Wubi
Low
Agostino Russo
lupin
Invalid
Low
Agostino Russo
initramfs-tools (Ubuntu)
Medium
Agostino Russo
Hardy
Undecided
Unassigned
lupin (Ubuntu)
Medium
Unassigned
Hardy
Undecided
Unassigned

Bug Description

There has been much confusion surrounding the user getting dropped in the initramfs shell when the host filesystem cannot be mounted because it is dirty.

TEST CASE:
When using Ubuntu (Hardy) under wubi, if the NTFS dirty flag is set, the error message is missing or confusing.

This situation can and will occur when you restart and are not paying attention, so you miss the NT Boot loader prompt and start booting Windows, then hard-power-off to save time (can you guess how I know this?), or if/when Windows crashes. I bet this is going to be a really F.A.Q. with Wubi.

To reproduce:
1) Either shut Windows down ungracefully, or let it start half-way up, then hard-power-off to kill it
2) Reboot and attempt to go into Ubuntu

Case 1: default startup: You end up at a completely useless and scary BusyBox/(initramfs) prompt with no indication why you are there or what to do about it.
Case 2: recovery mode (verbose) startup: You still end up at a completely useless and scary BusyBox/(initramfs) prompt, but there are log lines on the screen as follows. But they are scary and confusing ("mount: ... failed: Success"? WTH?):

----- cut here (very top of my screen) -----
$LogFile indicates unclean shutdown (0, 0)
Failed to mount '/dev/sda2/: Operation not supported
Mount is denied because NTFS is marked to be in use. Choose one action:

Choice 1: If you have Windows then disconnect the external devices by
 clicking on the 'Safely Remove Hardware' icon in the Windows
 taskbar then shutdown Windows cleanly.

Choice 2: If you don't have Windows then you can use the 'force' option for
 your own responsibility. For example type on the command line:
     mount -t ntfs-3g /dev/sda2 /root -o force

    Or add the option to the relevant row in the /etc/fstab file:
     /dev/sdc1 /mnt/external/ ntfs-3g defaults,force 0 0

mount: Mounting /dev/disk/by_uuid/... on /root failed: Success
mount: Mounting /root on /host failed: invalid argument
ALERT! /host/ubuntu/disks/root.disk does not exist. Dropping to a shell!

BusyBox v1.1.3 ... (ash)
Enter 'help' ....

(initramfs)
----- cut here -----

A diff of the required changes can be found here:
http://launchpadlibrarian.net/14795872/lupin-226622.debdiff

A debdiff of the entire 0.19 upload, including the fix for bug 136682, can be found here:
http://launchpadlibrarian.net/14795586/lupin_0.16-0.19.debdiff

A debdiff of the initramfs-tools changes can be found here:
http://launchpadlibrarian.net/14795732/initramfstools_0.85eubuntu36-0.85eubuntu38.debdiff

Szabolcs Szakacsits (szaka) wrote :

Both ntfs-3g and ntfs-3g.probe could be used and both return error code 15 if the journal is unclean: http://linux.die.net/man/8/ntfs-3g.probe

The most important thing is "gracefully shut down" and detaching external devices as Microsoft and drive manufacturers has documented.

Agostino Russo (ago) wrote :

I think this is a valid point that will greatly reduce the number of tickets

Changed in wubi:
importance: Undecided → Low
status: New → Confirmed
Agostino Russo (ago) on 2008-05-05
Changed in wubi:
assignee: nobody → ago
Agostino Russo (ago) on 2008-05-06
Changed in lupin:
assignee: nobody → ago
importance: Undecided → Low
status: New → Confirmed
Changed in initramfs-tools:
status: New → Confirmed
Agostino Russo (ago) wrote :
Agostino Russo (ago) wrote :
Changed in wubi:
status: Confirmed → Invalid
Changed in lupin:
status: Confirmed → Fix Committed
Changed in initramfs-tools:
status: Confirmed → In Progress
Evan (ev) wrote :
Evan (ev) on 2008-05-09
Changed in lupin:
status: Fix Committed → Invalid
Changed in initramfs-tools:
status: In Progress → Fix Committed
importance: Undecided → Medium
milestone: none → ubuntu-8.04.1
status: Fix Committed → Confirmed
Changed in lupin:
importance: Undecided → Medium
milestone: none → ubuntu-8.04.1
status: New → Fix Committed
milestone: none → ubuntu-8.04.1
status: New → Fix Committed
Evan (ev) on 2008-05-09
description: updated
description: updated
JP Vossen (jp-jpsdomain) wrote :

http://launchpadlibrarian.net/14296471/initramfs-tools_0.85eubuntu37.debdiff has 1 spelling error:

"beacause" --> "because"

http://launchpadlibrarian.net/14400134/lupin-ntfsdirty.diff has 2 spelling errors in 2 different places:

"beacause of an inproper" --> "because of an improper"

In both patches, I worry that "run a chkdsk /r" is not clear enough for naive users, perhaps "run a Check Disk and check the 'repair' box (or chkdsk /r)," would be better?

Overall though, I think this will be much more clear!

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lupin - 0.17

---------------
lupin (0.17) intrepid; urgency=low

  [ Agostino Russo]
  * Provide a clearer error when required installation files cannot be
    found (LP: #226622)

  [ Tormod Volden ]
  * Add locale support to ntfs host filesystems, to keep files and
    directories with non-C characters (utf) from disappearing.
    (LP: #136682)

 -- Evan Dandrea <email address hidden> Fri, 09 May 2008 13:53:14 -0400

Changed in lupin:
status: Fix Committed → Fix Released
Steve Langasek (vorlon) on 2008-05-09
Changed in lupin:
milestone: ubuntu-8.04.1 → none
Changed in initramfs-tools:
milestone: ubuntu-8.04.1 → none
milestone: none → ubuntu-8.04.1
Steve Langasek (vorlon) wrote :

lupin 0.17 has also been uploaded to hardy-proposed. I'm rejecting this upload, because:

- it needs to be given a unique version number, since it was not done as a pocket copy and we can't have different binaries under the same version number.
- the added strings include several typographical errors, some of which are pointed out above in the comments. Suggested error message:
  Could not find the ISO $iso_path
  This could also happen if the file system is not clean because of an operating
  system crash, an interrupted boot process, an improper shutdown, or
  unplugging of a removable device without first unmounting or ejecting it.
  To fix this, simply reboot into Windows, let it fully start, log in, run 'chkdsk /r',
  then gracefully shut down. Once you restart, you should be able to resume the
  installation.

At the very least, the "file-system", "beacause", and "inproper" errors should be fixed.

Agostino Russo (ago) wrote :

Made a few changes to lupin.proposed as suggested above.

Agostino Russo (ago) wrote :

Note that the typos also affect the initramfs-tools patch above. Will provide a new one later on.

Agostino Russo (ago) wrote :

Fixes typos in initramfs-tools

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package initramfs-tools - 0.85eubuntu37

---------------
initramfs-tools (0.85eubuntu37) intrepid; urgency=low

  * Provide a clearer error on mount failure of the Windows host
    filesystem (LP: #226622)

 -- Agostino Russo <email address hidden> Tue, 06 May 2008 23:55:47 +0100

Changed in initramfs-tools:
status: Confirmed → Fix Released
Evan (ev) wrote :
description: updated
Evan (ev) on 2008-05-29
description: updated
Evan (ev) wrote :
description: updated
Changed in initramfs-tools:
status: New → Fix Committed
Evan (ev) wrote :
description: updated
Martin Pitt (pitti) wrote :

Accepted into -proposed, please test and give feedback here

Dave Morley (davmor2) wrote :

Just to confirm this happens before I enable -proposed I am now going to install proposed and update and try again.

Dave Morley (davmor2) wrote :

Right I've enabled -proposed and done all the updates. rebooted let Ubuntu start to enable everything. Re-started gone into the windows killed it, rebooted into Ubuntu and no change it goes into initramfs/busybox.

Agostino Russo (ago) wrote :

arg... I had lupin rev109 in my local branch that for some reason did not make the hardy.proposed branch

That is required otherwise LIVEMEDIA_OFFSET is never set and without LIVEMEDIA_OFFSET the loopdevice is never setup...

=== modified file 'casper/scripts/casper-premount/20iso_scan'
--- casper/scripts/casper-premount/20iso_scan 2008-05-15 23:16:36 +0000
+++ casper/scripts/casper-premount/20iso_scan 2008-05-26 10:16:30 +0000
@@ -28,7 +28,7 @@
 if [ "$iso_path" ]; then
     if find_path "${iso_path}" /isodevice rw; then
         echo "LIVEMEDIA=${FOUNDPATH}" >> /conf/param.conf
- if [ -f "${iso_path}" ]; then
+ if [ -f "${FOUNDPATH}" ]; then
             echo "LIVEMEDIA_OFFSET=0" >> /conf/param.conf
         fi
     else

=== modified file 'debian/changelog'
--- debian/changelog 2008-05-15 23:16:36 +0000
+++ debian/changelog 2008-05-26 10:32:31 +0000
@@ -5,8 +5,9 @@
     is a useful check per se', but it is also required to allow using
     iso_scan to look for iso content such as squashfs which in turn
     would help with LP: #207137
+ * Use the absolute path when testing the iso_path target type

- -- Agostino Russo <email address hidden> Thu, 15 May 2008 23:55:32 +0100
+ -- Agostino Russo <email address hidden> Mon, 26 May 2008 11:32:10 +0100

 lupin (0.17) hardy-proposed; urgency=low

Changed in lupin:
status: Fix Committed → In Progress
status: Fix Released → In Progress
Agostino Russo (ago) wrote :

I have pushed rev 112 with the fix. I am quite sure that explains davomor2 issues (no /dev/loop*).
Sorry for not noticing before.

Martin Pitt (pitti) wrote :

initramfs-tools 0.85eubuntu39.1 is in hardy-updates already.

Changed in initramfs-tools:
status: Fix Committed → Fix Released
Martin Pitt (pitti) wrote :

lupin needs another upload, removing verification tag.

Martin Pitt (pitti) wrote :

Sponsored fix, accepted into hardy-proposed. Please test.

Changed in lupin:
status: In Progress → Fix Committed
Brian Murray (brian-murray) wrote :

I was able to recreate this bug using the test case provided. I then tried to verify the fix but failed. I have initramfs-tools 0.85eubuntu39.1 installed. I then installed lupin-support version 0.20, I choose lupin-support because that was the only lupin-package installed on my fresh install of Hardy Heron. I then recreated the problem and was again dropped to the busybox shell. I installed lupin-casper, since I thought that was what the debdiff modified, version 0.20 and then recreated the bug again. However, I was again dropped to a busybox shell.

I'm going to set this bug's tag to verification-failed. Either the test case needs to be updated with information about which packages from -proposed to install or I've installed the right one and the fix doesn't behave the way it should.

Agostino Russo (ago) wrote :

Brian, the patch does not avoid the busy box shell when the ntfs dirty flag is up (we have no fsck for ntfs at the moment), it should only show a more helpful message when that happens. So you should see some kind of explanation when the dirty flag is up and otherwise you should be able to boot normally. Lupin-casper is only relevant on first reboot (installation) after that the relevant package is initramfs-tools.

Brian Murray wrote:
> I was able to recreate this bug using the test case provided. I then
> tried to verify the fix but failed. I have initramfs-tools
> 0.85eubuntu39.1 installed. I then installed lupin-support version 0.20,
> I choose lupin-support because that was the only lupin-package installed
> on my fresh install of Hardy Heron. I then recreated the problem and
> was again dropped to the busybox shell. I installed lupin-casper, since
> I thought that was what the debdiff modified, version 0.20 and then
> recreated the bug again. However, I was again dropped to a busybox
> shell.

This may be a symptom of my original report that I don't see being
addressed. You end up the the prompt either way, but unless you boot in
"recovery mode" you never see *any* error message, clear or not.

Having said that, I have no idea how to change that behavior. :-(

Dave Morley (davmor2) wrote :

There is a nice message explaining the issue in recovery mode which would be nice to see in normal mode too.

Brian Murray (brian-murray) wrote :

Ah, from the test case it wasn't clear that you had to boot into recovery mode to see the message. I'll try that again.

Brian Murray (brian-murray) wrote :

I booted into recovery mode and saw the message regarding what to do, so I'll change the bug to verification-passed.

However, I think the error message would benefit from some clarification in the future. It'd be useful to tell people to use the 'reboot' command in the ash shell. Additionally, telling people how to scroll up in the shell might be useful too.

JP Vossen (jp-jpsdomain) wrote :

Brian Murray wrote:
> Ah, from the test case it wasn't clear that you had to boot into
> recovery mode to see the message. I'll try that again.

Right, the fact the you only get something useful if you think to boot
into recovery mode is, itself, part of the original bug...

Agostino Russo (ago) wrote :

That is a separate bug. Panic messages are not displayed when usplash is running.
Please see #243226

Agostino Russo (ago) on 2008-06-26
Changed in lupin:
status: In Progress → Fix Released
Steve Langasek (vorlon) wrote :

copied to hardy-updates.

Changed in lupin:
status: Fix Committed → Fix Released
David Balažic (xerces8) wrote :

I just saw this on na fresh installation of Ubuntu 10.10 x86 with Wubi 197.

ALERT! /host/ubuntu/disks/root.disk does not exist. Dropping to a shell!

BusyBox v1.15.3 (Ubuntu 1:1.15.3-1ubuntu5) built-in shell (ash)
Enter 'help' for a list of built-in commands.

(initramfs)

What happened:
 - downloaded wubi 197
 - installed Ubuntu 10.10 on disk D: (second disk with a single NTFS partition, C: is the single NTFS partition on the first disc)
 - reboot into Ubuntu
 - the installation is finished
 - another reboot into ubuntu
Result: The above error.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers