Persistent Installation on RPi3
#1
Tue, 2017-10-31 16:39
yaron
-
- Offline
- 2 months 4 weeks ago
- 2017-10-31
Hey guys,
I've seen some attempts to create a persistent (Install to HDD) system and trying them proved me it's might not be the best approach.
At some point I've realized that I need the fat32 partition in order to boot the Raspberry Pi 3.
In order to make the installation persistent I tried running setup-disk -o sys /media/mmcblk0p2
, and then changing the cmdline.txt
file so it'll have the root=/dev/mmcblk0p2
at the end, it failed miserably, blank screen (I even tried adding rootfstype=ext4
but that didn't help too).
So my question is: Is there a way to create a persistent installation on RPi3?
If that's not possible yet then: Is there a way to keep the python packages I installed with pip using lbu commit
?
Although I haven't installed onto a Raspberry before, could the wiki passage called Persistent storage on Raspberry Pis using disk-based (sys) installation help, even though it is to install onto an SD card?
Could anyone else help please?
Hey there, thank you so much for your help :)
I've tried each and every possible method I could find, this one was the first, apparently changing the
cmdline.txt
is the problematic part.I can't help but thinking that maybe the root configuration should not be directly to the device block, I'm guessing there should be another way, I'm reading Kernel loading commands to understand what I did wrong, in the meanwhile I'll be trying some other distros.
Get a SD-card and format 2 partitions : First with 128Mo, fat16, boot and lba flags. Second in ext4 with place as you can get.
Download :
http://dl-cdn.alpinelinux.org/alpine/v3.6/releases/armhf/alpine-rpi-3.6.2-armhf.tar.gz
and untar on the first partition.
So plug HDMI, keyboard and network cables. Insert the SD-card into the Raspberrypi and power on.
So launch instructions as follows:
Be patient with setup-disk, especially if you have a RaspberryPi 1B ( several tens of minutes )
After reboot execute the following instructions :
You are so awesome! Thank you so much!
Is there a chance you will let me add that info to the wiki or add it yourself?
And again, thank you!
That's great, @bazooka07! Your tips are excellent and wiki-worthy, I agree! It's a great idea by @yaron if you could transcribe your helpful steps into the wiki, or if you would agree for him to have them posted in the wiki! A variation on your steps might possibly be found anyway or modified in the future by anyone who might find any improvements.
Alternatively, if there is no wiki entry made for installation to a hard disk for Raspberry, hopefully someone might provisionally make links in the Raspberry wiki page to your very helpful post above and/or to your French article that was tweeted on November 1st (same user handle, general content and icon). The tweeted link to the article doesn't work but the article was found at Installation de Alpinelinux sur un Raspberry 1B ou 3B instead. Thanks for your input, @bazooka07, that's great!
I've added a new section to the Raspberry Pi page in the wiki with a link to bazooka07's post, I will fill it out a bit more when I have time.
https://wiki.alpinelinux.org/wiki/Raspberry_Pi#Persistent_Installation_on_RPi3
Thanks for you remarks.
Now, I have post on Wiki
But, I have to continue for post-installation and install for Nginx.
Just a quick heads up:
Avoid running apk update && apk upgrade with all the repos, the system won't load after this, I tried pulling the logs from the SD Card but I just couldn't find the relevant ones.
I have exactly the same problem, all things were fine after a reboot, and then, i did apk-update and apk-upgrade, then i reboot again, and now I have a blank screen, the system does not want to load.
Do you know why there is this error ? How can i load the system now ?
Thanks
@yanssolo, have you tried it with 3.7? You may also want to remove the "edge" repositories.
I follow this guide installed the v3.7 got the same problem! RPi 3b can booting but screen dosen't display.
Yes, don't select all the repositories but this one nearest from your location or in your country.
To get the list of the repositories :
sudo setup-apkrepos
Avoid to type r (random) of f (fastest), I have a trouble.
Following bazooka's instructions I get a segmentation fault when trying to run setup-disk:
I've configured the second partition on my SSD (mmcblk0p2) as ext4. I've tried repeating this process several times. Not sure what the problem is.
The installation process on Raspberry Pi is slightly modified in the wiki page, which was based on this page, and it has advised since then that syslinux and extlinux errors at that setup point can be ignored. However, I've not installed on a Pi. I'm no expert, but syslinux is the bootloader (a more common bootloader, on other Linux distributions and for x86_64 - not Pi's architecture - is Grub), but Alpine doesn't use that here, I think (and extlinux.conf is roughly equivalent to where on Grub you would modify the 'grub command line', etc).
Can you continue with the wiki instructions? Does anyone know whether the segmentation fault has to do with the hardening of the kernel in this instance?
@davidfcannock
I also had this error but it's normal and you could continue without fear ;)
@yaron
the most reverent modification on partition 1 I did was
fat16 or fat32
but I did'nt FLAG BOOT and LBA as mentionned