[arch-general] Building netboot images
Hi, I would like to create a (custom) netboot install image of archlinux to facilitate installation within our department. I have few queries regarding the corresponding mkinitcpio.conf. 1. How do I use custom hooks together with standard hooks *without* installing them in /lib/initcpio/install. Or in other words can I configure mkinitcpio to look for hooks in other locations besides the standard locations. There are two options that I can think of both of which looks ugly to me. * install custom hooks in the standard location /lib/initcpio/install. I would don't like this because I don't want to mess up the standard directory for testing these hooks. * copy all the hooks in the standard location to a new location. Install the custom hooks there as well and set the mkinitcpio to look at this new location. There does not seem to be an option for this, I might be stupid not to spot it, but appropriate fakeroot + chroot can make this work 2. I would like to have the minimal set of packages on the netboot image to reduce size. The actual installation will be from the local mirror of course but some packages are needed to start the process. What is the suggested package set ? Is the whole of base okey or is it an overkill? 3. How does one provide standard packages on the rootdir. I would assume the initial ramdisk should act as the actual root during the entire installation process (I don't want the NFS mounting mess). The algorithm seems like (1) install the appropriate packages via pacman --root /foo (2) get the entire subtree on to the initial ramdisk. For step 2, I would need to set BINARIES and FILES of mkinitcpio.conf appropriately. I would rather enjoy Vogon poetry. Is there a better way? Regards, ppk
On Mon, Mar 8, 2010 at 12:41 PM, Piyush P Kurur <ppk@cse.iitk.ac.in> wrote:
Hi,
I would like to create a (custom) netboot install image of archlinux to facilitate installation within our department. I have few queries regarding the corresponding mkinitcpio.conf.
1. How do I use custom hooks together with standard hooks *without* installing them in /lib/initcpio/install. Or in other words can I configure mkinitcpio to look for hooks in other locations besides the standard locations.
There are two options that I can think of both of which looks ugly to me.
* install custom hooks in the standard location /lib/initcpio/install. I would don't like this because I don't want to mess up the standard directory for testing these hooks.
* copy all the hooks in the standard location to a new location. Install the custom hooks there as well and set the mkinitcpio to look at this new location. There does not seem to be an option for this, I might be stupid not to spot it, but appropriate fakeroot + chroot can make this work
2. I would like to have the minimal set of packages on the netboot image to reduce size. The actual installation will be from the local mirror of course but some packages are needed to start the process. What is the suggested package set ? Is the whole of base okey or is it an overkill?
3. How does one provide standard packages on the rootdir. I would assume the initial ramdisk should act as the actual root during the entire installation process (I don't want the NFS mounting mess).
The algorithm seems like
(1) install the appropriate packages via pacman --root /foo
(2) get the entire subtree on to the initial ramdisk.
For step 2, I would need to set BINARIES and FILES of mkinitcpio.conf appropriately. I would rather enjoy Vogon poetry. Is there a better way?
Regards,
ppk
What I suggest is this - http://wiki.archlinux.org/index.php/Diskless_network_boot_NFS_root In the above step, use a statically compiled kernel with minimal requied drivers (including the FS which you plan to use) and put it on NFS root. Then once you've booted on the client machine. Then follow this - mkdir /tmp/foo mount <local-disk> /tmp/foo pacman -r /tmp/foo -S base You could also write a shell script which does this job. So just run it as root when you boot into the client machine. But for shell script one point needs to be made clear that the device names /dev/sdXY or /dev/hdXY must be same else you'll end up formatting some other disk. -- Nilesh Govindarajan Site & Server Administrator www.itech7.com
On Mon, Mar 08, 2010 at 07:32:18PM +0530, Nilesh Govindarajan wrote:
On Mon, Mar 8, 2010 at 12:41 PM, Piyush P Kurur <ppk@cse.iitk.ac.in> wrote:
What I suggest is this - http://wiki.archlinux.org/index.php/Diskless_network_boot_NFS_root
I saw the wiki. I am not looking for a diskless boot. We have here a pxelinux boot loader that allows people to select one of the distros that we mirror here and install it on their machine by just connecting to ethernet port here and enabling PXE boot. One of the images is that of arch. I definitely *do not* want the following (1) NFS mounts: I prefer to have all the stuff required for a netinstall in the initrd image. The actual packages will come from the local mirror. NFS is unnecessarily compilcated and would mean I have to also run an NFS server and cannot get away with a tftp server. (2) No custom kernel: I don't want a custom kernel. The standard kernel should be made to work. Besides I thought this is a good oppurtunity to hack a bit on image creation process. Best ppk
On Mon, Mar 8, 2010 at 10:06 PM, Piyush P Kurur <ppk> wrote:
On Mon, Mar 08, 2010 at 07:32:18PM +0530, Nilesh Govindarajan wrote:
On Mon, Mar 8, 2010 at 12:41 PM, Piyush P Kurur <ppk@cse.iitk.ac.in> wrote:
What I suggest is this - http://wiki.archlinux.org/index.php/Diskless_network_boot_NFS_root
I saw the wiki. I am not looking for a diskless boot. We have here a pxelinux boot loader that allows people to select one of the distros that we mirror here and install it on their machine by just connecting to ethernet port here and enabling PXE boot. One of the images is that of arch.
I definitely *do not* want the following
(1) NFS mounts: I prefer to have all the stuff required for a netinstall in the initrd image. The actual packages will come from the local mirror. NFS is unnecessarily compilcated and would mean I have to also run an NFS server and cannot get away with a tftp server.
(2) No custom kernel: I don't want a custom kernel. The standard kernel should be made to work.
Besides I thought this is a good oppurtunity to hack a bit on image creation process.
Best
ppk
So you want to do a templated installation something like that of kickstart availalbe in Fedora, Redhat and CentOS. It is possible using Arch Installation Framework but it is under development and not meant for use in production. I have a small idea but I don't know if it will work or not. If it works, it will be something great. You have to hack mkinitcpio but in a different manner. Add pacman.conf, mirrorlist (with your local LAN mirror on the top, if you have one), a static version of pacman into an mkinitcpio image using a kernel which will be used for netbooting. Then in the sysinit, after adding the devices by udev, and network config, run the pacman commands to install the OS via FTP mirror which will preferrably use your LAN mirror. Once you've prepared the basic kernel and the initrd, boot using PXE, and let syslinux (or whatever PXE loader you're using) load our custom initrd and kernel from TFTP server. When this runs on the client machine, then pacman will execute the install commands. -- Nilesh Govindarajan Site & Server Administrator www.itech7.com
On Mon, 8 Mar 2010 22:33:16 +0530 Nilesh Govindarajan <lists@itech7.com> wrote:
So you want to do a templated installation something like that of kickstart availalbe in Fedora, Redhat and CentOS.
It is possible using Arch Installation Framework but it is under development and not meant for use in production.
aif is the installation software which is pretty stable and has officially replaced the old /arch/setup and /arch/quickinst scripts since august last year. (it also supports automated installations) it has however nothing to do with the actual creation of images. we (arch-releng) use the archiso tool to do that, there's also the unofficial archboot scripts which are meant for creation of lightweight, early-userspace-only images. Dieter
On Mon, Mar 8, 2010 at 10:42 PM, Dieter Plaetinck <dieter@plaetinck.be> wrote:
On Mon, 8 Mar 2010 22:33:16 +0530 Nilesh Govindarajan <lists@itech7.com> wrote:
So you want to do a templated installation something like that of kickstart availalbe in Fedora, Redhat and CentOS.
It is possible using Arch Installation Framework but it is under development and not meant for use in production.
aif is the installation software which is pretty stable and has officially replaced the old /arch/setup and /arch/quickinst scripts since august last year. (it also supports automated installations)
it has however nothing to do with the actual creation of images. we (arch-releng) use the archiso tool to do that, there's also the unofficial archboot scripts which are meant for creation of lightweight, early-userspace-only images.
Dieter
Okay. I read about AIF in the forum (Google search), so was unsure about its stability. Isn't there any documentation about AIF ? -- Nilesh Govindarajan Site & Server Administrator www.itech7.com
On Mon, 8 Mar 2010 23:07:07 +0530 Nilesh Govindarajan <lists@itech7.com> wrote:
On Mon, Mar 8, 2010 at 10:42 PM, Dieter Plaetinck <dieter@plaetinck.be> wrote:
On Mon, 8 Mar 2010 22:33:16 +0530 Nilesh Govindarajan <lists@itech7.com> wrote:
So you want to do a templated installation something like that of kickstart availalbe in Fedora, Redhat and CentOS.
It is possible using Arch Installation Framework but it is under development and not meant for use in production.
aif is the installation software which is pretty stable and has officially replaced the old /arch/setup and /arch/quickinst scripts since august last year. (it also supports automated installations)
it has however nothing to do with the actual creation of images. we (arch-releng) use the archiso tool to do that, there's also the unofficial archboot scripts which are meant for creation of lightweight, early-userspace-only images.
Dieter
Okay. I read about AIF in the forum (Google search), so was unsure about its stability. Isn't there any documentation about AIF ?
not as much as i would want, but: http://projects.archlinux.org/aif.git/tree/README in the repository there are also examples, (very brief) design notes, etc. and of course: http://wiki.archlinux.org/index.php/Official_Arch_Linux_Install_Guide Dieter
participants (4)
-
Dieter Plaetinck
-
Nilesh Govindarajan
-
Piyush P Kurur
-
Piyush P Kurur