Ian Pratt
2005-Jan-21 19:47 UTC
RE: [Xen-devel] [PATCH] (revised slightly) create kernel symlinksin /boot
> > bzzt. What if /boot and $(INSTALL_DIR)/boot are different > partitions? > Oops, forgot to change that, fixed. Needless to say, most of my boxes > have a pretty flat filesystem :)What''s wrong with: ln -s vmlinuz-$(FULLVERSION) $(INSTALL_DIR)/boot/vmlinuz-$(EXTRAVERSION) In any event, wouldn''t it be better to have a link from e.g. vmlinux-2.6-xen0 -> vmlinuz-2.6.10-xen0 etc? Am I missing the point of what you''re proposing? Ian> -- > Thanks, > Paul Larson > plars@linuxtestproject.org > http://www.linuxtestproject.org > > diff -Nru a/buildconfigs/mk.linux-2.6-xen0 > b/buildconfigs/mk.linux-2.6-xen0 > --- a/buildconfigs/mk.linux-2.6-xen0 2005-01-21 10:54:17 -06:00 > +++ b/buildconfigs/mk.linux-2.6-xen0 2005-01-21 10:54:17 -06:00 > @@ -18,6 +18,8 @@ > $(MAKE) -C $(LINUX_DIR) ARCH=xen > INSTALL_MOD_PATH=$(INSTALL_DIR) > modules_install ; \ > fi > $(MAKE) -C $(LINUX_DIR) ARCH=xen > INSTALL_PATH=$(INSTALL_DIR) install > + ln $(INSTALL_DIR)/boot/vmlinuz-$(FULLVERSION) \ > + $(INSTALL_DIR)/boot/vmlinuz-$(EXTRAVERSION) > > $(LINUX_DIR)/include/linux/autoconf.h: pristine-linux-$(LINUX_VER) > rm -rf $(LINUX_DIR) > diff -Nru a/buildconfigs/mk.linux-2.6-xenU > b/buildconfigs/mk.linux-2.6-xenU > --- a/buildconfigs/mk.linux-2.6-xenU 2005-01-21 10:54:17 -06:00 > +++ b/buildconfigs/mk.linux-2.6-xenU 2005-01-21 10:54:17 -06:00 > @@ -18,6 +18,8 @@ > $(MAKE) -C $(LINUX_DIR) ARCH=xen > INSTALL_MOD_PATH=$(INSTALL_DIR) > modules_install ; \ > fi > $(MAKE) -C $(LINUX_DIR) ARCH=xen > INSTALL_PATH=$(INSTALL_DIR) install > + ln $(INSTALL_DIR)/boot/vmlinuz-$(FULLVERSION) \ > + $(INSTALL_DIR)/boot/vmlinuz-$(EXTRAVERSION) > > $(LINUX_DIR)/include/linux/autoconf.h: pristine-linux-$(LINUX_VER) > rm -rf $(LINUX_DIR) > >------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
Christian Limpach
2005-Jan-21 20:19 UTC
Re: [Xen-devel] [PATCH] (revised slightly) create kernel symlinksin /boot
On Fri, Jan 21, 2005 at 07:47:08PM -0000, Ian Pratt wrote:> > > > bzzt. What if /boot and $(INSTALL_DIR)/boot are different > > partitions? > > Oops, forgot to change that, fixed. Needless to say, most of my boxes > > have a pretty flat filesystem :) > > What''s wrong with: > ln -s vmlinuz-$(FULLVERSION) $(INSTALL_DIR)/boot/vmlinuz-$(EXTRAVERSION) > > In any event, wouldn''t it be better to have a link from e.g. > > vmlinux-2.6-xen0 -> vmlinuz-2.6.10-xen0 etc? > > Am I missing the point of what you''re proposing?I think we shouldn''t have a link at all, ideally a distribution''s package installer will create the links which work with the distribution''s bootloader configuration/setup. Also all the ln -s solutions fail if you build twice, you''d need at least ln -fs. If we must have a link, then I think it should be created as part of install.sh since that at least is less likely to get run when building packages. christian ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
Paul Larson
2005-Jan-21 20:41 UTC
Re: [Xen-devel] [PATCH] (revised slightly) create kernel symlinksin /boot
On Fri, 2005-01-21 at 20:19 +0000, Christian Limpach wrote:> I think we shouldn''t have a link at all, ideally a distribution''s package > installer will create the links which work with the distribution''s > bootloader configuration/setup.The problem for me right now, is that the kernel doesn''t have a predictable name when you are rebuilding it automatically. So when you do a ''make world install'' and the new kernel gets installed, then you might actually be on a newer kernel version and your grub entry is now invalid.> Also all the ln -s solutions fail if you build twice, you''d need at least > ln -fs.Good idea.> If we must have a link, then I think it should be created as part of > install.sh since that at least is less likely to get run when building > packages.It certainly would be preferable to do it there, but unfortunately install.sh doesn''t retain any knowledge of what kernel just got built. All it does is copy the directory contents across. -- Thanks, Paul Larson plars@linuxtestproject.org http://www.linuxtestproject.org
Christian Limpach
2005-Jan-21 21:20 UTC
Re: [Xen-devel] [PATCH] (revised slightly) create kernel symlinksin /boot
On Fri, Jan 21, 2005 at 02:41:29PM -0600, Paul Larson wrote:> On Fri, 2005-01-21 at 20:19 +0000, Christian Limpach wrote: > > I think we shouldn''t have a link at all, ideally a distribution''s package > > installer will create the links which work with the distribution''s > > bootloader configuration/setup. > The problem for me right now, is that the kernel doesn''t have a > predictable name when you are rebuilding it automatically. So when you > do a ''make world install'' and the new kernel gets installed, then you > might actually be on a newer kernel version and your grub entry is now > invalid.Yes, but we don''t change kernel versions that often and it''s easy to fix this from grub''s boot prompt should the old kernel no longer boot.> > If we must have a link, then I think it should be created as part of > > install.sh since that at least is less likely to get run when building > > packages. > It certainly would be preferable to do it there, but unfortunately > install.sh doesn''t retain any knowledge of what kernel just got built. > All it does is copy the directory contents across.you can find the last vmlinuz-2.6.*-xen0 installed with a command like this: ls -t dist/install/boot/vmlinuz-2.6.*-xen0 | head -1 How about adding this to install.sh: (run in dist/install/boot) (echo ''2.6.*'' -2.6; echo ''2.4.*'' -2.4) | while read m v do l=$(eval ls -t vmlinuz-$m-xen0 2>/dev/null | head -1) [ -e "$l" ] && ln -fs "$l" vmlinuz${v}-xen0 done You can even add another echo ''2.*.*'' '''' if you want to get a link vmlinuz-xen0 pointing to the last xen0 (2.4 or 2.6) installed, but I think that''s not a good idea because it can have very unexpected behaviour. christian ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
Paul Larson
2005-Jan-21 21:29 UTC
Re: [Xen-devel] [PATCH] (revised slightly) create kernel symlinksin /boot
On Fri, 2005-01-21 at 21:20 +0000, Christian Limpach wrote:> Yes, but we don''t change kernel versions that often and it''s easy to > fix this from grub''s boot prompt should the old kernel no longer boot.But by then, it''s already failed, possibly in a very confusing way.> How about adding this to install.sh: > (run in dist/install/boot) > (echo ''2.6.*'' -2.6; echo ''2.4.*'' -2.4) | while read m v > do > l=$(eval ls -t vmlinuz-$m-xen0 2>/dev/null | head -1)only nitpick here is -n1 for head (some versions of head are picky about that now) Otherwise that works for me. The reason I''m looking for something like this, is so that I can set up automated testing of xen nightly tarballs. This would greatly simplify things, as well as help prevent others from getting bit by the kernel upgrade thing. -- Thanks, Paul Larson plars@linuxtestproject.org http://www.linuxtestproject.org
Paul Larson
2005-Jan-24 23:06 UTC
Re: [Xen-devel] [PATCH] (revised slightly) create kernel symlinksin /boot
From rom all the latest comments, I think this should satisfy what everyone wants. This was from Christian''s last suggestion as to how to do it in install.sh, with the head flag fixed, and I did opt to create vmlinuz-xen{0|U} generic links because those are very handy when trying to completely automate testing. I also kept the versions specific links for those who want to know for certain that they are getting a latest 2.4 or 2.6 specifically. Ian, did you specifically need a make target that does this though, or is install.sh sufficient since it will work when you do make install? Thanks, Paul Larson Signed-off-by: pl@us.ibm.com diff -Nru a/install.sh b/install.sh --- a/install.sh 2005-01-24 16:55:01 -06:00 +++ b/install.sh 2005-01-24 16:55:01 -06:00 @@ -23,6 +23,15 @@ fi echo "Installing Xen from ''$src'' to ''$dst''..." +cd $src/boot +(echo ''2.6.*'' -2.6; echo ''2.4.*'' -2.4; echo ''2.*.*'' '''') | while read m v +do + l=$(eval ls -t vmlinuz-$m-xen0 2>/dev/null | head -n 1) + [ -e "$l" ] && ln -fs "$l" vmlinuz${v}-xen0 + l=$(eval ls -t vmlinuz-$m-xenU 2>/dev/null | head -n 1) + [ -e "$l" ] && ln -fs "$l" vmlinuz${v}-xenU +done +cd - cp -fdR $src/* $dst echo "All done."