[Lula] A tale of two woes. Solutions: boot with noapic nolapic, then do fsck.msdos -r...

Dan Kegel dank at kegel.com
Fri Jun 22 23:37:20 EDT 2007


Here's a tale of two nested woes, both with happy endings.
Quick summary:
a) A slighly messed up external FAT drive can make
XP's windows explorer stutter and hang
b) Dapper doesn't bundle ntfs support, but Feisty does
c) if Feisty hangs on boot, try adding noapic nolapic to the boot commandline
d) fsck.msdos sometimes succeeds when fsck.vfat fails, go figure
e) you have to give -r to fsck.msdos for it to really do anything

Long story:
About six months ago, my wife bought a Seagate Pushbutton
external hard drive at Fry's for backup.  We picked
one with both USB and firewire, on the theory that firewire
is faster, but usb is handy if firewire isn't available.
(I think it's a 500GB, probably model ST3500841CB-RK,
though the case is marked with the generic name
ST30000CB.)

We merrily installed its bundled backup software on my
wife's old 1GHz MS Windows XP system.  The months passed,
and she happily did the occasional backup.

Then one day she was shootin' up some food, and
up from the ground came a bubblin' crude.  (Oh, wait,
wrong story.)   Her Windows box began behaving strangely.
I figured this was a good excuse to replace it with a
faster system.  All went well until we reconnected
the external hard drive to the new system... same
strange behavior!

I eventually found time to track the problem down a bit,
and decided to see if Linux could access the external disk.
Booting into a Dapper live CD, I checked first whether
I could access the internal NTFS disks.  Nope, dapper
didn't come with even readonly NTFS.  So I tried a Feisty
live CD.  This didn't even boot!  Feisty hung whenever it
booted linux.  Guess the (somewhat old) new system I
gave my wife, a 2GHz Athlon XP system, confused Feisty.

I did a bunch of searching.
I found
1) the way to get the traditional, informative, boot screen
on an Ubuntu live cd is to hit "F6 - other options" and remove
the words "quiet" and "splash", then press Enter to boot.
This showed the kernel was oopsing, and the backtrace looked
like it was writing to an APIC.  This might have been handy if
I were a kernel developer :-)
2) Various web pages said that adding
  noapic nolapic
to the boot command line using F6 solved the "feisty hangs on boot" problem.
Sure enough, it did. (I guess I'll try the Grunty Gnu Herd 1 live cd
some time to see if that still has the problen.)

Now, back to the disk problem.  Plugging in the drive, sadly,
didn't make an icon come up on the Feisty desktop, so
I started a terminal and looked around.
$ lsusb
showed the drive:
 Bus 004 Device 010: ID 0bc2:0502 Seagate RSS LLC
and looking in /var/log/messages, I saw

Jun 23 02:03:31 ubuntu kernel: [  278.164000] scsi1 : SCSI emulation
for USB Mass Storage devices
Jun 23 02:03:37 ubuntu kernel: [  283.640000] scsi 1:0:0:0:
Direct-Access     ST350064 1A               3.AA PQ: 0 ANSI: 0
Jun 23 02:03:37 ubuntu kernel: [  283.644000] SCSI device sde:
976773168 512-byte hdwr sectors (500108 MB)

So I guess it's /dev/sde.
$ ls -l /dev/sde*
showed
 brw-rw---- 1 root plugdev 8, 64 2007-06-23 02:09 /dev/sde
 brw-rw---- 1 root plugdev 8, 65 2007-06-23 03:02 /dev/sde1
but
$ sudo mount /dev/sde1 /mnt
said
 mount: you must specify the filesystem type
$ sudo fdisk /dev/sde
p
said
/dev/sde1   *           1       60801   488384001    c  W95 FAT32 (LBA)

D'oh!  Guess I could have used dapper.  Well, what to do?
I decided to run fsck.  Because autodetection wasn't working, I ran
$ fsck.vfat /dev/sde1
dosfsck 2.11, 12 Mar 2005, FAT32, LFN
No FSINFO sector
1) Create one
2) Do without FSINFO
? 2
Read 61033104 bytes at 16384:Input/output error

On the theory that maybe it was msdos and not vfat (what the heck is
the difference, anyway?), I tried
$ fsck.msdos /dev/sde1
dosfsck 2.11, 12 Mar 2005, FAT32, LFN
No FSINFO sector
1) Create one
2) Do without FSINFO
? 2
FATs differ - using second FAT.
Leaving file system unchanged.

That looked much better.  Reading 'man fsck.msdos' showed
I needed the -r flag to actually repair the filesystem,
and -w sounded good (write immediately), so I did
$ fsck.msdos -r -w /dev/sde1
dosfsck 2.11, 12 Mar 2005, FAT32, LFN
No FSINFO sector
1) Create one
2) Do without FSINFO
? 1
FATs differ - using second FAT.
Free cluster summary uninitialized (should be 11588440)
1) Set it
2) Leave it uninitialized
? 1
Perform changes ? (y/n) y
/dev/sde1: 384497 files, 3669834/15258274 clusters

Ahhh.  Now I could mount it without specifying the type:
$ sudo mount /dev/sde1 /mnt
And now I can see the files, yay!  But is it mounted vfat or msdos?
$ mount | grep mnt
/dev/sde1 on /mnt type vfat (rw)

Well, that's a bit of a mystery... it's a vfat disk, but I had to use fsck.msdos
to repair it.  Whatever.

Now to see if the disk works when plugged into Windows again.
(And probably time to wipe and reformat with ntfs, which is
likely more resistant to whatever corrupted the disk last time.)

This was good practice for the upcoming installfest...
- Dan


-- 
Wine for Windows ISVs: http://kegel.com/wine/isv



More information about the Lula mailing list