home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / linux / 25040 < prev    next >
Encoding:
Text File  |  1993-01-21  |  3.6 KB  |  73 lines

  1. Newsgroups: comp.os.linux
  2. Path: sparky!uunet!boulder!ucsu!rintintin.Colorado.EDU!gleasokr
  3. From: gleasokr@rintintin.Colorado.EDU (Kris Gleason)
  4. Subject: Re: a universal set of fs commands?
  5. Message-ID: <gleasokr.727662027@rintintin.Colorado.EDU>
  6. Keywords: fs
  7. Sender: news@ucsu.Colorado.EDU (USENET News System)
  8. Nntp-Posting-Host: rintintin.colorado.edu
  9. Organization: University of Colorado, Boulder
  10. References: <gleasokr.727521117@rintintin.Colorado.EDU> <P38oXB6w165w@kf8nh.wariat.org>
  11. Date: Fri, 22 Jan 1993 00:20:27 GMT
  12. Lines: 59
  13.  
  14. kf8nh@kf8nh.wariat.org (Brandon S. Allbery) writes:
  15.  
  16. >And the partition ID is a valuable clue as to what the correct filesystem
  17. >type is if certain kinds of superblock corruption occur that leave auto-
  18. >detection schemes confused.
  19.  
  20. Ok... you convinced me (pretty quickly) that the partition table is the one
  21. place that any os should be able to figure out just what type of partition
  22. is there.  However, what type of filesystem is a floppy disk??  I think
  23. that maybe both a magic number check and a partition table check should be
  24. made in determining the fs type.  Of course, you say that msdos has no 
  25. magic number.  This is no problem for mkfs and fsck right now since there
  26. is no such beast for a dos fs (are these in the works somewhere, I wonder?).
  27. But, even without a magic number that the linux kernel uses, I would assume
  28. that it is possible to detect a filesystem as being a msdos fs.  Correct
  29. me if I'm wrong on this.  Also, other filesytem types I have seen spurious
  30. reports on might not be compatible with the Linux magic numbering convention.
  31. At any rate, I don't think that depending on the partition table alone is
  32. safe enough for a fsck command if it is to be automated.
  33.  
  34.  
  35. >> One thing I would like to see in mkfs, though, is autodetection of partition
  36. >> size.  If a partition device is selected to be used (as opposed to an image),
  37. >> it seems simple enough to get the number of blocks from the partition table,
  38. >> rather than specifying it as a command line option.
  39.  
  40. >(1) As long as your're doing this you might as well get and use the
  41. >    partition ID.
  42.  
  43. >(2) I have a good reason why this shouldn't be done except as a default if
  44. >    they don't specify a size.  It's called disk striping, which I'm putting
  45. >    into my gdisk driver.
  46.  
  47. I meant for autodetection to be a default that could easily be overridden.
  48. For simple tasks like mkfs'ing a floppy, this would be convenient, especially
  49. with all of the possible formats of floppy disks.
  50.  
  51. >> Another thing I would like to see is autodetection for the mount command, 
  52. >> rather than specifying a fs type.  The kernel already does this in order to
  53. >> mount the root filesystem.  Why not read in the `magic number' in mount
  54. >> and use that to determine the fs type?
  55.  
  56. >This only works if the filesystem has a magic number.  How should it
  57. >autodetect "-t msdos"?  (The kernel need not worry about it for the root
  58. >filesystem... I don't think an msdos root filesystem would work too well. :-)
  59.  
  60. >mount will be able to use the "fsid" scheme I detailed to get autodetection.
  61.  
  62. I like it.  The only real problems that I see are the problems with the
  63. partition table being incorrect; it might be a good idea to look at this
  64. id with skepticism rathen than as absolute fact when developing code, and
  65. offer a suitable alternate id-check for systems that are not quite right
  66. (maybe an option for fixing in fsck?  or is it bad to touch the partition 
  67. table without a reboot?)  Also, the most work these commands get on my
  68. system is with floppies.  So, whatever scheme is used, I think a system for
  69. detecting floppy fs-types would be important.
  70.  
  71. Kris
  72.  
  73.