home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / os / linux / 21703 < prev    next >
Encoding:
Text File  |  1992-12-26  |  3.6 KB  |  94 lines

  1. Newsgroups: comp.os.linux
  2. Path: sparky!uunet!spool.mu.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!eff!world!jrs
  3. From: jrs@world.std.com (Rick Sladkey)
  4. Subject: Re: Short filenames under Linux
  5. In-Reply-To: mph@plasma.apana.org.au's message of Sat, 26 Dec 1992 02:02:22 GMT
  6. Message-ID: <JRS.92Dec26002111@lepton.world.std.com>
  7. Sender: jrs@world.std.com (Rick Sladkey)
  8. Organization: The Internet
  9. References: <9235714.11059@mulga.cs.mu.OZ.AU>
  10.             <1992Dec26.020222.349@plasma.apana.org.au>
  11. Date: Sat, 26 Dec 1992 05:21:11 GMT
  12. Lines: 80
  13.  
  14. >>>>> On Sat, 26 Dec 1992 02:02:22 GMT, mph@plasma.apana.org.au
  15. >>>>> (Martin Peter Howell) said:
  16.  
  17. Martin> Has anyone tried recompiling the minix fs with, say, 40
  18. Martin> character filenames, is this just a matter of changing a
  19. Martin> #define?  Since I am about to install a new linux system on my
  20. Martin> second machine and dont care about the backward compatibility,
  21. Martin> I would love to do this and still maintain the performance
  22. Martin> benefits of the minix fs over the extfs.
  23.  
  24. Better not to mess with the minix file system.  If you really want to
  25. do this, here is a procedure.  This is just a skeleton, I might
  26. have forgotten something.
  27.  
  28. First create a directory and a new filesystem type called say "linux"
  29. based on the minix one.  You can do this as follows:
  30.  
  31. $ cd /usr/src/linux/fs
  32. $ mkdir linux
  33. $ cd minix
  34. $ for i in Makefile *.c
  35. > do
  36. >    sed -e 's/MINIX/LINUX/g' -e 's/minix/linux/g' $i >../linux/$i
  37. > done
  38. $
  39.  
  40. Then do the same thing for the include files:
  41.  
  42. $ cd /usr/src/linux/include
  43. $ for i in fs.h fs_i.h fs_sb.h
  44. > do
  45. >    sed -e 's/MINIX/LINUX/g' -e 's/minix/linux/g' minix_$i >linux_$i
  46. > done
  47. $
  48.  
  49. Now edit /usr/src/include/linux/fs.h and add entries for "linux" just
  50. like you see for "minix".  Search for minix and you will get the idea.
  51.  
  52. Then add the "linux" filesystem type to the superblock table in
  53. /usr/src/linux/fs/filesystems.c.  Again, you should be able to figure
  54. out what to do by looking at the other filesystems there.
  55.  
  56. Then add the "linux" subdirectory to the /usr/src/linux/fs/Makefile.
  57.  
  58. Finally add an entry into /usr/src/linux/config.in for the new
  59. filesystem type and rerun make config.
  60.  
  61. After rebuilding the kernel, you will have a new filesystem that is
  62. called "linux" but behaves exactly like the "minix" one does.
  63.  
  64. Now go ahead and make the change you are proposing.  Edit
  65. /usr/src/linux/include/linux/linux_fs.h and change the define of
  66. LINUX_NAME_LEN from 14 to 30, 62, 126, 254, 510 or 1022.  I recommend
  67. 30.  You will pay for it if you make it too large.  Also change the
  68. filesystem magic number so you don't get any accidents with similar
  69. filesystem types.
  70.  
  71. Rebuild the kernel again and you have a new filesystem type that is
  72. much like the minix one but allows filenames to be up to 30 characters
  73. in length.
  74.  
  75. Now you have to create a new mkfs and fsck for the filesystem type of
  76. "linux".  Get system-0.97.tar.Z (or whatever) and perform the sed
  77. trick to create mklfs.c from mkmfs.c and lfsck.c from mfsck.c.  There
  78. is a dependency on the number 16 in mkmfs.c.  Fix the lines that have
  79. the "\0\0\0" stuff in them and add 16 more "\0"s to each one.  Then
  80. search for the numbers 32 and 48 and change them to 2*32 and 3*32.
  81.  
  82. Now make mklfs.  You should be able to use mklfs to make a new
  83. filesystem on a partition.
  84.  
  85. Then you can mount it in the obvious way, "mount -t linux /dev/disk
  86. /mnt" and test that it works.  Do "ls -al" and make sure the "." and
  87. ".."  entries are OK.  Touch a file with a name longer that 14 chars.
  88. Untar an archive, etc.
  89.  
  90. You did say that you have a complete backup, didn't you?  I thought so.
  91. --
  92. Rick Sladkey
  93. jrs@world.std.com
  94.