Deployment and usage of unsquashfs

Source: Internet
Author: User

Scenario Description: When customizing the root file system, we can try to use the file system provided by liveos under livecd, modify the file system, and then repackage it to create a startup system. Deploying such a file system environment is very useful.

1) create a shared folder with the virtual machine to facilitate the use of the dial. Of course, the premise is required by vmvare tool !!

2) The space is no less than $ GB. The squashfs. imgfile is 600 mb. After decompression, the space is 1500 MB, and the package environment is required.

3) Create the squashfs-root folder and decompress it with unsquashfs.


Unsquashfs-D (specify the path of the decompressed squashfs-root folder)
-F (specify the full path of squashfs. IMG)

 

Attach the CD first, specify the decompressed path to squashfs-root, and specify the squashfs. imgfile directory.

 

4)

Decompress the squashfs. imgfile and obtain a squashfs-root file.
Files in the squashfs-root directory
Ext3fs. imgfile

Mount-o loop, RW ext3fs. img/mnt/livecd-root/

Now we can go to the livecd-root directory and see the file system of the five dirty directories,

5) switch the root file system in the current console and use chroot. This is a way to view the current directory as the root file system. We can directly operate on it, the trace is to directly change the file system, not the host.

Switch to the current directory on the current console as the root file system

 

At this time, the use of chkconfig, rpm, and so on is definitely far-reaching, but the existence of a virtual shadow is not damaged.

 

6) repackaging is a good idea:

Mksquashfs squashfs-root/squashfs. img

7)

8) replace the original file so that it is marked with its own brand

9) re-create an IOS image

Instructions for creating a CD image are as follows:
Go to the current directory of the CD file:
[[Email protected] ISO] # ls
EFI file GPL isolinux liveos
[[Email protected] ISO] # mkisofs-r-t-J-l-v 'ora ora '-O/mnt/HGFS/D/CD/Fedora. iso-B isolinux/isolinux. bin-C isolinux/boot. cat-no-emul-boot-load-size 4-boot-Info-table./

-O is the file path of ISO output specified by output.
-V is the volume ID of the disk specified by set volume ID (it must be consistent with the root Suffix in syslinux. cfg)
-B is the boot image file, which specifies the boot image file required when the disc is ready for boot.

 

 

 

 

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.