0

Today, in order to install CentOS 5.5 I'm using kickstart script.

I would like to install CentOS on different way:

  1. Create disk image (using dd command)
  2. Create filesystem on this disk image using mkfs.ext3
  3. Install CentOS on this filesystem
  4. Make this disk image bootable (using grub-install)
  5. Copy the disk image to the physical hard disk (using dd command)

I know to do all these items except 3. Is it possible to do it? If yes, how can I install CentOS on the disk image?

Dima
  • 485
  • 3
  • 7
  • 15

2 Answers2

1

CentOS uses several mounted filesystems. Typically /, /usr, /var, /home are each on different partitions. This complicates the idea of doing a normal CentOS install.

If you are after disk images, then your best bet is to install CentOS on a 'test' computer manually. Then use a disk-imaging bootdisk to create images of each of the partitions in /etc/fstab.

Perhaps if you shared more information on what your are trying to accomplish, or why you think you need to install CentOS differently than it's designers had intended; then I could provide a better answer.

JeffG
  • 1,194
  • 6
  • 18
  • I'm implementing embedded device based on CentOS. I need to create image that will be copied later to the embedded device hard disk. It is not good for me to make manual installation on a 'test' device (or PC) because the installation is part of the embedded device SW package and it may be changed and SW creation process should be automatically – Dima Mar 15 '11 at 16:55
  • Then you can use Anaconda Kickstart to create your install. – JeffG Mar 15 '11 at 17:03
  • But Kickstart will create an installation of the OS in the active hard disk, not on disk image – Dima Mar 21 '11 at 16:57
  • @Dima, That why you install on a test computer - then once the install is complete, you can make an image of the installed drive. – JeffG Mar 21 '11 at 18:29
  • Now I'm installing OS on test computer and making an image of the hard drive. But I'm looking for a way to do it directly: to install OS directly to the on the image. I need it because the OS installation is part of my embedded device and SW compilation and image creation process should be done automatically by script. As a result I cannot do it by installation on test computer. – Dima Mar 22 '11 at 10:57
0

the way to install Linux on CF card is described here: http://julian.coccia.com/article-37.html after the installation it is possible to create an image of the CF card

I'm still to looking a way to install Linux without using CF card

Dima
  • 485
  • 3
  • 7
  • 15