OS file system confusion

G

Groucho

I'm in a bit of a dilemma with a Samsung 400GB HDD

I bought the drive a few months ago and the very first use I put the drive
to was installing it in an old PC experimenting with FreeNas which uses the
UFS file system.

I subsequently removed it from that system and installed it into a normal XP
setup as a data/storage drive formatted as NTFS. Since that time it's worked
flawlessly under XP and is now over 3/4 full.

Now here's the problem: I've since installed installed Suse 10.1 on same
machine that houses the drive as a dual boot setup with XP and I've recently
noticed that Suse identifies the drive as using the UFS file system :weird

XP is fine with the drive and identifies it as being formatted NTFS and no
problems. I'm a little concerned that Nix may screw something up in working
with the drive because it identifies the file system used incorrectly.

I presume that when first formatted with UFS and subsequently reformatted
with NTFS that Windows hasn't cleanly reconfigured the MBR or some such?

Question is what to do about it?

I don't currently have the room to clear the drive to another HDD though
everything on it is backed up to DVD should I be forced to recover from that
media.

I can't recall how I wiped UFS and formatted to NTFS but I'm wondering if I
can use a utility to safely wipe and recreate the MBR without data loss so
it will be correctly identified as an NTFS formatted drive under Suse. So
far I've avoided use of it under Suse just in case it does muck it up for
AFAIK Suse 10.1 has write permissions for UFS but not NTFS. Any thoughts?
 
A

Arno Wagner

Previously Groucho said:
I'm in a bit of a dilemma with a Samsung 400GB HDD
I bought the drive a few months ago and the very first use I put the drive
to was installing it in an old PC experimenting with FreeNas which uses the
UFS file system.
I subsequently removed it from that system and installed it into a normal XP
setup as a data/storage drive formatted as NTFS. Since that time it's worked
flawlessly under XP and is now over 3/4 full.
Now here's the problem: I've since installed installed Suse 10.1 on same
machine that houses the drive as a dual boot setup with XP and I've recently
noticed that Suse identifies the drive as using the UFS file system :weird
XP is fine with the drive and identifies it as being formatted NTFS and no
problems. I'm a little concerned that Nix may screw something up in working
with the drive because it identifies the file system used incorrectly.
I presume that when first formatted with UFS and subsequently reformatted
with NTFS that Windows hasn't cleanly reconfigured the MBR or some such?
Question is what to do about it?

I suspect it is the partition type. Linux will not mount/write to
the disk if it does not find the metadata structures of the expected
filesystem on it, so you are pretty safe.

If it mounts, it is probably done with type ''auto'' which does its
ofn detection, AFAIK.
I don't currently have the room to clear the drive to another HDD though
everything on it is backed up to DVD should I be forced to recover from that
media.
I can't recall how I wiped UFS and formatted to NTFS but I'm wondering if I
can use a utility to safely wipe and recreate the MBR without data loss so
it will be correctly identified as an NTFS formatted drive under Suse. So
far I've avoided use of it under Suse just in case it does muck it up for
AFAIK Suse 10.1 has write permissions for UFS but not NTFS. Any thoughts?

If it is the filesystem type, then just start Linux
fsisk and change the type. Its the ''t'' command.

Arno
 
G

Groucho

If it is the filesystem type, then just start Linux
fsisk and change the type. Its the ''t'' command.

Thanks for your reply.

Not sure fdisk is going to be of any help?. I definately feel out of comfort
zone stuffing around with the unknown here to.

I decided to have a look at the existing partition tables and ID's with "p"
command and this is the output.

"Disk /dev/hdb1: 400.0 GB, 400085812224 bytes
255 heads, 63 sectors/track, 48640 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

This doesn't look like a partition table

Probably you selected the wrong device.

Device Boot Start End Blocks Id System

/dev/hdb1p1 ? 13578 119522 850995205 72 Unknown

Partition 1 does not end on cylinder boundary.

/dev/hdb1p2 ? 45382 79243 271987362 74 Unknown

Partition 2 does not end on cylinder boundary.

/dev/hdb1p3 ? 10499 10499 0 65 Novell Netware 386

Partition 3 does not end on cylinder boundary.

/dev/hdb1p4 167628 167631 25817+ 0 Empty

Partition 4 does not end on cylinder boundary.

Partition table entries are not in disk order"



For comparison this is the output of a Samsung 250GB drive that is being
correctly identified as NTFS although by output I'm wondering why as it's
pretty well identical except for the numbers as the 400GB drive which is
identified as UFS

"

Disk /dev/sdb1: 250.0 GB, 250056705024 bytes

255 heads, 63 sectors/track, 30400 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

This doesn't look like a partition table

Probably you selected the wrong device.

Device Boot Start End Blocks Id System

/dev/sdb1p1 ? 13578 119522 850995205 72 Unknown

Partition 1 does not end on cylinder boundary.

/dev/sdb1p2 ? 45382 79243 271987362 74 Unknown

Partition 2 does not end on cylinder boundary.

/dev/sdb1p3 ? 10499 10499 0 65 Novell Netware 386

Partition 3 does not end on cylinder boundary.

/dev/sdb1p4 167628 167631 25817+ 0 Empty

Partition 4 does not end on cylinder boundary.

Partition table entries are not in disk order"



Listing kown partition types under command "l" brings up ..



"

0 Empty 1e Hidden W95 FAT1 80 Old Minix be Solaris boot

1 FAT12 24 NEC DOS 81 Minix / old Lin bf Solaris

2 XENIX root 39 Plan 9 82 Linux swap / So c1 DRDOS/sec (FAT-

3 XENIX usr 3c PartitionMagic 83 Linux c4 DRDOS/sec (FAT-

4 FAT16 <32M 40 Venix 80286 84 OS/2 hidden C: c6 DRDOS/sec (FAT-

5 Extended 41 PPC PReP Boot 85 Linux extended c7 Syrinx

6 FAT16 42 SFS 86 NTFS volume set da Non-FS data

7 HPFS/NTFS 4d QNX4.x 87 NTFS volume set db CP/M / CTOS / .

8 AIX 4e QNX4.x 2nd part 88 Linux plaintext de Dell Utility

9 AIX bootable 4f QNX4.x 3rd part 8e Linux LVM df BootIt

a OS/2 Boot Manag 50 OnTrack DM 93 Amoeba e1 DOS access

b W95 FAT32 51 OnTrack DM6 Aux 94 Amoeba BBT e3 DOS R/O

c W95 FAT32 (LBA) 52 CP/M 9f BSD/OS e4 SpeedStor

e W95 FAT16 (LBA) 53 OnTrack DM6 Aux a0 IBM Thinkpad hi eb BeOS fs

f W95 Ext'd (LBA) 54 OnTrackDM6 a5 FreeBSD ee EFI GPT

10 OPUS 55 EZ-Drive a6 OpenBSD ef EFI (FAT-12/16/

11 Hidden FAT12 56 Golden Bow a7 NeXTSTEP f0 Linux/PA-RISC b

12 Compaq diagnost 5c Priam Edisk a8 Darwin UFS f1 SpeedStor

14 Hidden FAT16 <3 61 SpeedStor a9 NetBSD f4 SpeedStor

16 Hidden FAT16 63 GNU HURD or Sys ab Darwin boot f2 DOS secondary

17 Hidden HPFS/NTF 64 Novell Netware b7 BSDI fs fd Linux raid auto

18 AST SmartSleep 65 Novell Netware b8 BSDI swap fe LANstep

1b Hidden W95 FAT3 70 DiskSecure Mult bb Boot Wizard hid ff BBT

1c Hidden W95 FAT3 75 PC/IX"



Using command "t" brings up following option "

Partition number (1-4):

Unfortunately none of existing ID's on 4 partitions correspond with either
UFS or NTFS so I'm lost as to why Suse identifys one drive formatted NTFS
while the other UFS as the output is virtually identical.
 
A

Arno Wagner

Thanks for your reply.
Not sure fdisk is going to be of any help?. I definately feel out of
comfort zone stuffing around with the unknown here to.

Yes, I can see that. But ist is a simple and valuable tool when
dealing with disks, so knowing how to use it is worth the effort.
I decided to have a look at the existing partition tables and ID's with "p"
command and this is the output.
"Disk /dev/hdb1: 400.0 GB, 400085812224 bytes
255 heads, 63 sectors/track, 48640 cylinders

Ok. I will talk you though it. First fdisk is used on whole disks,
it works on the pattition table and partitions do (usually) not have
one.

Please post the output from

fdisk -l /dev/hdb

(Fdisk does interactive mode, but listing can be done from the
commandline. The equivalent in interactive mode would be
''fdisk /dev/hdb and then 'p')

-------

For reference, one of my disks looks like this:

root ~>fdisk -l /dev/hda

Disk /dev/hda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 1 10 80324+ 83 Linux
/dev/hda2 * 11 764 6056505 b W95 FAT32
/dev/hda3 765 19457 150151522+ f W95 Ext'd (LBA)
/dev/hda5 766 1355 4739175 b W95 FAT32
/dev/hda6 1356 2329 7823654+ b W95 FAT32
/dev/hda7 2330 4221 15197489+ b W95 FAT32
/dev/hda8 4222 6112 15189457 b W95 FAT32
/dev/hda9 6113 6431 2562367 fd Linux raid autodetect
/dev/hda10 6432 6686 2048287 fd Linux raid autodetect
/dev/hda11 6687 7133 3590527 fd Linux raid autodetect
/dev/hda12 7134 19457 98992529+ fd Linux raid autodetect
root ~>

The ''Id'' column is the filesystem fiels. The ''System'' column
is just a verbose version of ''Id''. ''Id'' is not derived from
the actual filesystem on the partition, it is just a byte.
Unless ''Id'' describes an extended partition, it does not have
any special meaning to fdisk.
 
J

Jan Gerrit Kootstra

Arno said:
Yes, I can see that. But ist is a simple and valuable tool when
dealing with disks, so knowing how to use it is worth the effort.




Ok. I will talk you though it. First fdisk is used on whole disks,
it works on the pattition table and partitions do (usually) not have
one.

Please post the output from

fdisk -l /dev/hdb

(Fdisk does interactive mode, but listing can be done from the
commandline. The equivalent in interactive mode would be
''fdisk /dev/hdb and then 'p')

-------

For reference, one of my disks looks like this:

root ~>fdisk -l /dev/hda

Disk /dev/hda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 1 10 80324+ 83 Linux
/dev/hda2 * 11 764 6056505 b W95 FAT32
/dev/hda3 765 19457 150151522+ f W95 Ext'd (LBA)
/dev/hda5 766 1355 4739175 b W95 FAT32
/dev/hda6 1356 2329 7823654+ b W95 FAT32
/dev/hda7 2330 4221 15197489+ b W95 FAT32
/dev/hda8 4222 6112 15189457 b W95 FAT32
/dev/hda9 6113 6431 2562367 fd Linux raid autodetect
/dev/hda10 6432 6686 2048287 fd Linux raid autodetect
/dev/hda11 6687 7133 3590527 fd Linux raid autodetect
/dev/hda12 7134 19457 98992529+ fd Linux raid autodetect
root ~>

The ''Id'' column is the filesystem fiels. The ''System'' column
is just a verbose version of ''Id''. ''Id'' is not derived from
the actual filesystem on the partition, it is just a byte.
Unless ''Id'' describes an extended partition, it does not have
any special meaning to fdisk.
Dear Arno,



The Id indeed it does not describe a type of filesystem, but it
describes the type of partition.

fdisk /dev/hda
t
1
L

Will give you the list of system descriptors:


fdisk /dev/hda

Het aantal cylinders van deze schijf is ingesteld op 30401.
Hier is niets mis mee, maar het is groter dan 1024, en
kan met bepaalde instellingen problemen veroorzaken met:
1) software die werkt bij het opstarten (bijv. oude versies van LILO)
2) opstart- en partitioneringssoftware van andere besturings-
systemen, zoals DOS FDISK en OS/2 FDISK

Opdracht (m voor hulp): t
Partitienummer (1-4): 1
Hex code (typ L om codes op te sommen): L

0 Leeg 1e Hidden W95 FAT1 75 PC/IX be Solaris
opstart
1 FAT12 24 NEC DOS 80 Oude Minix bf Solaris
2 XENIX root 39 Plan 9 81 Minix / oude Li c1
DRDOS/sec (FAT-
3 XENIX usr 3c PartitionMagic 82 Linux wisselgeh c4
DRDOS/sec (FAT-
4 FAT16 <32M 40 Venix 80286 83 Linux c6
DRDOS/sec (FAT-
5 Uitgebreid 41 PPC PReP Opstar 84 OS/2 verborgen c7 Syrinx
6 FAT16 42 SFS 85 Linux uitgebrei da
Niet-bestandssy
7 HPFS/NTFS 4d QNX4.x 86 NTFS volume set db CP/M /
CTOS / .
8 AIX 4e QNX4.x 2de deel 87 NTFS volume set de Dell
Utility
9 AIX opstartbaar 4f QNX4.x 3de deel 8e Linux LVM df BootIt
a OS/2 Boot Manag 50 OnTrack DM 93 Amoeba e1 DOS access
b W95 FAT32 51 OnTrack DM6 Aux 94 Amoeba BBT e3 DOS R/O
c W95 FAT32 (LBA) 52 CP/M 9f BSD/OS e4 SpeedStor
e W95 FAT16 (LBA) 53 OnTrack DM6 Aux a0 IBM Thinkpad hi eb BeOS
f W95 Ext'd (LBA) 54 OnTrackDM6 a5 FreeBSD ee EFI GPT
10 OPUS 55 EZ-Drive a6 OpenBSD ef EFI
(FAT-12/16/
11 Verborgen FAT12 56 Golden Bow a7 NeXTSTEP f0
Linux/PA-RISC o
12 Compaq diagnost 5c Priam Edisk a8 Darwin UFS f1 SpeedStor
14 Verborgen FAT16 61 SpeedStor a9 NetBSD f4 SpeedStor
16 Verborgen FAT16 63 GNU HURD of Sys ab Darwin opstart f2 DOS
secundair
17 Verborgen HPFS/ 64 Novell Netware b7 BSDI fs fd Linux
raid auto
18 AST SmartSleep 65 Novell Netware b8 BSDI wisselgehe fe LANstep
1b Hidden W95 FAT3 70 DiskSecure Mult bb Boot Wizard ver ff BBT
1c Hidden W95 FAT3


Kind regards,



Jan Gerrit Kootstra
 
A

Arno Wagner

Previously Jan Gerrit Kootstra said:
Dear Arno,


The Id indeed it does not describe a type of filesystem, but it
describes the type of partition.

True. I am just not entirely sure what the ''auto'' option to
mount does. Does it look at the partition type or the on-disk
filesystem? I think I remember it working correctly with
the wrong partition type....

Arno
 
J

Jerry Peters

---snip
True. I am just not entirely sure what the ''auto'' option to
mount does. Does it look at the partition type or the on-disk
filesystem? I think I remember it working correctly with
the wrong partition type....

Arno

AFAIK none of the various mount commands look at the partition table
for the FS type.
Busybox auto tries to mount the device by iterating over a list of
filesystems in /etc/filesystems. klibc mount doesn't have an auto
option but will take a list like -t ext3,ext2,... to try. I think
util-linux mount has some sort of builtin list it uses.

Jerry
 
A

Arno Wagner

Previously Jerry Peters said:
AFAIK none of the various mount commands look at the partition table
for the FS type.
Busybox auto tries to mount the device by iterating over a list of
filesystems in /etc/filesystems. klibc mount doesn't have an auto
option but will take a list like -t ext3,ext2,... to try. I think
util-linux mount has some sort of builtin list it uses.

Sounds reasonable.

Arno
 
G

Groucho

Arno Wagner said:
Ok. I will talk you though it. First fdisk is used on whole disks,
it works on the pattition table and partitions do (usually) not have
one.

Please post the output from

fdisk -l /dev/hdb

Ok. Seems everything is as it should be by below output.

Disk /dev/hdb: 400.0 GB, 400088457216 bytes

255 heads, 63 sectors/track, 48641 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

/dev/hdb1 * 1 48641 390708801 7 HPFS/NTFS

The below link is a screen capture of "My Computer" via "Konqueror". If you
have a look at "400G Media" you can see the drive is identified as UFS. This
is where the confusion on my part came from. Seems it may be a bug somewhere
else that is misidentifying drive in GUI mode as UFS, but it is NTFS
formatted never the less.

Had I not previously used the drive under FreeNas and UFS I wouldn't have
given it as much thought.
http://img156.imageshack.us/img156/7623/snapshot1ib9.png

Thanks for your time.
 
A

Arno Wagner

Ok. Seems everything is as it should be by below output.
Disk /dev/hdb: 400.0 GB, 400088457216 bytes
255 heads, 63 sectors/track, 48641 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hdb1 * 1 48641 390708801 7 HPFS/NTFS

The below link is a screen capture of "My Computer" via "Konqueror". If you
have a look at "400G Media" you can see the drive is identified as UFS. This
is where the confusion on my part came from. Seems it may be a bug somewhere
else that is misidentifying drive in GUI mode as UFS, but it is NTFS
formatted never the less.

Hmm. Is the claimes used and free space right? If so, then it actually
recognises it as NTFS for that part. Probably just Konqueror using
something too simple...
Had I not previously used the drive under FreeNas and UFS I wouldn't have
given it as much thought.
http://img156.imageshack.us/img156/7623/snapshot1ib9.png

My guess is that there is some magic number or the like left
on the partition. But if it identifes the free/used numbers right,
I don't think you need to worry.
Thanks for your time.

No problem.

Arno
 
G

Groucho

Arno Wagner said:
Hmm. Is the claimes used and free space right? If so, then it actually
recognises it as NTFS for that part. Probably just Konqueror using
something too simple...

How do I do an accurate comparable check?

In Windows by right click drive and properties I get
Used 356,220,895,232 bytes 331GB
Free 43,864,915,968 bytes 40.8GB

In Linux not sure how to get same? Obviously GUI snapshot shows figure
rounded slightly differently and not very intuitive for accuracy at "40.85GB
Available space"
Is there a Linux shell command to get comparable info to Windows above?

Isn't Linux fun for n00bs :)
 
A

Arno Wagner

How do I do an accurate comparable check?
In Windows by right click drive and properties I get
Used 356,220,895,232 bytes 331GB
Free 43,864,915,968 bytes 40.8GB
In Linux not sure how to get same? Obviously GUI snapshot shows
figure rounded slightly differently and not very intuitive for
accuracy at "40.85GB Available space" Is there a Linux shell command
to get comparable info to Windows above?

use ''df'' and multiply the reported sizes by 1024. But the above
is close enough, if Linux has a real idea what the allocated
and free sizes are, then it detects the right filesystem.
Isn't Linux fun for n00bs :)

Windows is not much better. And if you learn this Linux stuff,
you can actually use a lot on any other Unix system. And you
can use it for a long time, the Interface is very stable. Unlike
some other OS, that has another major revision every 5 years...

Arno
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top