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

Re: New discussion: ppc64 installer -- ext2 /boot partition to keep sabot happy.



Hi Adrian,

On 09/26/2017 10:47 PM, John Paul Adrian Glaubitz wrote:
On 09/26/2017 10:34 PM, Rick Thomas wrote:
Hmmm…  Are you sure it’s trying to read /etc/yaboot.conf (i.e. from the root partition)?

Yes, that's directly part of the error message. It tries to read

"-3/etc/yaboot.conf" and then prints the corrupted filesystem error.

I had to take a screenshot of QEMU-KVM in virt-manager because I couldn't
get Yaboot to work on the text console.

See: https://people.debian.org/~glaubitz/yaboot-error.png

From the screenshot I assume the firmware succeeds to load `yaboot` (but don't know from where) but fails to load `yaboot.conf` from the same partition in an `etc` sub directory.

From network booting my G5 and POWER5 machines I know that:

* for the G5s, yaboot "wants" to load its configuration file from the root-level of the same remote dir from where it was loaded and...

* for the POWER5, yaboot "wants" to load its configuration file from an `etc` sub dir of the remote dir from where it was loaded.

I also tried to verify this with the on-disk installation of Debian Jessie on the POWER5 which boots with yaboot:
```
[...]
Config file read, 4096 bytes
Welcome to yaboot version 1.3.16
Enter "help" to get some basic usage information
boot:
Please wait, loading kernel...
   Elf64 kernel loaded...
Loading ramdisk...
ramdisk loaded at 01a00000, size: 3336 Kbytes
OF stdout device is: /vdevice/vty@30000000
Preparing to boot Linux version 3.16.0-4-powerpc64 (debian-kernel@lists.debian.org) (gcc version 4.8.4 (Debian 4.8.4-1) ) #1 SMP Debian 3.16.43-2 (2017-04-30)
Detected machine type: 0000000000000101
Max number of cores passed to firmware: 16 (NR_CPUS = 32)
Calling ibm,client-architecture-support... not implemented
command line: root=UUID=[...] ro
[...]
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[ 0.000000] Linux version 3.16.0-4-powerpc64 (debian-kernel@lists.debian.org) (gcc version 4.8.4 (Debian 4.8.4-1) ) #1 SMP Debian 3.16.43-2 (2017-04-30)
[...]
```

There I have the following partition table:
```
root@p5-520q:~# fdisk -l

Disk /dev/sda: 136.7 GiB, 146814976000 bytes, 286748000 sectors
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: dos
Disk identifier: 0x73d66e4d

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sda1  *         2048     16383     14336     7M 41 PPC PReP Boot
/dev/sda2           16384 275019775 275003392 131.1G 83 Linux
/dev/sda3       275021822 286746623  11724802   5.6G  5 Extended
/dev/sda5       275021824 286746623  11724800   5.6G 82 Linux swap / Solaris
```

`/dev/sda2` is formatted with EXT4 and the following options:
```
root@p5-520q:~# tune2fs -l /dev/sda2
[...]
Filesystem features: has_journal ext_attr resize_inode dir_index filetype needs_recovery extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
Filesystem flags:         unsigned_directory_hash
[...]
```

It looks like yaboot must be able to read from it, as the PReP partition is too small to hold even the kernel (16 MiB).

The `/etc/yaboot.conf` on `/dev/sda2` looks like this:
```
## yaboot.conf generated by debian-installer
##
## run: "man yaboot.conf" for details. Do not make changes until you have!!
## see also: /usr/share/doc/yaboot/examples for example configurations.
##
## For a dual-boot menu, add one or more of:
## bsd=/dev/hdaX, macos=/dev/hdaY, macosx=/dev/hdaZ

boot="/dev/disk/by-id/scsi-1[...]-part1"
root="UUID=[...]"
timeout=50
install=/usr/lib/yaboot/yaboot
enablecdboot

image=/boot/vmlinux
        label=Linux
        device=/pci@800000020000003/pci@2,4/pci1069,b166@1/scsi@0/sd@3,0
        partition=2
        read-only
        initrd=/boot/initrd.img

image=/boot/vmlinux.old
        label=old
        device=/pci@800000020000003/pci@2,4/pci1069,b166@1/scsi@0/sd@3,0
        partition=2
        read-only
        initrd=/boot/initrd.img.old
```

I don't know how to access the PReP partition, so cannot have a look what's there.

To be able to load the yaboot config file from the partition that holds the root FS, yaboot needs to know which partition to use. Hence I assume there has to be an additional configuration file that is loaded maybe from the PReP partition.

Cheers,
Frank


Reply to: