0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

raspberry_pi_4bで manjaro を機械式ハードディスクのみで動かす

Last updated at Posted at 2021-04-26

ubuntu より すばしっこく動きます

160GBより 250GBにクローンしたので 今は
# df
ファイルシス   1K-ブロック    使用    使用可 使用% マウント位置
dev                 812816       0    812816    0% /dev
run                 952220    1196    951024    1% /run
/dev/sda2        223805524 9952776 203273764    5% / **200GB超**
tmpfs               952220  185324    766896   20% /dev/shm
tmpfs               952224   11224    941000    2% /tmp
/dev/sda1           259816   57820    201996   23% /boot
tmpfs               190444      68    190376    1% /run/user/1000

youtube -> ラスちゃんたら ギッチョンチョンで パイのpiのpi

動作時に
1.jpg
と マイクロSD カードは入れてなく

USB3.0接続の 余っている
2.jpg
のみで動いてます

なお https://qiita.com/tyokai/items/15944cf53f0df65c1415 にハードディスクのみで動かす準備をかいてます

 本題です

起動風景は 最初を撮影できませんでしたが
https://www.youtube.com/watch?v=ACc2eqtGwi8
な感じで 約60秒で起動します

Manjaro-ARM-kde-plasma-rpi4-21.04.img
をマイクロSDカードに焼き付けて起動し

それを
機械式ハードディスクに
いつものように
dd if=/dev/sdX of=/dev/sdY bs=512 count=16000

rsync -avHx
とでクローンします
なお機械式ハードディスクに/dev/sdY3をswapでつくってます

1)

cat /boot/cmdline.txt

root=/dev/sda2 rw rootwait console=serial0,115200 console=tty3 selinux=0 quiet splash plymouth.ignore-serial-consoles smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=serial0,115200 elevator=noop usbhid.mousepoll=8 snd-bcm2835.enable_compat_alsa=0 audit=0


2)

./comment-out.bat /etc/fstab

/dev/sda1 /boot vfat defaults 0 0
/dev/sda3 swap swap defaults,noatime 0 1


3)

cat /etc/sddm.conf.d/sddm.conf

[General]
Numlock=none
[Theme]
CursorTheme=breeze_cursors
FacesDir=/usr/share/sddm/faces
ThemeDir=/usr/share/sddm/themes
[Users]
DefaultPath=/bin:/usr/bin:/usr/local/bin
HideShells=
HideUsers=
RememberLastSession=true
RememberLastUser=true
[WaylandDisplay]
SessionCommand=/usr/share/sddm/scripts/wayland-session
SessionDir=/usr/share/wayland-sessions
[XDisplay]
DisplayCommand=/usr/share/sddm/scripts/Xsetup
DisplayStopCommand=/usr/share/sddm/scripts/Xstop
MinimumVT=1
ServerArguments=-nolisten tcp
ServerPath=/usr/bin/X
SessionCommand=/usr/share/sddm/scripts/Xsession
SessionDir=/usr/share/xsessions
XauthPath=/usr/bin/xauth
XephyrPath=/usr/bin/Xephyr


 以下を加えてます########################

[Autologin]
User=laro
Session=plasma.desktop

これで 自動ログインとなります。


4)zram0除去

swapoff /dev/zram0

それから
pacman -Rsc zswap-arm

5) ボードに埋め込まれてるwifiはNetworkManager ではつなからない

新たにUSB wifiをつけます

ifconfigで
wlan0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
wlp1s0u1u3u3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  これです

あとは NetworkManager でOK

IMG20210511042502.jpg

その後 duplicater で 250GBにしました


pi.bat が以下として 

def f(x):
  return 4 / ( 1.0 + x**2 )
n = 10000000
sum = 0
step = 1.0 / n
for i in range(0, n):
  x = ( i + 0.5 ) * step
  sum += f(x)
pi = sum * step
print (pi)



# time ./pi.bat 
3.141592653589731
real    0m14.882s
user    0m14.851s
sys     0m0.025s

と14秒です


同じく raspistill で pi camera で撮影できないです、 どなたか解決してますか?
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?