Après 1,5 mois d’attente j’ai enfin la cote pour le trail UBAYE ( pour l’UTMB, il a fallu 3 jours …).
Rock64 / Débian : Ajouter un disque dur externe
Je viens de prendre un disque dur externe car j’ai pas trop confiance dans les cartes SD ( désolé Michel).
Etape 1 : Le formatage, pour cela il faut fdisk !
rock64@rock64:~$ cat /etc/debian_version
9.9
rock64@rock64:~$ sudo whereis fdisk
fdisk: /sbin/fdisk /usr/share/man/man8/fdisk.8.gz
rock64@rock64:~$ dpkg -S /sbin/fdisk
util-linux: /sbin/fdisk
rock64@rock64:~$ sudo fdisk -l
Disk /dev/ram0: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/mtdblock0: 4 MiB, 4128768 bytes, 8064 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 /dev/mmcblk1: 59.5 GiB, 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
Disklabel type: gpt
Disk identifier: 9CFDF7D8-766C-43DE-9354-57097D428E8F
Device Start End Sectors Size Type
/dev/mmcblk1p1 64 8063 8000 3.9M Linux filesystem
/dev/mmcblk1p2 8064 8191 128 64K Linux filesystem
/dev/mmcblk1p3 8192 16383 8192 4M Linux filesystem
/dev/mmcblk1p4 16384 24575 8192 4M Linux filesystem
/dev/mmcblk1p5 24576 32767 8192 4M Linux filesystem
/dev/mmcblk1p6 32768 262143 229376 112M Microsoft basic data
/dev/mmcblk1p7 262144 124735454 124473311 59.4G Linux filesystem
Disk /dev/sda: 1.8 TiB, 2000398933504 bytes, 3907029167 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
Disklabel type: dos
Disk identifier: 0x88185100
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 64 3907024128 3907024065 1.8T 7 HPFS/NTFS/exFAT
rock64@rock64:~$ sudo mkfs.ext3 /dev/sda1
mke2fs 1.43.4 (31-Jan-2017)
/dev/sda1 contains a ntfs file system labelled 'Seagate Portable Drive'
Proceed anyway? (y,N) y
Creating filesystem with 488378008 4k blocks and 122101760 inodes
Filesystem UUID: 42a1cde2-2269-4582-b4a0-2bb6272b0990
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000, 214990848
Allocating group tables: done
A noter qu’en cas de crash durant le formatage, je conseille alors :
rock64@rock64:~$ sudo mkfs -t ext4 /dev/sda1
[sudo] password for rock64:
mke2fs 1.43.4 (31-Jan-2017)
Creating filesystem with 488378008 4k blocks and 122101760 inodes
Filesystem UUID: 3e48d36d-20e7-45b8-abea-97a6b234cfcc
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000, 214990848
Allocating group tables: done
Writing inode tables: done
Creating journal (262144 blocks): done
Writing superblocks and filesystem accounting information:
Et si la connexion n’est pas stable pendant le formatage :
rock64@rock64:~$ sudo apt-get install screen
...
rock64@rock64:~$ sudo screen -dmS "format" mkfs -t ext4 /dev/sda1
...
Etape 2 : Préparation du montage sur l’OS :
rock64@rock64:~$ sudo mkdir /disk1 rock64@rock64:~$ sudo mount /dev/sda1 /disk1 rock64@rock64:~$ df -H Filesystem Size Used Avail Use% Mounted on udev 2.1G 0 2.1G 0% /dev tmpfs 412M 5.6M 406M 2% /run /dev/mmcblk1p7 63G 41G 20G 68% / tmpfs 2.1G 0 2.1G 0% /dev/shm tmpfs 5.3M 4.1k 5.3M 1% /run/lock tmpfs 2.1G 0 2.1G 0% /sys/fs/cgroup /dev/mmcblk1p6 118M 1.1M 117M 1% /boot/efi tmpfs 412M 0 412M 0% /run/user/1000 /dev/sda1 2.0T 80M 1.9T 1% /disk1
Etape 3 : Modification du fstab :
rock64@rock64:~$ sudo vi /etc/fstab
Etape 3 bis: On peut aussi utiliser les labels:
rock64@rock64:~$ sudo e2label /dev/sda1 nextcloud
rock64@rock64:~$ sudo vi /etc/fstab
rock64@rock64:~$ sudo cat /etc/fstab
LABEL=boot /boot/efi vfat defaults,sync 0 0
LABEL=nextcloud /disk1 ext4 defaults 1 1
ATTENTION, il faut tester le fichier /etc/fstab AVANT le reboot … sinon c’est LA MORT
rock64@rock64:~$ sudo mount -a /etc/fstab
Voir même un petit text de copie :
rock64@rock64:~$ sudo cp -r /var/www/html/nextcloud/ /disk1/.
MacOS : Monter une carte SD sous MacOS
Première étape, voir les partitions :
$ diskutil list
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *1.1 TB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_APFS Container disk1 1.1 TB disk0s2
/dev/disk1 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +1.1 TB disk1
Physical Store disk0s2
1: APFS Volume Macintosh HD 571.3 GB disk1s1
2: APFS Volume Preboot 22.0 MB disk1s2
3: APFS Volume Recovery 507.4 MB disk1s3
4: APFS Volume VM 1.1 GB disk1s4
/dev/disk2 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *63.9 GB disk2
1: Linux Filesystem 4.1 MB disk2s1
2: Linux Filesystem 65.5 KB disk2s2
3: Linux Filesystem 4.2 MB disk2s3
4: Linux Filesystem 4.2 MB disk2s4
5: Linux Filesystem 4.2 MB disk2s5
6: Microsoft Basic Data boot 117.4 MB disk2s6
7: Linux Filesystem 63.7 GB disk2s7
En lecture seule :
$ brew install ext4fuse $ sudo mkdir /Volumes/ext4 $ sudo ext4fuse /dev/disk2s7 /Volumes/ext4 -o allow_other
En lecture écriture :
– Ceci ne marche pas ..
$ brew cask install osxfuse $ sudo mkdir /Volumes/ext4 $ sudo mount -t fuse-ext2 /dev/disk2s7 /Volumes/ext4/ mount: exec /Library/Filesystems/fuse-ext2.fs/Contents/Resources/mount_fuse-ext2 for /Volumes/ext4: No such file or directory
– Ceci marche :
$ sudo dscl . append /Groups/operator GroupMembership $(whoami) $ sudo dscl . append /Groups/wheel GroupMembership $(whoami) $ sudo mkdir /Volumes/ext4 $ sudo ext4fuse /dev/disk2s7 /Volumes/ext4
Enfin le mieux est quand même le « sudo su », car le Groupe ne fonctionne pas correctement.
Jenkins / LibVirt / Qemu / Fédora : Brouillon d’une tentative de mise en place …
!!! CECI EST UN BROUILLON !!!
Sur Jenkins j’ai mis le bon plugins : Libvirt Slaves
C’est pour l’instant en projet … mais j’essaye de faire une installation propre afin de facilité la validation automatique :
$ apt-get install qemu-kvm qemu virt-manager virt-viewer libvirt-bin $ apt install libguestfs-tools
On télécharge pour une cible armhfp :
$ curl -O https://dl.fedoraproject.org/pub/fedora/linux/releases/30/Spins/armhfp/images/Fedora-Minimal-armhfp-30-1.2-sda.raw.xz
$ unxz Fedora-Minimal-armhfp-30-1.2-sda.raw.xz
$ sudo virt-builder -v -x --get-kernel Fedora-Minimal-armhfp-30-1.2-sda.raw
command line: virt-builder -v -x --get-kernel Fedora-Minimal-armhfp-30-1.2-sda.raw
virt-get-kernel --verbose -x --add 'Fedora-Minimal-armhfp-30-1.2-sda.raw'
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
libguestfs: trace: add_drive "Fedora-Minimal-armhfp-30-1.2-sda.raw" "readonly:true" "protocol:file"
libguestfs: creating COW overlay to protect original drive content
libguestfs: trace: get_tmpdir
libguestfs: trace: get_tmpdir = "/tmp"
libguestfs: trace: disk_create "/tmp/libguestfsEd6WdG/overlay1" "qcow2" -1 "backingfile:/home/farias/Fedora-Minimal-armhfp-30-1.2-sda.raw"
…
$ sudo mv Fedora-Minimal-armhfp-30-1.2-sda.raw initramfs-5.0.9-301.fc30.armv7hl.img vmlinuz-5.0.9-301.fc30.armv7hl /var/lib/libvirt/images/.
$ sudo virt-install -v --name Fedora-Minimal-armhfp-30-1.2-sda.raw --ram 4096 --arch armv7l --import --os-variant fedora22 \
--disk /var/lib/libvirt/images/Fedora-Minimal-armhfp-30-1.2-sda.raw \
--boot kernel=/var/lib/libvirt/images/vmlinuz-5.0.9-301.fc30.armv7hl,initrd=/var/lib/libvirt/images/initramfs-5.0.9-301.fc30.armv7hl.img,kernel_args="console=ttyAMA0 rw root=LABEL=_/ rootwait"
File "/usr/lib/python2.7/dist-packages/OpenSSL/SSL.py", line 118, in
SSL_ST_INIT = _lib.SSL_ST_INIT
AttributeError: 'module' object has no attribute 'SSL_ST_INIT'
Pour fixer ce problème :
$ sudo rm -rf /usr/lib/python2.7/dist-packages/OpenSSL $ sudo rm -rf /usr/lib/python2.7/dist-packages/pyOpenSSL-0.15.1.egg-info $ sudo pip install pyopenssl
On reprends l’installation :
$ sudo virt-install -v --name Fedora-Minimal-armhfp-30-1.2-sda.raw --ram 4096 --arch armv7l --import --os-variant fedora22 \
--disk /var/lib/libvirt/images/Fedora-Minimal-armhfp-30-1.2-sda.raw \
--boot kernel=/var/lib/libvirt/images/vmlinuz-5.0.9-301.fc30.armv7hl,initrd=/var/lib/libvirt/images/initramfs-5.0.9-301.fc30.armv7hl.img,kernel_args="console=ttyAMA0 rw root=LABEL=_/ rootwait"
Pour l’instant j’ai un problème sur le lancement :
....
[ OK ] Started udev Wait for Complete Device Initialization.
[ 452.577419] audit: type=1130 audit(1568017972.419:65): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-udev-settle comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Starting Activation of DM RAID sets...
[ OK ] Started Activation of DM RAID sets.
[ 455.227583] audit: type=1130 audit(1568017975.069:66): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=dmraid-activation comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ 455.239316] audit: type=1131 audit(1568017975.081:67): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=dmraid-activation comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ OK ] Reached target Local Encrypted Volumes.
[ OK ] Reached target Local File Systems (Pre).
Mounting /boot...
[ 456.625813] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)
[ OK ] Mounted /boot.
Mounting /boot/efi...
[ OK ] Mounted /boot/efi.
[ OK ] Reached target Local File Systems.
Starting Tell Plymouth To Write Out Runtime Data...
Starting Restore /run/initramfs on shutdown...
Starting Create Volatile Files and Directories...
Starting Rebuild Dynamic Linker Cache...
[ OK ] Started Tell Plymouth To Write Out Runtime Data.
[ 461.320751] audit: type=1130 audit(1568017981.162:68): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=plymouth-read-write comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ 461.328420] audit: type=1131 audit(1568017981.170:69): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=plymouth-read-write comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ OK ] Started Restore /run/initramfs on shutdown.[ 461.762211] audit: type=1130 audit(1568017981.604:70): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=dracut-shutdown comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ OK ] Started Rebuild Dynamic Linker Cache.
[ 468.259621] audit: type=1130 audit(1568017988.101:71): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=ldconfig comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ OK ] Started Create Volatile Files and Directories.
[ 470.643545] audit: type=1130 audit(1568017990.485:72): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-tmpfiles-setup comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Starting Security Auditing Service...
Starting Rebuild Journal Catalog...
[ 473.210959] audit: type=1305 audit(1568017993.053:73): audit_enabled=1 old=1 auid=4294967295 ses=4294967295 subj=system_u:system_r:auditd_t:s0 res=1
[ OK ] Started Rebuild Journal Catalog.
Starting Update is Completed...
[ OK ] Started Update is Completed.
[ OK ] Started Security Auditing Service.
Starting Update UTMP about System Boot/Shutdown...
[ OK ] Started Update UTMP about System Boot/Shutdown.
[ OK ] Reached target System Initialization.
[ OK ] Started daily update of the root trust anchor for DNSSEC.
[ OK ] Listening on SSSD Kerberos…ache Manager responder socket.
[ OK ] Started Daily Cleanup of Temporary Directories.
[ OK ] Listening on D-Bus System Message Bus Socket.
[ OK ] Reached target Sockets.
[ OK ] Reached target Basic System.
Starting NTP client/server...
Starting firewalld - dynamic firewall daemon...
Starting OpenSSH ecdsa Server Key Generation...
Starting OpenSSH rsa Server Key Generation...
Starting Initial Setup configuration program...
Starting System Security Services Daemon...
[ OK ] Started Hardware RNG Entropy Gatherer Daemon.
Starting OpenSSH ed25519 Server Key Generation...
[ OK ] Started dnf makecache --timer.
[ OK ] Reached target Timers.
[ 2049.261075] fbcon: Taking over console
================================================================================
================================================================================
1) [x] Language settings 2) [x] Time settings
(English (United States)) (America/New_York timezone)
3) [x] Network configuration 4) [!] Root password
(Wired (eth0) connected) (Password is not set.)
5) [!] User creation
(No user will be created)
C’est super long pour avoir « fbcon » .
A suivre.



