메모, Devuan


고무 파이 3에 xfce 데스크톱 on Devuan

개요

  • 개발 프로젝트

  • Devuan Jessie 1.0.0 stable release (LTS)는 2017년 5월 25일에 발표되었습니다.
  • 라즈파용 인상도 포함돼 있으니 한번 해보자.
  • 사용자: root/암호: toor
  • 환경


  • Raspberry Pi 2
    $ uname -a
    Linux devuan 4.10.17-v7+ #1 SMP Mon May 22 23:13:01 CEST 2017 armv7l GNU/Linux
    

  • Raspberry Pi 3 (64bit)
    $ uname -a
    Linux devuan 4.6.3-gb48d47a #1 SMP Thu Oct 13 00:34:22 CEST 2016 aarch64 GNU/Linux
    
  • 단계

  • 이미지 다운로드

  • https://devuan.org/, >Download>Direct download from mirrors에서 원하는 미러 사이트를 선택하여/devuan_jessie>embedded에서 고무 파이의 유형에 따라 다운로드
  • devuan_jessie_1.0.0_armel_raspi1.img.xz
  • devuan_jessie_1.0.0_armhf_raspi2.img.xz
  • devuan_jessie_1.0.0_arm64_raspi3.img.xz
  • SD로 굽기, 시작
  • 평소와 같은 도구로 OK.

  • rufus Portable Edition
  • 시작, 장치 선택
  • [FreeDOS]라는 드롭다운 메뉴에서 [DD Image]를 선택하고 옆에 있는 디스크 아이콘을 클릭하여 이미지를 선택합니다.(.gz,.xy 등은 그대로 있어도 OK)
  • "시작"을 누르고 확인 대화상자를 누르며 기다립니다.
  • 로그인
  • 사용자: root/암호: toor 로그인.

  • 확장 루트 파티션

  • 파티션을 삭제하고 파티션을 다시 만듭니다.시작 위치를 주의하십시오.(프롬프트의 값이 이전과 다를 수 있음)
    root@devuan:~# fdisk -l /dev/mmcblk0
    Disk /dev/mmcblk0: 14.7 GiB, 15811477504 bytes, 30881792 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: 0x385e06d1
    
    Device         Boot  Start     End Sectors  Size Id Type
    /dev/mmcblk0p1           1  125000  125000   61M  c W95 FAT32 (LBA)
    /dev/mmcblk0p2      125001 3870815 3745815  1.8G 83 Linux
    root@devuan:~# fdisk /dev/mmcblk0
    
    Welcome to fdisk (util-linux 2.25.2).
    Changes will remain in memory only, until you decide to write them.
    Be careful before using the write command.
    
    Command (m for help): p
    Disk /dev/mmcblk0: 14.7 GiB, 15811477504 bytes, 30881792 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: 0x385e06d1
    
    Device         Boot  Start     End Sectors  Size Id Type
    /dev/mmcblk0p1           1  125000  125000   61M  c W95 FAT32 (LBA)
    /dev/mmcblk0p2      125001 3870815 3745815  1.8G 83 Linux
    
    Command (m for help): d
    Partition number (1,2, default 2): 2
    
    Partition 2 has been deleted.
    
    Command (m for help): n
    Partition type
       p   primary (1 primary, 0 extended, 3 free)
       e   extended (container for logical partitions)
    Select (default p): p
    Partition number (2-4, default 2): 2
    First sector (125001-30881791, default 126976): 125001
    Last sector, +sectors or +size{K,M,G,T,P} (125001-30881791, default 30881791):
    
    Created a new partition 2 of type 'Linux' and of size 14.7 GiB.
    
    Command (m for help): t
    Partition number (1,2, default 2): 2
    Partition type (type L to list all types): 83
    
    Changed type of partition 'Linux' to 'Linux'.
    
    Command (m for help): w
    The partition table has been altered.
    Calling ioctl() to re-read partition table.
    Re-reading the partition table failed.: Device or resource busy
    
    The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8).
    
    root@devuan:~# shutdown -h now
    
    Broadcast message from root@devuan (pts/0) (Thu Jun  1 16:01:51 2017):
    
    The system is going down for system halt NOW!
    root@devuan:~#
    

  • 재부팅 후resize2fs
    root@devuan:~# resize2fs /dev/mmcblk0p2
    resize2fs 1.42.12 (29-Aug-2014)
    Filesystem at /dev/mmcblk0p2 is mounted on /; on-line resizing required
    old_desc_blocks = 1, new_desc_blocks = 2
    The filesystem on /dev/mmcblk0p2 is now 3844598 (4k) blocks long.
    
    root@devuan:~# df -h
    Filesystem      Size  Used Avail Use% Mounted on
    /dev/root        15G  575M   14G   5% /
    devtmpfs        422M     0  422M   0% /dev
    tmpfs            86M  220K   85M   1% /run
    tmpfs           5.0M  4.0K  5.0M   1% /run/lock
    tmpfs           171M     0  171M   0% /run/shm
    /dev/mmcblk0p1   61M   30M   32M  49% /boot
    root@devuan:~#
    

  • 초기 설정
    # パッケージ更新
    apt update && apt upgrade -y  
    # User `pi`作成
    adduser pi
    # => いろいろきかれる
    # ------------------------
    #sudoerに加える. (パスワードなしの設定).
    echo -e 'pi ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/010_pi-nopasswd
    #rootでsshログイン禁止
    sed -e 's@^PermitRootLogin yes@PermitRootLogin no@g' -i /etc/ssh/sshd_config
    service ssh restart  # サービス再起動. systemdはないよ.
    # いったん、再起動
    reboot
    #
    # ユーザpiアカウントで、作業できる。。ハズ
    
    실행 예
    root@devuan:~# adduser pi
    Adding user `pi' ...
    Adding new group `pi' (1000) ...
    Adding new user `pi' (1000) with group `pi' ...
    Creating home directory `/home/pi' ...
    Copying files from `/etc/skel' ...
    Enter new UNIX password:
    Retype new UNIX password:
    passwd: password updated successfully
    Changing the user information for pi
    Enter the new value, or press ENTER for the default
        Full Name []:
        Room Number []:
        Work Phone []:
        Home Phone []:
        Other []:
    Is the information correct? [Y/n]
    root@devuan:~# echo -e 'pi ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/010_pi-nopasswd
    root@devuan:~# sed -e 's@^PermitRootLogin yes@PermitRootLogin no@g' -i /etc/ssh/sshd_config
    root@devuan:~# service ssh restart
    [ ok ] Restarting OpenBSD Secure Shell server: sshd.
    root@devuan:~# exit
    logout
    

  • 그리고 적당히
  • 필요한 포장 선호sudo apt install -y bash-completion htop byobu
  • 시간대 설정 sudo dpkg-reconfigure tzdata

  • Locales ?
    sudo apt install locales
    sudo dpkg-reconfigure locales
    

  • 데스크톱 환경 같은 거?
    # xfce
    sudo apt install -y task-xfce-desktop
    sudo apt install -y task-japanese-desktop #日本語?
    #
    #sudo apt install task-lxde-desktop
    #sudo apt install mate-desktop-environment
    #sudo apt install cinnamon-desktop-environment
    
  • 기타

  • 아는 사람이 아니면 공식적인 라스비안이 좋다.시스템 기반 정보도 이미 다 갖추어져 있다...
  • 라즈파의 설정 도구는 시스템d를 위한 것이 아니냐...raspi-config
  • 좋은 웹페이지 즐겨찾기