new GRUB redesigned -- BETA

21 views
Skip to first unread message

Daniel Robbins

unread,
Nov 23, 2009, 1:26:42 AM11/23/09
to funto...@googlegroups.com
Hi All,

I've committed a new GRUB 2 ebuild -- grub-1.97.1-r2 -- to the tree, masked.

This ebuild has had some light testing by me and contains a rewrite of grub-mkconfig and a completely new very nice /etc/conf.d/grub config file.

The default config file looks like this:

grub {
features altboot osprobe
extensions *
parse header linux
timeout 10
default bzImage
}

display {
gfxmode 1440x900
font /boot/grub/unifont.pf2
}

default {
scan /boot
kernel bzImage[-v] kernel[-v] vmlinuz[-v] vmlinux[-v]
initrd initramfs[-v]
params video=vesafb
gfxmode 1440x900
}

altboot {
params += init=/bin/bash
}

"Funtoo Linux 64-bit" {
params += root=/dev/sda4
}

Some notes:

The config file format is completely new and exclusive to Funtoo. "features" altboot and osprobe are not implemented yet, so the "features altboot osprobe" line does nothing.

This default config above does show a working VESA FB boot config. unifont.pf2 *is* included and gets installed to /boot/grub/. It is 3MB currently and I'll look into shrinking it in the future. :)

Basic usage: The "default" section lists defaults for all boot entries. If an item is not defined in your own personal boot entry, it will inherit the default from the default section. You are then supposed to define what I am calling a literal section -- which is a section that doesn't have the name "grub", "display", "default" or "altboot". These are used to generate boot menu entries. As you can see, you can use double-quotes to include a detailed description of the section, which I recommend. You can append kernel parameters with "params += param1 param2" in your custom section. Unlike upstream GRUB2 and the prior Funtoo GRUB2, I am not auto-detecting your root filesystem to boot, so you must specify it manually with a params += /dev/sdxy.

The "kernel" parameter specifies search patterns for kernels. A menu entry will be found for each kernel found. To improve useability, you can also specify a single kernel with no wildcard -- then it will only find one kernel and you'll only get one menu entry. If you want to find "bzImage[-v]" but skip "bzImage-foo", you can specify:

"my os" {
kernel bzImage[-v] -bzImage-foo
}

The use of the minus sign works as in Portage USE variables, and can include wildcards.

For initrds, use the "initrd" option. For the initrd option, things work a bit differently from the kernel option. *All* matching initrds will be listed for each boot entry, since Linux supports multiple initramfs filesystems. So normally, in your custom boot menu, you will want just one initrd pattern specified, like the default of "initramfs[-v]"

Dual-boot can work this way:

"Funtoo Linux 64-bit" {
kernel bzImage64[-v]
params += root=/dev/sda3
}

"Funtoo Linux 32-bit" {
kernel bzImage32[-v]
params += root/dev/sda4
}

As usual, run grub-update to auto-generate your /boot/grub/grub.cfg file. Note that the rootfstype= auto-detection is still in place, but relies on a valid /etc/fstab (rather than /proc/mounts) to exist to identify the root filesystem type. So if you are installing from a LiveCD, ensure that /etc/fstab is set up in the chroot first, before running grub-update. It should then get it right the first time.

Before testing, I recommend backing up your existing /boot/grub/grub.cfg if it exists, then installing this new grub, then tweaking /etc/conf.d/grub, then running grub-update, and comparing the new grub.cfg to the prior version, looking for any issues.

Please post all feedback here and ONLY TEST THIS PACKAGE ON NON-PRODUCTION TEST MACHINES :)

I will work on better docs as the system moves closer to unstable. This should be sufficient for people to play with it and see how it works.

-Daniel

Rajat Vig

unread,
Nov 23, 2009, 9:08:23 AM11/23/09
to funto...@googlegroups.com
Works great for me.
Solves my /boot shared problem.

Awesome.

-Rajat


--

You received this message because you are subscribed to the Google Groups "Funtoo" group.
To post to this group, send email to funto...@googlegroups.com.
To unsubscribe from this group, send email to funtoo-dev+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/funtoo-dev?hl=.



Jochums Johannes

unread,
Nov 23, 2009, 5:11:12 PM11/23/09
to funto...@googlegroups.com
Hello all,

First off ... yes it works :D

How do you know if vesafb works for GRUB2 ... the font size for GRUB2
seems the same as before?
When booting it works (fonts are much smaller)

Whats the point of having to specify the root device for the kernel
when the grub-update script already knows what format type it uses
(rootfstype=ext3)?

Example of grub.cfg created without root set ...

"Funtoo Linux 64-bit" {
# params += root=/dev/sdd3
}


insmod ext2
set root=(hd3,1)
search --no-floppy --fs-uuid --set a24f7b37-038d-4528-8bd1-ce530621de49
linux /kernel-genkernel-x86_64-2.6.30-gentoo-r5 video=vesafb rootfstype=ext3

All the best,
Jochums Johannes (Infernoid)

Daniel Robbins

unread,
Nov 23, 2009, 5:18:25 PM11/23/09
to funto...@googlegroups.com
On Nov 23, 2009, at 3:11 PM, Jochums Johannes wrote:

> Hello all,
>
> First off ... yes it works :D

Great, glad to hear.

> How do you know if vesafb works for GRUB2 ... the font size for GRUB2
> seems the same as before?
> When booting it works (fonts are much smaller)

vesafb should be working for GRUB2 - for it to be enabled, you will need a valid "gfxmode" specified in the "display" section. You should get a higher-res GRUB2 menu using unifont.pf2.

> Whats the point of having to specify the root device for the kernel
> when the grub-update script already knows what format type it uses
> (rootfstype=ext3)?

Good point - I should make this behavior more consistent. Might be tricky.

Thanks for your feedback.

-Daniel

netcelli

unread,
Nov 24, 2009, 2:17:21 AM11/24/09
to Funtoo
Yesterday all works for me :) But this morning i get only kernel panic
with this msg: No init found. Try passing init .. even if I didn't
change anything :/

Daniel Robbins

unread,
Nov 24, 2009, 2:25:47 AM11/24/09
to funto...@googlegroups.com
That's weird. If you didn't run grub-update, nothing should have changed.

-Daniel

Erick Michau

unread,
Nov 24, 2009, 4:24:12 AM11/24/09
to funto...@googlegroups.com
1) Using =grub-1.97-r1, I had grub-mkconfig able to generate the following output:

pong ~ # grub-mkconfig 
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/conf.d/grub
#

### BEGIN /etc/grub.d/00_header ###
set timeout=10
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry "Funtoo Linux - /boot/kernel-genkernel-x86-2.6.32-rc7-git1 " {
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set 56e7d503-b084-49e9-8c76-1fcda47a717b
linux /kernel-genkernel-x86-2.6.32-rc7-git1 root=/dev/mapper/root rootfstype=ext4 ro 
initrd /initramfs-genkernel-x86-2.6.32-rc7-git1
}

menuentry "Funtoo Linux - /boot/kernel-genkernel-x86-2.6.32-rc7-git1 init=/bin/bash" {
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set 56e7d503-b084-49e9-8c76-1fcda47a717b
linux /kernel-genkernel-x86-2.6.32-rc7-git1 root=/dev/mapper/root rootfstype=ext4 ro  init=/bin/bash
initrd /initramfs-genkernel-x86-2.6.32-rc7-git1
}

menuentry "Funtoo Linux - /boot/kernel-genkernel-x86-2.6.32-rc6-git1 " {
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set 56e7d503-b084-49e9-8c76-1fcda47a717b
linux /kernel-genkernel-x86-2.6.32-rc6-git1 root=/dev/mapper/root rootfstype=ext4 ro 
initrd /initramfs-genkernel-x86-2.6.32-rc6-git1
}

menuentry "Funtoo Linux - /boot/kernel-genkernel-x86-2.6.32-rc6-git1 init=/bin/bash" {
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set 56e7d503-b084-49e9-8c76-1fcda47a717b
linux /kernel-genkernel-x86-2.6.32-rc6-git1 root=/dev/mapper/root rootfstype=ext4 ro  init=/bin/bash
initrd /initramfs-genkernel-x86-2.6.32-rc6-git1
}

menuentry "Funtoo Linux - /boot/kernel-genkernel-x86-2.6.32-rc6-git3 " {
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set 56e7d503-b084-49e9-8c76-1fcda47a717b
linux /kernel-genkernel-x86-2.6.32-rc6-git3 root=/dev/mapper/root rootfstype=ext4 ro 
initrd /initramfs-genkernel-x86-2.6.32-rc6-git3
}

menuentry "Funtoo Linux - /boot/kernel-genkernel-x86-2.6.32-rc6-git3 init=/bin/bash" {
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set 56e7d503-b084-49e9-8c76-1fcda47a717b
linux /kernel-genkernel-x86-2.6.32-rc6-git3 root=/dev/mapper/root rootfstype=ext4 ro  init=/bin/bash
initrd /initramfs-genkernel-x86-2.6.32-rc6-git3
}

menuentry "Funtoo Linux - /boot/kernel-genkernel-x86-2.6.32-rc6-git5 " {
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set 56e7d503-b084-49e9-8c76-1fcda47a717b
linux /kernel-genkernel-x86-2.6.32-rc6-git5 root=/dev/mapper/root rootfstype=ext4 ro 
initrd /initramfs-genkernel-x86-2.6.32-rc6-git5
}

menuentry "Funtoo Linux - /boot/kernel-genkernel-x86-2.6.32-rc6-git5 init=/bin/bash" {
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set 56e7d503-b084-49e9-8c76-1fcda47a717b
linux /kernel-genkernel-x86-2.6.32-rc6-git5 root=/dev/mapper/root rootfstype=ext4 ro  init=/bin/bash
initrd /initramfs-genkernel-x86-2.6.32-rc6-git5
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
pong ~ # 

Though this output does not detect my luks partition layout, it gives some output to work with.

2) Upgrading to =grub-1.97-r2 works fine for the merge but then, running grub-mkconfig gives me the following:

pong ~ # grub-mkconfig 
Traceback (most recent call last):
  File "/sbin/grub-mkconfig", line 5, in <module>
    if sys.argv[1] == "-o":
IndexError: list index out of range
pong ~ #

I did not get the time to investigate the matter yet as time is a rare resource for me but I just wanted to let you know.

I have not had a look at files such as /etc/conf.d/grub, I don't feel the need to use them (yet).

My current working grub.cfg file looks like that:
pong ~ # cat /boot/grub/grub.cfg 
set timeout=10

menuentry "Funtoo Linux - /boot/kernel-genkernel-x86-2.6.32-rc7-git1 " {
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set 56e7d503-b084-49e9-8c76-1fcda47a717b
linux /kernel-genkernel-x86-2.6.32-rc7-git1 root=/dev/ram0 real_root=/dev/mapper/root crypt_root=/dev/sda3 init=/linuxrc ramdisk=8192
initrd /initramfs-genkernel-x86-2.6.32-rc7-git1
}

pong ~ #

Finally I would say that in relation to my setup grub-1.97-r1 (especially grub-mkconfig) is closer to what I need rather than grub-1.97-r2 (especially grub-mkconfig).

But again, I'm only concerned about how to generate an adapted version of grub.cfg. The grub binaries work fine regardless the release version.

I hope it helps somehow

Thanks a lot for your time and work

Erick


ps: my layout 
pong ~ # cat /etc/fstab 
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/sda1 /boot ext2 defaults 1 2
/dev/mapper/swap none swap defaults 0 0
/dev/mapper/root / ext4 noatime 0 1
pong ~ #






 
I will work on better docs as the system moves closer to unstable. This should be sufficient for people to play with it and see how it works.

-Daniel

netcelli

unread,
Nov 24, 2009, 10:56:50 AM11/24/09
to Funtoo

I reinstalled grub 1 and all works :)

Daniel Robbins

unread,
Nov 24, 2009, 12:52:49 PM11/24/09
to funto...@googlegroups.com
On Nov 24, 2009, at 2:24 AM, Erick Michau wrote:

2) Upgrading to =grub-1.97-r2 works fine for the merge but then, running grub-mkconfig gives me the following:

pong ~ # grub-mkconfig 
Traceback (most recent call last):
  File "/sbin/grub-mkconfig", line 5, in <module>
    if sys.argv[1] == "-o":
IndexError: list index out of range
pong ~ #

Thanks for the bug report.

Yes, right now, grub-mkconfig is set up to be called only from grub-update with the "-o" option specified. This will be fixed in later versions. For now, specify the "-o outfile" options to grub-mkconfig and it will work.

Finally I would say that in relation to my setup grub-1.97-r1 (especially grub-mkconfig) is closer to what I need rather than grub-1.97-r2 (especially grub-mkconfig).

Was grub-mkconfig the only issue? I noticed you had a lot fewer kernels listed with the new -r2 version of GRUB.

Regards,

Daniel

Erick Michau

unread,
Nov 24, 2009, 1:46:43 PM11/24/09
to funto...@googlegroups.com
Yes and it was not even an issue. I now realize that I was (falsely) expecting the same behavior of grub-mkconfig for both -r1 and -r2; things changes fast and big that's good :)

Concerning the kernels, you're right after the post I refer to them I realized I had too many, so I  rm'd a few (quite funny how you can remember that ;) - they did _not_ disappear because of grub-1.97

Thanks for the work (and the fine eye) !

Erick




 
Regards,

Daniel

--

You received this message because you are subscribed to the Google Groups "Funtoo" group.
To post to this group, send email to funto...@googlegroups.com.
To unsubscribe from this group, send email to funtoo-dev+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/funtoo-dev?hl=en.

Jochums Johannes

unread,
Nov 24, 2009, 1:54:25 PM11/24/09
to funto...@googlegroups.com
Hello all,

The Grub2 boot loader still operates in "console mode" to make really
use of the "gfxterm" i added one line in "/etc/grub.d/header"

print "if loadfont %s; then" %
linux.resolver.RelativePathTo(config.item("display","font")[0],"/boot")
print " set gfxmode=%s" % config.item("display","gfxmode")[0]
print " insmod gfxterm"
print " insmod vbe"
+ print " terminal_output gfxterm"
print "fi"

ref: http://grub.enbug.org/gfxterm

All the best,
Jochums Johannes (Infernoid)


> --
>
> You received this message because you are subscribed to the Google Groups "Funtoo" group.
> To post to this group, send email to funto...@googlegroups.com.
> To unsubscribe from this group, send email to funtoo-dev+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/funtoo-dev?hl=.
>
>
>

Daniel Robbins

unread,
Nov 24, 2009, 3:31:19 PM11/24/09
to funto...@googlegroups.com

On Nov 24, 2009, at 11:54 AM, Jochums Johannes wrote:

> Hello all,
>
> The Grub2 boot loader still operates in "console mode" to make really
> use of the "gfxterm" i added one line in "/etc/grub.d/header"
>
> print "if loadfont %s; then" %
> linux.resolver.RelativePathTo(config.item("display","font")[0],"/boot")
> print " set gfxmode=%s" % config.item("display","gfxmode")[0]
> print " insmod gfxterm"
> print " insmod vbe"
> + print " terminal_output gfxterm"
> print "fi"
>
> ref: http://grub.enbug.org/gfxterm

Thanks for the report - this is a bug I introduced just prior to release. It will be fixed in the next release.

-Daniel

Jochums Johannes

unread,
Nov 24, 2009, 7:37:08 PM11/24/09
to funto...@googlegroups.com
Hello everybody,

I couldn't stop with just "gfxterm" for Grub2 so i made a patch that
adds background image option (and fixes gfxterm (see previous post))

patching "/etc/grub.d/header"
cd /etc/grub.d/
patch -i grub_gfx_header.patch

an example of setting the background image in "/etc/conf.d/grub"

display {
gfxmode 1280x1024x32
font /boot/grub/unifont.pf2
background /boot/grub/img.jpg
}

or

display {
gfxmode 1280x1024x32
font /boot/grub/unifont.pf2
background png /boot/grub/some-png-img
}

You can use jpg / jpeg / png / tga images
Make sure the image is at the exact resolution (Grub does not scale images)

A word of caution:
-) These are my first experiments with python
-) It is also the first patch file I made!
-) I have tested it (only) on local machine
-) I am not responsible if their is smoke coming out of your PC

This is just made for fun and to "learn new things" ... feedback is
certainly welcome
(see patch file attached to email)

Have Fun,
Jochums Johannes (infernoid)


On Mon, Nov 23, 2009 at 7:26 AM, Daniel Robbins <drob...@funtoo.org> wrote:
grub_gfx_header.patch

Daniel Robbins

unread,
Nov 25, 2009, 1:10:38 AM11/25/09
to funto...@googlegroups.com

On Nov 24, 2009, at 5:37 PM, Jochums Johannes wrote:

> Hello everybody,
>
> I couldn't stop with just "gfxterm" for Grub2 so i made a patch that
> adds background image option (and fixes gfxterm (see previous post))

This is a great patch, thanks for submitting it. And it's great that you did the patch because it shows me that it was worth re-designing the GRUB userland so this kind of tweaking is a lot easier :) You were able to extend the config file format with a very simple patch. Really great :) I'll add this to the next release.

-Daniel

Jochums Johannes

unread,
Nov 25, 2009, 6:00:09 PM11/25/09
to funto...@googlegroups.com
Hello everyone,

> This is a great patch, thanks for submitting it. And it's great that you did the patch because it shows me that it was worth re-designing the GRUB userland so this kind of tweaking is a lot easier :) You were able to extend the config file format with a very simple patch. Really great :) I'll add this to the next release.

Thank you for that sweet feedback :)
Today I made a few more changes to the "/etc/grub.d/" scripts

- Made font option optional and defaults to "font
/boot/grub/unifont.pf2": this way gfxterm can work by only setting
resolution
- Moved background option to "/etc/grub.d/theme": header was not such
a good place :P
- Added menu color options also in "etc/grub.d/theme"

Example "/etc/conf.d/grub":
(don't forget to add theme to "grub { parse }")

grub {
features altboot osprobe
extensions *
parse header theme linux
timeout 10
}

display {
gfxmode 1280x1024x32
color-normal cyan/blue
color-highlight white/blue
}

Made patch against unpatched grub-1.97.1-r2
(see attachment for "/etc/grub.d/theme" file and grub_gfx_theme.patch)

Have fun,
Jochums Johannes (infernoid)
grub_gfx_theme.patch
theme

netcelli

unread,
Nov 24, 2009, 6:37:13 AM11/24/09
to Funtoo
I reinstalled grub legacy and the system booted!

mikehunt

unread,
Nov 26, 2009, 10:43:00 PM11/26/09
to Funtoo
Hi Daniel,

I'm wondering if the "default bzImage" config item (instead of setting
default by entry number), is why I couldn't get the grub menu the way
I liked.
Because it seems that grub didn't distinguish between "bzImage" and
"bzImage nox" and used the last one in the list.

I really like the new Funtoo grub - not that I really use it much -
only to reboot kernel updates.

Thanks again,

MH :)

Victor Moura

unread,
Nov 29, 2009, 12:08:16 PM11/29/09
to Funtoo
I had the same problem here.

Moesasji

unread,
Dec 6, 2009, 12:32:43 PM12/6/09
to Funtoo
I'm trying to install this grub-1.97.1-r2 package, but for some reason
I am unable to configure it properly. I am installing from a livecd
and have configured /etc/fstab properly. The error-message I get when
running grub-update is the following:

--
(chroot) sysresccd init.d # grub-update

* grub-update 1.0 ~ http://www.funtoo.org
* /boot already mounted.
Loading extension linux
Traceback (most recent call last):
File "/sbin/grub-mkconfig", line 157, in <module>
pytext("/etc/grub.d/"+x,globals)
File "/sbin/grub-mkconfig", line 104, in pytext
exec mycode in globals
File "<string>", line 2, in <module>
File "/usr/share/grub/extensions", line 35, in BootDeviceDev

File "/usr/share/grub/extensions", line 19, in Guppy

TypeError: exceptions must be classes or instances, not NoneType
* Error: grub-mkconfig failed.
--

Can anybody clarify what I am doing wrong as I must overlook
something, but I fail to see what.

Daniel Robbins

unread,
Dec 6, 2009, 9:46:51 PM12/6/09
to funto...@googlegroups.com
On Dec 6, 2009, at 10:32 AM, Moesasji wrote:

> I'm trying to install this grub-1.97.1-r2 package, but for some reason
> I am unable to configure it properly. I am installing from a livecd
> and have configured /etc/fstab properly. The error-message I get when
> running grub-update is the following:
>
> --
> (chroot) sysresccd init.d # grub-update
>
> * grub-update 1.0 ~ http://www.funtoo.org
> * /boot already mounted.
> Loading extension linux
> Traceback (most recent call last):
> File "/sbin/grub-mkconfig", line 157, in <module>
> pytext("/etc/grub.d/"+x,globals)
> File "/sbin/grub-mkconfig", line 104, in pytext
> exec mycode in globals
> File "<string>", line 2, in <module>
> File "/usr/share/grub/extensions", line 35, in BootDeviceDev
>
> File "/usr/share/grub/extensions", line 19, in Guppy
>
> TypeError: exceptions must be classes or instances, not NoneType
> * Error: grub-mkconfig failed.

Are you installing with a separate /boot partition and is it mounted within the chroot?

If not, then this could be causing the GRUB code to malfunction.

Regards,

Daniel

Moesasji

unread,
Dec 7, 2009, 1:07:00 AM12/7/09
to Funtoo
Yes, /boot is indeed separate and mounted within the chroot.
And both /boot and /root are on ext3 to prevent headaches.
The partition-table in /etc/fstab is as follows (just first three
columns):

/dev/sda1 /boot ext3
/dev/sdb2 none swap
/dev/sda5 / ext3
/dev/sda6 /usr btrfs
/dev/sda7 /var btrfs
/dev/sda8 /home ext4
/dev/sdb1 /var/log ext4
/dev/cdrom /mnt/cdrom auto

tmpfs /tmp tmpfs
tmpfs /var/tmp/portage tmpfs
tmpfs /var/run tmpfs
tmpfs /var/lock tmpfs

Really not sure why this triggers a problem as the only thing that is
not typical is the /root is within an extended partition, yet that
should not matter as far as I know.

*) In case you wonder: The reason /var/log is on a separate drive is
because sda is an SSD drive and Gentoo really hammers /var/log during
emerge by writing single characters to the fetch-log.

Daniel Robbins

unread,
Dec 8, 2009, 7:36:26 PM12/8/09
to funto...@googlegroups.com
On Nov 26, 2009, at 8:43 PM, mikehunt wrote:

> Hi Daniel,
>
> I'm wondering if the "default bzImage" config item (instead of setting
> default by entry number), is why I couldn't get the grub menu the way
> I liked.
> Because it seems that grub didn't distinguish between "bzImage" and
> "bzImage nox" and used the last one in the list.

Hey Mike,

Sorry for the delay in replying - can you paste your config here?

-Daniel

Daniel Robbins

unread,
Dec 8, 2009, 7:40:45 PM12/8/09
to funto...@googlegroups.com
On Dec 6, 2009, at 11:07 PM, Moesasji wrote:

> Yes, /boot is indeed separate and mounted within the chroot.
> And both /boot and /root are on ext3 to prevent headaches.
> The partition-table in /etc/fstab is as follows (just first three
> columns):


Could you do me a favor and paste output of "grub-probe --target=device /boot"?

-Daniel

Moesasji

unread,
Dec 9, 2009, 2:59:58 AM12/9/09
to Funtoo

> Could you do me a favor and paste output of "grub-probe --target=device /boot"?

Yes of course, here it is:
--
(chroot) sysresccd init.d # grub-probe --target=device /boot
grub-probe: error: Cannot open `/boot/grub/device.map'
--

Checking to see if the file is indeed missing, which it is:
--
(chroot) sysresccd init.d # ls /boot/grub
grub.cfg unifont.pf2
--

Which pointed me into what to do to solve this : running grub-
mkdevicemap to generate the device-map.
After that grub-update completes successfully (it does also pick up my
associated .config in boot, but that's fine)

--
* /boot already mounted.
Loading extension linux

* Funtoo Linux 64-bit - /boot/kernel-2.6.32_config
* Funtoo Linux 64-bit - /boot/kernel-2.6.32
--

So the bug is apparently that during install grub-mkdevicemap did not
run, which should have happenned during the install-phase if I
understand things correctly.

mikehunt

unread,
Dec 13, 2009, 1:10:47 PM12/13/09
to Funtoo
Hi Daniel,

Sorry too, I got caught up in something else, and I kinda lost my
train of thought on this.
Now, re-looking at the new grub, it may be as simple as pointing the
ALTBOOT param in /etc/conf.d/grub to my "no-X" runlevel, which after
all is just a slightly modified single user type of boot:

# eselect rc show nox
Status of init scripts in runlevel "nox"
dhcpcd [started]
exim [started]
gpm [started]
local [started]
netmount [started]
ntpd [started]
slapd [started]
syslog-ng [started]
vixie-cron [started]

Now all that's left to do, - and I saw this somewhere in the
documentation, - is get it to not start ALL my networking services. So
I just need to re-read all the nice documentation that you so
thoughtfully provide.

Bottom line, is it looks like there may in fact be several ways to get
this done, which is also nice. :)

Later,

MH

Daniel Robbins

unread,
Dec 13, 2009, 10:33:41 PM12/13/09
to funto...@googlegroups.com
On Dec 13, 2009, at 11:10 AM, mikehunt wrote:

> Hi Daniel,
>
> Sorry too, I got caught up in something else, and I kinda lost my
> train of thought on this.
> Now, re-looking at the new grub, it may be as simple as pointing the
> ALTBOOT param in /etc/conf.d/grub to my "no-X" runlevel, which after
> all is just a slightly modified single user type of boot:

Please note that in 1.97.1-r2 and later, the config file is at /etc/grub.conf now --
the /etc/conf.d/ location is no more. Also note that I haven't implemented
altboot in the new code, and when I do it will not be using the ALTBOOT
parameter but the Funtoo grub config file format, like this:

altboot {
params += softlevel=no-X
}

For now you will need to create distinct menu entries with that parameter
added, ie:

"Funtoo - altboot" {
kernel /boot/bzImage
params += softlevel=no-X
}

-Daniel

mikehunt

unread,
Dec 14, 2009, 1:51:21 PM12/14/09
to Funtoo
Thanks Daniel, that's exactly identical to what I had managed to
configure after re-reading the documentation.
So I emerged the -r3 latest grub version and got that easily
configured. Nice.
For some reason though, grub-update made double entries in grub.cfg -
4 instead of 2, so I nano'd the duplicates out. I shall reboot at the
next kernel update. I'm sure it'll work just fine.
Love this Funtoo thingy, just awesome. :-)

Kind regards,

MH

Daniel Robbins

unread,
Dec 14, 2009, 3:22:26 PM12/14/09
to funto...@googlegroups.com
Yep, the duplicates are due to me accidentally dropping a bug fix from
the last release.

I've added the fix to the "grub" repo on github and you can grab it
from there if you want.

It will be in the next release.

-Daniel

Daniel Robbins

unread,
Dec 14, 2009, 3:31:38 PM12/14/09
to funto...@googlegroups.com
On Mon, Dec 14, 2009 at 1:22 PM, Daniel Robbins <drob...@funtoo.org> wrote:
>
> Yep, the duplicates are due to me accidentally dropping a bug fix from
> the last release.
>
> I've added the fix to the "grub" repo on github and you can grab it
> from there if you want.
>
> It will be in the next release.

Also note that there are other big changes coming. I am going to
rename our GRUB extensions to "Funtoo Core Boot Framework" and I will
also be adding support for LILO and GRUB Legacy as well.

/etc/grub.conf will again be renamed -- to /etc/boot.conf, and
grub-mkconfig will likely become boot-mkconfig, and grub-update will
likely become boot-update.

This will allow one consistent boot config meta-file, one consistent
update procedure, and a consistent set of features like altboot,
regardless of the boot loader you want to use.

Regards,

Daniel

mikehunt

unread,
Dec 14, 2009, 6:07:51 PM12/14/09
to Funtoo
On Dec 14, 3:31 pm, Daniel Robbins <drobb...@funtoo.org> wrote:

> ...
> On Mon, Dec 14, 2009 at 1:22 PM, Daniel Robbins <drobb...@funtoo.org> wrote:
> Also note that there are other big changes coming. I am going to
> rename our GRUB extensions to "Funtoo Core Boot Framework" and I will
> ...


Oh ya, the FCBF, cool. :-)
Reply all
Reply to author
Forward
0 new messages