Hi, > Am 01.03.2018 um 17:31 schrieb Sven Dyroff <s.dyr...@phytec.de>: > > Hello Nikolaus, > > > Hm. Do you have a non-whitespace white space? Happens sometimes when > > copying UTF charactersto a terminal. > > Ok, after typing the command by hand I got the error that I have no rights to > do that. So modified the command once again: > > DEV=/dev/sdg sudo ./makesd qtmoko -r > http://download.goldelico.com/letux-debian-rootfs/20180224-wheezy-7.11-armhf-qtmoko.tbz > > <http://download.goldelico.com/letux-debian-rootfs/20180224-wheezy-7.11-armhf-qtmoko.tbz> >
Ah, ok. Well, it seems to protect the user :) I usually use an SD card reader of some SBC where I did ssh root access to so I never thought about needing sudo. Maybe we should add a check that you really have write access to the specified device. > > Now it worked and created the SD card. Fine! > > But please note that in the end I got: > > -----------------------------------------%<---------------------------------- > > rmdir: konnte '/media/P2' nicht entfernen: Datei oder Verzeichnis nicht > gefunden > rmdir: konnte '/media/P3' nicht entfernen: Datei oder Verzeichnis nicht > gefunden > rmdir: konnte '/media/P4' nicht entfernen: Datei oder Verzeichnis nicht > gefunden > fsck von util-linux 2.27.1 > rootfs: 26693/7331840 Dateien (7.1% nicht zusammenhängend), 650288/29305190 > Blöcke > fsck von util-linux 2.27.1 > fsck.ext2: Datei oder Verzeichnis nicht gefunden beim Versuch, /dev/sdc2 zu > öffnen > Ist das Gerät möglicherweise nicht vorhanden? > fsck von util-linux 2.27.1 > fsck.ext2: Datei oder Verzeichnis nicht gefunden beim Versuch, /dev/sdc3 zu > öffnen > Ist das Gerät möglicherweise nicht vorhanden? > fsck von util-linux 2.27.1 > fsck.ext2: Datei oder Verzeichnis nicht gefunden beim Versuch, /dev/sdc4 zu > öffnen > Ist das Gerät möglicherweise nicht vorhanden? > > ----------------------------------------->%---------------------------------- That is a harmless and known bug. The script is not completely checking everything. So these warnings are not prevented. > > Accessing "/dev/sdc<x>" is completely wrong and luckily I had no "/dev/sdc" > that could be erased! The same is true for "/media/P<x>"! Well, it is impossible to perfectly prevent erasing the wrong device, because only the user can know what the SD card reader with an SD really is. So it is equally risky as calling fdisk directly. There is at least one protection: you can't overwrite /dev/sda. What you could do is to just sudo chmod o+rw /dev/your-sd-reader but I am not sure what happens with newly created partitions. > > Furthermore: Why "fsck.ext2"? My QtMoko v55 and v57 SD cards had already been > formatted with "fsck.ext4". So even "fsck.ext3" would have been outdated. No idea. The script only calls fsck.ext3. Seems to be a bug in util-linux 2.27.1 when printing the error message. On my system, there are symlinks: root@letux:~# ls -l /sbin/fsck.ext* lrwxrwxrwx 1 root root 6 Dec 31 2016 /sbin/fsck.ext2 -> e2fsck lrwxrwxrwx 1 root root 6 Dec 31 2016 /sbin/fsck.ext3 -> e2fsck lrwxrwxrwx 1 root root 6 Dec 31 2016 /sbin/fsck.ext4 -> e2fsck lrwxrwxrwx 1 root root 6 Dec 31 2016 /sbin/fsck.ext4dev -> e2fsck root@letux:~# which means they are all the same independently of the ext2/3/4 suffix... One size fits all :) Anyways, this is just a safety check for a freshly created partition. So it should normally pass and does not need to be perfect. It fails only if you have a broken SD card or SD card reader which pretends to have written data... So I will prepare patches for both issues reported above. They will be available in some days (after I have tested them). Thanks for feedback about makesd. It can only become better :) BR, Nikolaus
_______________________________________________ Gta04-owner mailing list Gta04-owner@goldelico.com http://lists.goldelico.com/mailman/listinfo.cgi/gta04-owner