install postmarketOS on 1p6t

This commit is contained in:
Luca Cai 2023-02-17 13:37:34 +01:00 committed by GitHub
parent 15e8863558
commit 1d4f37b0ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 57 additions and 1 deletions

View File

@ -1,2 +1,2 @@
# docs # docs
misc documatation, my know how organized by theme misc documatation, my know how organized by themes

View File

@ -46,6 +46,7 @@ Device Start End Sectors Size Type
mount and install: mount and install:
````sh ````sh
[ "ls /dev/sda1" == "/dev/sda1" ] && mknod /dev/sda1 b 8 1
mkfs.vfat /dev/sda15 mkfs.vfat /dev/sda15
mkfs.ext4 /dev/sda1 mkfs.ext4 /dev/sda1
mount /dev/sda1 /mnt mount /dev/sda1 /mnt

View File

@ -0,0 +1,55 @@
credits && resources: https://wiki.postmarketos.org/wiki/
### Install
````postmarket
init
install --split
export
shutdown
cd /tmp/postmarketOS-export
ls
````
| file | where to flash |
|--|--|
| boot.img | boot |
| initramfs initramfs-extra | |
oneplus-fajita-boot.img | vendor |
oneplus-fajita-root.img | userdata
| vmlinuz | |
````fastboot
erase dtbo
reboot
````
inside postmarketOS:
````
sudo resize2fs /dev/sda17
````
### CONNECT VIA USB
````
ip link set dev usb0 address 12:12:12:12:12:12
dhclient -v usb0
ip link set usb0 up
````
### DNS
````
echo nameserver 1.1.1.1 > /etc/resolv.conf
````
### INTERNET VIA USB
````
ip route add default via 172.16.42.2
````
#### persistent INTERNET VIA USB
````
echo 'ip route add default via 172.16.42.2' > /etc/local.d/usb_internet.start
chmod +x /etc/local.d/usb_internet.start
rc-update add local
````
#### on HOST
````
sysctl net.ipv4.ip_forward=1
iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -s 172.16.42.0/24 -j ACCEPT
iptables -A POSTROUTING -t nat -j MASQUERADE -s 172.16.42.0/24
iptables-save
````