8. Adding directory entries

Start up debugfs in read-write mode.

        # debugfs -w /dev/hdy1

Now you should add the deleted directories to the directory were they were located before deletion.

        debugfs: link <inode> directoryname

Where inode is the inode number and directoryname is the directoryname.

After you have added the links you will notice that the directories have popped up in the current directory. You can now list their contents (from debugfs).

But the size shown for each directory is zero and that need to be fixed, otherwise they will look empty with ls from the shell.

Get out of debugfs.

        debugfs: quit