Difference between revisions of "Fix ext2 magic"
|Line 11:||Line 11:|
Download [http://downloads../PlatformSupport/i386/ fix_ext2_magic ]
Revision as of 02:22, 11 September 2007
fix_ext2_magic is a tool which corrects the LinkStation file system magic number.
In order to thwart hacking the LinkStation Buffalo decided to fiddle with the identifier (magic number) which identify the type of the file system on the hard disk partitions. Of course that didn't really thwart hacking :-), but creates a useless minor annoyance when someone wants to access the data on an LS hard drive on a normal Linux system.
The LS uses the common Linux file system ext2. However Buffalo swapped the bytes of the magic number. The file system driver on the LinkStation has been altered by Buffalo to deal with the mangled magic number, while of course this hasn't happen on normal Linux Systems. So when someone tries to connect the hard disk to a normal Linux system a normal Linux can't identify the file system and can't mount it.
This is where fix_ext2_magic comes into play. It replaces the magic number of a partition to the correct ext2 value. After this had been done, the partition can be mounted normally on any Linux system.
After unpacking the tool is run by specifying the partition which should be fixed:
./fix_ext2_magic --fix /dev/hd=
Where = stands for the partition which should be fixed. For example, a1 or a4.
NOTE: The exact partition to fix depends on how the drive is physically connected (to which IDE controller). Do not just use the partitions as given in the example. You are supposed to know what you are doing before running fix_ext2_magic.