Where can I download a mere 254MiB Image of CentOS7 for RasPi in less than 2 days?

Issues related to hardware problems
Post Reply
dimwit
Posts: 7
Joined: 2017/02/14 15:59:24

Where can I download a mere 254MiB Image of CentOS7 for RasPi in less than 2 days?

Post by dimwit » 2017/02/14 16:41:53

Hello,

I've been trying to download the CentOS-7 Minimal image for the ARM/PasPi2 almost the whole (office) day, in vain.

The link below was the only download URL that I have discovered so far, but the dowload rate grinds almost to a halt and bytes seem to drip, i.e. ETA > 1 day!

http://mirror.centos.org/altarch/7/isos/armhfp/

I've been searching a few German CentOS mirrors (that's where I live), but none I browsed through had an armhfp subdir on their site.

Please, this is rediculous. There must be a file server that serves this small image in a reasonable time.


N.b. I also tried to resort to Fedora, for I remembered they once provided a Pidora image.
But what I found of Pidora seemed stale (dating back to 2014).
Then I read in their Wiki that from Fedora 24 or 25 they have a namesake Fedora image for ARM
(because of an inadvertent mnemonic clash with the Russian swear word Pidor. I think they gave up that former name).
But when I read in the release notes of the current Fedora 25 ARM image about what it all yet doesn't support of this SBC,
I dismissed my plan to take Fedora instead.

User avatar
avij
Retired Moderator
Posts: 3046
Joined: 2010/12/01 19:25:52
Location: Helsinki, Finland
Contact:

Re: Where can I download a mere 254MiB Image of CentOS7 for RasPi in less than 2 days?

Post by avij » 2017/02/14 18:02:41

mirror.centos.org points to a number of mirrors, so if you ran into some mirror instance that isn't suitable for you, simply trying again might help. You will likely end up on a different instance of mirror.centos.org

Some other mirrors that you could use:
http://mirrors.coreix.net/centos-altarch/
http://fr.mirror.babylon.network/centos-altarch
http://mirror.airenetworks.es/CentOS-AltArch/
http://mirror1.hs-esslingen.de/pub/Mirr ... s-altarch/

User avatar
avij
Retired Moderator
Posts: 3046
Joined: 2010/12/01 19:25:52
Location: Helsinki, Finland
Contact:

Re: Where can I download a mere 254MiB Image of CentOS7 for RasPi in less than 2 days?

Post by avij » 2017/02/16 17:28:13

I hope you have already managed to download the file, but for future reference for other users struggling with the same problem, please see https://wiki.centos.org/SpecialInterest ... ch/Mirrors

dimwit
Posts: 7
Joined: 2017/02/14 15:59:24

Re: Where can I download a mere 254MiB Image of CentOS7 for RasPi in less than 2 days?

Post by dimwit » 2017/02/17 08:44:19

Hello avij,

thanks for providing the list of mirrors that host the AltArch CentOS images.

I apologize, I should have looked more carefully.

Though here from work, where I have to use a corporate proxy, I could fetch the images.

Code: Select all

$ time wget -Y1 --quiet http://mirror1.hs-esslingen.de/pub/Mirrors/centos-altarch/7.3.1611/isos/armhfp/CentOS-Userland-7-armv7hl-Minimal-1611-RaspberryPi3.img.xz

real    1m46.259s
user    0m0.419s
sys     0m2.416s

$ wget -Y1 --quiet -nd -O CentOS-7-Minimal_RasPi_imgs.sha256 http://mirror1.hs-esslingen.de/pub/Mirrors/centos-altarch/7.3.1611/isos/armhfp/sha256sum.txt
 
$ sha256sum -c CentOS-7-Minimal_RasPi_imgs.sha256 
sha256sum: CentOS-Userland-7-armv7hl-Minimal-1611-BananaPi.img.xz: No such file or directory
CentOS-Userland-7-armv7hl-Minimal-1611-BananaPi.img.xz: FAILED open or read
sha256sum: CentOS-Userland-7-armv7hl-Minimal-1611-Cubieboard.img.xz: No such file or directory
CentOS-Userland-7-armv7hl-Minimal-1611-Cubieboard.img.xz: FAILED open or read
sha256sum: CentOS-Userland-7-armv7hl-Minimal-1611-CubieTruck.img.xz: No such file or directory
CentOS-Userland-7-armv7hl-Minimal-1611-CubieTruck.img.xz: FAILED open or read
CentOS-Userland-7-armv7hl-Minimal-1611-RaspberryPi2.img.xz: OK
CentOS-Userland-7-armv7hl-Minimal-1611-RaspberryPi3.img.xz: OK
sha256sum: WARNING: 3 of 5 listed files could not be read

dimwit
Posts: 7
Joined: 2017/02/14 15:59:24

Re: Where can I download a mere 254MiB Image of CentOS7 for RasPi in less than 2 days?

Post by dimwit » 2017/02/17 09:18:13

One more question.
But maybe I should better start a new thread for it than appending it to this one?

Anyway, I hope you don't mind.

After I have written the image to an SD card, would it be possible to mount the root FS (i.e. partition 3, according to parted below)
rw prior to first boot and populate the ifcfg-eth0 file with a fixed IP address of my liking,
so that I could connect via a point-to-point ethernet link from my Linux laptop to a known IP address on my RasPi
without having to rig up some dhcp setup on my laptop first?

Btw. is the sshd in that image started on first boot automatically, or would some sort of activation be required?
With old SysV init up to RHEL6 one would have only to set the runlevel symlinks (usually via chkconfig, orjust manually),
and maybe generate a set of hostkeys first.
Now with systemd I only know that one would probably issue "systemctl enable sshd.service",
but I guess it also only boils down to setting some symlinks from e.g. sshd's unit file beneath /usr/lib/systemd/system pointing to
/etc/systemd/system.
Is that true? Or would I have to chroot into the image (with bind mounts in place) and issue the systemctl enable command from there?
I'm not that much into systemd yet, that's why I'm unsure.

If the pre-assignment of a fixed IP address wouldn't work (but I cannot see why it shouldn't), what (e.g. supplementary parts and hacks) would be required to make a serial connection to the RasPi?

Thanks for your patience.

Code: Select all

$ 7z e -so CentOS-Userland-7-armv7hl-Minimal-1611-RaspberryPi3.img.xz > centos-7-raspi3.img

7-Zip [64] 9.20  Copyright (c) 1999-2010 Igor Pavlov  2010-11-18
p7zip Version 9.20 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,4 CPUs)

Processing archive: CentOS-Userland-7-armv7hl-Minimal-1611-RaspberryPi3.img.xz

Extracting  CentOS-Userland-7-armv7hl-Minimal-1611-RaspberryPi3.img

Everything is Ok

Size:       3221225472
Compressed: 326716936

$ /sbin/parted centos-7-raspi3.img u s p
WARNING: You are not superuser.  Watch out for permissions.

Model:  (file)
Disk /home/grothe/iso/raspi/centos/centos-7-raspi3.img: 6291455s
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start     End       Size      Type     File system  Flags
 1      2048s     1026047s  1024000s  primary  fat16        lba  
 2      1026048s  2074623s  1048576s  primary  linux-swap        
 3      2074624s  6268927s  4194304s  primary  ext3       
 
 $ su -c "mount -o loop,ro,offset=$((2074624*512)) centos-7-raspi3.img /mnt/tmp1"
Password: 

$ ls -l /mnt/tmp1/etc/sysconfig/network-scripts/ifcfg-*
-rw-r--r-- 1 root root 137 Dec  5 17:19 /mnt/tmp1/etc/sysconfig/network-scripts/ifcfg-eth0
-rw-r--r-- 1 root root 254 Sep 12 12:47 /mnt/tmp1/etc/sysconfig/network-scripts/ifcfg-lo

User avatar
avij
Retired Moderator
Posts: 3046
Joined: 2010/12/01 19:25:52
Location: Helsinki, Finland
Contact:

Re: Where can I download a mere 254MiB Image of CentOS7 for RasPi in less than 2 days?

Post by avij » 2017/02/17 12:19:41

Unfortunately I'm not familiar with the Raspberry Pi images, but if you have a Raspberry Pi 2 I don't think you can use the RPI3 image for that.

Editing the ifcfg file would work, but perhaps it would still be less of a hassle to set up a DHCP server somewhere for the initial boot. sshd should be enabled out of the box.

dimwit
Posts: 7
Joined: 2017/02/14 15:59:24

Re: Where can I download a mere 254MiB Image of CentOS7 for RasPi in less than 2 days?

Post by dimwit » 2017/02/18 10:51:30

Hi avij,

thank you for advising me not to attempt booting an image meant for RasPi 2 on a RasPi3.
I was fully aware of that. I simply also downloaded the RasPi3 image because I already ordered two RasPi3s.
And as I did this after I had downloaded the RasPi2 image the outputs of the most recent commands were still scrollable (by Shift+PgUp) without reexecuting them,
so that I for the sake of my laziness just copied and pasted those into my last post.

In the end it was futile to have downloaded the images in a break at work because shortly after posting I had pending jobs in the pipeline that prevented me from any further private tinkering at work.
Now, as I am sitting at home in my weekend I had to re-iterate and hopefully won't be disturbed by my tyrannic family for the next two hours.

dimwit
Posts: 7
Joined: 2017/02/14 15:59:24

Re: Where can I download a mere 254MiB Image of CentOS7 for RasPi in less than 2 days?

Post by dimwit » 2017/02/18 12:20:55

You were right.
Setting up a minimal DHCP server on my Fedora laptop was easy.
Then writing the image to a spare SD card, swapping it into the RasPi, connecting Ethernet and power supply, booting the RasPi, and SSHing into it took less than 5 mins.
Worked like a charm.
Now I first need to resize2fs the / FS to gain full SD's capacity and start bringing the RasPi to some sensible use.

Code: Select all

[root@pavilion:/etc/dhcp]
# ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null 192.168.10.10
Warning: Permanently added '192.168.10.10' (ECDSA) to the list of known hosts.
root@192.168.10.10's password: 
[root@centos-rpi2 ~]# set -o vi
[root@centos-rpi2 ~]# cat /etc/redhat-release 
CentOS Linux release 7.3.1611 (Core) 
[root@centos-rpi2 ~]# uname -a
Linux centos-rpi2 4.4.33-v7.1.el7 #1 SMP Mon Nov 21 18:48:06 UTC 2016 armv7l armv7l armv7l GNU/Linux
[root@centos-rpi2 ~]# df -ThP
Filesystem     Type      Size  Used Avail Use% Mounted on
/dev/root      ext4      2.0G  748M  1.1G  41% /
devtmpfs       devtmpfs  459M     0  459M   0% /dev
tmpfs          tmpfs     463M     0  463M   0% /dev/shm
tmpfs          tmpfs     463M  6.1M  457M   2% /run
tmpfs          tmpfs     463M     0  463M   0% /sys/fs/cgroup
/dev/mmcblk0p1 vfat      500M   43M  457M   9% /boot
tmpfs          tmpfs      93M     0   93M   0% /run/user/0
[root@centos-rpi2 ~]# passwd
Changing password for user root.
New password: 
Retype new password: 
passwd: all authentication tokens updated successfully.
[root@centos-rpi2 ~]# fdisk -l /dev/mmcblk0

Disk /dev/mmcblk0: 63.9 GB, 63864569856 bytes, 124735488 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x00089999

        Device Boot      Start         End      Blocks   Id  System
/dev/mmcblk0p1            2048     1026047      512000    c  W95 FAT32 (LBA)
/dev/mmcblk0p2         1026048     2074623      524288   82  Linux swap / Solaris
/dev/mmcblk0p3         2074624     6268927     2097152   83  Linux


User avatar
avij
Retired Moderator
Posts: 3046
Joined: 2010/12/01 19:25:52
Location: Helsinki, Finland
Contact:

Re: Where can I download a mere 254MiB Image of CentOS7 for RasPi in less than 2 days?

Post by avij » 2017/02/18 12:55:28

For resizing, see if there's /usr/local/bin/rootfs-expand that you could use.

Post Reply