home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.linux
- Path: sparky!uunet!spool.mu.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!eff!world!jrs
- From: jrs@world.std.com (Rick Sladkey)
- Subject: Re: Short filenames under Linux
- In-Reply-To: mph@plasma.apana.org.au's message of Sat, 26 Dec 1992 02:02:22 GMT
- Message-ID: <JRS.92Dec26002111@lepton.world.std.com>
- Sender: jrs@world.std.com (Rick Sladkey)
- Organization: The Internet
- References: <9235714.11059@mulga.cs.mu.OZ.AU>
- <1992Dec26.020222.349@plasma.apana.org.au>
- Date: Sat, 26 Dec 1992 05:21:11 GMT
- Lines: 80
-
- >>>>> On Sat, 26 Dec 1992 02:02:22 GMT, mph@plasma.apana.org.au
- >>>>> (Martin Peter Howell) said:
-
- Martin> Has anyone tried recompiling the minix fs with, say, 40
- Martin> character filenames, is this just a matter of changing a
- Martin> #define? Since I am about to install a new linux system on my
- Martin> second machine and dont care about the backward compatibility,
- Martin> I would love to do this and still maintain the performance
- Martin> benefits of the minix fs over the extfs.
-
- Better not to mess with the minix file system. If you really want to
- do this, here is a procedure. This is just a skeleton, I might
- have forgotten something.
-
- First create a directory and a new filesystem type called say "linux"
- based on the minix one. You can do this as follows:
-
- $ cd /usr/src/linux/fs
- $ mkdir linux
- $ cd minix
- $ for i in Makefile *.c
- > do
- > sed -e 's/MINIX/LINUX/g' -e 's/minix/linux/g' $i >../linux/$i
- > done
- $
-
- Then do the same thing for the include files:
-
- $ cd /usr/src/linux/include
- $ for i in fs.h fs_i.h fs_sb.h
- > do
- > sed -e 's/MINIX/LINUX/g' -e 's/minix/linux/g' minix_$i >linux_$i
- > done
- $
-
- Now edit /usr/src/include/linux/fs.h and add entries for "linux" just
- like you see for "minix". Search for minix and you will get the idea.
-
- Then add the "linux" filesystem type to the superblock table in
- /usr/src/linux/fs/filesystems.c. Again, you should be able to figure
- out what to do by looking at the other filesystems there.
-
- Then add the "linux" subdirectory to the /usr/src/linux/fs/Makefile.
-
- Finally add an entry into /usr/src/linux/config.in for the new
- filesystem type and rerun make config.
-
- After rebuilding the kernel, you will have a new filesystem that is
- called "linux" but behaves exactly like the "minix" one does.
-
- Now go ahead and make the change you are proposing. Edit
- /usr/src/linux/include/linux/linux_fs.h and change the define of
- LINUX_NAME_LEN from 14 to 30, 62, 126, 254, 510 or 1022. I recommend
- 30. You will pay for it if you make it too large. Also change the
- filesystem magic number so you don't get any accidents with similar
- filesystem types.
-
- Rebuild the kernel again and you have a new filesystem type that is
- much like the minix one but allows filenames to be up to 30 characters
- in length.
-
- Now you have to create a new mkfs and fsck for the filesystem type of
- "linux". Get system-0.97.tar.Z (or whatever) and perform the sed
- trick to create mklfs.c from mkmfs.c and lfsck.c from mfsck.c. There
- is a dependency on the number 16 in mkmfs.c. Fix the lines that have
- the "\0\0\0" stuff in them and add 16 more "\0"s to each one. Then
- search for the numbers 32 and 48 and change them to 2*32 and 3*32.
-
- Now make mklfs. You should be able to use mklfs to make a new
- filesystem on a partition.
-
- Then you can mount it in the obvious way, "mount -t linux /dev/disk
- /mnt" and test that it works. Do "ls -al" and make sure the "." and
- ".." entries are OK. Touch a file with a name longer that 14 chars.
- Untar an archive, etc.
-
- You did say that you have a complete backup, didn't you? I thought so.
- --
- Rick Sladkey
- jrs@world.std.com
-