Mailinglist Archive: opensuse-arm (49 mails)

< Previous Next >
Re: [opensuse-arm] JeOS-2017-03-13 image for RPi 1 installs OK, Grub fails on reboot
On 03/28/2017 08:27 AM, Alexander Graf wrote:
On 27/03/2017 23:15, Alex Armstrong wrote:
Alexander Graf wrote:
Hi Alex,

On 23/03/2017 20:48, Alex Armstrong wrote:
Greetings,

I was testing:
openSUSE-Tumbleweed-ARM-JeOS-raspberrypi.armv6l-2017.03.13-Build1.8.raw.xz

from:
http://download.opensuse.org/repositories/devel:/ARM:/Factory:/Contrib:/RaspberryPi/images/

On RaspberryPi 1 Model B
It installs fine - expands the file system, creates the dracut based
init and boots to a usable system.  But when I reboot, grub fails with:
error: attempt to read or write outside of partition.

This sounds like the repartitioning failed.

I just had the same thing on a Raspberry Pi 3 with
openSUSE-Leap42.3-ARM-JeOS-raspberrypi3.aarch64-2017.07.26-Build1.1.raw.xz
from
http://download.opensuse.org/ports/aarch64/distribution/leap/42.3/appliances/

[...]

One thing you could try is check on a working system what the
partition table and file system look like. It almost sounds like the
ext4 partition got resized, but the partition table is still on the
old, small size.


Alex
Thanks for mentioning that, I took a look at the SD card with parted
and here's what I found:

Model: Generic- Multi-Card (scsi)
Disk /dev/sdb: 7948MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt_sync_mbr

Number  Start   End     Size    File system     Name    Flags
 1      1049kB  211MB   210MB   fat16           UEFI    boot
 2      212MB   430MB   218MB   ext4            lxboot
 3      431MB   7427MB  6996MB                  lxroot
 4      7428MB  7948MB  520MB   linux-swap(v1)  lxswap

I think you're right - the resizing didn't work as expected.  I saw
the success message in the log and didn't think to check it further.

In my case, I have:

# parted /dev/mmcblk0
GNU Parted 3.1
Using /dev/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Model: SD SA16G (sd/mmc)
Disk /dev/mmcblk0: 15.5GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number Start End Size Type File system Flags
1 1049kB 211MB 210MB primary fat16 lba, type=0c
2 212MB 430MB 218MB primary ext4 type=83
3 431MB 15.0GB 14.5GB primary type=83
4 15.0GB 15.5GB 519MB primary linux-swap(v1) type=83


The partition table looks pretty sane to me. You have an 8GB disk and /
is properly expanded to 7GB.

Additionally when I try to mount partition 2, it fails with this message:
    EXT4-fs (sdb2): bad geometry: block count 1761625 exceeds size of
    device (53248 blocks)

Ok, so something really is broken there ;). Good.

It looks like your block size is 4kb (default size for ext4 IIRC). 53248
blocks translate to 218MB (with 1000 bytes as kbyte) while 1761625
blocks would be 7215MB.

If I had to guess, I'd say someone dropped the requirement for a
separate boot partition but forgot to update the partitioning script in
the JeOS package.

If I'm right, /dev/sdb3 should not contain a valid file system.

In that case, can you manually try to fix it up for now? Remove
partitions 2 and 3. Then create a new partition from beginning of
current partition 2 until end of partition 3. Switch to unit type sector
(unit s I think in parted) to make sure they really are aligned.

Then try to mount that new partition. Does it work? If so, does it boot?

That trick worked for me. For the record:

(parted) unit s
(parted) print
Model: SD SA16G (sd/mmc)
Disk /dev/mmcblk0: 30253056s
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number Start End Size Type File system Flags
1 2048s 411651s 409604s primary fat16 lba, type=0c
2 413696s 839683s 425988s primary ext4 type=83
3 841728s 29238300s 28396573s primary type=83
4 29239296s 30253022s 1013727s primary linux-swap(v1) type=83

(parted) rm 2
(parted) rm 3
(parted) mkpart
Partition type? primary/extended? primary
File system type? [ext2]? ext4
Start? 413696s
End? 29238300s
(parted) p
Model: SD SA16G (sd/mmc)
Disk /dev/mmcblk0: 30253056s
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number Start End Size Type File system Flags
1 2048s 411651s 409604s primary fat16 lba, type=0c
2 413696s 29238300s 28824605s primary ext4 type=83
4 29239296s 30253022s 1013727s primary linux-swap(v1) type=83

Rebooted, came up fine (although it takes about a minute and a half to
get from the grub screen to the login prompt, and the screen is blank
for all this time -- is that normal?)

Regards,

Tim
--
Tim Serong
Senior Clustering Engineer
SUSE
tserong@xxxxxxxx
null
< Previous Next >
This Thread
  • No further messages