In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
The main content of this article is to explain "what is the method of decompressing and extracting the physical partition of the corresponding file in Fedora 5.0", interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Next let the editor to take you to learn "Fedora 5.0decompression and extraction of the corresponding file physical partition method is what" bar!
The Fedora 5.0installation runs in a physical partition
Download the basic system of Fedora 5.0.Please go to: http://jailtime.org
2 decompress and extract the corresponding files
We download the Fedora 5.0basic system and store it in the / opt/Fedora 5.0vm directory; then extract it
[root@localhost ~] # mkdir / opt/Fedora 5.0vm [root@localhost ~] # mv Fedora 5.0.fc5.20060401.img.tgz / opt/Fedora 5.0vm [root@localhost ~] # cd / opt/Fedora 5.0vm [root@localhost Fedora 5.0vm] # tar zxvf Fedora 5.0.fc5.20060401.img.tgz [root@localhost Fedora 5.0vm] # ls
Fedora 5.0.fc5.20060401.img.tgz Fedora 5.0.fc5.img Fedora 5.0.fc5.xen.cfg Fedora 5.0.swap
3 plan the physical partition of the hard disk and create a file system
You can create a physical partition on your hard drive, or if a free physical partition is available. Then create a file system. The partitioning tool is fine with the fdisk tool. Partition tools, please refer to: "example to explain the use of fdisk" to create a file system, please refer to: "Linux to create a file system and mount file system process details" for example, we want to put Fedora 5.0 on / dev/hda5, we can use mkfs.ext3 to format / dev/hda5. [root@localhost] # / sbin/mkfs.ext3 / dev/hda5
4 to build the basic system of Fedora 5.0.
Because we have downloaded the image file of the basic system of Fedora Core 5, also do decompression. You will see the image file Fedora 5.0.fc5.img; we mount this image and copy its contents to the partition of the file system we just created, namely / dev/hda5
[root@localhost ~] # mkdir / mnt/tmp [root@localhost ~] # mkdir / mnt/Fedora 5.0 [root@localhost ~] # mount-o loop / opt/Fedora 5.0vm/Fedora 5.0.fc5.img / mnt/tmp [root@localhost ~] # mount / dev/hda5 / mnt/Fedora 5.0
Copy the contents of Fedora 5.0.fc5.img to / dev/hda5
[root@localhost ~] # cp-rp / mnt/tmp/* / mnt/Fedora 5.0[ root@localhost ~] # umount / mnt/tmp
Then chroot to the / mnt/Fedora 5.0directory, which is actually operating the Fedora 5.0system. We need to create the root password of Fedora 5.0s.
[root@localhost] # chroot / mnt/Fedora 5.0 / root@localhost:/# root@localhost:/# passwd root Changing password for user root. New UNIX password: Retype new UNIX password: passwd: all authentication tokens updated successfully. Root@localhost:/# exit
Then we uninstall the / dev/hda5 partition; [root@localhost ~] # umount / dev/hda5
5 create Fedora 5.0Boot File
When we unzip Fedora 5.0.fc5.20060401.img.tgz, we see a file Fedora 5.0.fc5.xen.cfg, which is the boot file of Fedora 5.0. other foreigners have written it for us. We'll just change it and use it; we'll go back to Fedora 5.0.fc5.xen.cfg 's storage directory / opt/Fedora 5.0vm; and copy the file named fc5vm.cfg in Fedora 5.0.fc5.xen.cfg. Then we use fc5vm.cfg as the boot file for the virtual Fedora 5.0
[root@localhost ~] # cd / opt/Fedora 5.0vm [root@localhost Fedora 5.0vm] # cp Fedora 5.0.fc5.xen.cfg fc5vm.cfg
We are going to make some changes to fc5vm.cfg; in fc5vm.cfg, we will see something like this:
Kernel = "/ boot/vmlinuz-2.6-xenU" memory = 128name = "Fedora 5.0.fc5" nics = 1 dhcp = "dhcp" disk = ['file:/xen/Fedora 5.0/Fedora 5.0.fc5.img root = "/ dev/sda1 ro"
First of all, let's take a look at the kernel line, which defines the virtual operating system kernel, and we need to use the kernel on which we installed xen. To find it in the virtual platform / boot directory. For example, I use Slackware virtual Fedora 5.0. The virtual platform is Slackware. I should try to find files with the words vmlinuz and xenU in the file name in / boot of Slackware. For example, what I'm looking for is:
[root@localhost] # ls-lh / boot/vmlinuz*xenU* lrwxrwxrwx 1 root root 21 2006-04-12 07:49 / boot/vmlinuz-2.6-xenU-> vmlinuz-2.6.12.6-xenU lrwxrwxrwx 1 root root 21 2006-04-12 07:49 / boot/vmlinuz-2.6.12-xenU-> vmlinuz-2.6.12.6-xenU-rw-r--r-- 1 root root 1.1m 2006-04-12 07:49 / boot/vmlinuz-2.6.12.6-xenU
We see three similar files, in fact only one, that is, vmlinuz-2.6.12.6-xenU, and the rest are his linked files. So when we specify the kernel in the kernel line, we can use any of these three; for example, we use vmlinuz-2.6-xenU
Memory is to specify the memory size, we set the virtual Fedora 5.0virtual memory size is 128m Fedora name is the definition of the virtual operating system name, can be displayed through the xm list, we also change to a simple point, to fc5nics=1 unchanged dhcp this line, is used to specify that the IP of the Fedora 5.0system is obtained through DHCP, but you can also specify IP. You don't have to do this.
Vif = ['mac=aa:00:00:00:00:11'] is used to specify the physical address of the network card of Fedora 5. 0; you can define it yourself. Ip = "192.168.1.144" the IPnetmask= "255.255.255.0" used to specify the virtual network card is used to specify the mask disk. This line is used to define the physical partition mapping point on which Fedora 5.0 is located, and the physical swap partition and mapping point; because the physical partition is specified through phy:.
So we have to change it. Because we have already put Fedora 5.0on / dev/hda5. By the way, where is the swap section? You can view the physical swap partition through swapon-s, which you want to see in the virtual platform; for example, what I get is that / dev/hda8 is the swap partition. So the disk line should say: disk = ['phy:hda5,sda1,w','phy:hda8,sda2,w']
However, the mapping points of real physical partitions, such as / dev/hda5 mapped to / dev/sda1, and swap partitions / dev/hda8 mapped to / dev/sda2. After mapping, the root file system of Fedora 5. 0 uses the mapped / dev/sda1. Slowly understand; the mapping point of the physical partition can be carried out within the permitted scope defined by the Linux system device.
Try to change the mapping point by yourself. If the mapping point of the physical partition where the root of Fedora 5.0is located changes, the value of the root= of Fedora 5.0will also change accordingly. Also change the / etc/fstab file on the Fedora 5.0system; the root line to specify all the virtual physical partitions (that is, mapping points) of Fedora 5.0s.
Where does it map to? Fedora 5.0is installed to / dev/hda5 and mapped to / dev/sda1. So look for / dev/sda1 as the file system when the Fedora 5.0system boots. So the root line can be written as: root = "/ dev/sda1 ro", so we can write the boot configuration file of Fedora 5.0.If you use DHCP to get IP:
Kernel = "/ boot/vmlinuz-2.6-xenU" memory = 128name = "fc5" nics = 1 vif = ['mac=aa:00:00:00:00:11'] dhcp = "dhcp" disk = [' phy:hda5,sda1,w','phy:hda8,sda2,w'] root = "/ dev/sda1 ro"
Second: if you specify IP:
Kernel = "/ boot/vmlinuz-2.6-xenU" memory = 128name = "fc5" nics = 1 vif = ['mac=aa:00:00:00:00:11'] disk = [' phy:hda5,sda1,w','phy:hda8,sda2,w'] root = "/ dev/sda1 ro" ip = "192.168.1.144" netmask= "255.255.255.0"
To cite another example:
For example, Fedora 5.0 is installed in the / dev/hda5 partition, and the physical swap partition is / dev/hda8. Get the IP through DHCP. I want to map / dev/hda5 to / dev/hda5 and I want to map / dev/hda8 to / dev/hda8. How should we modify some configuration files?
The contents of the boot file for Fedora 5.0should be:
Kernel = "/ boot/vmlinuz-2.6-xenU" memory = 128name = "fc5" nics = 1 vif = ['mac=aa:00:00:00:00:11'] dhcp = "dhcp" disk = [' phy:hda5,hda5,w','phy:hda8,hda8,w'] root = "/ dev/hda5 ro"
Then we should mount the / dev/hda5 partition with Fedora 5.0and then modify the / etc/fstab of the Fedora 5.0system. Note: you are not modifying the / etc/fstab of the virtual platform. Don't get mixed up! The partition where Fedora 5.0 is located should be mounted first: [root@localhost ~] # mount / dev/hda5 / mnt/Fedora 5.0 / and then modify the / etc/fstab file of Fedora 5.0, that is, the / mnt/Fedora 5.0/etc/fstab file: find the following two lines:
/ dev/sda1 / ext3 defaults 1 1 / dev/sda2 none swap sw 0 0 changed to: / dev/hda5 / ext3 defaults 1 1 / dev/hda8 none swap sw 0 and then umount / mnt/Fedora 5.0 [root@localhost ~] # umount / mnt/Fedora 5.0
6 Boot Fedora 5.0
It's easy to boot to run Fedora 5.0.Boot with the xm tool; first make sure where your Fedora 5.0configuration files are placed. For example, I put it in / opt/Fedora 5.0vm. And the file name is fc5vm.cfg. So I can boot Fedora 5.0in this way.
[root@localhost] # / usr/sbin/xm create-c / opt/Fedora 5.0vm/fc5vm.cfg
7 the treatment method that the network card of virtual operating system can not be activated
Modprobe: FATAL: Could not load / lib/modules/2.6.12.6-xenU/modules.dep: No such file or directory
If a phenomenon similar to the above occurs, please copy the 2.6.12.6-xenU under / lib/modues/ in the virtual platform to the Fedora 5.0system by mounting the physical partition where Fedora 5.0is located, and then using cp-rp to copy; first turn off Fedora 5.0and then copy
[root@localhost] # xm list Name ID Mem (MiB) VCPUs State Time (s) Domain-0 0 462 1 r-2192.9 fc5 2 128 1-Bhashi Murray-6.4
Based on the ID of the above virtual operating system, for example, if the ID of fc5 is 2, run the following command; [root@localhost ~] # xm destroy 2 and then mount mounts the physical partition / dev/hda5 where Fedora 5.0is located.
[root@localhost ~] # mount / dev/hda5 / mnt/Fedora 5.0 [root@localhost ~] # mkdir / mnt/Fedora 5.0/lib/modules
Note: create a modules in the / lib directory in Fedora 5. 0. If you have it, you won't create it.
[root@localhost] # cp-rp / lib/modules/2.6.12.6-xenU/ / mnt/Fedora 5.0/lib/modules/ [root@localhost ~] # chmod-R 755 / mnt/Fedora 5.0/lib/modules/ [root@localhost ~] # umount / mnt/Fedora 5.0 so far, I believe you have a better understanding of "what is the method of decompressing and extracting the physical partition of the corresponding file". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.