Discussion:
Grub2 with sparc64 patches
louis ayotte
2017-01-23 17:09:24 UTC
Permalink
Hi everyone,

I made sure to install the correct version of this package as can be
seen here;

# apt-cache policy grub2
grub2:
Installed: 2.02~beta3-3+sparc64
Candidate: 2.02~beta3-3+sparc64
Version table:
*** 2.02~beta3-3+sparc64 500
500 http://deb.debian.org/debian-ports unreleased/main sparc64
Packages
100 /var/lib/dpkg/status
2.02~beta3-3 500
500 http://ftp.de.debian.org/debian-ports sid/main sparc64 Packages
500 http://ftp.de.debian.org/debian-ports unstable/main sparc64
Packages

Then tried to install it (T5240, /dev/sdb1 (ext2) for /boot and
/dev/sdb2 (ext4) for / )

# grub-install --boot-directory=/boot /dev/sdb
Installing for sparc64-ieee1275 platform.
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 block
John Paul Adrian Glaubitz
2017-01-23 18:24:32 UTC
Permalink
Post by louis ayotte
# grub-install --boot-directory=/boot /dev/sdb
Installing for sparc64-ieee1275 platform.
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.
This looks like your /boot partition is either too small or uses an unsupported
filesystem. Could you print out your partition table with parted?

E.g.:

***@deb4g:~# parted /dev/vdiska print
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

***@deb4g:~#

Thanks,
Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer - ***@debian.org
`. `' Freie Universitaet Berlin - ***@physik.fu-berlin.de
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
louis ayotte
2017-01-23 21:10:20 UTC
Permalink
Post by John Paul Adrian Glaubitz
This looks like your /boot partition is either too small or uses an unsupported
filesystem. Could you print out your partition table with parted?
Model: Unknown (unknown)
Disk /dev/vdiska: 161GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 1049kB 1000MB 999MB ext3 boot, esp
2 1001MB 161GB 160GB ext4
Thanks,
Adrian
# parted /dev/sdb print
Model: SEAGATE ST914603SSUN146G (scsi)
Disk /dev/sdb: 147GB
Sector size (logical/physical): 512B/512B
Partition Table: sun
Disk Flags:

Number Start End Size File system Flags
1 0.00B 1003MB 1003MB ext2 boot
2 1003MB 141GB 140GB ext4
4 141GB 147GB 5799MB linux-swap(v1)
Post by John Paul Adrian Glaubitz
# grub-install —force /dev/sdb1
Installing for sparc64-ieee1275 platform.
grub2-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.
# grub-install --force /dev/sdb1
Installing for sparc64-ieee1275 platform.
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..
I
John Paul Adrian Glaubitz
2017-01-23 21:13:33 UTC
Permalink
Post by louis ayotte
Post by John Paul Adrian Glaubitz
This looks like your /boot partition is either too small or uses an unsupported
filesystem. Could you print out your partition table with parted?
(...)
# parted /dev/sdb print
Model: SEAGATE ST914603SSUN146G (scsi)
Disk /dev/sdb: 147GB
Sector size (logical/physical): 512B/512B
Partition Table: sun
Number Start End Size File system Flags
1 0.00B 1003MB 1003MB ext2 boot
2 1003MB 141GB 140GB ext4
4 141GB 147GB 5799MB linux-swap(v1)
Nothing special here. But as Eric has explained, the reason for the warning
comes from the fact that the hardware doesn't support GPT.
Post by louis ayotte
# grub-install --force /dev/sdb1
Installing for sparc64-ieee1275 platform.
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.
And, did you try rebooting the machine? Did it come up again?

Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer - ***@debian.org
`. `' Freie Universitaet Berlin - ***@physik.fu-berlin.de
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
Eric Snowberg
2017-01-23 19:38:55 UTC
Permalink
Post by louis ayotte
Hi everyone,
I made sure to install the correct version of this package as can be
seen here;
# apt-cache policy grub2
Installed: 2.02~beta3-3+sparc64
Candidate: 2.02~beta3-3+sparc64
*** 2.02~beta3-3+sparc64 500
500 http://deb.debian.org/debian-ports unreleased/main sparc64
Packages
100 /var/lib/dpkg/status
2.02~beta3-3 500
500 http://ftp.de.debian.org/debian-ports sid/main sparc64 Packages
500 http://ftp.de.debian.org/debian-ports unstable/main sparc64
Packages
Then tried to install it (T5240, /dev/sdb1 (ext2) for /boot and
/dev/sdb2 (ext4) for / )
# grub-install --boot-directory=/boot /dev/sdb
Installing for sparc64-ieee1275 platform.
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.
Since the T5240 doesn’t support GPT, we have to use blocklists, could you try this instead:

# grub-install —force /dev/sdb1

The following warning can be ignored for now:

Installing for sparc64-ieee1275 platform.
grub2-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.
Post by louis ayotte
Thanks to everyone involved!
Frans van Berckel
2017-01-24 13:34:19 UTC
Permalink
Hi Eric,
Post by Eric Snowberg
Since the T5240 doesn’t support GPT, we have to use blocklists, could
# grub-install —force /dev/sdb1
Installing for sparc64-ieee1275 platform.
grub2-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.
On an old Sun Blade 1000, without GPT partition table ...

# fdisk -l

Disk /dev/sda: 68.4 GiB, 73407865856 bytes, 143374738 sectors
Geometry: 255 heads, 63 sectors/track, 8922 cylinders
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: sun

Device        Start       End   Sectors   Size Id Type         Flags
/dev/sda1         0   1048575   1048576   512M  1 Boot              
/dev/sda2   1060290   2779244   1718955 839.3M 82 Linux swap      u 
/dev/sda3         0 143364059 143364060  68.4G  5 Whole disk        
/dev/sda4   2779245  73095749  70316505  33.5G 83 Linux native      
/dev/sda5  73095750 143364059  70268310  33.5G 83 Linux native

... it does this error as well ...

# grub-install /dev/sda

Installing for sparc64-ieee1275 platform.
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.

... do i need to install it with a force on /dev/sda1 as well?
Question, and how is this gonna remove the silo boot block on disk?

Thanks,

Frans van Berckel
John Paul Adrian Glaubitz
2017-01-24 13:37:19 UTC
Permalink
Post by Frans van Berckel
On an old Sun Blade 1000, without GPT partition table ...
Isn't that sun4u? I think these aren't supported yet.
Post by Frans van Berckel
... do i need to install it with a force on /dev/sda1 as well?
Yes. As Eric said: If your machine doesn't support GPT, you have
to use --force.
Post by Frans van Berckel
Question, and how is this gonna remove the silo boot block on disk?
Well, I assume GRUB overwrites the SILO bootblock.
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer - ***@debian.org
`. `' Freie Universitaet Berlin - ***@physik.fu-berlin.de
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
Eric Snowberg
2017-01-24 16:29:02 UTC
Permalink
Post by Frans van Berckel
Hi Eric,
Post by Eric Snowberg
Since the T5240 doesn’t support GPT, we have to use blocklists, could
# grub-install —force /dev/sdb1
Installing for sparc64-ieee1275 platform.
grub2-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.
On an old Sun Blade 1000, without GPT partition table ...
# fdisk -l
Disk /dev/sda: 68.4 GiB, 73407865856 bytes, 143374738 sectors
Geometry: 255 heads, 63 sectors/track, 8922 cylinders
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: sun
Device Start End Sectors Size Id Type Flags
/dev/sda1 0 1048575 1048576 512M 1 Boot
/dev/sda2 1060290 2779244 1718955 839.3M 82 Linux swap u
/dev/sda3 0 143364059 143364060 68.4G 5 Whole disk
/dev/sda4 2779245 73095749 70316505 33.5G 83 Linux native
/dev/sda5 73095750 143364059 70268310 33.5G 83 Linux native
... it does this error as well ...
# grub-install /dev/sda
Installing for sparc64-ieee1275 platform.
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.
... do i need to install it with a force on /dev/sda1 as well?
With a sun/vtoc partition table like you have on a Sun Blade 1000. You will need to give it the boot partition (/dev/sda1 in your case) along with the —force option. For your system I’d recommend doing:

# grub-install --force --skip-fs-probe /dev/sda1


If you were on a T4 or above that supports GPT and had a partition table like this:

Model: LSI MR9361-8i (scsi)
Disk /dev/sda: 2995GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
1 1049kB 1075MB 1074MB ext3
2 1075MB 1076MB 1049kB bios_grub
3 1076MB 2995GB 2994GB lvm

Then you could do:

# grub-install /dev/sda
Post by Frans van Berckel
Question, and how is this gonna remove the silo boot block on disk?
This will remove silo’s boot block and replace it with grub's. If you want to go back to silo, just do:

silo -r /
Post by Frans van Berckel
Thanks,
Frans van Berckel
Frans van Berckel
2017-01-24 20:44:39 UTC
Permalink
Hi Eric,
Post by Eric Snowberg
With a sun/vtoc partition table like you have on a Sun Blade
1000.  You will need to give it the boot partition (/dev/sda1 in your
case) along with the —force option. For your system I’d recommend
# grub-install --force --skip-fs-probe  /dev/sda1
Year that does the job. If the workstation starts it takes some extra
time to load Grub. First i see two error's, but they are quick away.
Next the menu is loaded. I can't use the arrow keys for selecting a I
want kernel. But just pressing enter does work. And being able edit a
kernel line does it as well. But again no arrow keys to walk through
the text. Exit with F10 also not functioned but ctrl+x does it well.

Next the kernel boots well. What's would be the best way to debug and
save the error messages?

Thanks,

Frans van Berckel
Eric Snowberg
2017-01-24 21:35:25 UTC
Permalink
Post by Frans van Berckel
Hi Eric,
Post by Eric Snowberg
With a sun/vtoc partition table like you have on a Sun Blade
1000. You will need to give it the boot partition (/dev/sda1 in your
case) along with the —force option. For your system I’d recommend
# grub-install --force --skip-fs-probe /dev/sda1
Year that does the job. If the workstation starts it takes some extra
time to load Grub. First i see two error's, but they are quick away.
Next the menu is loaded. I can't use the arrow keys for selecting a I
want kernel. But just pressing enter does work. And being able edit a
kernel line does it as well. But again no arrow keys to walk through
the text. Exit with F10 also not functioned but ctrl+x does it well.
Next the kernel boots well. What's would be the best way to debug and
save the error messages?
I think the Sun Blade has a frame buffer. Could you see what is in /etc/default/grub.

If it doesn’t contain the following lines, then I would recommend adding them:

GRUB_TERMINAL_OUTPUT="console"
GRUB_DISABLE_RECOVERY="true"
GRUB_PRELOAD_MODULES="iso9660"

This will prevent the frame buffer from being used and forces it to use the console. It will also preload the iso9660 module, which helps cover up some known bugs that need to be fixed.

Afterwards you will need to regenerate your grub.cfg, with the grub-mkconfig command. See if this helps with the arrow keys.

I’m not used to being on this older hardware.
Post by Frans van Berckel
Thanks,
Frans van Berckel
louis ayotte
2017-01-23 21:19:52 UTC
Permalink
I did reboot but i forgot to generate the configuration for grub,

GNU GRUB version 2.02~beta3-3+sparc64

Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists possible
device or file completions.


grub>

uname -a
Linux T5240 4.9.0-1-sparc64-smp #1 SMP Debian 4.9.2-2 (2017-01-12)
sparc64 GNU/Linux

parted /dev/sdb print
Model: SEAGATE ST914603SSUN146G (scsi)
Disk /dev/sdb: 147GB
Sector size (logical/physical): 512B/512B
Partition Table: sun
Disk Flags:

Number Start End Size File system Flags
1 0.00B 1003MB 1003MB ext2 boot
2 1003MB 141GB 140GB ext4
4 141GB 147GB 5799MB linux-swap(v1)


Some help would be appreciated

Thanks
John Paul Adrian Glaubitz
2017-01-23 21:27:27 UTC
Permalink
Post by louis ayotte
GNU GRUB version 2.02~beta3-3+sparc64
Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists possible
device or file completions.
(...)
Some help would be appreciated
https://www.linux.com/learn/how-rescue-non-booting-grub-2-linux
https://wiki.archlinux.org/index.php/GRUB#Using_the_command_shell
Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer - ***@debian.org
`. `' Freie Universitaet Berlin - ***@physik.fu-berlin.de
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
louis ayotte
2017-01-23 21:38:29 UTC
Permalink
Post by John Paul Adrian Glaubitz
Post by louis ayotte
https://www.linux.com/learn/how-rescue-non-booting-grub-2-linux
https://wiki.archlinux.org/index.php/GRUB#Using_the_command_shell
Adrian
T5240, No Keyboard
Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
OpenBoot 4.33.6, 98080 MB memory available, Serial #83048406.
Ethernet address 0:14:4f:f3:37:d6, Host ID: 84f337d6.

Boot device: /***@400/***@0/***@8/***@0/***@0,0:a File and args:
GRUB Loading kernel..

GNU GRUB version 2.02~beta3-3+sparc64

Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists possible
device or file completions.

grub> set pager=1
grub> ls
(ieee1275//iscsi-hba/disk) ERROR: /iscsi-hba: No iscsi-network-bootpath
property
(ieee1275/disk6)
ERROR: /***@400: Last Trap: Fast Data Access MMU Miss
{0} ok

Everytim
louis ayotte
2017-01-24 16:49:45 UTC
Permalink
“ls" is one area that has not been completed for SPARC and has many problems.
grub> ls /
grub> linux /vmlinuz-4.8.0-rc8-ATU_final_upstream_v4+ root=/dev/mapper/VolGroup-lv_root ro
grub> initrd /initramfs-4.8.0-rc8-ATU_final_upstream_v4+.img
grub> boot
This is what i have done,

GNU GRUB version 2.02~beta3-3+sparc64

Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists possible
device or file completions.


grub> ls /
lost+found/ silotftp.b isofs.b first.b generic.b fd.b second.b ieee32.b
vmlinuz
-4.5.0-2-sparc64-smp System.map-4.5.0-2-sparc64-smp vmlinuz ultra.b
initrd.img
silo.conf config-4.5.0-2-sparc64-smp boot etc old.b
initrd.img-4.5.0-2-sparc64-
smp config-4.9.0-1-sparc64-smp vmlinuz-4.9.0-1-sparc64-smp
initrd.img.old vmlin
uz.old grub/ System.map-4.9.0-1-sparc64-smp initrd.img-4.9.0-1-sparc64-smp
grub> linux /vmlinuz-4.9.0-1-sparc64-smp
error: /memory response buffer exceeded.
grub> initrd /in
Possible files are:

initrd.img initrd.img-4.5.0-2-sparc64-smp initrd.img.old
initrd.img-4.9.0-1-sparc64-smp
grub> initrd /initrd.img-4.9.0-1-sparc64-smp
error: you need to load the kernel first.
grub> linux /vmlinuz-4.9.0-1-sparc64-smp
error: couldn't allocate physical memory.
grub> linux /vmlinuz-4.9.0-1-sparc64-smp root=/dev/sdb
error: couldn't allocate physical memory.
grub> linux /vmlinuz-4.9.0-1-sparc64-smp root=/dev/sdb ro
error: couldn't allocate physical memory.
grub> linux /vmlinuz-4.9.0-1-sparc64-smp
root=/dev/mapper/Volgroup_lv_root ro
error: couldn't allocate physical memory.
grub> boot
error: you need to load the kernel fi
Eric Snowberg
2017-01-24 18:01:14 UTC
Permalink
Post by louis ayotte
“ls" is one area that has not been completed for SPARC and has many problems.
grub> ls /
grub> linux /vmlinuz-4.8.0-rc8-ATU_final_upstream_v4+ root=/dev/mapper/VolGroup-lv_root ro
grub> initrd /initramfs-4.8.0-rc8-ATU_final_upstream_v4+.img
grub> boot
This is what i have done,
GNU GRUB version 2.02~beta3-3+sparc64
Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists possible
device or file completions.
grub> ls /
lost+found/ silotftp.b isofs.b first.b generic.b fd.b second.b ieee32.b
vmlinuz
-4.5.0-2-sparc64-smp System.map-4.5.0-2-sparc64-smp vmlinuz ultra.b
initrd.img
silo.conf config-4.5.0-2-sparc64-smp boot etc old.b
initrd.img-4.5.0-2-sparc64-
smp config-4.9.0-1-sparc64-smp vmlinuz-4.9.0-1-sparc64-smp
initrd.img.old vmlin
uz.old grub/ System.map-4.9.0-1-sparc64-smp initrd.img-4.9.0-1-sparc64-smp
grub> linux /vmlinuz-4.9.0-1-sparc64-smp
error: /memory response buffer exceeded.
How big is your kernel? Will silo boot it? Can you start over and do the following:

grub> reboot

You should be back at OBP. Now boot from the disk again and issue:

grub> ls -l /

and send the response? Can you also send a list of all the loaded modules?

grub> lsmod

If you have a rescue iso, it may be easier to boot from it, mount your disk, chroot to it, and then generate your missing grub.cfg file with grub-mkconfig and then reboot.
Post by louis ayotte
grub> initrd /in
initrd.img initrd.img-4.5.0-2-sparc64-smp initrd.img.old
initrd.img-4.9.0-1-sparc64-smp
grub> initrd /initrd.img-4.9.0-1-sparc64-smp
error: you need to load the kernel first.
grub> linux /vmlinuz-4.9.0-1-sparc64-smp
error: couldn't allocate physical memory.
grub> linux /vmlinuz-4.9.0-1-sparc64-smp root=/dev/sdb
error: couldn't allocate physical memory.
grub> linux /vmlinuz-4.9.0-1-sparc64-smp root=/dev/sdb ro
error: couldn't allocate physical memory.
grub> linux /vmlinuz-4.9.0-1-sparc64-smp
root=/dev/mapper/Volgroup_lv_root ro
error: couldn't allocate physical memory.
grub> boot
error: you need to load the kernel first.
louis ayotte
2017-01-24 21:06:14 UTC
Permalink
Post by Eric Snowberg
grub> reboot
grub> ls -l /
and send the response? Can you also send a list of all the loaded modules?
grub> lsmod
If you have a rescue iso, it may be easier to boot from it, mount your disk, chroot to it, and then generate your missing grub.cfg file with grub-mkconfig and then reboot.
Before i installed grub it was booting fine with both kernels from SILO

grub> ls -l /
DIR 20170116171825 lost+found/
51437 20160122105340 silotftp.b
6752 20160122105340 isofs.b
512 20160122105340 first.b
1024 20160122105340 generic.b
1024 20160122105340 fd.b
53760 20170116173035 second.b
800 20160122105340 ieee32.b
3715429 20160430170110 vmlinuz-4.5.0-2-sparc64-smp
2314500 20160430170315 System.map-4.5.0-2-sparc64-smp
3850232 20170116192407 vmlinuz
512 20160122105340 ultra.b
17281088 20170116192407 initrd.img
196 20170116173227 silo.conf
127403 20160430170315 config-4.5.0-2-sparc64-smp
7680 20170116173035 old.b
16280175 20170116191428 initrd.img-4.5.0-2-sparc64-smp
132748 20170112155237 config-4.9.0-1-sparc64-smp
3850232 20170112155237 vmlinuz-4.9.0-1-sparc64-smp
16280175 20170116192407 initrd.img.old
3715429 20170116192407 vmlinuz.old
DIR 20170123170539 grub/
2416201 20170112155237 System.map-4.9.0-1-sparc64-smp
17281088 20170123004007 initrd.img-4.9.0-1-sparc64-smp

grub> lsmod
Name Ref Count Dependencies
minicmd 1
ls 1 normal
normal 3 gettext,boot,bufio,crypto,terminal
gzio 0
gettext 4
boot 4
bufio 4
crypto 4
terminal 4
search_fs_uuid 1
part_sun 1
ext2 1 fshelp
fshelp 2

I might look int
Eric Snowberg
2017-01-24 22:37:44 UTC
Permalink
Post by louis ayotte
Post by Eric Snowberg
grub> reboot
grub> ls -l /
and send the response? Can you also send a list of all the loaded modules?
grub> lsmod
If you have a rescue iso, it may be easier to boot from it, mount your disk, chroot to it, and then generate your missing grub.cfg file with grub-mkconfig and then reboot.
Before i installed grub it was booting fine with both kernels from SILO
grub> ls -l /
DIR 20170116171825 lost+found/
51437 20160122105340 silotftp.b
6752 20160122105340 isofs.b
512 20160122105340 first.b
1024 20160122105340 generic.b
1024 20160122105340 fd.b
53760 20170116173035 second.b
800 20160122105340 ieee32.b
3715429 20160430170110 vmlinuz-4.5.0-2-sparc64-smp
2314500 20160430170315 System.map-4.5.0-2-sparc64-smp
3850232 20170116192407 vmlinuz
512 20160122105340 ultra.b
17281088 20170116192407 initrd.img
196 20170116173227 silo.conf
127403 20160430170315 config-4.5.0-2-sparc64-smp
7680 20170116173035 old.b
16280175 20170116191428 initrd.img-4.5.0-2-sparc64-smp
132748 20170112155237 config-4.9.0-1-sparc64-smp
3850232 20170112155237 vmlinuz-4.9.0-1-sparc64-smp
16280175 20170116192407 initrd.img.old
3715429 20170116192407 vmlinuz.old
DIR 20170123170539 grub/
2416201 20170112155237 System.map-4.9.0-1-sparc64-smp
17281088 20170123004007 initrd.img-4.9.0-1-sparc64-smp
grub> lsmod
Name Ref Count Dependencies
minicmd 1
ls 1 normal
normal 3 gettext,boot,bufio,crypto,terminal
gzio 0
gettext 4
boot 4
bufio 4
crypto 4
terminal 4
search_fs_uuid 1
part_sun 1
ext2 1 fshelp
fshelp 2
I might look into the rescue iso later on today
That might be best. Before you do that though, could you turn on the following debug flag and send me the results:

grub> set debug=loader
grub> linux /vmlinuz-4.9.0-1-sparc64-smp

do you get the same error with your smaller kernel?
Post by louis ayotte
Thanks
louis ayotte
2017-01-24 23:32:26 UTC
Permalink
Post by Eric Snowberg
grub> set debug=loader
grub> linux /vmlinuz-4.9.0-1-sparc64-smp
do you get the same error with your smaller kernel?
grub> set debug=loader

grub> linux /vmlinuz-4.9.0-1-sparc64-smp
loader/sparc64/ieee1275/linux.c:495: Grub lives at phys_start[e402000]
phys_end[ee00000]
error: /memory response buffer exceeded.

grub> linux /vmlinuz-4.5.0-2-sparc64-smp
loader/sparc64/ieee1275/linux.c:270: Attempting to claim at 0x40004000, size
0x8d0591.
error: couldn't allocate physical memory.

reboot

grub> set debug=loader

grub> linux /vmlinuz-4.5.0-2-sparc64-smp
loader/sparc64/ieee1275/linux.c:495: Grub lives at phys_start[e402000]
phys_end[ee00000]
error: /memory response buffer exceeded.
John Paul Adrian Glaubitz
2017-01-25 13:58:00 UTC
Permalink
Hi Eric!
Post by Eric Snowberg
That might be best. Before you do that though, could you turn on the
(...)
On a sidenote, should we maybe start tracking these issues on your github repository?

The more we test, document and fix issues, the faster we can replace SILO in Debian
with GRUB.

Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer - ***@debian.org
`. `' Freie Universitaet Berlin - ***@physik.fu-berlin.de
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
Eric Snowberg
2017-01-25 19:15:33 UTC
Permalink
Post by John Paul Adrian Glaubitz
Hi Eric!
Post by Eric Snowberg
That might be best. Before you do that though, could you turn on the
(...)
On a sidenote, should we maybe start tracking these issues on your github repository?
Sure, the github repo is located here: https://github.com/esnowberg/grub2-sparc. Feel free to open any issues there.
Post by John Paul Adrian Glaubitz
The more we test, document and fix issues, the faster we can replace SILO in Debian
with GRUB.
Adrian
--
.''`. John Paul Adrian Glaubitz
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
louis ayotte
2017-01-25 16:40:57 UTC
Permalink
Post by Eric Snowberg
grub> reboot
grub> ls -l /
and send the response? Can you also send a list of all the loaded modules?
grub> lsmod
If you have a rescue iso, it may be easier to boot from it, mount your disk, chroot to it, and then generate your missing grub.cfg file with grub-mkconfig and then reboot.
Hi Eric

generated the grub configure and this was the output;

# grub-mkconfig
Generating grub configuration file ...
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi

function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}

if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_sun
insmod ext2
set root='hd1,sun2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root
--hint-ieee1275='ieee1275//***@400/***@0/***@8/***@0/***@0,sun2'
--hint-bios=hd1,sun2 --hint-efi=hd1,sun2 --hint-baremetal=ahci1,sun2
2f8e4b53-061c-4878-9d30-bec179fb59e4
else
search --no-floppy --fs-uuid --set=root
2f8e4b53-061c-4878-9d30-bec179fb59e4
fi
font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
set gfxmode=auto
load_video
insmod gfxterm
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
set timeout=30
else
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=5
fi
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
set gfxpayload="${1}"
}
set linux_gfx_mode=
export linux_gfx_mode
Found linux image: /boot/vmlinuz-4.9.0-1-sparc64-smp
Found initrd image: /boot/initrd.img-4.9.0-1-sparc64-smp
menuentry 'Debian GNU/Linux' --class debian --class gnu-linux --class
gnu --class os $menuentry_id_option
'gnulinux-simple-2f8e4b53-061c-4878-9d30-bec179fb59e4' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_sun
insmod ext2
set root='hd1,sun1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root
--hint-ieee1275='ieee1275//***@400/***@0/***@8/***@0/***@0,sun1'
--hint-bios=hd1,sun1 --hint-efi=hd1,sun1 --hint-baremetal=ahci1,sun1
eda75771-2b2f-4ef8-95f7-d007f3f3355a
else
search --no-floppy --fs-uuid --set=root
eda75771-2b2f-4ef8-95f7-d007f3f3355a
fi
echo 'Loading Linux 4.9.0-1-sparc64-smp ...'
linux /vmlinuz-4.9.0-1-sparc64-smp
root=UUID=2f8e4b53-061c-4878-9d30-bec179fb59e4 ro quiet
echo 'Loading initial ramdisk ...'
initrd /initrd.img-4.9.0-1-sparc64-smp
}
submenu 'Advanced options for Debian GNU/Linux' $menuentry_id_option
'gnulinux-advanced-2f8e4b53-061c-4878-9d30-bec179fb59e4' {
menuentry 'Debian GNU/Linux, with Linux 4.9.0-1-sparc64-smp' --class
debian --class gnu-linux --class gnu --class os $menuentry_id_option
'gnulinux-4.9.0-1-sparc64-smp-advanced-2f8e4b53-061c-4878-9d30-bec179fb59e4'
{
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_sun
insmod ext2
set root='hd1,sun1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root
--hint-ieee1275='ieee1275//***@400/***@0/***@8/***@0/***@0,sun1'
--hint-bios=hd1,sun1 --hint-efi=hd1,sun1 --hint-baremetal=ahci1,sun1
eda75771-2b2f-4ef8-95f7-d007f3f3355a
else
search --no-floppy --fs-uuid --set=root
eda75771-2b2f-4ef8-95f7-d007f3f3355a
fi
echo 'Loading Linux 4.9.0-1-sparc64-smp ...'
linux /vmlinuz-4.9.0-1-sparc64-smp
root=UUID=2f8e4b53-061c-4878-9d30-bec179fb59e4 ro quiet
echo 'Loading initial ramdisk ...'
initrd /initrd.img-4.9.0-1-sparc64-smp
}
menuentry 'Debian GNU/Linux, with Linux 4.9.0-1-sparc64-smp
(recovery mode)' --class debian --class gnu-linux --class gnu --class os
$menuentry_id_option
'gnulinux-4.9.0-1-sparc64-smp-recovery-2f8e4b53-061c-4878-9d30-bec179fb59e4'
{
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_sun
insmod ext2
set root='hd1,sun1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root
--hint-ieee1275='ieee1275//***@400/***@0/***@8/***@0/***@0,sun1'
--hint-bios=hd1,sun1 --hint-efi=hd1,sun1 --hint-baremetal=ahci1,sun1
eda75771-2b2f-4ef8-95f7-d007f3f3355a
else
search --no-floppy --fs-uuid --set=root
eda75771-2b2f-4ef8-95f7-d007f3f3355a
fi
echo 'Loading Linux 4.9.0-1-sparc64-smp ...'
linux /vmlinuz-4.9.0-1-sparc64-smp
root=UUID=2f8e4b53-061c-4878-9d30-bec179fb59e4 ro single
echo 'Loading initial ramdisk ...'
initrd /initrd.img-4.9.0-1-sparc64-smp
}
Found linux image: /boot/vmlinuz-4.5.0-2-sparc64-smp
Found initrd image: /boot/initrd.img-4.5.0-2-sparc64-smp
menuentry 'Debian GNU/Linux, with Linux 4.5.0-2-sparc64-smp' --class
debian --class gnu-linux --class gnu --class os $menuentry_id_option
'gnulinux-4.5.0-2-sparc64-smp-advanced-2f8e4b53-061c-4878-9d30-bec179fb59e4'
{
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_sun
insmod ext2
set root='hd1,sun1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root
--hint-ieee1275='ieee1275//***@400/***@0/***@8/***@0/***@0,sun1'
--hint-bios=hd1,sun1 --hint-efi=hd1,sun1 --hint-baremetal=ahci1,sun1
eda75771-2b2f-4ef8-95f7-d007f3f3355a
else
search --no-floppy --fs-uuid --set=root
eda75771-2b2f-4ef8-95f7-d007f3f3355a
fi
echo 'Loading Linux 4.5.0-2-sparc64-smp ...'
linux /vmlinuz-4.5.0-2-sparc64-smp
root=UUID=2f8e4b53-061c-4878-9d30-bec179fb59e4 ro quiet
echo 'Loading initial ramdisk ...'
initrd /initrd.img-4.5.0-2-sparc64-smp
}
menuentry 'Debian GNU/Linux, with Linux 4.5.0-2-sparc64-smp
(recovery mode)' --class debian --class gnu-linux --class gnu --class os
$menuentry_id_option
'gnulinux-4.5.0-2-sparc64-smp-recovery-2f8e4b53-061c-4878-9d30-bec179fb59e4'
{
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_sun
insmod ext2
set root='hd1,sun1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root
--hint-ieee1275='ieee1275//***@400/***@0/***@8/***@0/***@0,sun1'
--hint-bios=hd1,sun1 --hint-efi=hd1,sun1 --hint-baremetal=ahci1,sun1
eda75771-2b2f-4ef8-95f7-d007f3f3355a
else
search --no-floppy --fs-uuid --set=root
eda75771-2b2f-4ef8-95f7-d007f3f3355a
fi
echo 'Loading Linux 4.5.0-2-sparc64-smp ...'
linux /vmlinuz-4.5.0-2-sparc64-smp
root=UUID=2f8e4b53-061c-4878-9d30-bec179fb59e4 ro single
echo 'Loading initial ramdisk ...'
initrd /initrd.img-4.5.0-2-sparc64-smp
}
}

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

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

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

### BEGIN /etc/grub.d/30_uefi-firmware ###
### END /etc/grub.d/30_uefi-firmware ###

### 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 ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
done

Then rebooted

{0} ok boot
Boot device: /***@400/***@0/***@8/***@0/***@0,0:a File and args:
GRUB Loading kernel..
error: out of memory.
error: no suitable video mode found.

GNU GRUB version 2.02~beta3-3+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.



Loading Linux 4.9.0-1-sparc64-smp ...
error: /memory response buffer exceeded.
Loading initial ramdisk ...
error: you need to load the kernel first.

Press any key to continue...

Then rebooted

Loading Linux 4.5.0-2-sparc64-smp ...
error: /memory response buffer exceeded.
Loading initial ramdisk ...
error: you need to load the kernel first.

Press any key to continue...

Advanced menu shows this;

Debian GNU/Linux, with Linux 4.9.0-1-sparc64-smp
Debian GNU/Linux, with Linux 4.9.0-1-sparc64-smp (recovery mode)
Debian GNU/Linux, with Linux 4.5.0-2-sparc64-smp
Debian GNU/Linux, with Linux 4.5.0-2-sparc64-smp (recovery m
Eric Snowberg
2017-01-25 19:21:54 UTC
Permalink
Post by Frans van Berckel
Post by Eric Snowberg
grub> reboot
grub> ls -l /
and send the response? Can you also send a list of all the loaded modules?
grub> lsmod
If you have a rescue iso, it may be easier to boot from it, mount your disk, chroot to it, and then generate your missing grub.cfg file with grub-mkconfig and then reboot.
Hi Eric
generated the grub configure and this was the output;
# grub-mkconfig
Generating grub configuration file ...
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="0"
fi
if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi
export menuentry_id_option
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}
if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_sun
insmod ext2
set root='hd1,sun2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root
--hint-bios=hd1,sun2 --hint-efi=hd1,sun2 --hint-baremetal=ahci1,sun2
2f8e4b53-061c-4878-9d30-bec179fb59e4
else
search --no-floppy --fs-uuid --set=root
2f8e4b53-061c-4878-9d30-bec179fb59e4
fi
font="/usr/share/grub/unicode.pf2"
fi
if loadfont $font ; then
set gfxmode=auto
load_video
insmod gfxterm
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
set timeout=30
else
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=5
fi
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
set gfxpayload="${1}"
}
set linux_gfx_mode=
export linux_gfx_mode
Found linux image: /boot/vmlinuz-4.9.0-1-sparc64-smp
Found initrd image: /boot/initrd.img-4.9.0-1-sparc64-smp
menuentry 'Debian GNU/Linux' --class debian --class gnu-linux --class
gnu --class os $menuentry_id_option
'gnulinux-simple-2f8e4b53-061c-4878-9d30-bec179fb59e4' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_sun
insmod ext2
set root='hd1,sun1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root
--hint-bios=hd1,sun1 --hint-efi=hd1,sun1 --hint-baremetal=ahci1,sun1
eda75771-2b2f-4ef8-95f7-d007f3f3355a
else
search --no-floppy --fs-uuid --set=root
eda75771-2b2f-4ef8-95f7-d007f3f3355a
fi
echo 'Loading Linux 4.9.0-1-sparc64-smp ...'
linux /vmlinuz-4.9.0-1-sparc64-smp
root=UUID=2f8e4b53-061c-4878-9d30-bec179fb59e4 ro quiet
echo 'Loading initial ramdisk ...'
initrd /initrd.img-4.9.0-1-sparc64-smp
}
submenu 'Advanced options for Debian GNU/Linux' $menuentry_id_option
'gnulinux-advanced-2f8e4b53-061c-4878-9d30-bec179fb59e4' {
menuentry 'Debian GNU/Linux, with Linux 4.9.0-1-sparc64-smp' --class
debian --class gnu-linux --class gnu --class os $menuentry_id_option
'gnulinux-4.9.0-1-sparc64-smp-advanced-2f8e4b53-061c-4878-9d30-bec179fb59e4'
{
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_sun
insmod ext2
set root='hd1,sun1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root
--hint-bios=hd1,sun1 --hint-efi=hd1,sun1 --hint-baremetal=ahci1,sun1
eda75771-2b2f-4ef8-95f7-d007f3f3355a
else
search --no-floppy --fs-uuid --set=root
eda75771-2b2f-4ef8-95f7-d007f3f3355a
fi
echo 'Loading Linux 4.9.0-1-sparc64-smp ...'
linux /vmlinuz-4.9.0-1-sparc64-smp
root=UUID=2f8e4b53-061c-4878-9d30-bec179fb59e4 ro quiet
echo 'Loading initial ramdisk ...'
initrd /initrd.img-4.9.0-1-sparc64-smp
}
menuentry 'Debian GNU/Linux, with Linux 4.9.0-1-sparc64-smp
(recovery mode)' --class debian --class gnu-linux --class gnu --class os
$menuentry_id_option
'gnulinux-4.9.0-1-sparc64-smp-recovery-2f8e4b53-061c-4878-9d30-bec179fb59e4'
{
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_sun
insmod ext2
set root='hd1,sun1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root
--hint-bios=hd1,sun1 --hint-efi=hd1,sun1 --hint-baremetal=ahci1,sun1
eda75771-2b2f-4ef8-95f7-d007f3f3355a
else
search --no-floppy --fs-uuid --set=root
eda75771-2b2f-4ef8-95f7-d007f3f3355a
fi
echo 'Loading Linux 4.9.0-1-sparc64-smp ...'
linux /vmlinuz-4.9.0-1-sparc64-smp
root=UUID=2f8e4b53-061c-4878-9d30-bec179fb59e4 ro single
echo 'Loading initial ramdisk ...'
initrd /initrd.img-4.9.0-1-sparc64-smp
}
Found linux image: /boot/vmlinuz-4.5.0-2-sparc64-smp
Found initrd image: /boot/initrd.img-4.5.0-2-sparc64-smp
menuentry 'Debian GNU/Linux, with Linux 4.5.0-2-sparc64-smp' --class
debian --class gnu-linux --class gnu --class os $menuentry_id_option
'gnulinux-4.5.0-2-sparc64-smp-advanced-2f8e4b53-061c-4878-9d30-bec179fb59e4'
{
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_sun
insmod ext2
set root='hd1,sun1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root
--hint-bios=hd1,sun1 --hint-efi=hd1,sun1 --hint-baremetal=ahci1,sun1
eda75771-2b2f-4ef8-95f7-d007f3f3355a
else
search --no-floppy --fs-uuid --set=root
eda75771-2b2f-4ef8-95f7-d007f3f3355a
fi
echo 'Loading Linux 4.5.0-2-sparc64-smp ...'
linux /vmlinuz-4.5.0-2-sparc64-smp
root=UUID=2f8e4b53-061c-4878-9d30-bec179fb59e4 ro quiet
echo 'Loading initial ramdisk ...'
initrd /initrd.img-4.5.0-2-sparc64-smp
}
menuentry 'Debian GNU/Linux, with Linux 4.5.0-2-sparc64-smp
(recovery mode)' --class debian --class gnu-linux --class gnu --class os
$menuentry_id_option
'gnulinux-4.5.0-2-sparc64-smp-recovery-2f8e4b53-061c-4878-9d30-bec179fb59e4'
{
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_sun
insmod ext2
set root='hd1,sun1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root
--hint-bios=hd1,sun1 --hint-efi=hd1,sun1 --hint-baremetal=ahci1,sun1
eda75771-2b2f-4ef8-95f7-d007f3f3355a
else
search --no-floppy --fs-uuid --set=root
eda75771-2b2f-4ef8-95f7-d007f3f3355a
fi
echo 'Loading Linux 4.5.0-2-sparc64-smp ...'
linux /vmlinuz-4.5.0-2-sparc64-smp
root=UUID=2f8e4b53-061c-4878-9d30-bec179fb59e4 ro single
echo 'Loading initial ramdisk ...'
initrd /initrd.img-4.5.0-2-sparc64-smp
}
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/30_uefi-firmware ###
### END /etc/grub.d/30_uefi-firmware ###
### 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 ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
done
Then rebooted
{0} ok boot
GRUB Loading kernel..
error: out of memory.
I believe you are running out of memory here because grub is trying to load all those frame buffer modules within your config.
Post by Frans van Berckel
error: no suitable video mode found.
And then it didn’t find one that worked.

For this, I believe you are having the same problem as Frans. Could you add the following to /etc/default/grub:

GRUB_TERMINAL_OUTPUT="console"
GRUB_DISABLE_RECOVERY="true"
GRUB_PRELOAD_MODULES=“iso9660"

and then regenerate your grub.cfg with grub-mkconfig.

Adrian,

I don’t plan on adding frame buffer support since newer systems don’t have them. Would it be possible to change your grub package to include a /etc/default/grub file for SPARC with the changes above? We do the same thing with our grub rpm.
Post by Frans van Berckel
GNU GRUB version 2.02~beta3-3+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.
Loading Linux 4.9.0-1-sparc64-smp ...
error: /memory response buffer exceeded.
Loading initial ramdisk ...
error: you need to load the kernel first.
Press any key to continue...
Then rebooted
Loading Linux 4.5.0-2-sparc64-smp ...
error: /memory response buffer exceeded.
Loading initial ramdisk ...
error: you need to load the kernel first.
Press any key to continue...
Advanced menu shows this;
Debian GNU/Linux, with Linux 4.9.0-1-sparc64-smp
Debian GNU/Linux, with Linux 4.9.0-1-sparc64-smp (recovery mode)
Debian GNU/Linux, with Linux 4.5.0-2-sparc64-smp
Debian GNU/Linux, with Linux 4.5.0-2-sparc64-smp (recovery mode)
If you still run into out of memory problems after regenerating your grub.cfg. Could you send me the following results from OBP?

{0} ok cd /memory
{0} ok .properties
John Paul Adrian Glaubitz
2017-01-25 20:02:49 UTC
Permalink
Post by Eric Snowberg
I believe you are running out of memory here because grub is trying to load all those frame buffer modules within your config.
Post by louis ayotte
error: no suitable video mode found.
And then it didn’t find one that worked.
GRUB_TERMINAL_OUTPUT="console"
GRUB_DISABLE_RECOVERY="true"
GRUB_PRELOAD_MODULES=“iso9660"
and then regenerate your grub.cfg with grub-mkconfig.
Adrian,
I don’t plan on adding frame buffer support since newer systems don’t have them. Would it be possible to change your grub package to include a /etc/default/grub file for SPARC with the changes above? We do the same thing with our grub rpm.
Oh, absolutely. Thanks for the suggestion. This was just the first package and I'm happy to include
all improvements that are necessary.

Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer - ***@debian.org
`. `' Freie Universitaet Berlin - ***@physik.fu-berlin.de
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
louis ayotte
2017-01-26 16:52:17 UTC
Permalink
Post by John Paul Adrian Glaubitz
Post by Eric Snowberg
I believe you are running out of memory here because grub is trying to load all those frame buffer modules within your config.
Post by louis ayotte
error: no suitable video mode found.
And then it didn’t find one that worked.
GRUB_TERMINAL_OUTPUT="console"
GRUB_DISABLE_RECOVERY="true"
GRUB_PRELOAD_MODULES=“iso9660"
and then regenerate your grub.cfg with grub-mkconfig.
Adrian,
I don’t plan on adding frame buffer support since newer systems don’t have them. Would it be possible to change your grub package to include a /etc/default/grub file for SPARC with the changes above? We do the same thing with our grub rpm.
Oh, absolutely. Thanks for the suggestion. This was just the first package and I'm happy to include
all improvements that are necessary.
Adrian
K applied these changes, in chroot

GNU nano 2.7.4 File:
/etc/default/grub

# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to
Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"

GRUB_TERMINAL_OUTPUT="console"
GRUB_DISABLE_RECOVERY="true"
GRUB_PRELOAD_MODULES="iso9660"


Saved and exited


# grub-mkconfig
Generating grub configuration file ...
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
insmod iso9660
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi

function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}

terminal_output console
if [ "${recordfail}" = 1 ] ; then
set timeout=30
else
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=5
fi
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
set gfxpayload="${1}"
}
set linux_gfx_mode=
export linux_gfx_mode
Found linux image: /boot/vmlinuz-4.9.0-1-sparc64-smp
Found initrd image: /boot/initrd.img-4.9.0-1-sparc64-smp
menuentry 'Debian GNU/Linux' --class debian --class gnu-linux --class
gnu --class os $menuentry_id_option
'gnulinux-simple-2f8e4b53-061c-4878-9d30-bec179fb59e4' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_sun
insmod ext2
set root='hd1,sun1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root
--hint-ieee1275='ieee1275//***@400/***@0/***@8/***@0/***@0,sun1'
--hint-bios=hd1,sun1 --hint-efi=hd1,sun1 --hint-baremetal=ahci1,sun1
eda75771-2b2f-4ef8-95f7-d007f3f3355a
else
search --no-floppy --fs-uuid --set=root
eda75771-2b2f-4ef8-95f7-d007f3f3355a
fi
echo 'Loading Linux 4.9.0-1-sparc64-smp ...'
linux /vmlinuz-4.9.0-1-sparc64-smp
root=UUID=2f8e4b53-061c-4878-9d30-bec179fb59e4 ro quiet
echo 'Loading initial ramdisk ...'
initrd /initrd.img-4.9.0-1-sparc64-smp
}
submenu 'Advanced options for Debian GNU/Linux' $menuentry_id_option
'gnulinux-advanced-2f8e4b53-061c-4878-9d30-bec179fb59e4' {
menuentry 'Debian GNU/Linux, with Linux 4.9.0-1-sparc64-smp' --class
debian --class gnu-linux --class gnu --class os $menuentry_id_option
'gnulinux-4.9.0-1-sparc64-smp-advanced-2f8e4b53-061c-4878-9d30-bec179fb59e4'
{
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_sun
insmod ext2
set root='hd1,sun1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root
--hint-ieee1275='ieee1275//***@400/***@0/***@8/***@0/***@0,sun1'
--hint-bios=hd1,sun1 --hint-efi=hd1,sun1 --hint-baremetal=ahci1,sun1
eda75771-2b2f-4ef8-95f7-d007f3f3355a
else
search --no-floppy --fs-uuid --set=root
eda75771-2b2f-4ef8-95f7-d007f3f3355a
fi
echo 'Loading Linux 4.9.0-1-sparc64-smp ...'
linux /vmlinuz-4.9.0-1-sparc64-smp
root=UUID=2f8e4b53-061c-4878-9d30-bec179fb59e4 ro quiet
echo 'Loading initial ramdisk ...'
initrd /initrd.img-4.9.0-1-sparc64-smp
}
Found linux image: /boot/vmlinuz-4.5.0-2-sparc64-smp
Found initrd image: /boot/initrd.img-4.5.0-2-sparc64-smp
menuentry 'Debian GNU/Linux, with Linux 4.5.0-2-sparc64-smp' --class
debian --class gnu-linux --class gnu --class os $menuentry_id_option
'gnulinux-4.5.0-2-sparc64-smp-advanced-2f8e4b53-061c-4878-9d30-bec179fb59e4'
{
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_sun
insmod ext2
set root='hd1,sun1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root
--hint-ieee1275='ieee1275//***@400/***@0/***@8/***@0/***@0,sun1'
--hint-bios=hd1,sun1 --hint-efi=hd1,sun1 --hint-baremetal=ahci1,sun1
eda75771-2b2f-4ef8-95f7-d007f3f3355a
else
search --no-floppy --fs-uuid --set=root
eda75771-2b2f-4ef8-95f7-d007f3f3355a
fi
echo 'Loading Linux 4.5.0-2-sparc64-smp ...'
linux /vmlinuz-4.5.0-2-sparc64-smp
root=UUID=2f8e4b53-061c-4878-9d30-bec179fb59e4 ro quiet
echo 'Loading initial ramdisk ...'
initrd /initrd.img-4.5.0-2-sparc64-smp
}
}

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

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

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

### BEGIN /etc/grub.d/30_uefi-firmware ###
### END /etc/grub.d/30_uefi-firmware ###

### 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 ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
done

Rebooted

T5240, No Keyboard
Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
OpenBoot 4.33.6, 98080 MB memory available, Serial #83048406.
Ethernet address 0:14:4f:f3:37:d6, Host ID: 84f337d6.



{0} ok boot
Boot device: /***@400/***@0/***@8/***@0/***@0,0:a File and args:
GRUB Loading kernel..
error: out of memory.
error: no suitable video mode found.

Loading Linux 4.9.0-1-sparc64-smp ...
error: /memory response buffer exceeded.
Loading initial ramdisk ...
error: you need to load the kernel first.

Press any key to continue...

Failed to boot both default and fallback entries.

Press any key to continue...


Rebooted

Loading Linux 4.5.0-2-sparc64-smp ...
error: /memory response buffer exceeded.
Loading initial ramdisk ...
error: you need to load the kernel f
Adrian Davey
2017-01-26 17:08:19 UTC
Permalink
Post by louis ayotte
Post by John Paul Adrian Glaubitz
Post by Eric Snowberg
I believe you are running out of memory here because grub is trying
to load all those frame buffer modules within your config.
Post by louis ayotte
error: no suitable video mode found.
And then it didn’t find one that worked.
For this, I believe you are having the same problem as Frans. Could
GRUB_TERMINAL_OUTPUT="console"
GRUB_DISABLE_RECOVERY="true"
GRUB_PRELOAD_MODULES=“iso9660"
and then regenerate your grub.cfg with grub-mkconfig.
Adrian,
I don’t plan on adding frame buffer support since newer systems don’t
have them. Would it be possible to change your grub package to
include a /etc/default/grub file for SPARC with the changes above?
We do the same thing with our grub rpm.
Oh, absolutely. Thanks for the suggestion. This was just the first
package and I'm happy to include
all improvements that are necessary.
Adrian
K applied these changes, in chroot
/etc/default/grub
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to
Linux
#GRUB_DISABLE_LINUX_UUID=true
# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"
# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
GRUB_TERMINAL_OUTPUT="console"
GRUB_DISABLE_RECOVERY="true"
GRUB_PRELOAD_MODULES="iso9660"
Saved and exited
# grub-mkconfig
Generating grub configuration file ...
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
insmod iso9660
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="0"
fi
if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi
export menuentry_id_option
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}
terminal_output console
if [ "${recordfail}" = 1 ] ; then
set timeout=30
else
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=5
fi
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
set gfxpayload="${1}"
}
set linux_gfx_mode=
export linux_gfx_mode
Found linux image: /boot/vmlinuz-4.9.0-1-sparc64-smp
Found initrd image: /boot/initrd.img-4.9.0-1-sparc64-smp
menuentry 'Debian GNU/Linux' --class debian --class gnu-linux --class
gnu --class os $menuentry_id_option
'gnulinux-simple-2f8e4b53-061c-4878-9d30-bec179fb59e4' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_sun
insmod ext2
set root='hd1,sun1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root
--hint-bios=hd1,sun1 --hint-efi=hd1,sun1 --hint-baremetal=ahci1,sun1
eda75771-2b2f-4ef8-95f7-d007f3f3355a
else
search --no-floppy --fs-uuid --set=root
eda75771-2b2f-4ef8-95f7-d007f3f3355a
fi
echo 'Loading Linux 4.9.0-1-sparc64-smp ...'
linux /vmlinuz-4.9.0-1-sparc64-smp
root=UUID=2f8e4b53-061c-4878-9d30-bec179fb59e4 ro quiet
echo 'Loading initial ramdisk ...'
initrd /initrd.img-4.9.0-1-sparc64-smp
}
submenu 'Advanced options for Debian GNU/Linux' $menuentry_id_option
'gnulinux-advanced-2f8e4b53-061c-4878-9d30-bec179fb59e4' {
menuentry 'Debian GNU/Linux, with Linux 4.9.0-1-sparc64-smp' --class
debian --class gnu-linux --class gnu --class os $menuentry_id_option
'gnulinux-4.9.0-1-sparc64-smp-advanced-2f8e4b53-061c-4878-9d30-bec179fb59e4'
{
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_sun
insmod ext2
set root='hd1,sun1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root
--hint-bios=hd1,sun1 --hint-efi=hd1,sun1 --hint-baremetal=ahci1,sun1
eda75771-2b2f-4ef8-95f7-d007f3f3355a
else
search --no-floppy --fs-uuid --set=root
eda75771-2b2f-4ef8-95f7-d007f3f3355a
fi
echo 'Loading Linux 4.9.0-1-sparc64-smp ...'
linux /vmlinuz-4.9.0-1-sparc64-smp
root=UUID=2f8e4b53-061c-4878-9d30-bec179fb59e4 ro quiet
echo 'Loading initial ramdisk ...'
initrd /initrd.img-4.9.0-1-sparc64-smp
}
Found linux image: /boot/vmlinuz-4.5.0-2-sparc64-smp
Found initrd image: /boot/initrd.img-4.5.0-2-sparc64-smp
menuentry 'Debian GNU/Linux, with Linux 4.5.0-2-sparc64-smp' --class
debian --class gnu-linux --class gnu --class os $menuentry_id_option
'gnulinux-4.5.0-2-sparc64-smp-advanced-2f8e4b53-061c-4878-9d30-bec179fb59e4'
{
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_sun
insmod ext2
set root='hd1,sun1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root
--hint-bios=hd1,sun1 --hint-efi=hd1,sun1 --hint-baremetal=ahci1,sun1
eda75771-2b2f-4ef8-95f7-d007f3f3355a
else
search --no-floppy --fs-uuid --set=root
eda75771-2b2f-4ef8-95f7-d007f3f3355a
fi
echo 'Loading Linux 4.5.0-2-sparc64-smp ...'
linux /vmlinuz-4.5.0-2-sparc64-smp
root=UUID=2f8e4b53-061c-4878-9d30-bec179fb59e4 ro quiet
echo 'Loading initial ramdisk ...'
initrd /initrd.img-4.5.0-2-sparc64-smp
}
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/30_uefi-firmware ###
### END /etc/grub.d/30_uefi-firmware ###
### 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 ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
done
Rebooted
T5240, No Keyboard
Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
OpenBoot 4.33.6, 98080 MB memory available, Serial #83048406.
Ethernet address 0:14:4f:f3:37:d6, Host ID: 84f337d6.
{0} ok boot
GRUB Loading kernel..
error: out of memory.
error: no suitable video mode found.
Loading Linux 4.9.0-1-sparc64-smp ...
error: /memory response buffer exceeded.
Loading initial ramdisk ...
error: you need to load the kernel first.
Press any key to continue...
Failed to boot both default and fallback entries.
Press any key to continue...
Rebooted
Loading Linux 4.5.0-2-sparc64-smp ...
error: /memory response buffer exceeded.
Loading initial ramdisk ...
error: you need to load the kernel first.
Press any key to continue...
Your menu entry in /etc/grub.d/10_linux still seems to have a load_video
function which would do an insmod of
efi_gop
efi_uga
ieee1275_fb
vbe
vga
video_bochs
video_cirrus

if I read it correctly.. not sure you want these.

Regards,

Adrian
James Clarke
2017-01-26 17:12:16 UTC
Permalink
Post by louis ayotte
Post by John Paul Adrian Glaubitz
Post by Eric Snowberg
I believe you are running out of memory here because grub is trying to load all those frame buffer modules within your config.
Post by louis ayotte
error: no suitable video mode found.
And then it didn’t find one that worked.
GRUB_TERMINAL_OUTPUT="console"
GRUB_DISABLE_RECOVERY="true"
GRUB_PRELOAD_MODULES=“iso9660"
and then regenerate your grub.cfg with grub-mkconfig.
Adrian,
I don’t plan on adding frame buffer support since newer systems don’t have them. Would it be possible to change your grub package to include a /etc/default/grub file for SPARC with the changes above? We do the same thing with our grub rpm.
Oh, absolutely. Thanks for the suggestion. This was just the first package and I'm happy to include
all improvements that are necessary.
Adrian
K applied these changes, in chroot
/etc/default/grub
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to
Linux
#GRUB_DISABLE_LINUX_UUID=true
# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"
# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
GRUB_TERMINAL_OUTPUT="console"
GRUB_DISABLE_RECOVERY="true"
GRUB_PRELOAD_MODULES="iso9660"
Saved and exited
# grub-mkconfig
Generating grub configuration file ...
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
insmod iso9660
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="0"
fi
if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi
export menuentry_id_option
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}
terminal_output console
if [ "${recordfail}" = 1 ] ; then
set timeout=30
else
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=5
fi
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
set gfxpayload="${1}"
}
set linux_gfx_mode=
export linux_gfx_mode
Found linux image: /boot/vmlinuz-4.9.0-1-sparc64-smp
Found initrd image: /boot/initrd.img-4.9.0-1-sparc64-smp
menuentry 'Debian GNU/Linux' --class debian --class gnu-linux --class
gnu --class os $menuentry_id_option
'gnulinux-simple-2f8e4b53-061c-4878-9d30-bec179fb59e4' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_sun
insmod ext2
set root='hd1,sun1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root
--hint-bios=hd1,sun1 --hint-efi=hd1,sun1 --hint-baremetal=ahci1,sun1
eda75771-2b2f-4ef8-95f7-d007f3f3355a
else
search --no-floppy --fs-uuid --set=root
eda75771-2b2f-4ef8-95f7-d007f3f3355a
fi
echo 'Loading Linux 4.9.0-1-sparc64-smp ...'
linux /vmlinuz-4.9.0-1-sparc64-smp
root=UUID=2f8e4b53-061c-4878-9d30-bec179fb59e4 ro quiet
echo 'Loading initial ramdisk ...'
initrd /initrd.img-4.9.0-1-sparc64-smp
}
submenu 'Advanced options for Debian GNU/Linux' $menuentry_id_option
'gnulinux-advanced-2f8e4b53-061c-4878-9d30-bec179fb59e4' {
menuentry 'Debian GNU/Linux, with Linux 4.9.0-1-sparc64-smp' --class
debian --class gnu-linux --class gnu --class os $menuentry_id_option
'gnulinux-4.9.0-1-sparc64-smp-advanced-2f8e4b53-061c-4878-9d30-bec179fb59e4'
{
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_sun
insmod ext2
set root='hd1,sun1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root
--hint-bios=hd1,sun1 --hint-efi=hd1,sun1 --hint-baremetal=ahci1,sun1
eda75771-2b2f-4ef8-95f7-d007f3f3355a
else
search --no-floppy --fs-uuid --set=root
eda75771-2b2f-4ef8-95f7-d007f3f3355a
fi
echo 'Loading Linux 4.9.0-1-sparc64-smp ...'
linux /vmlinuz-4.9.0-1-sparc64-smp
root=UUID=2f8e4b53-061c-4878-9d30-bec179fb59e4 ro quiet
echo 'Loading initial ramdisk ...'
initrd /initrd.img-4.9.0-1-sparc64-smp
}
Found linux image: /boot/vmlinuz-4.5.0-2-sparc64-smp
Found initrd image: /boot/initrd.img-4.5.0-2-sparc64-smp
menuentry 'Debian GNU/Linux, with Linux 4.5.0-2-sparc64-smp' --class
debian --class gnu-linux --class gnu --class os $menuentry_id_option
'gnulinux-4.5.0-2-sparc64-smp-advanced-2f8e4b53-061c-4878-9d30-bec179fb59e4'
{
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_sun
insmod ext2
set root='hd1,sun1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root
--hint-bios=hd1,sun1 --hint-efi=hd1,sun1 --hint-baremetal=ahci1,sun1
eda75771-2b2f-4ef8-95f7-d007f3f3355a
else
search --no-floppy --fs-uuid --set=root
eda75771-2b2f-4ef8-95f7-d007f3f3355a
fi
echo 'Loading Linux 4.5.0-2-sparc64-smp ...'
linux /vmlinuz-4.5.0-2-sparc64-smp
root=UUID=2f8e4b53-061c-4878-9d30-bec179fb59e4 ro quiet
echo 'Loading initial ramdisk ...'
initrd /initrd.img-4.5.0-2-sparc64-smp
}
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/30_uefi-firmware ###
### END /etc/grub.d/30_uefi-firmware ###
### 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 ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
done
Rebooted
T5240, No Keyboard
Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
OpenBoot 4.33.6, 98080 MB memory available, Serial #83048406.
Ethernet address 0:14:4f:f3:37:d6, Host ID: 84f337d6.
{0} ok boot
GRUB Loading kernel..
error: out of memory.
error: no suitable video mode found.
Loading Linux 4.9.0-1-sparc64-smp ...
error: /memory response buffer exceeded.
Loading initial ramdisk ...
error: you need to load the kernel first.
Press any key to continue...
Failed to boot both default and fallback entries.
Press any key to continue...
Rebooted
Loading Linux 4.5.0-2-sparc64-smp ...
error: /memory response buffer exceeded.
Loading initial ramdisk ...
error: you need to load the kernel first.
Press any key to continue...
Your menu entry in /etc/grub.d/10_linux still seems to have a load_video function which would do an insmod of
efi_gop
efi_uga
ieee1275_fb
vbe
vga
video_bochs
video_cirrus
if I read it correctly.. not sure you want these.
From looking at /etc/grub.d/10_linux, the load_video is guarded by various
GRUB_GFXPAYLOAD_LINUX checks. I assume you probably want to set it to something
like "text".

James
Eric Snowberg
2017-01-26 19:12:23 UTC
Permalink
Post by louis ayotte
Post by John Paul Adrian Glaubitz
Post by Eric Snowberg
I believe you are running out of memory here because grub is trying to load all those frame buffer modules within your config.
Post by louis ayotte
error: no suitable video mode found.
And then it didn’t find one that worked.
GRUB_TERMINAL_OUTPUT="console"
GRUB_DISABLE_RECOVERY="true"
GRUB_PRELOAD_MODULES=“iso9660"
and then regenerate your grub.cfg with grub-mkconfig.
Adrian,
I don’t plan on adding frame buffer support since newer systems don’t have them. Would it be possible to change your grub package to include a /etc/default/grub file for SPARC with the changes above? We do the same thing with our grub rpm.
Oh, absolutely. Thanks for the suggestion. This was just the first package and I'm happy to include
all improvements that are necessary.
Adrian
K applied these changes, in chroot
/etc/default/grub
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to
Linux
#GRUB_DISABLE_LINUX_UUID=true
# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"
# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
GRUB_TERMINAL_OUTPUT="console"
GRUB_DISABLE_RECOVERY="true"
GRUB_PRELOAD_MODULES="iso9660"
Saved and exited
# grub-mkconfig
Is this the command you ran? If so, it would not have saved the change. You either need to redirect the output to your grub.cfg file or run it with the -o option like this:

# grub-mkconfig -o /boot/grub/grub.cfg

Currently I don’t have a Debian distro installed on SPARC. I think I need to spend some time and set one up. So I'm assuming that is where your grub.cfg should be saved.

I also see some things below that are not in my code that probably got changed when grub was packaged up.
Post by louis ayotte
Generating grub configuration file ...
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
#
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
For example there is no need for colors
Post by louis ayotte
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
set gfxpayload="${1}”
}
set linux_gfx_mode=
export linux_gfx_mode
And I don’t think this should be here.
John Paul Adrian Glaubitz
2017-01-26 20:33:25 UTC
Permalink
Hi Eric!
Post by Eric Snowberg
Currently I don’t have a Debian distro installed on SPARC. I think I need to
spend some time and set one up. So I'm assuming that is where your grub.cfg
should be saved.
That's great. The more SPARC upstream developers run Debian, the better ;). You
are also very welcome to send any patches for the Debian packaging or even become
a co-maintainer for Debian/sparc64 ;).

In any case, this mailing list post should help you getting Debian installed on
Post by Eric Snowberg
https://lists.debian.org/debian-sparc/2016/06/msg00126.html
I also see some things below that are not in my code that probably got changed when grub was packaged up.
That's because I actually just took Debian's source grub2 package, added your
patches as a single Debian patch and rebuilt the package with the "+sparc64"
version suffix added.
Post by Eric Snowberg
https://anonscm.debian.org/cgit/pkg-grub/grub.git
Note: This does not include your patches yet as I just created an unofficial
grub2 package for sparc64 only. If you check the "debian" subdirectory, you'll
see that there are already some sparc/sparc64-specific files in place and we
should probably just update these files as well to adjust the default configuration
for sparc and sparc64.

Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer - ***@debian.org
`. `' Freie Universitaet Berlin - ***@physik.fu-berlin.de
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
Continue reading on narkive:
Loading...