Mail archive
alpine-user

[alpine-user] Re: Need advice on Raspberry Pi install from SD card...

From: John Miner <jminer74_at_post.com>
Date: Mon, 30 Jul 2018 03:01:47 +0200
The below script works for me to create an img file which I then dd to an SD card (or use Etcher https://etcher.io/). I am using v3.7 below, but it also works on v3.8 except the serial console won't work for some reason on v3.8 for me. Plug in an HDMI cable to make sure you boot and debug from there if the serial console isn't working on v3.8 (or just stay on v3.7-stable)
 
#!/bin/bash
ALPINE="alpine-rpi-3.7.0-armhf.tar.gz"
http://dl-cdn.alpinelinux.org/alpine/v3.7/releases/armhf/alpine-rpi-3.7.0-armhf.tar.gz
IMAGE="alpine.img"
echo "Creating image file..."
dd if=/dev/zero of=$IMAGE bs=1M count=100
DEV=$(losetup -f --show $IMAGE)
echo "Mounted image file to: $DEV"
echo "Creating partition..."
parted -s "$DEV" \
  mklabel msdos \
  mkpart p fat32 2048s 100% \
  set 1 boot on
echo "Formatting partition..."
mkfs.vfat ${DEV}p1
echo "Mounting filesystem..."
mount ${DEV}p1 /mnt/alpine
echo "Writing contents..."
tar -xzf $ALPINE -C /mnt/alpine/ --no-same-owner
sync
echo "Unmounting..."
umount /mnt/alpine
losetup -d ${DEV}
echo "Done."
 
Sent: Friday, July 27, 2018 at 4:44 PM
From: "Stuart Hungerford" <stuart.hungerford_at_gmail.com>
To: alpine-user_at_lists.alpinelinux.org
Subject: [alpine-user] Need advice on Raspberry Pi install from SD card...
Hi,

I'm trying to bring Alpine Linux 3.8.0 up on a Raspberry Pi 3B using a
bootable SD card. The pi is not booting and the activity LEDs don't
flash. Here's the steps I've followed to setup the SD card on an
Antergos linux system:

1. Partition an SD card with parted:

$ sudo parted /dev/mmblkc0
mklabel msdos

mkpart primary fat32 2048s 100%

set 1 boot on

print

Model: (file)
Disk /dev/mmcblk0: 4128MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number Start End Size Type File system Flags
1 1049kB 4127MB 4126MB primary fat32 boot, lba


2. Format as fat32 with:

$ sudo mkfs.vfat /dev/mmblkc0


3. Expand the distro tar file:

$ sudo mkdir /mnt/SD

$ sudo mount -t vfat /dev/mmcblk0 /mnt/SD

$ sudo cd /mnt/SD

$ sudo wget http://dl-cdn.alpinelinux.org/alpine/v3.8/releases/armhf/alpine-rpi-3.8.0-armhf.tar.gz

$ sudo tar -xzvf alpine-rpi-3.8.0-armhf.tar.gz --no-same-owner

$ sudo rm alpine-rpi-3.8.0-armhf.tar.gz


4. Add a usercfg.txt file as per
https://wiki.alpinelinux.org/wiki/Classic_install_or_sys_mode_on_Raspberry_Pi

5. Unmount and load the SD card into Raspberry Pi and power on.

I've also tried a different SD card and tried both cards in two
different Raspberry Pi 3B's all with the same result.

I think there's some assumed step or setting that I'm missing--can
anyone advise?

Thanks,

Stu


---
Unsubscribe: alpine-user+unsubscribe_at_lists.alpinelinux.org
Help: alpine-user+help_at_lists.alpinelinux.org
---
 
--- Unsubscribe: alpine-user+unsubscribe_at_lists.alpinelinux.org Help: alpine-user+help_at_lists.alpinelinux.org --- Received on Mon Jul 30 2018 - 03:01:47 UTC