-
Fototrend
Utoljára frissítve: 2024.03.06.
Légy szíves olvasd el mielőtt kérdezel!
Az összefoglalóban sok helyen a fórumtársak hozzászólásai vannak belinkelve, vagy az ő információik alapján írtam meg, tisztáztam le az adott információt. Ezúton is köszönöm mindenkinek a segítséget!
Új hozzászólás Aktív témák
-
Ejelhar
senior tag
válasz
Csicsóka #36464 üzenetére
Szia,
megcsináltam a módosítást, ki is próbáltam egy friss rc4.1 telepítéssel, 8 GB-s penről bootolva.
A telepítő image ext4 partíciójába beleraktam az /sbin alá a parted és partprobe binárisokat, ezek az osmc rc3.3-ból származnak (ott feltelepítettem a parted csomagot).
Valamint az /usr/local/bin/fs-resize file-t lecseréltem a módosítottra. Eredmény:
osmc ~ # parted /dev/sda print
Model: SanDisk Cruzer Switch (scsi)
Disk /dev/sda: 7849MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:Number Start End Size Type File system Flags
1 4194kB 273MB 268MB primary fat16 boot, lba
2 273MB 1850MB 1577MB primary ext4osmc ~ # fs-resize
Found the start point of /dev/sda2:
Warning: Partition /dev/sda2 is being used. Are you sure you want to continue?
Information: You may need to update /etc/fstab.Ok, Partition resized.
Model: SanDisk Cruzer Switch (scsi)
Disk /dev/sda: 7849MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:Number Start End Size Type File system Flags
1 4194kB 273MB 268MB primary fat16 boot, lba
2 273MB 7849MB 7576MB primary ext4
Activating the new size
resize2fs 1.43.4 (31-Jan-2017)
Done!
Start OSMC. Enjoy your new space!
init: required argument missing.
osmc ~ # df -h
Fájlrendszer Méret Fogl. Szab. Fo.% Csatol. pont
devtmpfs 783M 0 783M 0% /dev
tmpfs 895M 19M 877M 3% /run
/dev/sda2 6,9G 792M 6,1G 12% /
tmpfs 895M 0 895M 0% /dev/shm
tmpfs 5,0M 0 5,0M 0% /run/lock
tmpfs 895M 0 895M 0% /sys/fs/cgroup
/dev/mmcblk1p1 15G 2,7G 12G 19% /media/Sandisk_SD16G
tmpfs 179M 0 179M 0% /run/user/1000
osmc ~ #A módosított script, amit kivettem azok a sorok a könnyebb azonosíthatóság miatt ## -- ## kezdődnek.
#!/bin/sh
fdisk_first() {
PART=$(grep "/" /proc/mounts | cut -d" " -f1 | grep '2$')
case $PART in
"/dev/mmcblk"*)
DISK=$(echo $PART | sed s/p2$//g)
;;
*)
DISK=$(echo $PART | sed s/2$//g)
;;
esac
## -- ## p2_start=`fdisk -l $DISK | grep $PART | awk '{print $2}'`
echo "Found the start point of $PART: $p2_start"
## -- ## fdisk $DISK << __EOF__ >> /dev/null
## -- ## d
## -- ## 2
## -- ## n
## -- ## p
## -- ## 2
## -- ## $p2_start
## -- ##
## -- ## p
## -- ## w
## -- ## __EOF__
/sbin/parted $DISK resizepart 2 Yes 100%
sync
touch /.resize
echo "Ok, Partition resized."
/sbin/parted $DISK print
echo
echo ""
sleep 5
## -- ## reboot -f
}
resize_fs() {
mount -t proc proc /proc >/dev/null 2>&1
/usr/bin/clear
PART=$(grep "/" /proc/mounts | cut -d" " -f1 | grep '2$')
echo "Activating the new size"
resize2fs $PART >> /dev/null
echo "Done!"
echo "Start OSMC. Enjoy your new space!"
sleep 5
rm -f /.resize
mkdir -p /tmp/mnt
mount -L OSMC /tmp/mnt
rm -f /tmp/mnt/resize
umount /tmp/mnt
exec /sbin/init $*
}
if [ -f /.resize ]; then
resize_fs
else
fdisk_first
resize_fs
fi
Új hozzászólás Aktív témák
- Gamer PC kompromisszumokkal, de garanciával RX 7800 XT + Ryzen 5 3600 32Gb-DDR4
- Ryzen 8500G+ Kingston 32Gb+1Tb 980pro NVME SSD
- AKCIÓ!!! GAMER PC: Új i5-14400F +RTX 4060/5060/4070/5070 +16-64GB DDR4! GAR/SZÁMLA! 50 FÉLE HÁZ!
- AKCIÓ - INGYEN POSTA - ÚJ GAMER PC - i5-12400F - RTX 5060 - 16GB RAM -1TB SSD - www.olcsogamerpc.hu
- AKCIÓ - INGYEN POSTA - ÚJ GAMER PC - i5-12400F - RTX 4060Ti - 16GB RAM -1TB SSD -www.olcsogamerpc.hu
- iKing.Hu - Apple iPhone 13 Pro Max - Graphite - Használt, újszerű
- AKCIÓ! Apple MacBook PRO 15" 2018 i9 32GB 500GB 560X 4GB notebook garanciával hibátlan működéssel
- Tablet felvásárlás!! Apple iPad, iPad Mini, iPad Air, iPad Pro
- Apple iPhone 7 128GB, Yettel függő, 1 Év Garanciával
- Windows, Office licencek kedvező áron, egyenesen a Microsoft-tól - Automata kézbesítés utalással is!
Állásajánlatok
Cég: CAMERA-PRO Hungary Kft
Város: Budapest
Cég: Promenade Publishing House Kft.
Város: Budapest