grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Maturity of GRUB on powerpc/ppc64?


From: Frank Scheiner
Subject: Re: Maturity of GRUB on powerpc/ppc64?
Date: Mon, 2 Oct 2017 17:04:58 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0

On 09/26/2017 08:57 PM, Frank Scheiner wrote:
I'll describe details maybe later this week. In short, it works similar in general to what I described for the Power Mac G5 (11,2). On the Xserve G4 I used it without separate partition for `/boot` without an issue (the partition for `/` was formatted with EXT4 during the original Wheezy installation on this machine). It cost me some time to find out what was the correct setting to activate the serial console. By default Grub uses a glass console, even if there is no graphics card installed. But this is usually not an issue for the workstations.

As a follow-up to [1] but maybe better placed under the subject of this thread, the promised details for the Grub installation on an Xserve G4 with Debian Sid.

The Xserve G4 originally had Debian Wheezy installed which was first upgraded to Debian Jessie and then to Debian Sid. To be able to successfully boot with the current Linux kernel 4.12.x:

1. I needed to blacklist the `rack-meter` module. It is loaded automatically by kernel 4.12.x of Debian Sid but not by 3.16.x of Debian Jessie - don't know why. But both kernels panic after it was loaded.

2. Because I couldn't successfully boot with kernel 4.12.x, I wanted to fall back to kernel 3.16.x to fix things, but this also didn't work out of the box, as the `/dev/disk` directory in the - possibly recreated - initrd of kernel 3.16.x did not contain a `by-uuid` directory, but the root FS was given by UUID in the kernel command line provided by yaboot. I don't know if this was done by Sid, Jessie or Wheezy originally. With a Debian installer CD-ROM I could "fix" things by using the actual `sd` device.

For the Grub installation I used the same approach as in [1] and not the `grub-install` command to rule out additional sources of errors:

# GRUB-IEEE1275 setup in Xserve G4 (1,2) #

## Install grub-ieee1275 ##

```
# apt install grub-ieee1275
```

## Full file list for grub image ##

Placed in `~/grub/`, copied from `/usr/lib/grub/powerpc-ieee1275` - this time in a more useful form for copy-and-paste:
```
archelp.mod bitmap.mod bitmap_scale.mod blocklist.mod boot.mod bufio.mod cat.mod cmp.mod configfile.mod cpio.mod crypto.mod datehook.mod date.mod datetime.mod disk.mod echo.mod elf.mod ext2.mod fat.mod font.mod fshelp.mod gettext.mod gfxmenu.mod gfxterm.mod gzio.mod halt.mod help.mod hexdump.mod hfs.mod hfsplus.mod ieee1275_fb.mod kernel.img linux.mod loadenv.mod loopback.mod lsmmap.mod ls.mod memdisk.mod memrw.mod minicmd.mod moddep.lst msdospart.mod normal.mod part_apple.mod part_msdos.mod parttool.mod probe.mod read.mod reboot.mod regexp.mod relocator.mod scsi.mod search_fs_file.mod search_fs_uuid.mod search_label.mod search.mod setjmp.mod sleep.mod suspend.mod terminal.mod test.mod trig.mod true.mod video_colors.mod video_fb.mod videoinfo.mod video.mod
```

## Partition table ##

```
~# mac-fdisk -l
/dev/sda
# type name length base ( size ) system /dev/sda1 Apple_partition_map Apple 63 @ 1 ( 31.5k) Partition map /dev/sda2 Apple_Bootstrap untitled 1954 @ 64 (977.0k) NewWorld bootblock /dev/sda3 Apple_UNIX_SVR2 untitled 613027344 @ 2018 (292.3G) Linux native /dev/sda4 Apple_UNIX_SVR2 swap 12113037 @ 613029362 ( 5.8G) Linux swap /dev/sda5 Apple_Free Extra 49 @ 625142399 ( 24.5k) Free space

Block size=512, Number of Blocks=625142448
DeviceType=0x0, DeviceId=0x0
```

## Embedded config file ##

NOTICE: No separate partition for `/boot` used this time!

`~/grub/grub-embedded-config.cfg`
```
insmod serial
insmod terminal
insmod part_apple
insmod ext2

terminal_input serial_ieee1275/scca console
terminal_output serial_ieee1275/scca console

set root=(ieee1275/hd,apple3)
set prefix=(ieee1275/hd,apple3)/boot/grub

configfile /boot/grub/grub.cfg
```

## Actual config file ##

NOTICE: No separate partition for `/boot` used this time!

`/boot/grub/grub.cfg`
```
set root=(ieee1275/hd,apple3)

timeout=10
#default=0

menuentry "Debian GNU/Linux Sid (powerpc)" {
    linux /boot/vmlinux root=/dev/sda3 console=tty1 console=ttyPZ0,57600n8
    initrd /boot/initrd.img
}
```

## Command to create the grub image ##

```
~/grub# grub-mkimage -c ./grub-embedded-config.cfg -o ../grub.img -O powerpc-ieee1275 -d . -p '(ieee1275/hd,apple3)/boot/grub' *.mod
```

## Installation on HFS partition ##

This time with correct command and directory names (compared to [1]):
```
~# mount /dev/sda2 /mnt
~# cp grub.img /mnt/
~# sync
~# df -h
[...]
/dev/sda2       974K  852K  122K  88% /mnt
[...]
~# umount /mnt
```

Cheers,
Frank

[1]: https://lists.debian.org/debian-powerpc/2017/09/msg00034.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]