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

How to create a ready to use USB memory stick image #172

Closed
gregorkistler opened this issue May 13, 2017 · 3 comments

Comments

@gregorkistler
Copy link

commented May 13, 2017

Hi,

is there a way to flash the SD card image to an USB memory stick and boot it completely without a SD card?
Sadly the cmdline.txt and /etc/fstab contain block device names like /dev/mmcblk0p2 for the root partition and not PARTUUIDs - same goes for the boot partition.
You´d need to boot from SD card first, copy everything to an USB memory stick and change both files - theoretically.

BUT:
Even if I try to get it done like described here or here it still won´t boot completely.
My Raspberry Pi 3 gets an IP address and the network device responds to ICMP packages but the boot process always got stuck at a certain point.

Thanks

@gregorkistler gregorkistler changed the title How to create a ready to use USB image How to create a ready to use USB memory stick image May 13, 2017
@gregorkistler

This comment has been minimized.

Copy link
Author

commented May 13, 2017

Got it. The only file which needs to be changed is builder/chroot-script.sh.
Created a new image and flashed it directly onto an USB memory stick.
Boots up without any issues.

Still not sure why it doesn´t work properly if I rsync the data from a working SD image installation though.

@DieterReuter

This comment has been minimized.

Copy link
Collaborator

commented May 13, 2017

@gregorkistler Great! Could you please share the changes you made, please? Do you think we could include in a way, so one could boot HypriotOS from SD card, USB drive or Network boot with minimal chances only?
Or even better, file a PR so we could discuss this changes and include it later on into our official image builder.

@gregorkistler

This comment has been minimized.

Copy link
Author

commented May 14, 2017

It´s actually just a quick'n'dirty solution as it would break the usage of SD cards and also works only as long as you just use one USB memory stick so I won´t recommend a PR.

The following changes were necessary:

  1. builder/chroot-script.sh
    Line 142: replace mmcblk0p2 with sda2
    Line 172: replace mmcblk0p1 with sda1
    Line 173: replace mmcblk0p2 with sda2

  2. builder/files/etc/firstboot.d/10-resize-rootdisk
    Line 10: replace mmcblk0p with sda
    Line 23: replace mmcblk0 with sda
    Line 31: replace mmcblk0 with sda
    Line 38: replace mmcblk0 with sda

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.