IRC log for #maemo-ssu on 20130216

00:23.44dafoxat 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.17Palimerlin1991: on tmo there are more people which want ext4 on MyDocs and also on home
02:06.43PaliI looked into script where are hardcoded vfat and ext3 strings
02:07.34Paliand scripts working: MyDocs is first partition which has 'c' id in MBR table on /dev/mmcblk0
02:08.16Palihome is partition on /dev/mmcblk0 which has in MBR table '83' id
02:08.32Pali(first partition)
02:09.09Paliso both /home and MyDocs are not hardcoded to partition number but to id in MBR table
02:11.07Paliproblem is that there is convention (and parition programs using it) that 'c' id means FAT32 partition, 83 is some linux partition (ext*)
02:11.52Palikerio, freemangodon, merlin1991, DocScrutinizer05: if you have idea how to fix that, ping me
02:12.36Palisolution is not easy, because more people swapped MyDocs and home partition numbers
02:13.44Paliwe need to determinate which partition is mydocs, home and swap and then generate proper /etc/fstab with correct filesystem type
02:18.42DocScrutinizer05Pali: well, the solution is rather simple, though radical. Get proper persistent fstab
02:19.55DocScrutinizer05tbh I still don't get the rationale yet of generating a fake fstab on each boot
02:21.59PaliDocScrutinizer05, ok, how to generate fstab?
02:22.05Palisee above problems ^^^
02:22.29Paliwe can break devices when we switch home & mydocs & swap
02:23.03Palideterminating which partition is swap could be easy
02:23.18Palibut how to determinate which partition is /home and which MyDocs?
02:24.33DocScrutinizer05well, 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.40DocScrutinizer05fstab*
02:25.11Paliyes, but now maemo scripts generating it
02:25.45Paliso I really do not know if some script is not going to remove fstab
02:25.50DocScrutinizer05yes, and if we want to fix it, we need to change that to using a static fstab
02:26.31Palimaybe another question: do we need fstab?
02:26.41DocScrutinizer05sure
02:26.51Palimounting mmc card & usb disks in host mode are mounted automatically by ke-recv
02:26.59Paliwhich ignoring fstab
02:27.11Paliand calling directly mount device mount_point
02:27.18Palisame is for MyDocs
02:27.23DocScrutinizer05one more reason why no dynamic fstab is needed
02:27.46Paliin fstab is only home & MyDocs
02:27.55Paliand swap
02:28.02DocScrutinizer05I really don't understand why all this is the way it is
02:28.28Palichanging ke-recv is not simple
02:28.48Paliso I think that mount code in ke-recv is not going to be changed
02:28.49DocScrutinizer05but feasible
02:29.23Paliand there is problem that all maemo apps want sd card in /media/mmc1
02:29.36Paliand usb disks in /media/usb/sd*
02:30.13Paliso fstab for SD card & usb disks is useless
02:30.36Paliand also when I create new partition on SD card I really do not want to edit fstab for mounting SD card
02:31.07Palilinuxes 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.38DocScrutinizer05Pali: you're jumbing like mad between /home and /mydocs and ke-recv and uSD cards and scripts and whatnot
02:38.58DocScrutinizer05I never suggested to mount uSD via fstab
02:39.21Paliok, so what do you want to see in fstab
02:39.36DocScrutinizer05I want to see my pillow now
02:39.42Paliand how to generate first version of fstab?
02:40.18DocScrutinizer05well, maybe user generates it with mcedit?
02:51.58DocScrutinizer05either user changed his partitons then he needs to change his fstab. Or user didn't and we use standard fstab
02:52.19DocScrutinizer05I 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.49kerioi already have a check against the generation of fstab in my rcS-late
07:45.06kerioi made it so that fstab is recreated iff genfstab.awk exists
07:46.09keriothen the only issue becomes mount_home, that checks for "/home ext3 rw" in /proc/mounts
07:46.24keriobut that can be regexp'd
07:46.45keriowhat *can't* be regexp'd is the fsck.ext3
07:47.05keriohow does the automagical fsck work, i wonder
07:49.47*** join/#maemo-ssu LauRoman (~LauRoman@5-14-88-255.residential.rdsnet.ro)
07:52.06keriohm, at worst we could run fsck.`grep /home /etc/fstab | cut | awk '{print $2}'`
07:59.00kerioanyway, 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.50kerioohai Pali
09:09.08kerioyou missed my monologue regarding fstab :)
09:09.25Palihi
09:10.40Palikerio, we can use blkid or hal which tell us filesystem on mmc block device
09:10.53Paliso hardcocded ext3/vfat can be fixed with blkid
09:11.02Palieverywhere
09:11.27kerioPali: that doesn't involve having a real fstab
09:11.41Palibut you can see that genfstab.awk reading MBR parittion id
09:12.27PaliI think that good solution would be: add new config file with GENFSTAB= option
09:12.33Paliwhich user can change
09:13.20Palikerio, but first we should solve how to determinate which partition is /home and which MyDocs
09:13.37keriowhat do you mean "determine"?
09:14.08Paliwhich partition should be mounted to /home?
09:14.14Paliand which to MyDocs?
09:14.14kerio/dev/mmcblk0p2
09:14.21Paliwhy?
09:14.21kerio/dev/mmcblk0p1
09:14.24kerioactually no, even better
09:14.28keriothe partitions specified in /etc/fstab
09:14.38Palisome people swapped p2 and p1
09:14.47keriowell those people should fix their fstab
09:14.55Paliand because genfstab.awk reading MBR id, it generate correct fstab
09:15.07keriogood, so the fstab is already correct
09:18.02Palikerio, 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.21Paliwithout fixing rcS-late I was not able to boot 3.8 kernel
09:18.33kerioPali: does our "mount" understand UUIDs?
09:18.47Paliso I think that static fstab is not good solution for booting more kernels
09:18.57kerioit is
09:19.05keriomount by UUID
09:19.11PaliUUID sounds like good idea, but
09:19.25kerioand if you're going to boot 3.8 then you're outside of the realm of the normal user
09:19.32Palireformating MyDocs on windows will change fat uuid
09:19.50Palikerio, I want easy solution for booting upstream kernel
09:19.59Paliand not changing tons of config before reboot
09:20.05kerioand i want a pony
09:20.30keriofremantle has unspoken assumptions regarding the partition layout of /dev/mmcblk*
09:20.32Paliit is not normal to change configs if you are going to boot another kernel
09:20.56keriobut it's normal to change configs if you're going to swap hardware around
09:21.00keriowhich is what's effectively happening
09:21.05Palikerio, for some reason ke-recv correctly detected which mmc device is SD card
09:21.09Paliand mounted it correctly
09:21.37Paliit mounted /dev/mmcblk0p1 to /media/mmc1
09:22.13Paliso seems that SD card is not hardcoded for /dev/mmcblk1*
09:23.36kerioyeah, the sd card can be automounted by ke-recv
09:24.06kerio(i'd still like a bit more documentation on how to trigger that manually, but whatever)
09:24.16kerio/home is mounted during rcS-late
09:24.21Paliyes
09:25.14kerioand the UUID of /home doesn't change
09:25.22keriowell
09:25.32keriohrmpf
09:25.46Palikerio, can we check if mc block device has root folder "user" before mouting?
09:25.50Pali*mmc
09:26.03Palibecause in /home should be "user"
09:26.03keriowe could mount and unmount if we're wrong, but that's bullshit
09:26.11kerio"mkdir user"
09:26.35Palino, I mean that device which has "user" is /home
09:26.41kerioyep, that's bullshit
09:27.05kerioi could have multiple extfs partitions with a "user" directory
09:27.49Palinow first partition with id '83' is mounted to /home
09:28.05kerioin the correct device
09:28.17keriobecause of the HAL renaming
09:28.24Paliudev doing renaming
09:28.30kerioright, udev
09:28.35Paliand rcS-late has hardcoded mmc0
09:28.40keriowell, make your 3.8 kernel's udev rename them too
09:29.02Palikerio, problem is that I do not know why that renaming udev rule not working
09:29.11PaliI tried to check out why
09:29.18Palibut I think that rule should work
09:29.28kerioPali: /dev/mmcblk0 being the eMMC and /dev/mmcblk1 being the uSD is an unwritten assumption in fremantle/n900 anyway
09:29.46Palikerio, yes, but this can be also easy fixed
09:30.12Paliin /sys there is item which tell us if mmc device is interal or external
09:30.18kerioi mean an assumption in every piece of (related to partitions) software
09:30.24Paliscript /bootmenu.sh doing it
09:31.48kerioPali: holy shit, our "mount" understands LABEL=
09:32.11PaliI'm for this: Add option for user to stop generating fstab, but also fix autogenerating to support any filesystem
09:33.19Palibtw is swapon reading swap partitions from /etc/fstab?
09:33.27kerioyeah, rcS-late just does a swapon -a
09:33.38kerioafter it's generated
09:33.41Paliif yes, this can solve also problem with adding more swaps
09:34.18kerioi have, around the block of code that generates fstab:
09:34.23kerio<PROTECTED>
09:34.58keriobut that can be changed to be something like if [ ! -e /etc/default/nogenfstab ]; then
09:35.00kerioor something like that
09:36.42Palikerio, 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.22kerioPali: linux doesn't care much about the partition type
09:37.23Palibecause I do not see any good solution how to generate fstab with MyDocs and home with any supported filesyetem
09:37.40kerioMyDocs and mmc things are still handled by ke-recv
09:37.51kerioMyDocs is the first partition with id 0c in the internal memory
09:37.57kerioregardless of the actual file system
09:38.01kerio(kinda ugly, but meh)
09:38.13Palikerio, yes this is reason why I do not like to see using MBR ids
09:39.47Paliok, 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.08kerioPali: what's wrong with having a fixed partition order, anyway?
09:40.31Paliusers which already using switched partitions
09:40.41kerioPali: they won't need to move data around
09:40.48Palibecase maemo system has support for that
09:40.50kerioyou can just change the partition order
09:41.10Palikerio, yes it is possible :-)
09:41.25keriofdisk will yell at you, but he'll do it
09:41.32Palibut I think that (s)fdisk has no command for reordering partition
09:41.51kerioPali: whatever, change the ordering in some way
09:42.05keriodelete the partitions and recreate them in the opposite order with the exact same start/end
09:42.12Paliyes
09:42.12kerio(but swapped)
09:42.33Palialso u-boot has hardcoded first emmc partittion for bootmenu
09:42.39keriowe 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.50PaliI will try to remove hardcoded fat32 option
09:43.08kerioPali: so you're going to outright ignore the mbr partition type?
09:43.32kerioPali: also, how does the autodetect work?
09:43.41PaliI do not see better solution...
09:43.43kerioext3 can be safely mounted as ext4 and then back
09:43.52keriobut ext4 with extents won't be mountable as ext3
09:43.55Palikerio, autodetect will read some bytes from partittion and detect type
09:44.04kerioalthough the ext* status in the kernel is always weird like that
09:44.12kerioand it's the same code anyway, right?
09:44.23Palirun sudo blkid and will show all info
09:44.39Paliit detecting correctly eveyrting on my device
09:44.48keriomine too
09:44.59*** join/#maemo-ssu M4rtinK (~M4rtinK@mail.melf.eu)
09:45.00kerioPali: how do i unmount/mount via ke-recv?
09:45.04keriolike, MyDocs
09:45.12keriodoes ke-recv read /etc/default/mount-opts?
09:45.24kerioah crap, how should ke-recv handle mount-opts then?
09:45.41keriofor its own partitions
09:45.49Palike-recv calling osso-mmc-mount.sh
09:46.08Paliit ignoring mount-opts
09:46.31Palialso see script mmc-mount
09:46.51Palithere are hardcoded options for vfat
09:47.16kerioso everything ke-recv does is done through that script?
09:47.35kerioregarding the mounts
09:47.45Paliit should be done by osso-mmc-mount.sh
09:47.53Palithere is implemented blacklist
09:47.56kerioalright
09:47.56Paliwhich seems to work
09:47.59keriowhat about the export?
09:48.07keriowho specifies what to export? it's not written in the script
09:48.07Paliexport?
09:48.11keriomass storage mode
09:48.15Palike-recv
09:48.22keriobut where in the source? i wasn't able to find that
09:48.31Palisd card is in /media/mmc<num>p<num>
09:48.35keriothat should be made configurable too,
09:48.41Paliusb disk is in /media/usb/
09:48.43Palikerio, no
09:48.45kerioyes
09:48.51kerioi have my swap on the uSD
09:48.55kerioand the whole usd is exported
09:49.00kerioand that's bullshit
09:49.06PaliI must hardcoded that, becuase gkt, hildon, and closed file manager depends on these locations
09:49.14kerionot the locations
09:49.20keriowhat to export via usb mass storage mode
09:49.33Paliah, you mean that
09:49.35kerioalso, file manager will happily list every directory in /media/
09:49.45kerioi do my nfs mounts there, and they're shown :3
09:50.26Palike-recv has check: if this is internal mmc device export only MyDocs else export full partittion
09:50.44Palimaemo has configured only 2 luns in gadget driver
09:50.50Paliso you can export only two devices
09:51.03keriowhile we're in the midst of having these customization helpings, we should try to make that configurable too
09:51.16kerioPali: at least a blacklist for exporting
09:51.43Palikerio, if swap is using I think that it will not be possible to export SD card
09:51.55kerioPali: i never tried to write on it, but the swap is exported
09:52.05kerioi don't know if it's locked down and you can't write on it from the usb host
09:52.12keriobut it's still terrifying
09:52.24Paliswap is exported when using?
09:52.32keriothe whole SD is exported
09:52.38Paliyes
09:52.43kerioi see the swap partition in the partition list in Disk Utility
09:52.46Palibut it should be umounted
09:52.57keriowell, it's not :)
09:53.01keriothankfully
09:53.06Palikerio, if you have swap partition on sd card, then swap is also exported
09:53.18Palibecause full mmc block device is exported
09:53.28kerioyeah, but we could change that
09:53.33kerioand by we i obviously mean you :P
09:53.59Paliand how?
09:54.00kerioPali: how about a setting to "prefer single partition" in the export of the uSD
09:54.13kerioif there's that setting, and there's a partition table, you export the first partition
09:54.26Paliok
09:54.51kerioyou 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.19kerioPali: make it threefold: export whole device (default), export single partition, no export
09:55.23keriowith no export, you only export mydocs
09:58.48kerioPali: also, my sd is mounted in /media/mmc1, not /media/mmc1p1
09:59.59Palikerio, yes, because one partition must be mounted to /media/mmc1
10:00.11kerioi see
10:00.20Palibecause camera (or another application, maybe modest) had hardcoded that path
10:00.34Paliand ke-recv mounting first fat partition for /media/mmc1
10:00.45Paliif there is no fat, then first non fat is mounted
10:01.05kerioalright
10:02.27kerioPali: btw, i successfully booted with no hardcoded devices in /etc/fstab :D
10:06.29kerioPali: does ke-recv depend on the reordering of devices?
10:06.47PaliI do not know
10:06.55Paliwhat is hardcoded in ke-recv
10:07.15kerioanyway, i think that the invariant of the first partition must be somewhat preserved
10:07.44kerioso if you want to reorder the partitions, you'll still have to keep the logical order preserved
10:08.00keriootherwise there's no way to support multiple filesystems
10:11.08kerioPali: LABEL= is great
10:12.48kerioPali: there's another issue in rcS-late, regarding the mount of /home
10:18.32keriodoes fsck also check the blkid
10:18.33kerio?
10:18.53*** join/#maemo-ssu kolp (~quassel@212.255.37.70)
10:20.51Palikerio, I do not know how fsck working
10:21.12Palibut I remember that I damaged /home when I called fsck on it (without suffix)
10:21.18kerioD:
10:21.24keriohow do we handle mount_home in rcS-late then?
10:21.51Paliit thought that /home was ext2 or ext4 and it not called fsck.ext3
10:22.05kerioPali: well, ext4 tools are backwards-compatible with ext3
10:22.05Palikerio, call fsck.<type>
10:22.30Paliif application fsck.<type> not exists then ignore it
10:22.33kerioand 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.05Palikerio, look: https://wiki.maemo.org/CSSU_kernel_assess
10:23.26Palihelp with that page
10:24.39keriowhere are the config options?
10:25.34*** join/#maemo-ssu xes (~xes@unaffiliated/xes)
10:29.17kerioPali: anyway, for your 3.8 kernel woes, use LABELs or UUIDs
10:29.19kerio:)
10:30.06kerioDocScrutinizer05: do you still have a vanilla n900? i want to know if the home partition has some label, by default
10:30.34Palikerio, 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.21kerioxes: 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.51kerioPali: do you have a rescueos image for linux 3.8?
13:39.02xes<PROTECTED>
13:49.00kerioxes: that's not the right way >:c
13:49.31xeshi kerio! ...this ..wtf!
13:49.44keriothe right way is to use SASL
13:59.12Palikerio, 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.04keriok, your ip didn't show
14:17.55xeskerio: thanks ;)
14:18.39merlin1991now 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.28xesnp... lot of honey here.. yw
14:54.34Palikerio, can you check if this command will print all swap devices? $ blkid -c /dev/null -o device -t TYPE=swap
14:55.29kerioPali: yep
14:55.44Paliok, swap problem fixed :-)
14:55.47kerio:D
14:56.04kerio...waaaaaaaaaait
14:56.10kerioyou mean when generating fstab, right?
14:57.39Paliyes
14:57.44kerioalright
14:57.51keriohm, i thought that it already scanned for swap partitions
14:57.55keriousing the mbr type
14:58.05Paliyes, it using mbr type
14:58.14Palibut I want to remove this mbr...
14:58.29Palikerio, 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.10Pali= do not mount /home if root is not ubifs
15:01.19kerioinstead of using your time doing that, why not look for a way to do an early mount of /usr?
15:01.50kerioor maybe checking out my patch to u-boot-tools >:c
15:05.01Paliudev does not support /usr on different partition as /
15:05.12Palisame problem is on desktops
15:05.20Paliso this does not make sense
15:05.23kerio...wat
15:05.30Paliif you really need it, write bootmenu script
15:05.42Paliand boot your alternative system from /bootmenu.sh
15:08.13kerioPali: btw, why is MyDocs in fstab?
15:08.22PaliI do not know
15:08.38Palimaybe because mount /home/user/MyDocs ?
15:08.41Palito work
15:08.46kerioi 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.24kerioPali: will you also change mount_home to check for the appropriate file system and fsck with the appropriate fsck?
15:29.37Paliyes, doing it too
15:29.43kerio^_^
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.07Palikerio, 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.33Paliwhich doing: mkswap ${1}p1; mkfs.ext3 ${1}p2; mkdosfs -F 32 -R 38 ${1}p3
16:58.53kerio...whaaaaaaaaat
16:59.41keriohm, why the reserved sectors, i wonder
16:59.50Palino idea
17:00.13Paliand in this script is also:
17:00.14Palisfdisk -D -uM $1 << EOF
17:00.14Pali,768,S
17:00.14Pali,2048,L
17:00.14Pali,,b
17:00.16PaliEOF
17:01.18PalieMMC and SD cards are big octopus in maemo...
17:01.21keriowell, does anything call it?
17:01.37kerioanswer: no, because you can't lose /home/opt
17:02.45Palimaybe that eMMC flasher
17:03.03PaliI have maemo rootfs in nandsim on desktop
17:03.07Paligoing grep
17:03.29Paliok, nothing it calling
17:03.45Palithat string is only in var/lib/dpkg/info/ke-recv.list and var/lib/dpkg/info/ke-recv.md5sums
17:04.10kerioPali: maybe the path is built :P
17:05.03Palikerio, swap is by default on p3?
17:05.08kerioyep
17:05.11Palimydocs on p1
17:05.15Paliand /home on p2?
17:05.20kerioyeah
17:05.22Paliok
17:05.32kerioyou know, i think i know why that script was made like it is
17:05.47kerioit's so it makes precisely 768mb and 2gb for swap and home
17:05.55kerioand then the rest of the 29ish gbs are for mydocs
17:06.28keriobut it's definetely from the preopt phase
17:12.15*** join/#maemo-ssu dafox (~dafox@ip51cc571d.speed.planet.nl)
17:35.56Palikerio, now I found that ke-recv has code for enabling/disabling swap partitions on mmc devices
17:36.12Palibut nokia decided to disable that code for PR1.2 (or 1.1)
17:36.19kerioyeah, i'm not sure it's worth using
17:36.43keriowhat do you mean by disabled? commented out/ifdeffed out?
17:36.45kerioor just not used?
17:36.49Pali#if 0
17:37.05keriomeh
17:37.25kerioi'm fairly sure that automatically changing swap partitions is a recipe for disaster
17:37.30Palivoid function() { \n #if 0 \n ..... \n #endif \n }
17:37.40Paliyes
17:39.41Palikerio, are you sure that maemo system export via usb live swap partition?
17:39.55ShadowJKthe automatic swap thing is probably remnant from Diablo
17:40.19kerioPali: yep, /dev/mmcblk1 is exported without any thought
17:40.29kerioand /dev/mmcblk1p2 is a swap partition
17:40.33kerio*the* swap partition
17:41.03Palikerio, ok at least I will add check and disable exporting whole device via usb
17:41.13kerioPali: which check?
17:41.29Paliif there is active swap partittion on sd card
17:41.33keriothat's silly
17:41.54kerioand awfully specific
17:41.57keriomake it configurable :(
17:41.59Paliyou should not export live block device via usb
17:42.17keriohm, good point
17:42.32keriocheck if /dev/mmcblk1 is anywhere in /proc/mounts or /proc/swaps
17:42.49kerioor just export the first partition where available
17:43.14kerioi'm fairly sure that the whole point of exporting the whole sd is to deal with superfloppies
17:43.24keriobut if there's a partition table...
17:43.29kerioidk
17:44.57kerioPali: is there code in ke-recv to disable a swap partition?
17:45.06Paliyes
17:45.11Palibut I do not know if working
17:45.15Paliit is commented
17:46.03Palikerio, I have more partitions on sd card (ext4 also vfat)
17:46.14Paliit make sense to export both
17:46.17keriohm
17:46.24Palibut I will add some config option later
17:46.38kerioisn't it easier to add the config options instead of the check?
17:46.55Palino :-)
17:46.59kerioPali: also, check if the activated swap partition is writable
17:47.12keriofrom the host
17:47.30keriofg
17:47.37keriosorry, 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.48Palikerio, I have first version of rcS-late
18:02.53Palido you want to check it?
18:03.07keriosure
18:05.38Palikerio, here is code: http://pastebin.com/36TGSTL6 and http://pastebin.com/GEczDFw2
18:06.25kerioPali: what the fuck, you don't mount ubifs with commit=1
18:06.49Paliubifs is mounted by kernel
18:07.13Palisee /proc/cmdline
18:08.07kerioPali: aaaaand fsck fails :)
18:09.09kerioalso, -p is only for e2fsck really
18:09.34kerioPali: my "HOME_DEV" is "LABEL=N900_optfs"
18:09.53PaliI did not tested that script yet
18:10.19Palikerio: on which line?
18:10.31kerioline 15 of rcS-late
18:11.47kerioalso, isn't there a shorter way of specifying [^\ ]* in regexps?
18:11.52keriolike \w or something
18:12.09PaliI do not know what working in busybox's sed :D
18:12.14kerioyeah, \w is all alphanumericals
18:13.27keriogrep " /home " /etc/fstab | cut -f2 -d" "
18:13.40kerioer, not f2, f1
18:14.16kerioand you can just grep for " /home $HOME_TYPE rw" at that point
18:14.27kerioi think that rw and ro are always at the beginning of the mount options
18:14.30Palikerio, " /home " will not work, because you can use tabs instead spaces
18:14.33kerioat least, that's what the nokia rcS-late was expecting
18:14.36kerioPali: hmm, good point
18:15.12Palikerio, show me your fstab
18:15.29Paliand also output of sed -n 's/^\([^\ ]*\)\s\s*\/home\s\s*.*$/\1/p' /etc/fstab | head -1
18:17.04kerioare you sure you want to see my fstab? :D
18:17.43keriohttp://pastebin.mozilla.org/2145595
18:18.49Paliah, LABEL=...
18:19.16kerioPali: i'm not entirely sure that fscking at every boot is good, anyway
18:19.26kerioi mean, unattended fscks are bad anyway
18:19.40Palikerio, see fsck.ext3 -p
18:19.56Palikerio, ext devices should be fscked
18:20.05keriohm
18:20.11keriowhy? :(
18:20.39kerioPali: also, -a is also valid for fsck.vfat
18:20.56kerioand most fscks
18:21.36Paliif device is clean and counter is ok fsck.ext will skip full check
18:22.00kerioPali: hm, why "0 2" and not "0 0"?
18:23.07Pali0 - does not check device, 1 - check rootfs device as first, 2 - check non roofs device
18:23.17Paliman fstab
18:23.23kerioyeah but nothing parses fstab like that in maemo
18:24.39kerioactually, who's responsible for parsing fstab and mounting, in normal systems
18:24.41kerioinit?
18:24.56Palisystemd :D
18:25.00keriooh, it's mountall
18:25.03keriowhich isn't used in fremantle
18:25.04Palion ubuntu it doing mountall
18:25.23Palion other systems maybe initscript which calling mount -a
18:25.25Paliand fsck
18:25.39Paliglobal fsck parsing fstab too
18:26.19kerioPali: instead of figuring out device and type, use fsck
18:26.21keriothe generic one
18:26.35PaliI used it
18:26.43Palionce and it damaged my /home
18:26.50kerioyou used it once
18:27.08Paliit not detecing ext3/ext4 correctly
18:27.44kerioPali: that's impossible
18:27.50kerioit's **the same binary**
18:28.19Paliif you call fsck.ext4 and fsck.ext3 it doing different...
18:28.33Palie2fck checking argv0
18:30.05kerio...woah i really hope they're hardlinked
18:30.29kerio/sbin/e2fsck, /sbin/fsck.ext3 and /sbin/fsck.ext4 have the same md5sum
18:30.38keriohow do i check if they're hardlinked to the same file?
18:31.20kerioPali: they're the same binary, it just has different argument parsing
18:31.41Palikerio, use stat
18:31.46Paliand check inode number
18:32.08kerioanyway, there's no way to specify the "version" of ext* to e2fsck
18:32.35kerioso i can only assume that fsck.ext* are effectively interchangeable
18:33.02kerioPali: as a bonus, `fsck` works with LABEL and UUID too
18:33.09kerioif the man page is to be believed
18:41.19*** join/#maemo-ssu _rd (~rd@p57B4952B.dip0.t-ipconnect.de)
18:45.04kerioPali: will you also update mmc-mount so that it uses the options in /etc/default/mount-opts?
18:45.28Paliyes
18:45.33PaliI have it too
18:45.47kerioanyway, fsck LABEL=foo works fine
18:48.11Palikerio: http://pastebin.com/eZRvCsWG
18:48.40kerioneat :D
18:56.15kerioPali: srsly though, why is mydocs in fstab
18:59.29Palikerio, because something is calling only mount /home/user/MyDocs
18:59.48kerioPali: could you grep for that in your rootfs copy?
19:00.35Palihm, seems that nothing in PR1.3 rootfs
19:00.40Palimaybe some extras-devel app...
19:03.50kerioPali: 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.04Paliyes, mount_home should not do anything if /home missing in etc/fstab
19:05.43kerioPali: mount_home should return error if there's no /home in /etc/fstab
19:05.55Palikerio, no
19:05.58keriomount_home should *not be called* if /home shouldn't be in /etc/fstab
19:05.58kerioyes
19:06.12keriobecause if root_is_ubifs then we want a /home
19:06.17keriowe *need* a /home
19:06.35Paliroot_is_ubifs is used only for generating fstab
19:06.59Paliif you do not want to rewrite fstab you should respect all lines
19:07.30Paliand if someting is not present in fstab then you should not report error and not reboot device
19:07.52keriohm
19:08.31keriothe thing is, there's really no facility to properly report catastrophical errors, wait for user acknowledgement, and halt
19:09.06Palikerio, if mount_home fails, dsme/upstart/... rebooting device
19:09.11kerioyeah
19:09.21keriowhich leaves the user with a weird "?" face
19:15.50kerioPali: where is user_fsck used? in mmc-mount?
19:16.05keriocan vfat do something similar to the quick preening?
19:17.08kerioPali: also, do we really want to run fsck -y *ever* in our system?
19:20.29Palikerio, I'd like to implement user_fsck in ke-recv/mmc-mount
19:20.40Paliand I do not know
19:21.06Palimaybe we should look at some linux desktop distribution what is doing with fat
19:21.36keriomost definetely not doing an unattended "fix all" run
19:22.31kerioin fact, make the "hail mary" /home fsck configurable too
19:50.22kerioDocScrutinizer05: remove the "hail mary" fsck -y that will probably do more bad than good in mount_home?
19:51.00DocScrutinizer05eh?
19:52.58keriopali is revolutioning the fstab thing, i'm helping a bit
19:53.31kerioin 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.06kerioand i'm not sure if we actually want to ever risk running "fsck -y" on *anything*
19:55.05kerioPali'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.14keriowhich is much, much better
19:55.41kerioshould we also keep the code that runs the POTENTIALLY DESTRUCTIVE AND COULD DO A LOT MORE DAMAGE fsck?
19:56.56Palinow I found that kernel-power-settings inject rcS-late script and calling fsck.ext3 on /home
19:57.13Palithis will be deleted from kernel-power-settings too
19:57.36Pali~seen t-tan
19:57.42infobotPali: i haven't seen 't-tan'
20:01.08DocScrutinizer05kerio: 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.33kerioDocScrutinizer05: a fsck -y can do a lot more harm than good
20:12.00kerioinstead of letting you mount read-only, and recover data, it can fuck the filesystem up
20:12.20keriohm, what's the decision process for something like this?
20:13.15kerioDocScrutinizer05: 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.20DocScrutinizer05pretty simple, if system can't boot there is no option
20:13.37DocScrutinizer05ack for backup
20:13.49DocScrutinizer05also ack for giving user a choice
20:14.05kerioDocScrutinizer05: "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.12DocScrutinizer05and also ack for fsck -a rather than -y
20:14.20kerioDocScrutinizer05: no, the preening will happen *before* the mounting
20:14.39kerio(and takes very little to no time, on a clean journaled system)
20:14.56keriothus, it's not very useful to *redo* it
20:21.45DocScrutinizer05when /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.34kerioDocScrutinizer05: yeah but stopping and saying "nope" is a much better option than blindly going ahead with a fsck -y
20:22.39keriofor the user's data
20:22.58DocScrutinizer05so 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.12DocScrutinizer05if 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.27keriosure there is!
20:25.29kerio#maemo!
20:25.29kerio:3
20:25.34DocScrutinizer05or 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.51keriobesides, checking /proc/mounts is probably the result of cargo computing
20:31.28kerioyou can check the return value
20:33.46kerioalthough 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.37kerioPali: hm, what does the "check" option do, when mounting ext*?
20:39.05Paliwhich check option?
20:39.11kerio"check" :)
20:39.31keriono, wait
20:39.44kerio...why are the only valid possibilities "none" and "nocheck"? :s
20:41.11kerionevermind :)
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)

Generated by irclog2html.pl Modified by Tim Riker to work with infobot.