* [PATCH] Support Fedora 13 initrd filenames
@ 2010-06-19 1:38 Pavel Roskin
2010-06-19 22:43 ` Vladimir 'φ-coder/phcoder' Serbinenko
0 siblings, 1 reply; 7+ messages in thread
From: Pavel Roskin @ 2010-06-19 1:38 UTC (permalink / raw)
To: grub-devel
Hello!
The initial ramdisk on Fedora 13 is called "initramfs-${version}.img"
unlike older versions of Fedora, which used "initrd-${version}.img"
The patch has been tested on Fedora 13.
ChangeLog:
* util/grub.d/10_linux.in: Add support for initrd images on Fedora 13.
--- util/grub.d/10_linux.in 2010-06-09 18:43:25 +0000
+++ util/grub.d/10_linux.in 2010-06-18 21:09:00 +0000
@@ -114,8 +114,9 @@
initrd=
for i in "initrd.img-${version}" "initrd-${version}.img" \
- "initrd-${version}" "initrd.img-${alt_version}" \
- "initrd-${alt_version}.img" "initrd-${alt_version}"; do
+ "initrd-${version}" "initramfs-${version}.img" \
+ "initrd.img-${alt_version}" "initrd-${alt_version}.img" \
+ "initrd-${alt_version}" "initramfs-${alt_version}.img"; do
if test -e "${dirname}/${i}" ; then
initrd="$i"
break
--
Regards,
Pavel Roskin
^ permalink raw reply [flat|nested] 7+ messages in thread[parent not found: <841040.37429.qm@web24906.mail.ird.yahoo.com>]
* Re: [PATCH] Support Fedora 13 initrd filenames
[not found] <841040.37429.qm@web24906.mail.ird.yahoo.com>
@ 2010-06-23 19:00 ` Piscium
2010-06-28 17:02 ` Colin Watson
0 siblings, 1 reply; 7+ messages in thread
From: Piscium @ 2010-06-23 19:00 UTC (permalink / raw)
To: grub-devel
[-- Attachment #1: Type: text/plain, Size: 2055 bytes --]
> ----- Forwarded Message ----
> From: Pavel Roskin <proski@gnu.org>
> To: grub-devel@gnu.org
> Sent: Sat, 19 June, 2010 2:38:26
> Subject: [PATCH] Support Fedora 13 initrd filenames
>
> Hello!
>
> The initial ramdisk on Fedora 13 is called "initramfs-${version}.img" unlike older versions of Fedora, which used "initrd-${version}.img"
>
> The patch has been tested on Fedora 13.
>
> ChangeLog:
>
> * util/grub.d/10_linux.in: Add support for initrd images on Fedora 13.
>
> --- util/grub.d/10_linux.in 2010-06-09 18:43:25 +0000
> +++ util/grub.d/10_linux.in 2010-06-18 21:09:00 +0000
> @@ -114,8 +114,9 @@
>
> initrd=
> for i in "initrd.img-${version}" "initrd-${version}.img" \
> - "initrd-${version}" "initrd.img-${alt_version}" \
> - "initrd-${alt_version}.img" "initrd-${alt_version}"; do
> + "initrd-${version}" "initramfs-${version}.img" \
> + "initrd.img-${alt_version}" "initrd-${alt_version}.img" \
> + "initrd-${alt_version}" "initramfs-${alt_version}.img"; do
> if test -e "${dirname}/${i}" ; then
> initrd="$i"
> break
>
>
>
> --Regards,
> Pavel Roskin
================
I applied the change detailed above on my PC running grub 1.98 and it
worked well.
It would be good also to boot Fedora partitions that lack Grub. In
order to do that (with initrd) I have modified 90fallback, a file from
os-prober v. 1.38. I am attaching the original file and a patch file.
My changes were few: I added one line, changed another and added one
comment line.
The modified 90fallback works well on my PC with Fedora 13, and I
expect it will work well with recent Fedora versions.
I am not sure where upstream for os-prober is. I downloaded 1.38 from
Debian Sid. So if this is not the right mailing list to propose
changes to os-prober, please let me know where I should go.
Note that there have been other requests for changes to this same
file. For example, see this:
https://bugs.launchpad.net/ubuntu/+source/os-prober/+bug/420900
[-- Attachment #2: 90fallback.orig --]
[-- Type: application/octet-stream, Size: 1586 bytes --]
#!/bin/sh
# Fallback in case nothing else works. Look for vmlinu[xz] file in root and
# /boot, see if there is a matching initrd, and wing it.
. /usr/share/os-prober/common.sh
set -e
partition="$1"
bootpart="$2"
mpoint="$3"
type="$4"
mappedpartition=$(mapdevfs "$partition" 2>/dev/null) || mappedpartition="$partition"
exitcode=1
for kernpat in /vmlinuz /vmlinux /boot/vmlinuz /boot/vmlinux "/boot/vmlinuz*" \
"/boot/vmlinux*" "/vmlinuz*" "/vmlinux*"; do
if echo "$kernpat" | grep -q boot/; then
kernbootpart="$bootpart"
else
kernbootpart="$partition"
fi
for kernfile in $(eval ls "$mpoint$kernpat" 2>/dev/null); do
kernbasefile=$(echo "$kernfile" | sed "s!^$mpoint!!")
if [ -f "$kernfile" ] && [ ! -L "$kernfile" ]; then
initrdname=$(echo "$kernfile" | sed "s/vmlinu[zx]/initrd\*/")
# Arch Linux names its initrds weirdly. We take
# some care here to avoid false positives on other
# systems, since kernel.img could conceivably be a
# kernel itself.
initrdname2=$(echo "$kernfile" | sed -n 's/vmlinu[zx]\([0-9][0-9]*\)/kernel\1/p' | sed 's/$/.img/')
foundinitrd=0
for initrd in $(eval ls "$initrdname" "$initrdname2" 2>/dev/null); do
if [ -f "$initrd" ] && [ ! -L "$initrd" ]; then
initrd=$(echo "$initrd" | sed "s!^$mpoint!!")
result "$partition:$kernbootpart::$kernbasefile:$initrd:root=$mappedpartition"
exitcode=0
foundinitrd=1
fi
done
if [ "$foundinitrd" = 0 ]; then
result "$partition:$kernbootpart::$kernbasefile::root=$mappedpartition"
exitcode=0
fi
fi
done
done
exit "$exitcode"
[-- Attachment #3: 90fallback.patch --]
[-- Type: text/x-patch, Size: 809 bytes --]
--- 90fallback.orig 2010-06-22 23:47:38.873379339 +0100
+++ 90fallback 2010-06-22 23:54:43.525745560 +0100
@@ -28,8 +28,10 @@
# systems, since kernel.img could conceivably be a
# kernel itself.
initrdname2=$(echo "$kernfile" | sed -n 's/vmlinu[zx]\([0-9][0-9]*\)/kernel\1/p' | sed 's/$/.img/')
+ # Handle Fedora partitions without Grub
+ initrdname3=$(echo "$kernfile" | sed "s/vmlinu[zx]/initramfs\*/" | sed 's/$/.img/')
foundinitrd=0
- for initrd in $(eval ls "$initrdname" "$initrdname2" 2>/dev/null); do
+ for initrd in $(eval ls "$initrdname" "$initrdname2" "$initrdname3" 2>/dev/null); do
if [ -f "$initrd" ] && [ ! -L "$initrd" ]; then
initrd=$(echo "$initrd" | sed "s!^$mpoint!!")
result "$partition:$kernbootpart::$kernbasefile:$initrd:root=$mappedpartition"
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] Support Fedora 13 initrd filenames
2010-06-23 19:00 ` Piscium
@ 2010-06-28 17:02 ` Colin Watson
2010-07-01 12:07 ` Piscium
0 siblings, 1 reply; 7+ messages in thread
From: Colin Watson @ 2010-06-28 17:02 UTC (permalink / raw)
To: The development of GNU GRUB
On Wed, Jun 23, 2010 at 08:00:27PM +0100, Piscium wrote:
> It would be good also to boot Fedora partitions that lack Grub. In
> order to do that (with initrd) I have modified 90fallback, a file from
> os-prober v. 1.38. I am attaching the original file and a patch file.
> My changes were few: I added one line, changed another and added one
> comment line.
I applied this to os-prober's revision control system today. Thanks!
> I am not sure where upstream for os-prober is. I downloaded 1.38 from
> Debian Sid. So if this is not the right mailing list to propose
> changes to os-prober, please let me know where I should go.
os-prober is maintained as part of the debian-installer project. Please
file bugs about it on the os-prober package in Debian.
> Note that there have been other requests for changes to this same
> file. For example, see this:
> https://bugs.launchpad.net/ubuntu/+source/os-prober/+bug/420900
I've arranged for that bug to be closed once this change reaches Ubuntu.
Regards,
--
Colin Watson [cjwatson@ubuntu.com]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Support Fedora 13 initrd filenames
2010-06-28 17:02 ` Colin Watson
@ 2010-07-01 12:07 ` Piscium
2010-07-01 12:39 ` Colin Watson
0 siblings, 1 reply; 7+ messages in thread
From: Piscium @ 2010-07-01 12:07 UTC (permalink / raw)
To: The development of GNU GRUB
On 28 June 2010 18:02, Colin Watson <cjwatson@ubuntu.com> wrote:
> On Wed, Jun 23, 2010 at 08:00:27PM +0100, Piscium wrote:
>> It would be good also to boot Fedora partitions that lack Grub. In
>> order to do that (with initrd) I have modified 90fallback, a file from
>> os-prober v. 1.38. I am attaching the original file and a patch file.
>> My changes were few: I added one line, changed another and added one
>> comment line.
>
> I applied this to os-prober's revision control system today. Thanks!
Thanks.
>> I am not sure where upstream for os-prober is. I downloaded 1.38 from
>> Debian Sid. So if this is not the right mailing list to propose
>> changes to os-prober, please let me know where I should go.
>
> os-prober is maintained as part of the debian-installer project. Please
> file bugs about it on the os-prober package in Debian.
I was wondering, what is the status of os-prober vis–à–vis grub2? Is
it a required package or optional package? Is it considered part of
grub2 or is it an external package?
>
>> Note that there have been other requests for changes to this same
>> file. For example, see this:
>> https://bugs.launchpad.net/ubuntu/+source/os-prober/+bug/420900
>
> I've arranged for that bug to be closed once this change reaches Ubuntu.
>
> Regards,
>
> --
> Colin Watson [cjwatson@ubuntu.com]
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Support Fedora 13 initrd filenames
2010-07-01 12:07 ` Piscium
@ 2010-07-01 12:39 ` Colin Watson
0 siblings, 0 replies; 7+ messages in thread
From: Colin Watson @ 2010-07-01 12:39 UTC (permalink / raw)
To: grub-devel
On Thu, Jul 01, 2010 at 01:07:06PM +0100, Piscium wrote:
> On 28 June 2010 18:02, Colin Watson <cjwatson@ubuntu.com> wrote:
> > On Wed, Jun 23, 2010 at 08:00:27PM +0100, Piscium wrote:
> >> I am not sure where upstream for os-prober is. I downloaded 1.38 from
> >> Debian Sid. So if this is not the right mailing list to propose
> >> changes to os-prober, please let me know where I should go.
> >
> > os-prober is maintained as part of the debian-installer project. Please
> > file bugs about it on the os-prober package in Debian.
>
> I was wondering, what is the status of os-prober vis–à–vis grub2? Is
> it a required package or optional package? Is it considered part of
> grub2 or is it an external package?
It's an optional (though very useful) add-on. It is not part of GRUB;
it is part of the Debian installer project.
--
Colin Watson [cjwatson@ubuntu.com]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-07-01 12:39 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-19 1:38 [PATCH] Support Fedora 13 initrd filenames Pavel Roskin
2010-06-19 22:43 ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-06-26 19:33 ` Colin Watson
[not found] <841040.37429.qm@web24906.mail.ird.yahoo.com>
2010-06-23 19:00 ` Piscium
2010-06-28 17:02 ` Colin Watson
2010-07-01 12:07 ` Piscium
2010-07-01 12:39 ` Colin Watson
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.