grub2 with SPARC support available for testing

Anatoly Pugachev matorola at gmail.com
Fri Feb 24 16:49:00 UTC 2017


On Thu, Feb 9, 2017 at 9:44 PM, Eric Snowberg <eric.snowberg at oracle.com> wrote:
> I put together a wiki to help document the installation process:
>
> https://github.com/esnowberg/grub2-sparc/wiki

Eric,

I tried this on 2 my testing LDOMs, one with sun disk/partition table,
and another one with gpt disk/partition table.
As well on an older sun4u v215 physical machine (sun disks/partition table).

Can you please suggest how do I install with gpt disk? Details is below.


Ldom with sun disk had no problems with installing by wiki guide, and
booted with grub ok:

# apt search grub2
grub2/unreleased,now 2.02~beta3-5+sparc64 sparc64 [installed]
  GRand Unified Bootloader, version 2 (dummy package)


# parted /dev/vdiska p
Model: Unknown (unknown)
Disk /dev/vdiska: 10.7GB
Sector size (logical/physical): 512B/512B
Partition Table: sun
Disk Flags:

Number  Start   End     Size    File system  Flags
 1      0.00B   296MB   296MB   ext3         boot
 2      296MB   10.3GB  10.0GB  ext4
 4      10.3GB  10.7GB  436MB   btrfs


# cat /etc/default/grub
GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="ro zswap.enabled=1 noresume"
GRUB_CMDLINE_LINUX=""
GRUB_DISABLE_LINUX_UUID=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_DISABLE_RECOVERY="true"
GRUB_PRELOAD_MODULES="iso9660"

# mkdir /boot/grub

# grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.10.0-06476-gbc49a7831b11
Found initrd image: /boot/initrd.img-4.10.0-06476-gbc49a7831b11
Found linux image: /boot/vmlinuz-4.9.0-2-sparc64-smp
Found initrd image: /boot/initrd.img-4.9.0-2-sparc64-smp
done

# grub-install --force --skip-fs-probe /dev/vdiska1
Installing for sparc64-ieee1275 platform.
grub-install: warning: Discarding improperly nested partition
(hostdisk//dev/vdiska,sun1,sun2).
grub-install: warning: Discarding improperly nested partition
(hostdisk//dev/vdiska,sun1,sun4).
grub-install: warning: Attempting to install GRUB to a disk with
multiple partition labels.  This is not supported yet..
grub-install: warning: Embedding is not possible.  GRUB can only be
installed in this setup by using blocklists.  However, blocklists are
UNRELIABLE and their use is discouraged..
Installation finished. No error reported.

# reboot


[3015439.460830] reboot: Restarting system
NOTICE: Entering OpenBoot.
NOTICE: Fetching Guest MD from HV.
NOTICE: Starting additional cpus.
NOTICE: Initializing LDC services.
NOTICE: Probing PCI devices.
NOTICE: Finished PCI probing.

SPARC T5-2, No Keyboard
Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
OpenBoot 4.38.5, 32.0000 GB memory available, Serial #83494642.
Ethernet address 0:14:4f:fa:6:f2, Host ID: 84fa06f2.



Boot device: vdisk1  File and args:
WARNING: Unsupported bootblk image, can not extract fcode

WARNING: Bootblk fcode extraction failed
GRUB Loading kernel....


                     GNU GRUB  version 2.02~beta3-5+sparc64

 +----------------------------------------------------------------------------+
 | Debian GNU/Linux                                                           |
 |*Advanced options for Debian GNU/Linux                                      |
 |                                                                            |
 |                                                                            |
 |                                                                            |
 |                                                                            |
 |                                                                            |
 |                                                                            |
 |                                                                            |
 |                                                                            |
 |                                                                            |
 |                                                                            |
 +----------------------------------------------------------------------------+

      Use the ^ and v keys to select which entry is highlighted.
      Press enter to boot the selected OS, `e' to edit the commands
      before booting or `c' for a command-line.




Another one I have with gpt disk , I was unable to install grub boot block:

root at deb4g:/# parted /dev/vdiska p
Model: Unknown (unknown)
Disk /dev/vdiska: 161GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size   File system  Name  Flags
 1      1049kB  1000MB  999MB  ext3               boot, esp
 2      1001MB  161GB   160GB  ext4         2


root at deb4g:/# grub-install /dev/vdiska
Installing for sparc64-ieee1275 platform.
grub-install: warning: this GPT partition label contains no BIOS Boot
Partition; embedding won't be possible.
grub-install: warning: Embedding is not possible.  GRUB can only be
installed in this setup by using blocklists.  However, blocklists are
UNRELIABLE and their use is discouraged..
grub-install: error: will not proceed with blocklists.

I would not suggest to use --force with gpt disk, since it would
destroy partition table on vdiska (and there would be still silo
bootblock), so i had to recover/restore it with parted.

Thanks.



PS:  v215 physical machine test, same setup as described earlier in
this email for sun disks, install grub and reboot:

[255887.048586] reboot: Restarting system

SC Alert: Host System has Reset
Probing system devices
Probing memory
Probing I/O buses
screen not found.
keyboard not found.
Keyboard not present.  Using ttya for input and output.
Probing system devices
Probing memory
Probing I/O buses


Sun Fire V215, No Keyboard
Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
OpenBoot 4.22.33, 4096 MB memory installed, Serial #78421684.
Ethernet address 0:14:4f:ac:9e:b4, Host ID: 84ac9eb4.



Rebooting with command: boot
Boot device: disk0  File and args:
GRUB Loading kernel....
screen not found.


                     GNU GRUB  version 2.02~beta3-5+sparc64

 +----------------------------------------------------------------------------+
 |*Debian GNU/Linux                                                           |
 | Advanced options for Debian GNU/Linux                                      |
 | Debian GNU/Linux 7 (wheezy) (on /dev/mapper/v215-root)                     |
 | Advanced options for Debian GNU/Linux 7 (wheezy) (on /dev/mapper/v215-root>|
 |                                                                            |
 |                                                                            |
 |                                                                            |
 |                                                                            |
 |                                                                            |
 |                                                                            |
 |                                                                            |
 |                                                                            |
 +----------------------------------------------------------------------------+

      Use the ^ and v keys to select which entry is highlighted.
      Press enter to boot the selected OS, `e' to edit the commands
      before booting or `c' for a command-line.

Loading Linux 4.9.0-2-sparc64-smp ...
Loading initial ramdisk ...

[    0.000000] PROMLIB: Sun IEEE Boot Prom 'OBP 4.22.33 2007/06/18 12:47'
[    0.000000] PROMLIB: Root node compatible:
[    0.000000] Linux version 4.9.0-2-sparc64-smp
(debian-kernel at lists.debian.org) (gcc version 6.3.0 20170205 (Debian
6.3.0-6) ) #1 SMP Debian 4.9.10-1 (2017-02-17)
[    0.000000] bootconsole [earlyprom0] enabled
[    0.000000] ARCH: SUN4U

it does work, but there's some noticeable delay in between "screen not
found" message and showing menu entries, so on my first thought I was
thinking when I would be able to connect debian installer cdrom to it
again ...

I believe we could probably just leave older machines with silo
bootloader. But grub does work anyway, i.e. machine loaded kernel and
works.



More information about the Pkg-grub-devel mailing list