OpenVZ Forum


Home » General » Support » *SOLVED* Create FC6 Template
Re: Create FC6 Template [message #11167 is a reply to message #11160] Wed, 14 March 2007 14:31 Go to previous messageGo to previous message
Alexandr Andreev is currently offline  Alexandr Andreev
Messages: 35
Registered: October 2006
Member
First of all, I forget to mention, that it's better to use runlevel 1 while making rootfs tar image. In the runlevel 1 all daemons are stopped and not so much processes are executed. This let us be sure, there are no any temporary files, such as lock's for example.

Startup from /bin/bash instead of /sbin/init is even better! In this case, your machine will be as 'clean' as possible. To start /bin/bash as initial process, do the followings:

1. reboot your host, add init=/bin/bash command line to the kernel (if you use grub, press 'e', 'e' again, add 'init=/bin/bash' to the command line, press 'b' to boot your image with this command line). With lilo just press 'TAB', type 'init=/bin/bash' and press ENTER.

2. When you boot your host, NO any process are executed at all, except /bin/bash and few kernel threads. /proc filesystem is also not mounted.

3. you have to remount your / partition read/write:
# mount -o rw,remount /

4. Now you can just use:
tar czf /rootfs.tgz --exclude /rootfs.tgz /

----------------------------------------------------

You may also just skip /proc directory when making tar image, so actual command will be in your case:

tar czf /rootfs.tgz --exclude "/rootfs.tgz" --exclude "/proc" /
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: *SOLVED* env_create error: Resource temporarily unavailable
Next Topic: *SOLVED* new kernel-smp-2.6.18-ovz028stab021.1.x86_64
Goto Forum:
  


Current Time: Wed Aug 07 15:58:57 GMT 2024

Total time taken to generate the page: 0.02834 seconds