Skip to contentSkip to conversation

Anyone willing to sponsor an ARC case for grub2?

DISCUSSION Vladimir 'phcoder' Serbinenko 1 participant 2 messages Jun 29, 2009 – Jun 30, 2009 11 messages not in the archive

lore
Share & tools
lore
#10 lore raw
In reply to a message not in the archive
Quoted 7 lines
Quoted 7 lines
Quoted 3 lines

2) The one thing from the prior thread which stood out was the need for netboot support.  Maybe Vladimir (phcoder) can comment on how far along this is in GRUB2

If it isn't a complete replacement for what is in GRUB1 then switching to GRUB2 is a complete non starter.

Quoted 8 lines
Quoted 8 lines

If that isn't what you are saying and I'm miss interpreting it can you explain what, if anything, we lose by moving to GRUB2 ?

Quoted 1 line

Is it possible to limit the ARC case for only GRUB2 + zfs support?  Is

So you are proposing that we intentionally break net install ?  That would not lead to a successful ARC review and very likely cause it to be denied.

GRUB2 already supports pxe. The only netboot present in grub1 and not in grub2 is tftp support when grub is booted from hard drive. David Miller was interested on coding TCP/IP stack for grub2 which would mean FTP and network shell support. If he doesn't do it I'll do when I have a bit more time (in September probably)

Quoted 3 lines

 Switching to GRUB 2 is a medium sized undertaking that involves rolling all the things we've fixed and added in legacy GRUB into it.

Forgive me the harsh wording that follow but at least some "fixes" for grub-solaris are junk and not to be considered ok. One example is the function is_top_dataset file. Basically grub2 checks the filename and depending on it takes it from different datasets. This is a workaround for a limitation introduced by coding procedure which normally doesn't allow to access multiple datasets in the same time. In my personal repository you can find a port of zfs to grub2. It uses the following syntax to access files:
(hdX,Y)/fsname@[snapshot]/filename
as neither filesystem name nor snapshot name can contain @ and snapshot name can't contain / this is unambiguous.

Quoted 3 lines

It would be really
nice if we could manage most of this in a manner that would allow  these changes to be accepted upstream.

I already did some fixes. AFAIK only one thing is missing: a command to retrieve zfs information to pass it to kernel. Remaining fixes are on the kernel side. I outlined it in
http://lists.gnu.org/archive/html/grub-devel/2009-03/msg00035.html
All 3 points are solaris bugs. One of them is workarounded in current grub2 but it still has to be fixed on kernel side (you don't comply with multiboot standard)

Quoted 3 lines

 Since the menu changes significantly this will basically break all the legacy installers/upgraders and kill nevada for x86.

We now have a scripting support both for lua and sh. Both advance now and with proposed patches lua scripting would be able to create menu on runtime listing all installed OSes.

Quoted 4 lines

I'm at peace with that,
but this project can't be the one that drives that, so I'd suggest timing integration accordingly (this should roughly line up correctly if EFI drags GRUB 2 in).

I think multiboot standard could be extended to pass SMBIOS/RSDP pointer to payload. It would allow kernel to stay unaware if it runs on EFI, BIOS or Coreboot. We're also creating multiboot2 standard which is meant to be portable. We have sparc64 grub port and in my git grub2 already parses big-endian volumes. Perhaps solaris could use multiboot2 everywhere? Your propositions for the multiboot2 standard are welcome

Quoted 8 lines

 The slim install and beadm will need to learn to deal with the new menus. Likely beadm will need to learn how to generate a new menu for existing entries. libgrubmgmt (which parses the GRUB menu for fast reboot) will need to learn to deal with the new menus.

-jan

Signature · 4 lines
Regards
Vladimir 'phcoder' Serbinenko

Personal git repository: http://repo.or.cz/w/grub2/phcoder.git
#12 lore raw
In reply to a message not in the archive
Quoted 4 lines

 There's much that should be improved with respect to how zfs integrates with GRUB.

Ok. If you have time you can look at zfs and nestpart branches in my repo (for grub2). I added the things like ls -l support and tab completion. Comments are welcome

Quoted 3 lines

 I've never had any love for $ZFS-BOOTFS. I was however unable to sell anyone on extending or abusing the multiboot structure to pass this up.

I thought of implementing something like $ZFS-BOOTFS but in a way to use grub2 variable support
In would be sth like:
zfsinfo --solaris -s ZFS-BOOTFS (LABEL=rpool)/ROOT@/ multiboot ... $ZFS-BOOTFS
In this case zfsinfo can give back other useful info about zfs e.g. Or
zfsinfo --objnum -s OBJNUM (LABEL=rpool)/ROOT@/
Currently normal way to specify root device is to do so on command line. The fields in multiboot structure were defined as based on BIOS and as such not easily usable by Operating System. Additionally grub2 can access the disks directly with ata.mod so it may not know about BIOS disk numbering at all. Also on non-BIOS this data simply doesn't exist at all. The command line has an advantage of being easily user-modifiable. If you can propose a reliable unambiguous OS- and booter-independent way to pass root device from grub to OS I would be interested
Perhaps one can pass a command-line parameter like root=poolname/fsname@snapshot ?
This way it's clear and uses the same syntax as zfs mount.

Quoted 2 lines

 Are you using a newer version of the structure?

I use the multiboot structure as defined in the latest multiboot specification

Quoted 8 lines
Quoted 7 lines
Quoted 3 lines

 Since the menu changes significantly this will basically break all the legacy installers/upgraders and kill nevada for x86.

We now have a scripting support both for lua and sh. Both advance now and with proposed patches lua scripting would be able to create menu on runtime listing all installed OSes.

Quoted 7 lines

 If you're not familiar with the Solaris legacy installers, it's largely an organizational hair-ball due to the transition to opensolaris. At the moment no one is tasked with maintaining the code, we're not allowed to, or at least discouraged from touching it and we're not allowed to break it :) . However the clock is running out on them and I feel fairly confident that we can ignore this problem toward the end of year time-frame.

GRUB2 has a possibility of multiple scripting engines. Currenly they are sh and lua. Legacy compatibility mode can be implemented the same way then you will just need to add a "#!legacy" to the top of menu.lst and make a symlink to it from grub.cfg (my zfs branch already supports symlinks on zfs) but the price of such move is that you can't use grub2 scripting and I feel like implementing legacy compatibility mode is a waste of time. If you put autoscanning to grub.cfg then grub2 will simply ignore menu.lst and find installed OS itself. However I don't know which organisational problems these approaches may be on your side.

Quoted 5 lines
Quoted 5 lines
Quoted 4 lines

I'm at peace with that,
but this project can't be the one that drives that, so I'd suggest timing integration accordingly (this should roughly line up correctly if EFI drags GRUB 2 in).

Quoted 7 lines
Quoted 5 lines

I think multiboot standard could be extended to pass SMBIOS/RSDP pointer to payload. It would allow kernel to stay unaware if it runs on EFI, BIOS or Coreboot. We're also creating multiboot2 standard which is meant to be portable. We have sparc64 grub port and in my git grub2 already parses big-endian volumes.

 We've looked at GRUB 2 on SPARC/OBP, and since it can't eliminate OBP

I'm not sparc expert but if hardware drivers are similar to x86-pc, hardware initialisation not difficult and we have documantation on it grub2 can be made into firmware. As example you can look at Robert Milan's i386-qemu port. We also started a yeelong port which in perspective will be a firmware port. But I suppose this would be a completely different ARC case

Signature · 4 lines
Regards
Vladimir 'phcoder' Serbinenko

Personal git repository: http://repo.or.cz/w/grub2/phcoder.git