Gentoo Archives: gentoo-user

From: Alan Mackenzie <acm@×××.de>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] [OT]: Powering off Windows XP, crashing NTFS with a Live CD.
Date: Mon, 04 Jul 2011 12:15:27
Message-Id: 20110704121203.GB30318@acm.acm
In Reply to: Re: [gentoo-user] [OT]: Powering off Windows XP, crashing NTFS with a Live CD. by Mick
1 Hi, Mick.
2
3 On Sun, Jul 03, 2011 at 01:17:33PM +0100, Mick wrote:
4 > On Sunday 03 Jul 2011 11:31:14 Alan Mackenzie wrote:
5 > > Hi, Gentoo.
6
7 > > There's been a cock and bull story on comp.os.linux.setup and I'm
8 > > wondering about some of the details. Mainly, I'd like some education,
9 > > please!
10
11 > > The story, in essence:
12 > > (i) Windows XP is running, with a normal NTFS filesystem(s).
13 > > (ii) Power off without a proper shutdown.
14
15 > Not particularly wise on NTFS. Upon next boot up it'll try to run chkdsk,
16 > which you *must* not interrupt. 99% of the time it'll happily continue into a
17 > normal boot.
18
19 Not wise on any system. :-).
20
21 > > (iii) Start again with a Linux Live CD (distribution not specified).
22 > > (iv) This corrupts the NTFS journal(s).
23
24 > No it does not. The NTFS journals (or the MSWindows partition and its NTFS)
25 > have nothing to do with a LiveCD booting and running exclusively in RAM.
26
27 I worked that out too. Beyond doubt, the teller of the tale was a troll,
28 of dubious credibility.
29
30 > > (v) It is now difficult to start Windows.
31
32 > It would be without running chkdsk first, but you do not explain what the
33 > difficulty amounts to ... error messages 'n all.
34
35 The troll said he had to let chkdsk run "repeatedly", before W32 would
36 boot.
37
38 > > OK. My questions:
39 > > o - Do live CDs actually mount filesystems on HDDs?
40
41 > Only when you ask them to.
42
43 I'm stupid. Of _course_ a live CD can't mount HDD filesystems at boot.
44 To do this it would need /etc/fstab, for which it would need to be told
45 the root partition. A live CD doesn't get this.
46
47 > To mount NTFS you would these days use ntfs-3g:
48
49 > ntfs-3g /dev/sda1 /mnt/windows
50
51 > or
52 > mount -t ntfs-3g /dev/sda1 /mnt/windows
53
54 I hadn't heard of this. Useful to know, though.
55
56 > > o - Would this actually try to mount an NTFS filesystem?
57
58 > Linux LiveCDs will not typically mount anything whatsoever. They are by
59 > default respectful of the devices on the system. I don't know if this
60 > convention has changed recently, or if there are particular LiveCDs created
61 > with different mounting conventions for the sake of MSWindows users - who
62 > would not otherwise know how to mount a partition from Linux.
63
64 > Can't recall what MSWindows based LiveCDs do (e.g. BartsPE).
65
66 Something else I hadn't heard about before yesterday.
67
68 > > o - Given that Linux's NTFS doesn't (?yet) do journaling (see kernel
69 > > docs), would the driver not detect the presence of a journal and leave
70 > > well alone?
71
72 > The Kernel's NTFS driver is not safe for writing to a NTFS partition. It is
73 > mostly a read only driver (check the Help page of the module, next time you're
74 > rolling up a new kernel). If you mount a NTFS partition using the kernel
75 > driver and then try to write to it in a way that it requires a change to the
76 > fs journals then you will invariably corrupt the NTFS fs. The working
77 > solution for NTFS partitions these days is the ntfs-3g userspace application
78 > as mentioned above.
79
80
81 > CONCLUSION:
82
83 > To recover a MSWindows partition which did not shutdown cleanly, boot into
84 > MSWindows and let it run through the chkdsk sequence. When it finishes all
85 > should be good.
86
87 Yes.
88
89 > If the MSWindows journal is corrupted, then you could try running
90
91 > ntfsfix /dev/sda1
92
93 > to force it to run chkdsk next time it boots.
94
95 > When the MSWindows OS boots next time it will go through the chkdsk routine.
96 > If that does not fix it either, then the journalling problem is probably
97 > unrecoverable. In that case ntfs-3g won't work. Instead you could try
98 > mounting the partition using the Linux kernel driver (read only of course) and
99 > if it succeeds recover the files you need.
100
101 > If the Linux kernel NTFS driver does not work, then we are into a full blown
102 > recovery exercise. You could try testdisk and photorec. There are also a
103 > bunch of MSWindows solutions too to recover NTFS partitions/files, but I'm not
104 > sure if any of these are open source.
105
106 > HTH.
107
108 Indeed it does. Thanks!
109
110 > --
111 > Regards,
112 > Mick
113
114 --
115 Alan Mackenzie (Nuremberg, Germany).

Replies

Subject Author
Re: [gentoo-user] [OT]: Powering off Windows XP, crashing NTFS with a Live CD. Neil Bothwick <neil@××××××××××.uk>