* RE: [PATCH] (revised slightly) create kernel symlinksin /boot
@ 2005-01-21 19:47 Ian Pratt
2005-01-21 20:19 ` Christian Limpach
0 siblings, 1 reply; 7+ messages in thread
From: Ian Pratt @ 2005-01-21 19:47 UTC (permalink / raw)
To: Paul Larson, Adam Heath; +Cc: xen-devel
> > 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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] (revised slightly) create kernel symlinksin /boot
2005-01-21 19:47 [PATCH] (revised slightly) create kernel symlinksin /boot Ian Pratt
@ 2005-01-21 20:19 ` Christian Limpach
2005-01-21 20:41 ` Paul Larson
0 siblings, 1 reply; 7+ messages in thread
From: Christian Limpach @ 2005-01-21 20:19 UTC (permalink / raw)
To: Ian Pratt; +Cc: Paul Larson, Adam Heath, xen-devel
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] (revised slightly) create kernel symlinksin /boot
2005-01-21 20:19 ` Christian Limpach
@ 2005-01-21 20:41 ` Paul Larson
2005-01-21 21:20 ` Christian Limpach
0 siblings, 1 reply; 7+ messages in thread
From: Paul Larson @ 2005-01-21 20:41 UTC (permalink / raw)
To: Christian Limpach; +Cc: Ian Pratt, Adam Heath, xen-devel
[-- Attachment #1: Type: text/plain, Size: 1079 bytes --]
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
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] (revised slightly) create kernel symlinksin /boot
2005-01-21 20:41 ` Paul Larson
@ 2005-01-21 21:20 ` Christian Limpach
2005-01-21 21:29 ` Paul Larson
2005-01-24 23:06 ` Paul Larson
0 siblings, 2 replies; 7+ messages in thread
From: Christian Limpach @ 2005-01-21 21:20 UTC (permalink / raw)
To: Paul Larson; +Cc: Ian Pratt, Adam Heath, xen-devel
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [PATCH] (revised slightly) create kernel symlinksin /boot
@ 2005-01-21 21:26 Ian Pratt
0 siblings, 0 replies; 7+ messages in thread
From: Ian Pratt @ 2005-01-21 21:26 UTC (permalink / raw)
To: Christian Limpach; +Cc: Paul Larson, Adam Heath, xen-devel
> 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.
OK, that makes sense, e.g.:
ln -sf `(cd ${src}/boot; echo vmlinuz-2.6.*-xen0)` vmlinuz-2.6-xen0
ln -sf vmlinuz-2.6-xen0 vmlinuz-xen0
We should do something similar with the xen version numbers too.
etc.
Personally, I'd quite like to also have a separate make target that
creates the links in the dist/install/boot directory as it would avoid
me having to keep editing my domain config scripts all the time...
Ian
-------------------------------------------------------
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] (revised slightly) create kernel symlinksin /boot
2005-01-21 21:20 ` Christian Limpach
@ 2005-01-21 21:29 ` Paul Larson
2005-01-24 23:06 ` Paul Larson
1 sibling, 0 replies; 7+ messages in thread
From: Paul Larson @ 2005-01-21 21:29 UTC (permalink / raw)
To: Christian Limpach; +Cc: Ian Pratt, Adam Heath, xen-devel
[-- Attachment #1: Type: text/plain, Size: 912 bytes --]
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
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] (revised slightly) create kernel symlinksin /boot
2005-01-21 21:20 ` Christian Limpach
2005-01-21 21:29 ` Paul Larson
@ 2005-01-24 23:06 ` Paul Larson
1 sibling, 0 replies; 7+ messages in thread
From: Paul Larson @ 2005-01-24 23:06 UTC (permalink / raw)
To: Christian Limpach; +Cc: Ian Pratt, xen-devel
[-- Attachment #1: Type: text/plain, Size: 1235 bytes --]
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."
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2005-01-24 23:06 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-21 19:47 [PATCH] (revised slightly) create kernel symlinksin /boot Ian Pratt
2005-01-21 20:19 ` Christian Limpach
2005-01-21 20:41 ` Paul Larson
2005-01-21 21:20 ` Christian Limpach
2005-01-21 21:29 ` Paul Larson
2005-01-24 23:06 ` Paul Larson
-- strict thread matches above, loose matches on Subject: below --
2005-01-21 21:26 Ian Pratt
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.