Method and apparatus for repairing file system by initramfs
A file system and file system format technology, applied in the field of file system repair through initramfs, can solve the problems of file system damage, complicated operation, startup stuck, etc., and achieve the effect of highlighting substantive features, wide application prospects, and reliable design principles
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0054] like figure 1 As shown, a method for repairing a file system through initramfs includes the following steps:
[0055] S1: Recompile and generate initramfs and compile the file system repair tool into initramfs;
[0056] S2: Set the interrupt breakpoint for the newly compiled initramfs;
[0057] S3: Query the file system format of the root directory;
[0058] S4: Execute a file system repair instruction according to the file format of the partition system.
[0059] Before step S1 includes:
[0060] S0: Create a temporary folder under the system.
[0061] Step S1 includes:
[0062] S11: recompile initramfs, and install fsck.ext3, fsck.ext4, xfs_repair file system repair tools into initramfs;
[0063] S12: Put the compiled initramfs into the / boot directory.
[0064] like figure 2As shown, step S2 includes:
[0065] S21: Edit the grub parameters on the grub interface when the system starts;
[0066] S22: Add rdbreak=[breakpoint] in the kernel line;
[0067] S23...
Embodiment 2
[0073] A method for repairing a file system through initramfs, comprising the steps of:
[0074] S0: Create a temporary folder under the system:
[0075] # mkdir / test & cd / test
[0076] S1: Recompile initramfs, and install file system repair tools such as fsck.ext3, fsck.ext4, xfs_repair:
[0077] # dracut --install 'fsck.ext3 fsck.ext4 xfs_repair' initramfs-repairfs.img
[0078] Put the new initramfs into the / boot directory for backup:
[0079] # mv / test / initramfs-rapairfs.img / boot
[0080] S2: When you need to repair the file system in initramfs, start to the grub interface, press 'e' to modify, modify the kernel line, add a breakpoint of initramfs at the end of the line, and enter the breakpoint before the root directory of mount / sysroot:
[0081] rdbreak=mount
[0082] Modify the initrd line to boot from the / initramfs-rapairfs.img file, and press 'b' to boot into the initramfs system;
[0083] The stages of entering initramfs as a breakpoint include cmdline, p...
Embodiment 3
[0107] A device for repairing a file system through initramfs, including a compilation module, an interrupt setting module, a query module and an execution module;
[0108] The compilation module is used to recompile and generate initramfs and compile the file system repair tool into initramfs;
[0109] The interrupt setting module is used to set the interrupt breakpoint to enter the newly compiled initramfs;
[0110] The query module is used to query the file system format of the root directory;
[0111] The execution module is used for executing the repair instruction of the file system according to the file format of the partition system.
[0112] The system also includes a creating module, which is used to create a temporary folder under the system.
[0113] The steps are to recompile and generate initramfs and compile the file system repair tool into initramfs, including:
[0114] The compilation module is used to recompile the initramfs, and install the fsck.ext3, fsc...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com