zielonyBB Posted November 11, 2014 Share Posted November 11, 2014 Po pierwsze witam i pozdrawiam Szanownych Kolegów ! Po drugie, pytanie które mam jest następujące - co się stało z narzędziem sysbckp ? Po ostatnim upgrade 10.11 (który zakończył się pełnym sukcesem) skrypt owszem uruchamia się ale po 6-ciu godzinach powstaje tylko paczka archiwum i suma kontrolna dla rootfs, a co z resztą ? Tuner ADB5800 Quote Link to comment Share on other sites More sharing options...
matzg Posted November 11, 2014 Share Posted November 11, 2014 @tux czy przypadkiem nie błędu w sysbckp: if grep -q "/media/data" /proc/mounts; then devs=`mount | grep "/media/data" | tr -d '*' | awk '{print $1}'` fs_id=`fdisk -l | grep $devs | tr -d '*' | tail -n1 | awk '{print $6}'` if [ "$fs_id" != 83 ]; then echo "Partycja /media/data/ nie jest w formacie Linux" fi elif grep -q "/hdd" /proc/mounts; then devs=`mount | grep "/hdd" | tr -d '*' | awk '{print $1}'` fs_id=`fdisk -l | grep $devs | tr -d '*' | tail -n1 | awk '{print $6}'` if [ "$fs_id" != 83 ]; then echo "Partycja /hdd nie jest w formacie Linux" exit 0 fi nie powinno być? if grep -q "/media/data" /proc/mounts; then devs=`mount | grep "/media/data" | tr -d '*' | awk '{print $1}'` fs_id=`fdisk -l | grep $devs | tr -d '*' | tail -n1 | awk '{print $5}'` if [ "$fs_id" != 83 ]; then echo "Partycja /media/data/ nie jest w formacie Linux" fi elif grep -q "/hdd" /proc/mounts; then devs=`mount | grep "/hdd" | tr -d '*' | awk '{print $1}'` fs_id=`fdisk -l | grep $devs | tr -d '*' | tail -n1 | awk '{print $5}'` if [ "$fs_id" != 83 ]; then echo "Partycja /hdd nie jest w formacie Linux" exit 0 fi Quote Link to comment Share on other sites More sharing options...
tux Posted November 11, 2014 Share Posted November 11, 2014 A dlaczego $5? Sprawdzałeś co zwraca $fs_id? My szukamy numeru określającego FS type. Czy u mnie jest jakoś inaczej? Quote Link to comment Share on other sites More sharing options...
matzg Posted November 12, 2014 Share Posted November 12, 2014 tak sprawdzałem ...na 2850 mam GraterliaOS:~# fdisk -l | grep /dev/sda1 | tr -d '*' | tail -n1 | awk '{print $6 }' Linux GraterliaOS:~# fdisk -v fdisk from util-linux 2.24 GraterliaOS:~# a na 5800 GraterliaOS:~# fdisk -l | grep /dev/sda1 | tr -d '*' | tail -n1 | awk '{print $ 6 > }' 83 GraterliaOS:~# fdisk -v fdisk from util-linux 2.25 GraterliaOS:~# wybacz za zawracanie głowy, wszystko ok Quote Link to comment Share on other sites More sharing options...
tux Posted November 12, 2014 Share Posted November 12, 2014 Na 28xx jest inaczej niz 5800xx? Quote Link to comment Share on other sites More sharing options...
matzg Posted November 12, 2014 Share Posted November 12, 2014 Sądzę że to wina wersji fdisk-a na 2850 mam stary OS i wersja 2.24 . Quote Link to comment Share on other sites More sharing options...
Guest j00zek Posted November 12, 2014 Share Posted November 12, 2014 aleście skomplikowali.... if `fdisk -l | grep /dev/sda1 | grep -q '83 Linux'` Quote Link to comment Share on other sites More sharing options...
tux Posted November 12, 2014 Share Posted November 12, 2014 @j00zek → Nie zadziała 82 Linux to nie jedno wyrażenie a dwa rozdzielone spacją. Efekt masz taki: kikut:~# fdisk -l | grep /dev/sda1 | grep -q '83 Linux' kikut:~# fdisk -l Disk /dev/mtdblock0: 512 KiB, 524288 bytes, 1024 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 Disk /dev/mtdblock1: 2.5 MiB, 2621440 bytes, 5120 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 Disk /dev/mtdblock2: 61 MiB, 63963136 bytes, 124928 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 Disk /dev/sda: 14.5 GiB, 15504900096 bytes, 30283008 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: 0x2a0d3490 Device Boot Start End Sectors Size Id Type /dev/sda1 2048 30283007 30280960 14.4G 83 Linux Quote Link to comment Share on other sites More sharing options...
Guest j00zek Posted November 12, 2014 Share Posted November 12, 2014 oczywiście, że zadziała if `fdisk -l | grep /dev/sda1 | grep -q '83 Linux'`; then echo aqq;fi Quote Link to comment Share on other sites More sharing options...
tux Posted November 12, 2014 Share Posted November 12, 2014 FUCK było -q a ja ślepota nie zauważyłem :P Nowy fdisk pokazuje inaczej i już nie trzeba tak komplikować. Jutro do poprawki leci :) Quote Link to comment Share on other sites More sharing options...
Guest j00zek Posted November 12, 2014 Share Posted November 12, 2014 a ja bym proponował skorzystanie z blkid. Wielokrotnie mi się zdarzyło, że fdisk pokazywał znacznik partycji jako dos, choć byłą sformatowana ext3 Quote Link to comment Share on other sites More sharing options...
tux Posted November 12, 2014 Share Posted November 12, 2014 W sumie też można :) Tak czy siak trzeba to poprawić. Ciągnie się to już dość długo. Quote Link to comment Share on other sites More sharing options...
zielonyBB Posted November 13, 2014 Author Share Posted November 13, 2014 Znaczy się jest szansa na poprawkę ? :) Quote Link to comment Share on other sites More sharing options...
zielonyBB Posted November 14, 2014 Author Share Posted November 14, 2014 To ja kończąc temat (chyba). Jest prawie ok. Utworzyły się archiwa rootfs i FLASH, tempy poczyszczone, brakuje archiwum settingsbackup ale w sumie to drobiazg. Pozdrawiam Quote Link to comment Share on other sites More sharing options...
tux Posted November 14, 2014 Share Posted November 14, 2014 Bo to archiwum tworzy się inaczej :) wpisz "system.sh" w terminal. Póki co nie przewiduję innej opcji. Pełny backup ma w sobie ustawienia tunera. Nie ma potrzeby wykonywać teraz raz jeszcze. Docelowo zostanie tylko pełny backup. Quote Link to comment Share on other sites More sharing options...
zielonyBB Posted November 14, 2014 Author Share Posted November 14, 2014 Tux, jak dla mnie, tak jak jest jest gitarra :) Dzięki za szybką reakcję ! Temat do zamknięcia. Quote Link to comment Share on other sites More sharing options...
tux Posted November 14, 2014 Share Posted November 14, 2014 Jeszcze nie jest OK do końca. Teraz jeszcze szuka po fdisk a nie uuid. Jak będę miał moment to przepiszę to i będzie 100% super. Quote Link to comment Share on other sites More sharing options...
tomciu Posted November 14, 2014 Share Posted November 14, 2014 Bo to archiwum tworzy się inaczej :) wpisz "system.sh" w terminal. W końcu zebrałem się do pisania, i chcę zauważyć, że wywołanie "sysbckp" w obecnej formie jest IMO do kitu. Dlaczego? Po wpisaniu tej komendy nie mam nad nią żadnej kontroli. Od razu rozpoczyna się proces tworzenia kopii. Jedyna forma przerwania tego to ctrl^c. Takie coś powoduje, że w /hdd/backup zostaje utworzony symlink do /, i ktoś mało zorientowany może wykasować sobie cały nand. Druga sprawa to brak wyboru, do jakiej postaci chcę zrobić backup. Według mnie ta funkcja powinna wyglądać tak: wpisanie w konsoli "sysbckp" wyświetla komunikat w stylu "system.sh", czyli krótka informacja o możliwości wyboru formy backupu, np.: - flash (nand) - rootfs (pendrive) - all (obydwa) Takie rozwiązanie powinno pozwolić (dla większości użytkowników) na skrócenie całej tej operacji, bo wydaje mi się, że mało kto potrzebuje jednocześnie kopii w dwóch wariantach. Quote Link to comment Share on other sites More sharing options...
Guest future0 Posted November 15, 2014 Share Posted November 15, 2014 Mam problem, mimo sformatowania pendrive na ext3 i zamontowania do /hdd wyskakuje: GraterliaOS:~# sysbckp Posiadasz tuner ADB5800 Sprawdzam czy moĹźna wykonaÄ kopiÄ bezpieczeĹ stwa Partycja /hdd nie jest w formacie Linux Quote Link to comment Share on other sites More sharing options...
tux Posted November 15, 2014 Share Posted November 15, 2014 A jak zakładałeś partycje i ją formatowałeś? Quote Link to comment Share on other sites More sharing options...
Guest future0 Posted November 15, 2014 Share Posted November 15, 2014 Poprzez Managera dysków w GOS Manager. Quote Link to comment Share on other sites More sharing options...
tux Posted November 15, 2014 Share Posted November 15, 2014 Co pokaże polecneie: blkid Quote Link to comment Share on other sites More sharing options...
Guest future0 Posted November 15, 2014 Share Posted November 15, 2014 GraterliaOS:~# blkid /dev/sda1: LABEL="records" UUID="6b25ffe1-8e7a-4b64-b9eb-ade2ac2278f3" TYPE="ext3" Quote Link to comment Share on other sites More sharing options...
tux Posted November 15, 2014 Share Posted November 15, 2014 To pokaż jeszcze co pokazuje: fdisk -l Quote Link to comment Share on other sites More sharing options...
Guest future0 Posted November 15, 2014 Share Posted November 15, 2014 GraterliaOS:~# fdisk -l Disk /dev/mtdblock0: 60 MiB, 62914560 bytes, 122880 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 Disk /dev/mtdblock1: 4 MiB, 4194304 bytes, 8192 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 Disk /dev/sda: 3.8 GiB, 4011851776 bytes, 7835648 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: 0x00000000 Device Boot Start End Sectors Size Id Type /dev/sda1 * 128 7835647 7835520 3.8G b W95 FAT32 tylko czego pokazuje FAT32 skoro formatowałem na ext3 ? Quote Link to comment Share on other sites More sharing options...
tux Posted November 15, 2014 Share Posted November 15, 2014 Musze coś przeanalizować. Dajcie mi trochę czasu. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.