Mac McClellan
2009-Jan-06 17:08 UTC
[Xen-users] Mount CD ROM iso during kickstart postinstall
Mount CD ROM iso during kickstart postinstall CentOS 5.2 i386 I''m doing a xen virtual machine installation from a DVD iso image with a kickstart file to set network and run scripts and such in the postinstall section. During the installation the DVD iso is listed as device /tmp/cdrom and mounted on /mnt/source. Once the installation is done and the post install starts the /tmp/cdrom device is unmounted. Part of my kickstart is copying certain files from the DVD iso to the installed system but all attempts to re-mount the DVD fail. /tmp/cdrom is gone once the postinstall portion of the install starts. On a real machine I''ve been able to re-mount the DVD in the postinstall using /dev/cdrom or /dev/hdc but on this virtual machine it does not work. It complains of ''No medium found''. A listing of /dev during the post install shows a valid device of /dev/hdc but any attempts to mount it in the postinstall portion of kickstart results in ''No medium found''. After re-boot mounting the DVD iso image works with no problem using /dev/hdc I need some way of mounting the DVD iso image during the postinstall of the kickstart. My config is as follows: name = "yum" uuid = "82983ffc-36d6-7272-4ce8-143a516142a7" maxmem = 256 memory = 256 vcpus = 1 builder = "hvm" kernel = "/usr/lib/xen/boot/hvmloader" boot = "c" pae = 1 acpi = 1 apic = 1 localtime = 0 on_poweroff = "destroy" on_reboot = "destroy" on_crash = "restart" device_model = "/usr/lib/xen/bin/qemu-dm" sdl = 0 vnc = 1 vncunused = 1 disk = [ "file:/var/xen/images/yum.img,hda,w", "file:/var/xen/images/yum-cd-10.06.09.iso,hdc:cdrom,r" ] vif = [ "mac=00:16:3e:64:d3:aa,bridge=vnet1", "mac=00:16:3e:13:e3:a1,bridge=virbr0" ] serial = "pty" _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Todd Deshane
2009-Jan-06 17:47 UTC
Re: [Xen-users] Mount CD ROM iso during kickstart postinstall
On Tue, Jan 6, 2009 at 12:08 PM, Mac McClellan <mmcclellan@scires.com> wrote:> Mount CD ROM iso during kickstart postinstall > > CentOS 5.2 i386 > > I''m doing a xen virtual machine installation from a DVD iso image with a kickstart file to set network and run scripts and such in the postinstall section. > > During the installation the DVD iso is listed as device /tmp/cdrom and mounted on /mnt/source. Once the installation is done and the post install starts the /tmp/cdrom device is unmounted. > > Part of my kickstart is copying certain files from the DVD iso to the installed system but all attempts to re-mount the DVD fail. > > /tmp/cdrom is gone once the postinstall portion of the install starts. On a real machine I''ve been able to re-mount the DVD in the postinstall using /dev/cdrom or /dev/hdc but on this virtual machine it does not work. It complains of ''No medium found''. > > A listing of /dev during the post install shows a valid device of /dev/hdc but any attempts to mount it in the postinstall portion of kickstart results in ''No medium found''. >Could it simply be that a pause or sleep is needed for the iso to be "read in"? Any idea might be to try to manually detach and attach the disk devices with xm block-detach and xm block-attach. Hope that helps. Cheers, Todd -- Todd Deshane http://todddeshane.net http://runningxen.com _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Mac McClellan
2009-Jan-06 18:56 UTC
Re: [Xen-users] Mount CD ROM iso during kickstart postinstall
>>> "Todd Deshane" <deshantm@gmail.com> 01/06/09 12:47 PM >>>On Tue, Jan 6, 2009 at 12:08 PM, Mac McClellan <mmcclellan@scires.com> wrote:> Mount CD ROM iso during kickstart postinstall > > CentOS 5.2 i386 > > I''m doing a xen virtual machine installation from a DVD iso image with a kickstart file to set network and run scripts and such in the postinstall section. > > During the installation the DVD iso is listed as device /tmp/cdrom and mounted on /mnt/source. Once the installation is done and the post install starts the /tmp/cdrom device is unmounted. > > Part of my kickstart is copying certain files from the DVD iso to the installed system but all attempts to re-mount the DVD fail. > > /tmp/cdrom is gone once the postinstall portion of the install starts. On a real machine I''ve been able to re-mount the DVD in the postinstall using /dev/cdrom or /dev/hdc but on this virtual machine it does not work. It complains of ''No medium found''. > > A listing of /dev during the post install shows a valid device of /dev/hdc but any attempts to mount it in the postinstall portion of kickstart results in ''No medium found''. >Could it simply be that a pause or sleep is needed for the iso to be "read in"? Any idea might be to try to manually detach and attach the disk devices with xm block-detach and xm block-attach. =================== Sleep does not work. I had previously added a 5 minute sleep to the kickstart to allow me to poke around on a different terminal to discover what what is mounted and when. /dev/hdc gets unmounted right at the start of the post install. I tried xm block-attach on Dom-0 like this: xm block-attach yum /var/lib/xen/images/yum-cd-10.06.09.iso /dev/hdc r and got this error: Error: Device /dev/hdc (5632, vbd) is already connected. So it thinks that it is already attached but any attempt to mount it from within the Dom-U fails with a ''No medium found'' error To mount I''m using: # mount -t iso9660 /dev/hdc /mnt/sysimage/mnt/cdrom Any other ideas? Mac _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Reasonably Related Threads
- RFC: Add 'postinstall' hook to R CMD INSTALL ?
- 6314894 SUNWvolr postinstall egrep output should be send to /dev/null
- [Bug 1038] buildpkg.sh postinstall script does not install RC links using installroot and non-symlinks.
- samba-1.9.18p10 - Solaris 2.6, postinstall and postremove scripts
- RMagick Instant Rails install problem