-->
Showing posts with label installl raspbian. Show all posts
Showing posts with label installl raspbian. Show all posts

Saturday, March 9, 2019

Raspberry Pi] 4. Installing Ubuntu Server 18.04 on Raspberry Pi 3 Model B+

Hello, guys. I will let you know how to install Ubuntu Server 18.04 on Raspberry Pi 3 Model B+ in this post. Like Raspbian, if you install Ubuntu Linux on Raspberry Pi, the root filesystem is automatically resized on boot. So you do not need to resize the root filesystem manually. Let's see how to install it.

First please, download the Ubuntu Server image file from the website below.

https://wiki.ubuntu.com/ARM/RaspberryPi

In my case, I downloaded the 'ubuntu-18.04.2-preinstalled-server-arm64+raspi3.img.xz' file. If you download complete, please prepare the micro SD and SD reader. Then combine them and connect them to your computer.


If you use Windows operating system, extract the xz compress using 7-Zip and install it into the micro SD using a program such as Rufus. The use of the Rufus program is very simple. If you don't know how to use it, please refer to the post below.

https://sunguruitchannel01.blogspot.com/2019/02/useful-utilities-1-creating-bootable.html

If you are using Linux operating system, refer to the commands below to install:

[root@centos76 ~]# cd /mnt/hgfs/Raspberry/Ubuntu/
[root@centos76 Ubuntu]# ls
ubuntu-18.04.2-preinstalled-server-arm64+raspi3.img.xz
[root@centos76 Ubuntu]# xz -d ubuntu-18.04.2-preinstalled-server-arm64+raspi3.img.xz

[root@centos76 Ubuntu]# ls -l ubuntu-18.04.2-preinstalled-server-arm64+raspi3.img
-rwxrwxrwx. 1 root root 2422361088 Mar  9 16:14 ubuntu-18.04.2-preinstalled-server-arm64+raspi3.img

[root@centos76 Ubuntu]# lsblk /dev/sdb
NAME MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sdb    8:16   1 29.8G  0 disk 

[root@centos76 Ubuntu]# dd if=ubuntu-18.04.2-preinstalled-server-arm64+raspi3.img of=/dev/sdb bs=1M
2310+1 records in
2310+1 records out
2422361088 bytes (2.4 GB) copied, 368.764 s, 6.6 MB/s

[root@centos76 Ubuntu]# lsblk /dev/sdb
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sdb      8:16   1 29.8G  0 disk 
├─sdb1   8:17   1  256M  0 part 
└─sdb2   8:18   1    2G  0 part 

[root@centos76 Ubuntu]# parted /dev/sdb unit mb print free
Model: Mass Storage Device (scsi)
Disk /dev/sdb: 32011MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End      Size     Type     File system  Flags
        0.02MB  1.05MB   1.03MB            Free Space
 1      1.05MB  269MB    268MB    primary  fat32        boot, lba
 2      269MB   2422MB   2153MB   primary  ext4
        2422MB  32011MB  29589MB           Free Space

[root@centos76 Ubuntu]# eject /dev/sdb

Once the installation is complete, detach the SD reader from your computer and connect the micro SD to the raspberry pi.


Now connect the keyboard, mouse, and monitor to the Raspberry Pi and power on it. You will then be able to see the following screen.


When the boot is complete, you will see the login screen. The ID is ubuntu and the password is ubuntu.


Congratulations. Now you can use Ubuntu Server 18.04 on Raspberry Pi. enjoy your Raspberry Pi. :D

See you next. Thank you.

Friday, March 8, 2019

Raspberry Pi] 3. Installing CentOS 7.6 on Raspberry Pi 3 Model B+

Hello, guys. I will let you know how to install CentOS 7.6 in this post. Unlike Raspbian, if you install CentOS 7.6 on Raspberry Pi, the root filesystem is not automatically resized on boot. So you have to set it manually. Other than that, there is no big trouble to install. Let's see how to install it.

First please, download the CentOS 7.6 image file from the website below.

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

In my case, I downloaded the 'CentOS-Userland-7-armv7hl-RaspberryPI-Minimal-1810-sda.raw.xz' file. Because GUI Environment consumes too much memory.

If you download complete, please prepare the micro SD and SD reader. Then combine them and connect them to your computer.


Unfortunately, the .raw extension file is not available in the Rufus program. So I used CentOS 7 virtual machine with a USB controller in VMware Workstation Pro.


After virtual machine booting, please run the following commands for installation.

[root@centos76 ~]# lsblk /dev/sdb
NAME MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sdb    8:16   1 29.8G  0 disk

[root@centos76 ~]# cd /mnt/hgfs/CentOS\ 7.6/
[root@centos76 CentOS 7.6]# ls
CentOS-Userland-7-armv7hl-RaspberryPI-Minimal-1810-sda.raw.xz

[root@centos76 CentOS 7.6]# xz -d CentOS-Userland-7-armv7hl-RaspberryPI-Minimal-1810-sda.raw.xz
[root@centos76 CentOS 7.6]# dd if=CentOS-Userland-7-armv7hl-RaspberryPI-Minimal-1810-sda.raw of=/dev/sdb bs=1M
2712+0 records in
2712+0 records out
2843738112 bytes (2.8 GB) copied, 427.279 s, 6.7 MB/s

When the installation is complete, run the following commands to resize the partition of the root filesystem.

[root@centos76 CentOS 7.6]# parted /dev/sdb unit mb print free
Model: Mass Storage Device (scsi)
Disk /dev/sdb: 32011MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End      Size     Type     File system     Flags
        0.03MB  1.05MB   1.02MB            Free Space
 1      1.05MB  701MB    700MB    primary  fat32           boot, lba
 2      701MB   1213MB   512MB    primary  linux-swap(v1)
 3      1213MB  2713MB   1499MB   primary  ext4
        2713MB  32011MB  29298MB           Free Space

[root@centos76 CentOS 7.6]# parted /dev/sdb rm 3
Information: You may need to update /etc/fstab.

[root@centos76 CentOS 7.6]# parted /dev/sdb unit mb mkpart primary ext4 1213 32011
Information: You may need to update /etc/fstab.

[root@centos76 CentOS 7.6]# parted /dev/sdb print
Model: Mass Storage Device (scsi)
Disk /dev/sdb: 32.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system     Flags
 1      1049kB  701MB   700MB   primary  fat32           boot, lba
 2      701MB   1213MB  512MB   primary  linux-swap(v1)
 3      1213MB  32.0GB  30.8GB  primary  ext4



After resizing the partition, run the following commands to expand the root filesystem.

[root@centos76 CentOS 7.6]# e2fsck -f /dev/sdb3
e2fsck 1.42.9 (28-Dec-2013)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
_/: 24455/91584 files (0.6% non-contiguous), 243184/366080 blocks

[root@centos76 CentOS 7.6]# resize2fs /dev/sdb3
resize2fs 1.42.9 (28-Dec-2013)
Resizing the filesystem on /dev/sdb3 to 7518976 (4k) blocks.
The filesystem on /dev/sdb3 is now 7518976 blocks long.

[root@centos76 CentOS 7.6]# mkdir /rasp
[root@centos76 CentOS 7.6]# mount /dev/sdb3 /rasp
[root@centos76 CentOS 7.6]# df -Ph /rasp
Filesystem      Size  Used Avail Use% Mounted on
/dev/sdb3        29G  899M   28G   4% /rasp

Finally, create a swap file and set it.

[root@centos76 CentOS 7.6]# mkdir /rasp/swapfile
[root@centos76 CentOS 7.6]# dd if=/dev/zero of=/rasp/swapfile/swapfile1 bs=1M count=1024
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB) copied, 147.71 s, 7.3 MB/s
[root@centos76 CentOS 7.6]# mkswap /swapfile/swapfile1
Setting up swapspace version 1, size = 1048572 KiB
no label, UUID=15ddb497-31de-4a5a-9b28-b117c6286f25
[root@centos76 CentOS 7.6]# echo '/swapfile/swapfile1 swap swap defaults 0 0' >> /rasp/etc/fstab
[root@centos76 CentOS 7.6]# umount /rasp
[root@centos76 CentOS 7.6]# rmdir /rasp
[root@centos76 CentOS 7.6]# eject /dev/sdb

Please, detach the SD reader from your computer and connect the micro SD to the raspberry pi.


Now connect the keyboard, mouse, and monitor to the Raspberry Pi and power on it. You will then be able to see the following screen.


The ID is root and the password is centos.


Congratulations. Now you can use CentOS 7.6 on Raspberry Pi. enjoy your Raspberry Pi. :D

See you next. Thank you.


Monday, March 4, 2019

Raspberry Pi] 2. Installing Raspbian on Raspberry Pi 3 Model B+

When I have free time these days, I do various tests with Raspberry Pi. Installing operating systems, using the serial ports, measuring temperature and so on. It's a very interesting thing.


Anyway, I will let you know how to install Raspbian in this post. It's so easy. First, prepare the micro SD and SD reader. Then combine them and connect them to your computer.


Second, download the Raspbian image file from the website below.

https://www.raspberrypi.org/downloads/raspbian/

In my case, I downloaded the '2018-11-13-raspbian-stretch-full.zip' file.

Once the download is complete, the file must be installed in the micro SD. If you use Windows operating system, extract the zip and install it into the micro SD using a program such as Rufus. The use of the Rufus program is very simple. If you don't know how to use it, please refer to the post below.

https://sunguruitchannel01.blogspot.com/2019/02/useful-utilities-1-creating-bootable.html

If you are using Linux operating system, refer to the commands below to install:

[root@centos76 Raspbian]# ls
2018-11-13-raspbian-stretch-full.zip  
[root@centos76 Raspbian]# unzip 2018-11-13-raspbian-stretch-full.zip
Archive:  2018-11-13-raspbian-stretch-full.zip
  inflating: 2018-11-13-raspbian-stretch-full.img  

[root@centos76 Raspbian]# ls
2018-11-13-raspbian-stretch-full.img  2018-11-13-raspbian-stretch-full.zip  
[root@centos76 Raspbian]# lsblk | grep disk
sda                  8:0    0   20G  0 disk 
sdb                  8:16   1 29.8G  0 disk

[root@centos76 Raspbian]# lsblk /dev/sdb
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sdb      8:16   1 29.8G  0 disk 
└─sdb1   8:17   1 29.8G  0 part /run/media/root/9016-4EF8
[root@centos76 Raspbian]# umount /run/media/root/9016-4EF8  

[root@centos76 Raspbian]# parted /dev/sdb print
Model: Mass Storage Device (scsi)
Disk /dev/sdb: 32.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      4194kB  32.0GB  32.0GB  primary  fat32        lba

[root@centos76 Raspbian]# parted /dev/sdb rm 1
Information: You may need to update /etc/fstab.

[root@centos76 Raspbian]# dd if=2018-11-13-raspbian-stretch-full.img of=/dev/sdb bs=1M
5052+0 records in
5052+0 records out
5297405952 bytes (5.3 GB) copied, 792.762 s, 6.7 MB/s

[root@centos76 Raspbian]# eject /dev/sdb
[root@centos76 Raspbian]# lsblk | grep disk
sda                  8:0    0   20G  0 disk

Once the installation is complete, detach the SD reader from your computer and connect the micro SD to the raspberry pi.


Now connect the keyboard, mouse, and monitor to the Raspberry Pi and power on it. You will then be able to see the following screen.


When the boot is complete, you will see the following screen.


Congratulations. And... enjoy your Raspberry Pi. :D

See you next. Thank you.