Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stretch lite image boot fails #24

Closed
broo0ose opened this issue Oct 23, 2017 · 5 comments
Closed

Stretch lite image boot fails #24

broo0ose opened this issue Oct 23, 2017 · 5 comments
Assignees

Comments

@broo0ose
Copy link

broo0ose commented Oct 23, 2017

Hi,

on first boot I got

[ 1.618965] mmcblk0: p1 p2

and then the Pi Zero froze.

I've solved the problem so I though I'd post here to share the knowledge.
After resizing an image the first boot fails due to (I think) the changed naming of the partitions in /etc/fstab and cmdline.txt.

My solution after much googling was to replace:

PARTUUID=0e75fcd5-01 with /dev/mmcblk0p1
and
PARTUUID=0e75fcd5-02 with /dev/mmcblk0p2

in these files.

I did it by mounting the partitions, but making the change before creating the full fat image would probably be easier. Unless it involves creating a time machine.

HTH

Bruce

Edit,
more info here
https://raspberrypi.stackexchange.com/questions/68082/why-wont-my-raspberrypi-boot-if-i-use-parted-to-adjust-the-partition

@Drewsif Drewsif self-assigned this Oct 24, 2017
@Drewsif
Copy link
Owner

Drewsif commented Oct 24, 2017

I'm having trouble replicating your issue. Are you using the latest stretch image? And whats the OS you're running pishrink from?

@broo0ose
Copy link
Author

I'm running pishrink from Raspbian Stretch lite on a Pi3. It was certainly downloaded as stretch and updated since, I don't know how many stretch Raspbian versions there have been so far.

Not sure if this is relevant but the image I was shrinking was a Pi-Zero gadget image, so the cmdline.txt had been edited. The link I added in the first post pointed me to an issue with PARTUUID and sure enough explicitly putting the /dev entries in fixed the issue.

@Drewsif
Copy link
Owner

Drewsif commented Oct 24, 2017

Hmm, so the image I was using was booting with PARTUUID as well and I checked to make sure pisrink wasn't changing the UUID and it didn't for me. If it's the case that it is changing it I'd like to make it not do that.

I didn't run pishrink from a raspbian image, so let me try that and see if I can replicate it.

@samvrlewis
Copy link

Also had this issue - the PARTUUIDs definitely changed between the shrunk and non shrunk images. Maybe different versions of parted do this differently? For reference, I'm using Fedora 28 and parted 3.2.

The workaround I have been using is to use blkid to find the new PARTUUID of the partitions (on the shrunk image) and then updating /etc/fstab and /boot/cmdline.txt to refer to them.

@Drewsif
Copy link
Owner

Drewsif commented Feb 14, 2023

Closing for #255. Thank you for reporting the issue

@Drewsif Drewsif closed this as completed Feb 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants