Skip to content
Menu
TechDudes.de
  • Allgemein
  • Server
  • Linux
  • Impressum
TechDudes.de

Banana Pi von SATA Platte / SSD booten

Posted on 25. August 20169. August 2019 by Dennis

Eigentlich keine große Sache, wären da nicht viele Howtos veraltet und erzählten mir was von Uenv.txt . Es funktioniert im Grunde wie schon damals beim Raspberry Pi (1), wo man die SD-Karte nur noch für den Bootloader brauchte und dann root auf sda umgebogen hat. Genau so läuft es beim Banana Pi auch, aber mit einem kleinen Unterschied also hier mal mein Log:

  1. Platte Partitionieren und Dateisysteme erstellen:
    root@bananapi ~ # fdisk -lDisk /dev/sda: 149.1 GiB, 160041885696 bytes, 312581808 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: 0x0ccea0b3Device     Boot    Start      End  Sectors Size Id Type
    /dev/sda1           2048 41945087 41943040  20G 83 Linux
    /dev/sda2       41945088 46139391  4194304   2G 82 Linux swap / SolarisDisk /dev/mmcblk0: 3.8 GiB, 4041211904 bytes, 7892992 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: 0x0ccea0b3Device         Boot Start     End Sectors  Size Id Type
    /dev/mmcblk0p1       2048   43007   40960   20M 83 Linux
    /dev/mmcblk0p2      43008 3710936 3667929  1.8G 83 Linux

    1. per mkfs.ext4 /dev/sda1 und mkswap /dev/sda2 die Dateisysteme erstellen
    2. mkdir /target
    3. /dev/sda1 unter /target mounten: mount /dev/sda1 /target
  2. Root Partition auf die SATA Platte klonen:
    rsync -vax / /target/...
    var/spool/mail -> ../mail
    var/spool/cron/
    var/spool/cron/crontabs/
    var/spool/rsyslog/
    var/tmp/
    sent 977,632,843 bytes received 286,334 bytes 10,572,099.21 bytes/sec
    total size is 976,386,228 speedup is 1.00
    rsync -vax / /target/ 31.16s user 36.92s system 74% cpu 1:31.38 total
  3. Jetzt kommt der neure Part. Das Bootimage muss angepasst werden, dazu benötigen wir Pakete:
    root@bananapi /target # apt-get install u-boot-tools
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    The following NEW packages will be installed:
    u-boot-tools
    0 upgraded, 1 newly installed, 0 to remove and 24 not upgraded.
    Need to get 70.3 kB of archives.
    After this operation, 178 kB of additional disk space will be used.
    Get:1 http://ftp.de.debian.org/debian/ jessie/main u-boot-tools armhf 2014.10+dfsg1-5 [70.3 kB]
    Fetched 70.3 kB in 0s (249 kB/s)
    Selecting previously unselected package u-boot-tools.
    (Reading database … 15931 files and directories currently installed.)
    Preparing to unpack …/u-boot-tools_2014.10+dfsg1-5_armhf.deb …
    Unpacking u-boot-tools (2014.10+dfsg1-5) …
    Processing triggers for man-db (2.7.0.2-5) …
    Setting up u-boot-tools (2014.10+dfsg1-5) …
    apt-get install u-boot-tools  4.84s user 2.08s system 20% cpu 34.502 total

    1. Jetzt wird das Kommandoscript angepasst:
      umount /target
      mount /dev/mmcblk0p1 /target
    2. vi /target/boot.cmd
    3. An allen Stellen anpassen:
      root=/dev/mmcblk0p2 -> root=/dev/sda1
  4. root@bananapi /target #  mkimage -C none -A arm -T script -d boot.cmd boot.scr
    Image Name:
    Created:      Thu Aug 25 21:40:43 2016
    Image Type:   ARM Linux Script (uncompressed)
    Data Size:    1602 Bytes = 1.56 kB = 0.00 MB
    Load Address: 00000000
    Entry Point:  00000000
    Contents:
    Image 0: 1594 Bytes = 1.56 kB = 0.00 MB

Fertig…

Reboot

 

root@bananapi /target #  mkimage -C none -A arm -T script -d boot.cmd boot.scr
Image Name:
Created:      Thu Aug 25 21:40:43 2016
Image Type:   ARM Linux Script (uncompressed)
Data Size:    1602 Bytes = 1.56 kB = 0.00 MB
Load Address: 00000000
Entry Point:  00000000
Contents:
Image 0: 1594 Bytes = 1.56 kB = 0.00 MB

 

 

Und Swap anmachen

# UNCONFIGURED FSTAB FOR BASE SYSTEM

# 512 MB swapfile
/swapfile1 swap swap defaults 0 0

zu

/dev/sda2 swap swap defaults 0 0

Schreibe einen Kommentar Antworten abbrechen

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert

Neueste Beiträge

  • Smart 451 Schlüsselbatterie wechseln und Schlüssel wieder anlernen
  • VDR Server im LXC-Container unter Proxmox
  • Einen guten Start in 2021
  • Arch Linux in Proxmox LXC – first Steps
  • Pimp your Zbox

Kategorien

  • Allgemein
  • Android
  • Arch Linux
  • Browser
  • Chrome
  • Debian
  • Docker
  • Firefox
  • IBM (Allgemein)
  • IBM (Server)
  • KVM
  • Linux
  • LXC
  • NAS
  • Raspberry Pi
  • Redhat / CentOS
  • Server
  • Sonstiges
  • Sun
  • Thunderbird
  • Toolbox
  • Ubuntu
  • Virtualisierung
  • Windows
  • Xen

Schlagwörter

18.04 451 Acer Android Arch Linux Aspier Batterie wechseln bios bios-mod container denicid docker Dropbox DVB-C dvb-c2 DVB-S2 id4me Install Installation Kubuntu kvm lga Linux LXC mailcow microcode mSATA nextcloud pin-mod Proxmox proxmox-ve pve ReverseProxy Schlüssel Schlüssel anlernen Schlüsselbatterie Smart Smart451 SSD Thunderbird Ubuntu V3-771 V3-771G VDR vt-d
©2025 TechDudes.de | Theme: Wordly by SuperbThemes