freebsd:freebsd-14.0-stable_vergroessern
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen RevisionVorhergehende Überarbeitung | |||
| freebsd:freebsd-14.0-stable_vergroessern [2024-02-17 11:05:48] – manfred | freebsd:freebsd-14.0-stable_vergroessern [2024-02-17 11:09:52] (aktuell) – gelöscht manfred | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| - | ====== FreeBSD-14.0-STABLE vergrößern ====== | ||
| - | |||
| - | |||
| - | ===== UFS-RAW-Image vergrößern ===== | ||
| - | |||
| - | <code bash> | ||
| - | > ls -lha FreeBSD-14.0-STABLE-amd64.raw | ||
| - | -rw-r--r-- | ||
| - | |||
| - | > truncate -s +10G FreeBSD-14.0-STABLE-amd64.raw | ||
| - | |||
| - | > ls -lha FreeBSD-14.0-STABLE-amd64.raw | ||
| - | -rw-r--r-- | ||
| - | |||
| - | > du -sh FreeBSD-14.0-STABLE-amd64.raw | ||
| - | 1.8G FreeBSD-14.0-STABLE-amd64.raw | ||
| - | |||
| - | > truncate -s 20G FreeBSD-14.0-STABLE-amd64.raw | ||
| - | |||
| - | > ls -lha FreeBSD-14.0-STABLE-amd64.raw | ||
| - | -rw-r--r-- | ||
| - | |||
| - | > du -sh FreeBSD-14.0-STABLE-amd64.raw | ||
| - | 1.8G FreeBSD-14.0-STABLE-amd64.raw | ||
| - | |||
| - | > screen -S FreeBSD-14.0-STABLE sh / | ||
| - | |||
| - | > gpart list | awk '/Geom name: /{print $NF}' | ||
| - | vtbd0 | ||
| - | |||
| - | [root@freebsd ~]# gpart show vtbd0 | ||
| - | => 34 12649618 | ||
| - | 34 | ||
| - | | ||
| - | | ||
| - | | ||
| - | |||
| - | [root@freebsd ~]# gpart resize -i 4 vtbd0 | ||
| - | gpart: autofill: No space left on device | ||
| - | |||
| - | [root@freebsd ~]# growfs / | ||
| - | growfs: requested size 5.0GB is equal to the current filesystem size 5.0GB | ||
| - | |||
| - | [root@freebsd ~]# GEOM_PART: vtbd0 was automatically resized. | ||
| - | Use `gpart commit vtbd0` to save changes or `gpart undo vtbd0` to revert them. | ||
| - | |||
| - | [root@freebsd ~]# gpart show vtbd0 | ||
| - | => 34 41942966 | ||
| - | 34 | ||
| - | | ||
| - | | ||
| - | | ||
| - | 12649652 | ||
| - | |||
| - | [root@freebsd ~]# gpart commit vtbd0 | ||
| - | |||
| - | [root@freebsd ~]# gpart resize -i 4 vtbd0 | ||
| - | vtbd0p4 resized | ||
| - | |||
| - | [root@freebsd ~]# df -h | ||
| - | Filesystem | ||
| - | / | ||
| - | devfs 1.0K 0B 1.0K | ||
| - | / | ||
| - | |||
| - | [root@freebsd ~]# growfs / | ||
| - | Device is mounted read-write; resizing will result in temporary write suspension for /. | ||
| - | It's strongly recommended to make a backup before growing the file system. | ||
| - | OK to grow filesystem on / | ||
| - | growfs: no room to allocate last cylinder group; leaving 7.6MB unused | ||
| - | super-block backups (for fsck_ffs -b #) at: | ||
| - | | ||
| - | | ||
| - | |||
| - | [root@freebsd ~]# df -h / | ||
| - | Filesystem | ||
| - | / | ||
| - | |||
| - | [root@freebsd ~]# gpart show vtbd0 | ||
| - | => 34 41942966 | ||
| - | 34 | ||
| - | | ||
| - | | ||
| - | | ||
| - | 41942784 | ||
| - | </ | ||
| - | |||
| - | |||
| - | ===== FreeBSD-14.0-STABLE Downlad & Start ===== | ||
| - | |||
| - | <file bash / | ||
| - | #!/bin/sh | ||
| - | |||
| - | # | ||
| - | # | ||
| - | # Dieses Skript hilt sich das neueste FreeBSD-RAW-Image und startet es mit Bhyve. | ||
| - | # Zu diesem Zweck wird auch ein TAP angelegt, wenn es nicht schon da ist und | ||
| - | # zur Brücke hinzugefügt. | ||
| - | # | ||
| - | # | ||
| - | |||
| - | VERSIN=" | ||
| - | |||
| - | RAM=" | ||
| - | NIC=" | ||
| - | |||
| - | ### wenn das NIC bereits in Nutzung ist, wird abgebrochen | ||
| - | ifconfig ${NIC} | grep -F ' | ||
| - | |||
| - | # | ||
| - | |||
| - | ### neuestes STABLE-Release-Namen auslesen | ||
| - | STABLERELEASE=" | ||
| - | |||
| - | ### wenn eine VM mit diesem Namen bereits läuft, dann wird abgebrochen | ||
| - | if [ -e / | ||
| - | |||
| - | ### neuestes STABLE-Image saugen | ||
| - | FETCH_IMG=" | ||
| - | rm -f ${FETCH_IMG} | ||
| - | fetch https:// | ||
| - | |||
| - | ### Image entpacken | ||
| - | DISKNAME=" | ||
| - | rm -f ${DISKNAME} | ||
| - | unxz -v ${FETCH_IMG} | ||
| - | |||
| - | ### Netzwerkanbindung | ||
| - | ifconfig bridge0 | ||
| - | ifconfig ${NIC} || ifconfig ${NIC} create | ||
| - | ifconfig bridge0 | grep -F " | ||
| - | |||
| - | ### NIC mit Default-Route (ins Internet??? | ||
| - | INTERNETNIC=" | ||
| - | if [ x = " | ||
| - | echo 'Es ẃurde keine NIC mit Default-Route gefunden!' | ||
| - | echo 'Die VM wird versuchen sich eine IP-Adresse per DHCP vom Host (per lo0) zu holen.' | ||
| - | ifconfig bridge0 | grep -F " | ||
| - | else | ||
| - | ifconfig bridge0 | grep -F " | ||
| - | fi | ||
| - | |||
| - | ### VM starten | ||
| - | echo "sh / | ||
| - | screen -S FreeBSD-${STABLERELEASE} sh / | ||
| - | |||
| - | ### Hinweise zum sauber machen | ||
| - | echo " | ||
| - | ifconfig -a | ||
| - | ifconfig bridge0 deletem ${NIC} | ||
| - | ifconfig ${NIC} destroy | ||
| - | ifconfig bridge0 destroy | ||
| - | " | ||
| - | </ | ||
| - | |||
/home/http/wiki/data/attic/freebsd/freebsd-14.0-stable_vergroessern.1708167948.txt · Zuletzt geändert: von manfred
