00:23.44 | dafox | at the risk of not getting any more help: yes. However this happens very predictably (always those apps), and has much more characteristics of a drawing bug (i.e. not just random corruption) |
00:44.01 | *** join/#maemo-ssu LaoLang_cool (~LaoLang_c@120.85.133.181) |
01:31.53 | *** join/#maemo-ssu wumpwoast (~jcassidy@63.251.248.156) |
02:06.17 | Pali | merlin1991: on tmo there are more people which want ext4 on MyDocs and also on home |
02:06.43 | Pali | I looked into script where are hardcoded vfat and ext3 strings |
02:07.34 | Pali | and scripts working: MyDocs is first partition which has 'c' id in MBR table on /dev/mmcblk0 |
02:08.16 | Pali | home is partition on /dev/mmcblk0 which has in MBR table '83' id |
02:08.32 | Pali | (first partition) |
02:09.09 | Pali | so both /home and MyDocs are not hardcoded to partition number but to id in MBR table |
02:11.07 | Pali | problem is that there is convention (and parition programs using it) that 'c' id means FAT32 partition, 83 is some linux partition (ext*) |
02:11.52 | Pali | kerio, freemangodon, merlin1991, DocScrutinizer05: if you have idea how to fix that, ping me |
02:12.36 | Pali | solution is not easy, because more people swapped MyDocs and home partition numbers |
02:13.44 | Pali | we need to determinate which partition is mydocs, home and swap and then generate proper /etc/fstab with correct filesystem type |
02:18.42 | DocScrutinizer05 | Pali: well, the solution is rather simple, though radical. Get proper persistent fstab |
02:19.55 | DocScrutinizer05 | tbh I still don't get the rationale yet of generating a fake fstab on each boot |
02:21.59 | Pali | DocScrutinizer05, ok, how to generate fstab? |
02:22.05 | Pali | see above problems ^^^ |
02:22.29 | Pali | we can break devices when we switch home & mydocs & swap |
02:23.03 | Pali | determinating which partition is swap could be easy |
02:23.18 | Pali | but how to determinate which partition is /home and which MyDocs? |
02:24.33 | DocScrutinizer05 | well, somebody must have changed that, or it will be as we're used to. The one who changes fs type also has to ccreate the fstap for that |
02:24.40 | DocScrutinizer05 | fstab* |
02:25.11 | Pali | yes, but now maemo scripts generating it |
02:25.45 | Pali | so I really do not know if some script is not going to remove fstab |
02:25.50 | DocScrutinizer05 | yes, and if we want to fix it, we need to change that to using a static fstab |
02:26.31 | Pali | maybe another question: do we need fstab? |
02:26.41 | DocScrutinizer05 | sure |
02:26.51 | Pali | mounting mmc card & usb disks in host mode are mounted automatically by ke-recv |
02:26.59 | Pali | which ignoring fstab |
02:27.11 | Pali | and calling directly mount device mount_point |
02:27.18 | Pali | same is for MyDocs |
02:27.23 | DocScrutinizer05 | one more reason why no dynamic fstab is needed |
02:27.46 | Pali | in fstab is only home & MyDocs |
02:27.55 | Pali | and swap |
02:28.02 | DocScrutinizer05 | I really don't understand why all this is the way it is |
02:28.28 | Pali | changing ke-recv is not simple |
02:28.48 | Pali | so I think that mount code in ke-recv is not going to be changed |
02:28.49 | DocScrutinizer05 | but feasible |
02:29.23 | Pali | and there is problem that all maemo apps want sd card in /media/mmc1 |
02:29.36 | Pali | and usb disks in /media/usb/sd* |
02:30.13 | Pali | so fstab for SD card & usb disks is useless |
02:30.36 | Pali | and also when I create new partition on SD card I really do not want to edit fstab for mounting SD card |
02:31.07 | Pali | linuxes on desktop also doing autodetection of external usb disks and SD cards |
02:37.04 | *** join/#maemo-ssu FlameReaper (~assassin@175.144.200.125) |
02:38.38 | DocScrutinizer05 | Pali: you're jumbing like mad between /home and /mydocs and ke-recv and uSD cards and scripts and whatnot |
02:38.58 | DocScrutinizer05 | I never suggested to mount uSD via fstab |
02:39.21 | Pali | ok, so what do you want to see in fstab |
02:39.36 | DocScrutinizer05 | I want to see my pillow now |
02:39.42 | Pali | and how to generate first version of fstab? |
02:40.18 | DocScrutinizer05 | well, maybe user generates it with mcedit? |
02:51.58 | DocScrutinizer05 | either user changed his partitons then he needs to change his fstab. Or user didn't and we use standard fstab |
02:52.19 | DocScrutinizer05 | I don't see the problem |
03:54.58 | *** join/#maemo-ssu amiconn_ (quassel@rockbox/developer/amiconn) |
04:02.21 | *** join/#maemo-ssu DocScrutinizer05 (~HaleBopp@openmoko/engineers/joerg) |
04:23.41 | *** join/#maemo-ssu FlameReaper (~assassin@175.144.200.125) |
06:39.07 | *** join/#maemo-ssu tadzik (tjs@feather.perl6.nl) |
07:28.32 | *** join/#maemo-ssu Mihanizat0r (~M13@170.133-224-87.telenet.ru) |
07:44.49 | kerio | i already have a check against the generation of fstab in my rcS-late |
07:45.06 | kerio | i made it so that fstab is recreated iff genfstab.awk exists |
07:46.09 | kerio | then the only issue becomes mount_home, that checks for "/home ext3 rw" in /proc/mounts |
07:46.24 | kerio | but that can be regexp'd |
07:46.45 | kerio | what *can't* be regexp'd is the fsck.ext3 |
07:47.05 | kerio | how does the automagical fsck work, i wonder |
07:49.47 | *** join/#maemo-ssu LauRoman (~LauRoman@5-14-88-255.residential.rdsnet.ro) |
07:52.06 | kerio | hm, at worst we could run fsck.`grep /home /etc/fstab | cut | awk '{print $2}'` |
07:59.00 | kerio | anyway, if we eventually ship a kernel with ext4, we can just change all of those to "ext4", it's backwards-compatible |
08:29.42 | *** join/#maemo-ssu Vlad_on_the_road (~Vlad_on_t@ip-66.net-82-216-1.versailles2.rev.numericable.fr) |
08:53.17 | *** join/#maemo-ssu NIN101 (~NIN@p5DD29714.dip0.t-ipconnect.de) |
09:08.36 | *** join/#maemo-ssu Pali (~pali@Maemo/community/contributor/Pali) |
09:08.50 | kerio | ohai Pali |
09:09.08 | kerio | you missed my monologue regarding fstab :) |
09:09.25 | Pali | hi |
09:10.40 | Pali | kerio, we can use blkid or hal which tell us filesystem on mmc block device |
09:10.53 | Pali | so hardcocded ext3/vfat can be fixed with blkid |
09:11.02 | Pali | everywhere |
09:11.27 | kerio | Pali: that doesn't involve having a real fstab |
09:11.41 | Pali | but you can see that genfstab.awk reading MBR parittion id |
09:12.27 | Pali | I think that good solution would be: add new config file with GENFSTAB= option |
09:12.33 | Pali | which user can change |
09:13.20 | Pali | kerio, but first we should solve how to determinate which partition is /home and which MyDocs |
09:13.37 | kerio | what do you mean "determine"? |
09:14.08 | Pali | which partition should be mounted to /home? |
09:14.14 | Pali | and which to MyDocs? |
09:14.14 | kerio | /dev/mmcblk0p2 |
09:14.21 | Pali | why? |
09:14.21 | kerio | /dev/mmcblk0p1 |
09:14.24 | kerio | actually no, even better |
09:14.28 | kerio | the partitions specified in /etc/fstab |
09:14.38 | Pali | some people swapped p2 and p1 |
09:14.47 | kerio | well those people should fix their fstab |
09:14.55 | Pali | and because genfstab.awk reading MBR id, it generate correct fstab |
09:15.07 | kerio | good, so the fstab is already correct |
09:18.02 | Pali | kerio, there is another problem: yesterday I booted 3.8 kernel on maemo5, and udev did not changed mmc0 and mmc1, so I had mmc1 for eMMC |
09:18.21 | Pali | without fixing rcS-late I was not able to boot 3.8 kernel |
09:18.33 | kerio | Pali: does our "mount" understand UUIDs? |
09:18.47 | Pali | so I think that static fstab is not good solution for booting more kernels |
09:18.57 | kerio | it is |
09:19.05 | kerio | mount by UUID |
09:19.11 | Pali | UUID sounds like good idea, but |
09:19.25 | kerio | and if you're going to boot 3.8 then you're outside of the realm of the normal user |
09:19.32 | Pali | reformating MyDocs on windows will change fat uuid |
09:19.50 | Pali | kerio, I want easy solution for booting upstream kernel |
09:19.59 | Pali | and not changing tons of config before reboot |
09:20.05 | kerio | and i want a pony |
09:20.30 | kerio | fremantle has unspoken assumptions regarding the partition layout of /dev/mmcblk* |
09:20.32 | Pali | it is not normal to change configs if you are going to boot another kernel |
09:20.56 | kerio | but it's normal to change configs if you're going to swap hardware around |
09:21.00 | kerio | which is what's effectively happening |
09:21.05 | Pali | kerio, for some reason ke-recv correctly detected which mmc device is SD card |
09:21.09 | Pali | and mounted it correctly |
09:21.37 | Pali | it mounted /dev/mmcblk0p1 to /media/mmc1 |
09:22.13 | Pali | so seems that SD card is not hardcoded for /dev/mmcblk1* |
09:23.36 | kerio | yeah, the sd card can be automounted by ke-recv |
09:24.06 | kerio | (i'd still like a bit more documentation on how to trigger that manually, but whatever) |
09:24.16 | kerio | /home is mounted during rcS-late |
09:24.21 | Pali | yes |
09:25.14 | kerio | and the UUID of /home doesn't change |
09:25.22 | kerio | well |
09:25.32 | kerio | hrmpf |
09:25.46 | Pali | kerio, can we check if mc block device has root folder "user" before mouting? |
09:25.50 | Pali | *mmc |
09:26.03 | Pali | because in /home should be "user" |
09:26.03 | kerio | we could mount and unmount if we're wrong, but that's bullshit |
09:26.11 | kerio | "mkdir user" |
09:26.35 | Pali | no, I mean that device which has "user" is /home |
09:26.41 | kerio | yep, that's bullshit |
09:27.05 | kerio | i could have multiple extfs partitions with a "user" directory |
09:27.49 | Pali | now first partition with id '83' is mounted to /home |
09:28.05 | kerio | in the correct device |
09:28.17 | kerio | because of the HAL renaming |
09:28.24 | Pali | udev doing renaming |
09:28.30 | kerio | right, udev |
09:28.35 | Pali | and rcS-late has hardcoded mmc0 |
09:28.40 | kerio | well, make your 3.8 kernel's udev rename them too |
09:29.02 | Pali | kerio, problem is that I do not know why that renaming udev rule not working |
09:29.11 | Pali | I tried to check out why |
09:29.18 | Pali | but I think that rule should work |
09:29.28 | kerio | Pali: /dev/mmcblk0 being the eMMC and /dev/mmcblk1 being the uSD is an unwritten assumption in fremantle/n900 anyway |
09:29.46 | Pali | kerio, yes, but this can be also easy fixed |
09:30.12 | Pali | in /sys there is item which tell us if mmc device is interal or external |
09:30.18 | kerio | i mean an assumption in every piece of (related to partitions) software |
09:30.24 | Pali | script /bootmenu.sh doing it |
09:31.48 | kerio | Pali: holy shit, our "mount" understands LABEL= |
09:32.11 | Pali | I'm for this: Add option for user to stop generating fstab, but also fix autogenerating to support any filesystem |
09:33.19 | Pali | btw is swapon reading swap partitions from /etc/fstab? |
09:33.27 | kerio | yeah, rcS-late just does a swapon -a |
09:33.38 | kerio | after it's generated |
09:33.41 | Pali | if yes, this can solve also problem with adding more swaps |
09:34.18 | kerio | i have, around the block of code that generates fstab: |
09:34.23 | kerio | <PROTECTED> |
09:34.58 | kerio | but that can be changed to be something like if [ ! -e /etc/default/nogenfstab ]; then |
09:35.00 | kerio | or something like that |
09:36.42 | Pali | kerio, it will be very bad if we hardcode that first partition will be mounted to MyDocs (any supported filesystem by kernel) and second will be /home? |
09:37.22 | kerio | Pali: linux doesn't care much about the partition type |
09:37.23 | Pali | because I do not see any good solution how to generate fstab with MyDocs and home with any supported filesyetem |
09:37.40 | kerio | MyDocs and mmc things are still handled by ke-recv |
09:37.51 | kerio | MyDocs is the first partition with id 0c in the internal memory |
09:37.57 | kerio | regardless of the actual file system |
09:38.01 | kerio | (kinda ugly, but meh) |
09:38.13 | Pali | kerio, yes this is reason why I do not like to see using MBR ids |
09:39.47 | Pali | ok, so I will try to change all maemo scripts to, respect some nongenfstab settings and generation will always use p1 for MyDocs and p2 for /home (with autodetection of filesystem) |
09:40.08 | kerio | Pali: what's wrong with having a fixed partition order, anyway? |
09:40.31 | Pali | users which already using switched partitions |
09:40.41 | kerio | Pali: they won't need to move data around |
09:40.48 | Pali | becase maemo system has support for that |
09:40.50 | kerio | you can just change the partition order |
09:41.10 | Pali | kerio, yes it is possible :-) |
09:41.25 | kerio | fdisk will yell at you, but he'll do it |
09:41.32 | Pali | but I think that (s)fdisk has no command for reordering partition |
09:41.51 | kerio | Pali: whatever, change the ordering in some way |
09:42.05 | kerio | delete the partitions and recreate them in the opposite order with the exact same start/end |
09:42.12 | Pali | yes |
09:42.12 | kerio | (but swapped) |
09:42.33 | Pali | also u-boot has hardcoded first emmc partittion for bootmenu |
09:42.39 | kerio | we should facilitate users who wish to customize their system like that, but we and they can't hope that everything will happen automagically |
09:42.50 | Pali | I will try to remove hardcoded fat32 option |
09:43.08 | kerio | Pali: so you're going to outright ignore the mbr partition type? |
09:43.32 | kerio | Pali: also, how does the autodetect work? |
09:43.41 | Pali | I do not see better solution... |
09:43.43 | kerio | ext3 can be safely mounted as ext4 and then back |
09:43.52 | kerio | but ext4 with extents won't be mountable as ext3 |
09:43.55 | Pali | kerio, autodetect will read some bytes from partittion and detect type |
09:44.04 | kerio | although the ext* status in the kernel is always weird like that |
09:44.12 | kerio | and it's the same code anyway, right? |
09:44.23 | Pali | run sudo blkid and will show all info |
09:44.39 | Pali | it detecting correctly eveyrting on my device |
09:44.48 | kerio | mine too |
09:44.59 | *** join/#maemo-ssu M4rtinK (~M4rtinK@mail.melf.eu) |
09:45.00 | kerio | Pali: how do i unmount/mount via ke-recv? |
09:45.04 | kerio | like, MyDocs |
09:45.12 | kerio | does ke-recv read /etc/default/mount-opts? |
09:45.24 | kerio | ah crap, how should ke-recv handle mount-opts then? |
09:45.41 | kerio | for its own partitions |
09:45.49 | Pali | ke-recv calling osso-mmc-mount.sh |
09:46.08 | Pali | it ignoring mount-opts |
09:46.31 | Pali | also see script mmc-mount |
09:46.51 | Pali | there are hardcoded options for vfat |
09:47.16 | kerio | so everything ke-recv does is done through that script? |
09:47.35 | kerio | regarding the mounts |
09:47.45 | Pali | it should be done by osso-mmc-mount.sh |
09:47.53 | Pali | there is implemented blacklist |
09:47.56 | kerio | alright |
09:47.56 | Pali | which seems to work |
09:47.59 | kerio | what about the export? |
09:48.07 | kerio | who specifies what to export? it's not written in the script |
09:48.07 | Pali | export? |
09:48.11 | kerio | mass storage mode |
09:48.15 | Pali | ke-recv |
09:48.22 | kerio | but where in the source? i wasn't able to find that |
09:48.31 | Pali | sd card is in /media/mmc<num>p<num> |
09:48.35 | kerio | that should be made configurable too, |
09:48.41 | Pali | usb disk is in /media/usb/ |
09:48.43 | Pali | kerio, no |
09:48.45 | kerio | yes |
09:48.51 | kerio | i have my swap on the uSD |
09:48.55 | kerio | and the whole usd is exported |
09:49.00 | kerio | and that's bullshit |
09:49.06 | Pali | I must hardcoded that, becuase gkt, hildon, and closed file manager depends on these locations |
09:49.14 | kerio | not the locations |
09:49.20 | kerio | what to export via usb mass storage mode |
09:49.33 | Pali | ah, you mean that |
09:49.35 | kerio | also, file manager will happily list every directory in /media/ |
09:49.45 | kerio | i do my nfs mounts there, and they're shown :3 |
09:50.26 | Pali | ke-recv has check: if this is internal mmc device export only MyDocs else export full partittion |
09:50.44 | Pali | maemo has configured only 2 luns in gadget driver |
09:50.50 | Pali | so you can export only two devices |
09:51.03 | kerio | while we're in the midst of having these customization helpings, we should try to make that configurable too |
09:51.16 | kerio | Pali: at least a blacklist for exporting |
09:51.43 | Pali | kerio, if swap is using I think that it will not be possible to export SD card |
09:51.55 | kerio | Pali: i never tried to write on it, but the swap is exported |
09:52.05 | kerio | i don't know if it's locked down and you can't write on it from the usb host |
09:52.12 | kerio | but it's still terrifying |
09:52.24 | Pali | swap is exported when using? |
09:52.32 | kerio | the whole SD is exported |
09:52.38 | Pali | yes |
09:52.43 | kerio | i see the swap partition in the partition list in Disk Utility |
09:52.46 | Pali | but it should be umounted |
09:52.57 | kerio | well, it's not :) |
09:53.01 | kerio | thankfully |
09:53.06 | Pali | kerio, if you have swap partition on sd card, then swap is also exported |
09:53.18 | Pali | because full mmc block device is exported |
09:53.28 | kerio | yeah, but we could change that |
09:53.33 | kerio | and by we i obviously mean you :P |
09:53.59 | Pali | and how? |
09:54.00 | kerio | Pali: how about a setting to "prefer single partition" in the export of the uSD |
09:54.13 | kerio | if there's that setting, and there's a partition table, you export the first partition |
09:54.26 | Pali | ok |
09:54.51 | kerio | you need to check if there's a partition table, because uSDs can also be superfloppys with no partition table and the filesystem on the whole device |
09:55.19 | kerio | Pali: make it threefold: export whole device (default), export single partition, no export |
09:55.23 | kerio | with no export, you only export mydocs |
09:58.48 | kerio | Pali: also, my sd is mounted in /media/mmc1, not /media/mmc1p1 |
09:59.59 | Pali | kerio, yes, because one partition must be mounted to /media/mmc1 |
10:00.11 | kerio | i see |
10:00.20 | Pali | because camera (or another application, maybe modest) had hardcoded that path |
10:00.34 | Pali | and ke-recv mounting first fat partition for /media/mmc1 |
10:00.45 | Pali | if there is no fat, then first non fat is mounted |
10:01.05 | kerio | alright |
10:02.27 | kerio | Pali: btw, i successfully booted with no hardcoded devices in /etc/fstab :D |
10:06.29 | kerio | Pali: does ke-recv depend on the reordering of devices? |
10:06.47 | Pali | I do not know |
10:06.55 | Pali | what is hardcoded in ke-recv |
10:07.15 | kerio | anyway, i think that the invariant of the first partition must be somewhat preserved |
10:07.44 | kerio | so if you want to reorder the partitions, you'll still have to keep the logical order preserved |
10:08.00 | kerio | otherwise there's no way to support multiple filesystems |
10:11.08 | kerio | Pali: LABEL= is great |
10:12.48 | kerio | Pali: there's another issue in rcS-late, regarding the mount of /home |
10:18.32 | kerio | does fsck also check the blkid |
10:18.33 | kerio | ? |
10:18.53 | *** join/#maemo-ssu kolp (~quassel@212.255.37.70) |
10:20.51 | Pali | kerio, I do not know how fsck working |
10:21.12 | Pali | but I remember that I damaged /home when I called fsck on it (without suffix) |
10:21.18 | kerio | D: |
10:21.24 | kerio | how do we handle mount_home in rcS-late then? |
10:21.51 | Pali | it thought that /home was ext2 or ext4 and it not called fsck.ext3 |
10:22.05 | kerio | Pali: well, ext4 tools are backwards-compatible with ext3 |
10:22.05 | Pali | kerio, call fsck.<type> |
10:22.30 | Pali | if application fsck.<type> not exists then ignore it |
10:22.33 | kerio | and this brings me to my next point: when CSSU eventually ships a kernel with ext4 support, we could just change all the mounts from ext3 to ext4 |
10:23.05 | Pali | kerio, look: https://wiki.maemo.org/CSSU_kernel_assess |
10:23.26 | Pali | help with that page |
10:24.39 | kerio | where are the config options? |
10:25.34 | *** join/#maemo-ssu xes (~xes@unaffiliated/xes) |
10:29.17 | kerio | Pali: anyway, for your 3.8 kernel woes, use LABELs or UUIDs |
10:29.19 | kerio | :) |
10:30.06 | kerio | DocScrutinizer05: do you still have a vanilla n900? i want to know if the home partition has some label, by default |
10:30.34 | Pali | kerio, kernel config diff is here: https://garage.maemo.org/plugins/ggit/browse.php/?p=kernel-power;a=blob;f=kernel-power-2.6.28/debian/patches/rx51_defconfig.diff |
10:35.19 | *** join/#maemo-ssu xes (~xes@host204-233-dynamic.1-79-r.retail.telecomitalia.it) |
10:35.19 | *** join/#maemo-ssu xes (~xes@unaffiliated/xes) |
10:59.21 | kerio | xes: your IP is shown to the world before the hostmask cloak is applied |
12:09.26 | *** join/#maemo-ssu arcean (~arcean@aacz164.neoplus.adsl.tpnet.pl) |
12:47.13 | *** join/#maemo-ssu M13 (~M13@170.133-224-87.telenet.ru) |
12:51.47 | *** join/#maemo-ssu xes (~xes@host89-237-dynamic.25-79-r.retail.telecomitalia.it) |
12:51.52 | *** join/#maemo-ssu xes (~xes@unaffiliated/xes) |
13:17.51 | kerio | Pali: do you have a rescueos image for linux 3.8? |
13:39.02 | xes | <PROTECTED> |
13:49.00 | kerio | xes: that's not the right way >:c |
13:49.31 | xes | hi kerio! ...this ..wtf! |
13:49.44 | kerio | the right way is to use SASL |
13:59.12 | Pali | kerio, yes |
14:00.10 | *** part/#maemo-ssu xes (~xes@unaffiliated/xes) |
14:05.20 | *** join/#maemo-ssu xes (~xes@unaffiliated/xes) |
14:16.38 | *** join/#maemo-ssu xes (~xes@unaffiliated/xes) |
14:17.04 | kerio | k, your ip didn't show |
14:17.55 | xes | kerio: thanks ;) |
14:18.39 | merlin1991 | now just ctcp something fun and you got his ip again :D |
14:20.05 | *** join/#maemo-ssu merlin1991 (~merlin@Maemo/community/cssu/merlin1991) |
14:21.28 | xes | np... lot of honey here.. yw |
14:54.34 | Pali | kerio, can you check if this command will print all swap devices? $ blkid -c /dev/null -o device -t TYPE=swap |
14:55.29 | kerio | Pali: yep |
14:55.44 | Pali | ok, swap problem fixed :-) |
14:55.47 | kerio | :D |
14:56.04 | kerio | ...waaaaaaaaaait |
14:56.10 | kerio | you mean when generating fstab, right? |
14:57.39 | Pali | yes |
14:57.44 | kerio | alright |
14:57.51 | kerio | hm, i thought that it already scanned for swap partitions |
14:57.55 | kerio | using the mbr type |
14:58.05 | Pali | yes, it using mbr type |
14:58.14 | Pali | but I want to remove this mbr... |
14:58.29 | Pali | kerio, also I'm going to fix booting maemo5 from eMMC/SD card |
14:59.07 | *** join/#maemo-ssu arcean_ (~arcean@aacr98.neoplus.adsl.tpnet.pl) |
14:59.10 | Pali | = do not mount /home if root is not ubifs |
15:01.19 | kerio | instead of using your time doing that, why not look for a way to do an early mount of /usr? |
15:01.50 | kerio | or maybe checking out my patch to u-boot-tools >:c |
15:05.01 | Pali | udev does not support /usr on different partition as / |
15:05.12 | Pali | same problem is on desktops |
15:05.20 | Pali | so this does not make sense |
15:05.23 | kerio | ...wat |
15:05.30 | Pali | if you really need it, write bootmenu script |
15:05.42 | Pali | and boot your alternative system from /bootmenu.sh |
15:08.13 | kerio | Pali: btw, why is MyDocs in fstab? |
15:08.22 | Pali | I do not know |
15:08.38 | Pali | maybe because mount /home/user/MyDocs ? |
15:08.41 | Pali | to work |
15:08.46 | kerio | i thought ke-recv did that |
15:14.58 | *** join/#maemo-ssu Milhouse (~Milhouse@Maemo/community/contributor/Milhouse) |
15:19.47 | *** join/#maemo-ssu WizardNumberNext (~marek@2001:470:1f08:178b:92e6:baff:fe50:bed4) |
15:20.00 | *** join/#maemo-ssu FlameReaper (~assassin@175.138.123.90) |
15:22.44 | *** join/#maemo-ssu Martix (~martix@ip-62-245-106-78.net.upcbroadband.cz) |
15:29.24 | kerio | Pali: will you also change mount_home to check for the appropriate file system and fsck with the appropriate fsck? |
15:29.37 | Pali | yes, doing it too |
15:29.43 | kerio | ^_^ |
15:36.50 | *** join/#maemo-ssu dhbiker (~dhbiker@95.87.145.172) |
15:51.04 | *** join/#maemo-ssu dhbiker (~dhbiker@95.87.145.172) |
16:02.11 | *** join/#maemo-ssu NIN101 (~NIN@p5DD29714.dip0.t-ipconnect.de) |
16:35.01 | *** join/#maemo-ssu _rd (~rd@p57B4952B.dip0.t-ipconnect.de) |
16:36.29 | *** join/#maemo-ssu lexicek (~user@90.152.broadband5.iol.cz) |
16:58.07 | Pali | kerio, in maemo we have script fremantle-format-internal-memory-card.sh |
16:58.16 | *** join/#maemo-ssu _rd (~rd@p57B4952B.dip0.t-ipconnect.de) |
16:58.33 | Pali | which doing: mkswap ${1}p1; mkfs.ext3 ${1}p2; mkdosfs -F 32 -R 38 ${1}p3 |
16:58.53 | kerio | ...whaaaaaaaaat |
16:59.41 | kerio | hm, why the reserved sectors, i wonder |
16:59.50 | Pali | no idea |
17:00.13 | Pali | and in this script is also: |
17:00.14 | Pali | sfdisk -D -uM $1 << EOF |
17:00.14 | Pali | ,768,S |
17:00.14 | Pali | ,2048,L |
17:00.14 | Pali | ,,b |
17:00.16 | Pali | EOF |
17:01.18 | Pali | eMMC and SD cards are big octopus in maemo... |
17:01.21 | kerio | well, does anything call it? |
17:01.37 | kerio | answer: no, because you can't lose /home/opt |
17:02.45 | Pali | maybe that eMMC flasher |
17:03.03 | Pali | I have maemo rootfs in nandsim on desktop |
17:03.07 | Pali | going grep |
17:03.29 | Pali | ok, nothing it calling |
17:03.45 | Pali | that string is only in var/lib/dpkg/info/ke-recv.list and var/lib/dpkg/info/ke-recv.md5sums |
17:04.10 | kerio | Pali: maybe the path is built :P |
17:05.03 | Pali | kerio, swap is by default on p3? |
17:05.08 | kerio | yep |
17:05.11 | Pali | mydocs on p1 |
17:05.15 | Pali | and /home on p2? |
17:05.20 | kerio | yeah |
17:05.22 | Pali | ok |
17:05.32 | kerio | you know, i think i know why that script was made like it is |
17:05.47 | kerio | it's so it makes precisely 768mb and 2gb for swap and home |
17:05.55 | kerio | and then the rest of the 29ish gbs are for mydocs |
17:06.28 | kerio | but it's definetely from the preopt phase |
17:12.15 | *** join/#maemo-ssu dafox (~dafox@ip51cc571d.speed.planet.nl) |
17:35.56 | Pali | kerio, now I found that ke-recv has code for enabling/disabling swap partitions on mmc devices |
17:36.12 | Pali | but nokia decided to disable that code for PR1.2 (or 1.1) |
17:36.19 | kerio | yeah, i'm not sure it's worth using |
17:36.43 | kerio | what do you mean by disabled? commented out/ifdeffed out? |
17:36.45 | kerio | or just not used? |
17:36.49 | Pali | #if 0 |
17:37.05 | kerio | meh |
17:37.25 | kerio | i'm fairly sure that automatically changing swap partitions is a recipe for disaster |
17:37.30 | Pali | void function() { \n #if 0 \n ..... \n #endif \n } |
17:37.40 | Pali | yes |
17:39.41 | Pali | kerio, are you sure that maemo system export via usb live swap partition? |
17:39.55 | ShadowJK | the automatic swap thing is probably remnant from Diablo |
17:40.19 | kerio | Pali: yep, /dev/mmcblk1 is exported without any thought |
17:40.29 | kerio | and /dev/mmcblk1p2 is a swap partition |
17:40.33 | kerio | *the* swap partition |
17:41.03 | Pali | kerio, ok at least I will add check and disable exporting whole device via usb |
17:41.13 | kerio | Pali: which check? |
17:41.29 | Pali | if there is active swap partittion on sd card |
17:41.33 | kerio | that's silly |
17:41.54 | kerio | and awfully specific |
17:41.57 | kerio | make it configurable :( |
17:41.59 | Pali | you should not export live block device via usb |
17:42.17 | kerio | hm, good point |
17:42.32 | kerio | check if /dev/mmcblk1 is anywhere in /proc/mounts or /proc/swaps |
17:42.49 | kerio | or just export the first partition where available |
17:43.14 | kerio | i'm fairly sure that the whole point of exporting the whole sd is to deal with superfloppies |
17:43.24 | kerio | but if there's a partition table... |
17:43.29 | kerio | idk |
17:44.57 | kerio | Pali: is there code in ke-recv to disable a swap partition? |
17:45.06 | Pali | yes |
17:45.11 | Pali | but I do not know if working |
17:45.15 | Pali | it is commented |
17:46.03 | Pali | kerio, I have more partitions on sd card (ext4 also vfat) |
17:46.14 | Pali | it make sense to export both |
17:46.17 | kerio | hm |
17:46.24 | Pali | but I will add some config option later |
17:46.38 | kerio | isn't it easier to add the config options instead of the check? |
17:46.55 | Pali | no :-) |
17:46.59 | kerio | Pali: also, check if the activated swap partition is writable |
17:47.12 | kerio | from the host |
17:47.30 | kerio | fg |
17:47.37 | kerio | sorry, wrong window |
17:57.24 | *** join/#maemo-ssu povbot (~supybot@office.pov.lt) |
17:57.25 | *** mode/#maemo-ssu [+v povbot] by ChanServ |
18:02.48 | Pali | kerio, I have first version of rcS-late |
18:02.53 | Pali | do you want to check it? |
18:03.07 | kerio | sure |
18:05.38 | Pali | kerio, here is code: http://pastebin.com/36TGSTL6 and http://pastebin.com/GEczDFw2 |
18:06.25 | kerio | Pali: what the fuck, you don't mount ubifs with commit=1 |
18:06.49 | Pali | ubifs is mounted by kernel |
18:07.13 | Pali | see /proc/cmdline |
18:08.07 | kerio | Pali: aaaaand fsck fails :) |
18:09.09 | kerio | also, -p is only for e2fsck really |
18:09.34 | kerio | Pali: my "HOME_DEV" is "LABEL=N900_optfs" |
18:09.53 | Pali | I did not tested that script yet |
18:10.19 | Pali | kerio: on which line? |
18:10.31 | kerio | line 15 of rcS-late |
18:11.47 | kerio | also, isn't there a shorter way of specifying [^\ ]* in regexps? |
18:11.52 | kerio | like \w or something |
18:12.09 | Pali | I do not know what working in busybox's sed :D |
18:12.14 | kerio | yeah, \w is all alphanumericals |
18:13.27 | kerio | grep " /home " /etc/fstab | cut -f2 -d" " |
18:13.40 | kerio | er, not f2, f1 |
18:14.16 | kerio | and you can just grep for " /home $HOME_TYPE rw" at that point |
18:14.27 | kerio | i think that rw and ro are always at the beginning of the mount options |
18:14.30 | Pali | kerio, " /home " will not work, because you can use tabs instead spaces |
18:14.33 | kerio | at least, that's what the nokia rcS-late was expecting |
18:14.36 | kerio | Pali: hmm, good point |
18:15.12 | Pali | kerio, show me your fstab |
18:15.29 | Pali | and also output of sed -n 's/^\([^\ ]*\)\s\s*\/home\s\s*.*$/\1/p' /etc/fstab | head -1 |
18:17.04 | kerio | are you sure you want to see my fstab? :D |
18:17.43 | kerio | http://pastebin.mozilla.org/2145595 |
18:18.49 | Pali | ah, LABEL=... |
18:19.16 | kerio | Pali: i'm not entirely sure that fscking at every boot is good, anyway |
18:19.26 | kerio | i mean, unattended fscks are bad anyway |
18:19.40 | Pali | kerio, see fsck.ext3 -p |
18:19.56 | Pali | kerio, ext devices should be fscked |
18:20.05 | kerio | hm |
18:20.11 | kerio | why? :( |
18:20.39 | kerio | Pali: also, -a is also valid for fsck.vfat |
18:20.56 | kerio | and most fscks |
18:21.36 | Pali | if device is clean and counter is ok fsck.ext will skip full check |
18:22.00 | kerio | Pali: hm, why "0 2" and not "0 0"? |
18:23.07 | Pali | 0 - does not check device, 1 - check rootfs device as first, 2 - check non roofs device |
18:23.17 | Pali | man fstab |
18:23.23 | kerio | yeah but nothing parses fstab like that in maemo |
18:24.39 | kerio | actually, who's responsible for parsing fstab and mounting, in normal systems |
18:24.41 | kerio | init? |
18:24.56 | Pali | systemd :D |
18:25.00 | kerio | oh, it's mountall |
18:25.03 | kerio | which isn't used in fremantle |
18:25.04 | Pali | on ubuntu it doing mountall |
18:25.23 | Pali | on other systems maybe initscript which calling mount -a |
18:25.25 | Pali | and fsck |
18:25.39 | Pali | global fsck parsing fstab too |
18:26.19 | kerio | Pali: instead of figuring out device and type, use fsck |
18:26.21 | kerio | the generic one |
18:26.35 | Pali | I used it |
18:26.43 | Pali | once and it damaged my /home |
18:26.50 | kerio | you used it once |
18:27.08 | Pali | it not detecing ext3/ext4 correctly |
18:27.44 | kerio | Pali: that's impossible |
18:27.50 | kerio | it's **the same binary** |
18:28.19 | Pali | if you call fsck.ext4 and fsck.ext3 it doing different... |
18:28.33 | Pali | e2fck checking argv0 |
18:30.05 | kerio | ...woah i really hope they're hardlinked |
18:30.29 | kerio | /sbin/e2fsck, /sbin/fsck.ext3 and /sbin/fsck.ext4 have the same md5sum |
18:30.38 | kerio | how do i check if they're hardlinked to the same file? |
18:31.20 | kerio | Pali: they're the same binary, it just has different argument parsing |
18:31.41 | Pali | kerio, use stat |
18:31.46 | Pali | and check inode number |
18:32.08 | kerio | anyway, there's no way to specify the "version" of ext* to e2fsck |
18:32.35 | kerio | so i can only assume that fsck.ext* are effectively interchangeable |
18:33.02 | kerio | Pali: as a bonus, `fsck` works with LABEL and UUID too |
18:33.09 | kerio | if the man page is to be believed |
18:41.19 | *** join/#maemo-ssu _rd (~rd@p57B4952B.dip0.t-ipconnect.de) |
18:45.04 | kerio | Pali: will you also update mmc-mount so that it uses the options in /etc/default/mount-opts? |
18:45.28 | Pali | yes |
18:45.33 | Pali | I have it too |
18:45.47 | kerio | anyway, fsck LABEL=foo works fine |
18:48.11 | Pali | kerio: http://pastebin.com/eZRvCsWG |
18:48.40 | kerio | neat :D |
18:56.15 | kerio | Pali: srsly though, why is mydocs in fstab |
18:59.29 | Pali | kerio, because something is calling only mount /home/user/MyDocs |
18:59.48 | kerio | Pali: could you grep for that in your rootfs copy? |
19:00.35 | Pali | hm, seems that nothing in PR1.3 rootfs |
19:00.40 | Pali | maybe some extras-devel app... |
19:03.50 | kerio | Pali: btw, you're forgetting to not call mount_home if /home is not on a separate partition in that version of rcS-late you pastebinned |
19:05.04 | Pali | yes, mount_home should not do anything if /home missing in etc/fstab |
19:05.43 | kerio | Pali: mount_home should return error if there's no /home in /etc/fstab |
19:05.55 | Pali | kerio, no |
19:05.58 | kerio | mount_home should *not be called* if /home shouldn't be in /etc/fstab |
19:05.58 | kerio | yes |
19:06.12 | kerio | because if root_is_ubifs then we want a /home |
19:06.17 | kerio | we *need* a /home |
19:06.35 | Pali | root_is_ubifs is used only for generating fstab |
19:06.59 | Pali | if you do not want to rewrite fstab you should respect all lines |
19:07.30 | Pali | and if someting is not present in fstab then you should not report error and not reboot device |
19:07.52 | kerio | hm |
19:08.31 | kerio | the thing is, there's really no facility to properly report catastrophical errors, wait for user acknowledgement, and halt |
19:09.06 | Pali | kerio, if mount_home fails, dsme/upstart/... rebooting device |
19:09.11 | kerio | yeah |
19:09.21 | kerio | which leaves the user with a weird "?" face |
19:15.50 | kerio | Pali: where is user_fsck used? in mmc-mount? |
19:16.05 | kerio | can vfat do something similar to the quick preening? |
19:17.08 | kerio | Pali: also, do we really want to run fsck -y *ever* in our system? |
19:20.29 | Pali | kerio, I'd like to implement user_fsck in ke-recv/mmc-mount |
19:20.40 | Pali | and I do not know |
19:21.06 | Pali | maybe we should look at some linux desktop distribution what is doing with fat |
19:21.36 | kerio | most definetely not doing an unattended "fix all" run |
19:22.31 | kerio | in fact, make the "hail mary" /home fsck configurable too |
19:50.22 | kerio | DocScrutinizer05: remove the "hail mary" fsck -y that will probably do more bad than good in mount_home? |
19:51.00 | DocScrutinizer05 | eh? |
19:52.58 | kerio | pali is revolutioning the fstab thing, i'm helping a bit |
19:53.31 | kerio | in rcS-preinit, the part that mounts /home tries to mount, and if it fails to do so it runs a fsck -y on it |
19:54.06 | kerio | and i'm not sure if we actually want to ever risk running "fsck -y" on *anything* |
19:55.05 | kerio | Pali's modifications will allow the user to configure whether or not to run a fsck -a (automatic but only "safe" options) on home before mounting |
19:55.14 | kerio | which is much, much better |
19:55.41 | kerio | should we also keep the code that runs the POTENTIALLY DESTRUCTIVE AND COULD DO A LOT MORE DAMAGE fsck? |
19:56.56 | Pali | now I found that kernel-power-settings inject rcS-late script and calling fsck.ext3 on /home |
19:57.13 | Pali | this will be deleted from kernel-power-settings too |
19:57.36 | Pali | ~seen t-tan |
19:57.42 | infobot | Pali: i haven't seen 't-tan' |
20:01.08 | DocScrutinizer05 | kerio: this fsck is ok, what's fishy is the missing notification to user about that state, which might render device semi-dead for hours and user would reboot |
20:02.53 | *** join/#maemo-ssu nox- (noident@freebsd/developer/nox) |
20:11.33 | kerio | DocScrutinizer05: a fsck -y can do a lot more harm than good |
20:12.00 | kerio | instead of letting you mount read-only, and recover data, it can fuck the filesystem up |
20:12.20 | kerio | hm, what's the decision process for something like this? |
20:13.15 | kerio | DocScrutinizer05: let's put it this way: if fsck -a couldn't preemptively fix it, i very much doubt that fsck -y can, and before trying, you really, really, really want a backup |
20:13.20 | DocScrutinizer05 | pretty simple, if system can't boot there is no option |
20:13.37 | DocScrutinizer05 | ack for backup |
20:13.49 | DocScrutinizer05 | also ack for giving user a choice |
20:14.05 | kerio | DocScrutinizer05: "shit be fucked up, yo - you might want to do $foo, $bar and/or $baz to fix it. The system can't boot, push the power button to shut down" |
20:14.12 | DocScrutinizer05 | and also ack for fsck -a rather than -y |
20:14.20 | kerio | DocScrutinizer05: no, the preening will happen *before* the mounting |
20:14.39 | kerio | (and takes very little to no time, on a clean journaled system) |
20:14.56 | kerio | thus, it's not very useful to *redo* it |
20:21.45 | DocScrutinizer05 | when /home can't get mounted in a way that forbids system to boot up, we want to do something about it. We also want to do something about /home being mounted r/o *before* we can't umount it any more |
20:22.34 | kerio | DocScrutinizer05: yeah but stopping and saying "nope" is a much better option than blindly going ahead with a fsck -y |
20:22.39 | kerio | for the user's data |
20:22.58 | DocScrutinizer05 | so you could check if e.g. BM is installed, and if it is, boot up with /home r/o and display a suggestion to use BM to fix it |
20:24.12 | DocScrutinizer05 | if however no such alternative exists, you as well can go try and fix it right away, since there's no other option for the joe average user |
20:25.27 | kerio | sure there is! |
20:25.29 | kerio | #maemo! |
20:25.29 | kerio | :3 |
20:25.34 | DocScrutinizer05 | or you set a flag file on NAND/root that tells "home-been-mounted-r/o" and if on next boot it's again running into this error, you go fsck |
20:30.51 | kerio | besides, checking /proc/mounts is probably the result of cargo computing |
20:31.28 | kerio | you can check the return value |
20:33.46 | kerio | although to be fair i don't know if it has a different return value if "corrupted fs, mounted read-only" happens |
20:38.06 | *** join/#maemo-ssu Martix (~martix@ip-62-245-106-78.net.upcbroadband.cz) |
20:38.37 | kerio | Pali: hm, what does the "check" option do, when mounting ext*? |
20:39.05 | Pali | which check option? |
20:39.11 | kerio | "check" :) |
20:39.31 | kerio | no, wait |
20:39.44 | kerio | ...why are the only valid possibilities "none" and "nocheck"? :s |
20:41.11 | kerio | nevermind :) |
20:50.31 | *** join/#maemo-ssu Martix (~martix@ip-62-245-106-78.net.upcbroadband.cz) |
20:52.36 | *** join/#maemo-ssu Martix (~martix@ip-62-245-106-78.net.upcbroadband.cz) |
21:09.19 | *** join/#maemo-ssu Martix (~martix@ip-62-245-106-78.net.upcbroadband.cz) |
21:12.35 | *** join/#maemo-ssu Martix_ (~martix@ip-62-245-106-78.net.upcbroadband.cz) |
21:27.12 | *** join/#maemo-ssu _rd (~rd@p57B4952B.dip0.t-ipconnect.de) |
21:48.41 | *** join/#maemo-ssu arcean__ (~arcean@aaeo233.neoplus.adsl.tpnet.pl) |
21:50.25 | *** join/#maemo-ssu LauRoman (~LauRoman@5-14-88-255.residential.rdsnet.ro) |
22:02.51 | *** join/#maemo-ssu arcean (~arcean@aaen189.neoplus.adsl.tpnet.pl) |
22:34.06 | *** join/#maemo-ssu arcean (~arcean@aaen189.neoplus.adsl.tpnet.pl) |