LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How do you read from & write to the bootloader inode of an ext2 filesystem? (https://www.linuxquestions.org/questions/linux-software-2/how-do-you-read-from-and-write-to-the-bootloader-inode-of-an-ext2-filesystem-4175514130/)

madanra 08-10-2014 05:44 AM

How do you read from & write to the bootloader inode of an ext2 filesystem?
 
ext2 has a number of reserved inodes, such as inode 2 being the root directory. Inode 5 is reserved for a bootloader. AFAIK Linux doesn't actually use this, but I would like to know how you read from & write to that inode.

jefro 08-11-2014 02:36 PM

"5.3.5. EXT2_IMMUTABLE_FL - Immutable File

The blocks associated with the file will not be exchanged. If for any reason a file system defragmentation is launched, such files will not be moved. Mostly used for stage2 and stage1.5 boot loaders. "

So, writing a stage loader to it would write to it.

Also I'd assume the location is always a few bytes off partition edge. That area I forget exactly.

jefro 08-11-2014 02:38 PM

Some info http://uranus.chrysocome.net/explore2fs/es2fs.htm

So, writing a stage loader to it would write to it.

Also I'd assume the location is always a few bytes off partition edge. That area I forget exactly.


All times are GMT -5. The time now is 05:36 PM.