Difference between revisions of "Fix ext2 magic"

From NAS-Central Buffalo - The Linkstation Wiki
Jump to: navigation, search
(download link error)
(Download)
Line 11: Line 11:
  
 
==Download==
 
==Download==
fix_ext2_magic can be downloaded from the download area:
 
 
* For Intel (x86) Linux:
 
* For PPC (to execute on the [[LS1]]/[[HG]] itself:
 
  
 
==Usage==
 
==Usage==

Revision as of 20:15, 2 April 2007

Nuvola apps important.png 
WARNING!

Ensure you only run the tool on the right partition(s) which really need to be fixed.


Background

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.

Download

Usage

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.