"mount /dev/sde1" is old vfat whole disk unless "-t ext2"
I took a 4 year old 80GB disk drive, formerly running Microsoft Windows,
then repartitioned it with fdisk.
But I get the following odd behavior
mount /dev/sde1 /mnt #Mounts as 80GB vfat
mount -t ext2 /dev/sde1 /mnt #Mounts as 1GB ext2
Of course, "-t ext2" will guarantee no other partition type gets used,
but a mount without options I would not expect to do either of
a. Mount the whole disk drive, all 80GB rather than 1GB.
b. Mount a different filesystem (vfat) type than
I set with fdisk (83).
I suppose that any of the commands "shred", "wide", "sterilize", or
dd if=/dev/zero of=/dev/sde bs=1000 count=80000000
would prepare a disk drive so that later
no ext2 partition would "mount" as a Microsoft vfat partition.
However, one is behooved to use fewer such dangerous commands.
Since 1994, I have used the following standard sequence to prepare
a Linux disk drive, whether that drive was old or new,
fdisk (or cfdisk) to create partitions
mkfs (or mke2fs) to put filesystems on those partitions
/etc/fstab changes if I want system mounts
e2label if I want to mount with a label
DID I MISS SOMETHING?
Like this oddity today, on another disk drive 6 years ago,
I was similarly perplexed by a first partition that misbehaved.
Configuration:
This "internal" Seagate ST380020A 80GB disk drive I attached to a CableMax
USB2.0 to IDE & SATA Cable
so this bare (screwed on metal plate to protect electronics)
ATA drive is externally connected by USB cable and a power
connection.
I run Debian 3.0 (not yet upgraded to 3.1).
I don't expect this configuration causes these oddities,
since I use this configuration often,
although I don't often convert Microsoft disk drives to Linux ext2.
The rest of this email supports the above statement.
Here is the output for my 80GB disk drive using
fdisk -l /dev/sde
#
Disk /dev/sde: 255 heads, 63 sectors, 9729 cylinders
Units = cylinders of 16065 * 512 bytes
#
Device Boot Start End Blocks Id System
/dev/sde1 1 141 1132551 83 Linux #1.1GB
/dev/sde2 142 422 2257132+ 83 Linux #2.2GB
When I run
mount /dev/sde1 /mnt
I get the following response from "mount",
/dev/sde1 on /mnt type vfat (rw)
which is not ext2!
Indeed, I can see former Microsoft Windows files with "ls -F /mnt",
My Documents/
Program Files/
autoexec.bat*
command.com*
config.sys*
I get the following from "df",
/dev/sde1 78131104 78131104 0 100% /mnt
so the full 80GB disk drive has been mounted, not just /dev/sde1.
When I run
mount -t ext2 /dev/sde1 /mnt
I get the following response from "mount",
/dev/sde1 on /mnt type ext2 (rw)
as expected from my settings with fdisk.
The files now include Linux (No Microsoft files) files/directories from /boot,
as seen by the following "ls -F /mnt",
grub/
lost+found/
boot.b
bzImage-2.4.27-sound
System.map-2.4.27-sound
boot-bmp.b
boot-compat.b
boot-menu.b
boot-text.b
chain.b
os2_d.b
map
I get the following from "df",
/dev/sde1 1114724 14532 1043568 2% /mnt
as expected for my 1.1GB partition.
--
Jameson C. Burt, NJ9L Fairfax, Virginia, USA
jameson@coost.com http://www.coost.com
(202) 690-0380 (work)
LTSP.org: magic "mysterious and awe-inspiring even though
we know they are real and not supernatural"
Reply to: