[lfs-support] udev custom rules for duplicate usb devices
Hi I'm trying to write custom udev rules to create persistent symlinks for my usb stick and card reader. The first pluged gets /dev/sda and the second /dev/sdb. I followed the instructions in http://www.linuxfromscratch.org/lfs/view/stable/chapter07/symlinks.html and tried many more (DRIVER="usb-storage", DRIVER="ums-realtek", SUBSYSTEM=="block", ACTION=="add") with no success. cat /etc/udev/rules.d/83-duplicate_devs.rules KERNEL=="sd*", ATTRS{ID_VENDOR}=="Generic-", ATTRS{ID_MODEL}=="Multi-Card", SYMLINK+="card_reader" KERNEL=="sd*", ATTRS{ID_VENDOR}=="Kingston", ATTRS{ID_MODEL}=="DT_R500", SYMLINK+="usb_stick" I tried renaming to 11-duplicate_devs.rules At the moment I test booting having the devices pluged, until the symlinks to be created and then add ACTION=="add" rule For the usb stick: udevadm info --query=all --path=/sys/block/sda P: /devices/pci:00/:00:03.3/usb1/1-3/1-3:1.0/host0/target0:0:0/0:0:0:0/block/sda N: sda S: disk/by-id/usb-Kingston_DT_R500_0018F3D97163BBB1114800E2-0:0 S: disk/by-path/pci-:00:03.3-usb-0:3:1.0-scsi-0:0:0:0 E: UDEV_LOG=3 E: DEVPATH=/devices/pci:00/:00:03.3/usb1/1-3/1-3:1.0/host0/target0:0:0/0:0:0:0/block/sda E: MAJOR=8 E: MINOR=0 E: DEVNAME=/dev/sda E: DEVTYPE=disk E: SUBSYSTEM=block E: ID_VENDOR=Kingston E: ID_VENDOR_ENC=Kingston E: ID_VENDOR_ID=0951 E: ID_MODEL=DT_R500 E: ID_MODEL_ENC=DT\x20R500\x20\x20\x20\x20\x20\x20\x20\x20\x20 E: ID_MODEL_ID=1654 E: ID_REVISION=PMAP E: ID_SERIAL=Kingston_DT_R500_0018F3D97163BBB1114800E2-0:0 E: ID_SERIAL_SHORT=0018F3D97163BBB1114800E2 E: ID_TYPE=disk E: ID_INSTANCE=0:0 E: ID_BUS=usb E: ID_USB_INTERFACES=:080650: E: ID_USB_INTERFACE_NUM=00 E: ID_USB_DRIVER=usb-storage E: ID_PATH=pci-:00:03.3-usb-0:3:1.0-scsi-0:0:0:0 E: ID_PATH_TAG=pci-_00_03_3-usb-0_3_1_0-scsi-0_0_0_0 E: ID_PART_TABLE_TYPE=dos E: DEVLINKS=/dev/disk/by-id/usb-Kingston_DT_R500_0018F3D97163BBB1114800E2-0:0 /dev/disk/by-path/pci-:00:03.3-usb-0:3:1.0-scsi-0:0:0:0 For the card reader: udevadm info --query=all --path=/sys/block/sdb P: /devices/pci:00/:00:03.3/usb1/1-5/1-5:1.0/host1/target1:0:0/1:0:0:0/block/sdb N: sdb S: disk/by-id/usb-Generic-_Multi-Card_2006041309210-0:0 S: disk/by-path/pci-:00:03.3-usb-0:5:1.0-scsi-0:0:0:0 E: UDEV_LOG=3 E: DEVPATH=/devices/pci:00/:00:03.3/usb1/1-5/1-5:1.0/host1/target1:0:0/1:0:0:0/block/sdb E: MAJOR=8 E: MINOR=16 E: DEVNAME=/dev/sdb E: DEVTYPE=disk E: SUBSYSTEM=block E: ID_VENDOR=Generic- E: ID_VENDOR_ENC=Generic- E: ID_VENDOR_ID=0bda E: ID_MODEL=Multi-Card E: ID_MODEL_ENC=Multi-Card\x20\x20\x20\x20\x20\x20 E: ID_MODEL_ID=0158 E: ID_REVISION=1.00 E: ID_SERIAL=Generic-_Multi-Card_2006041309210-0:0 E: ID_SERIAL_SHORT=2006041309210 E: ID_TYPE=disk E: ID_INSTANCE=0:0 E: ID_BUS=usb E: ID_USB_INTERFACES=:080650: E: ID_USB_INTERFACE_NUM=00 E: ID_USB_DRIVER=ums-realtek E: ID_PATH=pci-:00:03.3-usb-0:5:1.0-scsi-0:0:0:0 E: ID_PATH_TAG=pci-_00_03_3-usb-0_5_1_0-scsi-0_0_0_0 E: ID_PART_TABLE_TYPE=dos E: DEVLINKS=/dev/disk/by-id/usb-Generic-_Multi-Card_2006041309210-0:0 /dev/disk/by-path/pci-:00:03.3-usb-0:5:1.0-scsi-0:0:0:0 The output of udevadm test /sys/block/sd{a,b} is here: http://pastebin.ca/2109689 Thanks Thanos -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: [lfs-support] udev custom rules for duplicate usb devices
On 04/02/2012 05:20 ??, Thanos Baloukas wrote: Hi I'm trying to write custom udev rules to create persistent symlinks for my usb stick and card reader. The first pluged gets /dev/sda and the second /dev/sdb. I followed the instructions in http://www.linuxfromscratch.org/lfs/view/stable/chapter07/symlinks.html and tried many more (DRIVER="usb-storage", DRIVER="ums-realtek", SUBSYSTEM=="block", ACTION=="add") with no success. I forgot to mention that I'm doing this on lfs 7.0 -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: [lfs-support] udev custom rules for duplicate usb devices
On 04/02/2012 05:20 ??, Thanos Baloukas wrote: Hi I'm trying to write custom udev rules to create persistent symlinks for my usb stick and card reader. The first pluged gets /dev/sda and the second /dev/sdb. I followed the instructions in http://www.linuxfromscratch.org/lfs/view/stable/chapter07/symlinks.html and tried many more (DRIVER="usb-storage", DRIVER="ums-realtek", SUBSYSTEM=="block", ACTION=="add") with no success. cat /etc/udev/rules.d/83-duplicate_devs.rules KERNEL=="sd*", ATTRS{ID_VENDOR}=="Generic-", ATTRS{ID_MODEL}=="Multi-Card", SYMLINK+="card_reader" KERNEL=="sd*", ATTRS{ID_VENDOR}=="Kingston", ATTRS{ID_MODEL}=="DT_R500", SYMLINK+="usb_stick" I tried renaming to 11-duplicate_devs.rules At the moment I test booting having the devices pluged, until the symlinks to be created and then add ACTION=="add" rule *Ken Moffat wrote: * Perhaps that is your problem - do they appear correctly if you boot without them plugged in, then connect them once the system has booted ? FWIW, I use lowercase ATTRS variable names on my sticks and camera (only one is ever plugged in at a time, so all my different usb sticks can happily appear at /dev/stick). I couldn't see corresponding items in your udevadm output. As of (summer) 2011, I found the values using: /sbin/udevadm info --name=/dev/sdb --attribute-walk but I'm sure the correct command will have changed since then - backward-compatability was never a goal for udev. I also specify SUBSYSTEMS=="usb" on some of my rules - that should clearly be SUBSYSTEM= so I guess that part isn't needed :) For the sticks (a range collected over the past few years) I variously match on ATTRS{product}=="USB Flash Memory", ATTRS{product}=="DISK 2.0", ATTRS{product}=="EHCI Host Controller", and for the cameras ATTRS{manufacturer}=="OLYMPUS", I also match for KERNEL=="sd?1", NOT for the unpartitioned device (in my case these are all formatted with FAT). Thanos Baloukas wrote: Thank you Ken, for the response. I tried many times to boot and then plug having the ACTION=="add" option. I tried with lower/upper case also. KERNEL=="sd?1" is more strict than KERNEL=="sd*", but the solution was elsewere. I have to be more carefull when I read man pages. The option --attribute-walk helped to find correct rules. I used rules from the same device as per command's output: SUBSYSTEMS=="scsi", ATTRS{vendor}=="Kingston" and SUBSYSTEMS=="scsi",ATTRS{vendor}=="Generic-" The full lines: ACTION=="add", KERNEL=="sd*", SUBSYSTEMS=="scsi", ATTRS{vendor}=="Kingston", SYMLINK+="usb_stick", RUN+="/bin/mount /dev/usb_stick" ACTION=="add", KERNEL=="sd*", SUBSYSTEMS=="scsi", ATTRS{vendor}=="Generic-", SYMLINK+="card_reader", RUN+="/bin/mount /dev/card_reader" and have them mounted. Thank you very much for the help. I spent a lot of time trying and had got stuck. Thanos -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
[lfs-support] systemd-journal group missing on LFS-SYSTEMD-20130324?
Hi Did I miss that? Maybe it's intentional? Thanos -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: [lfs-support] systemd-journal group missing on LFS-SYSTEMD-20130324?
On 03/26/2013 07:27 PM, Armin K. wrote: > On 03/26/2013 04:31 PM, Thanos Baloukas wrote: >> Hi >> >> Did I miss that? >> Maybe it's intentional? >> >> Thanos >> > > Does LFS SYSTEMD have Systemd 198 now? I don't remember touching > anything. The group was introduced in that version. > It seems that Systemd 198 is current http://www.linuxfromscratch.org/lfs/view/systemd/chapter06/systemd.html Thanos -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: [lfs-support] Changing the ownership
On 04/08/2013 08:22 PM, Niels Terp wrote: > *Fra:*lfs-support-boun...@linuxfromscratch.org > [mailto:lfs-support-boun...@linuxfromscratch.org] *På vegne af *Prabhu > *Sendt:* 8. april 2013 18:11 > *Til:* lfs-support@linuxfromscratch.org > *Emne:* [lfs-support] Changing the ownership > > Hi, I'm working on LFS-7.2, I successfully compiled the packages until > XZ-5.0.4 and I did stripping, then in Changing the ownership I checked > the permissions of tools directory as lfs user and host user then I > switched back to the root user and I executed this command "*sudo chown > -R root:root $LFS/tools*", but after executing it the permission remains > same. I would like to know the exact permission of the tools directory. > Could someone assist me in this. > > With Regards... > > PRABHU :) > > Hi PRABU, > > You don’t have to use SUDO here – the exact command is given in the book: > > *chown -R root:root $LFS/tools* > > Execute this command while you are still the ‘lfs’ user – even thougt > you don’t have root privilegedes, you can still “give away” your own > files and folders to another user. > > Greetings > > Niels > > AFAIK on Linux only root can use chown for changing ownership of a file, but any user can change the group to another group he belongs to. The command probably failed because PRABHU executed that with sudo while beeing root. Thanos -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: [lfs-support] Automated build of LFS 7.3
On 04/10/2013 04:37 PM, Baho Utot wrote: > On 04/10/2013 09:33 AM, Anthony Wright wrote: >> I'm an old LFS user who originally worked with LFS 6.1, and more >> recently 6.8. To build these two systems automatically I used jhalfs. >> >> I'd like to upgrade to LFS 7.3, but I can't get jhalfs 2.3.2 (the latest >> version of the recommended ALFS build tool) to work. >> >> Is ALFS still active - nothing seems to have changed with it since July >> 2009? >> >> Is there another way to build LFS 7.3 automatically? >> >> thanks, >> >> Anthony Wright > > I have some scripts at: https://github.com/baho-utot > You can get some ideas there. > You can use the development version of jhalfs. It worked for me lately. On alfs page says how to fetch it via svn. Thanos -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: [lfs-support] Ch 5.13: Check fails to build
On 07/04/2013 05:14 PM, hans kaper wrote: > > I am building LFS 7.3, copy-pasting from the book into scriptfiles. > I restarted with ch.5 about five times, but I get no further then ch. 5.13, > building Check 0.9.9. > > I have not seen any conspicuous errors building from the earlier paragraphs > and certainly no FAILURES. > > The end of the make-log is: > > /mnt/lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../i686-pc-linux-gnu/bin/ld: > check_thread_stress-check_thread_stress.o: undefined reference to symbol > 'pthread_create@@GLIBC_2.1' > /mnt/lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../i686-pc-linux-gnu/bin/ld: > note: 'pthread_create@@GLIBC_2.1' is defined in DSO > /tools/lib/libpthread.so.0 so try adding it to the linker command line > /tools/lib/libpthread.so.0: could not read symbols: Invalid operation > collect2: error: ld returned 1 exit status > make[2]: *** [check_thread_stress] Error 1 > make[2]: Leaving directory `/mnt/lfs/sources/check-0.9.9/tests' > make[1]: *** [all-recursive] Error 1 > make[1]: Leaving directory `/mnt/lfs/sources/check-0.9.9' > make: *** [all] Error 2 > FAILED! > > libpthread.so.0 is a link to libpthread-2.17.so. > > Anyone any ideas? Or can I just carry on, because it is a failure > in a test? > > > > Hans. > Take a look there: http://www.linuxfromscratch.org/lfs/errata/stable/ -- Thanos -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: [lfs-support] LFS 7.4 Patching Perl
On 12/25/2013 05:44 PM, Bob Elgie wrote: > My apologies if I'm blindly overlooking something obvious. > > Among the patches needed to build 7.4 is a Perl libc patch. I can't see > where this patch is applied; it is not mentioned in chapter 6.39. > > The only place I find instructions to apply it is in the French version > of the svn build. > > Should the patch be applied at all, and if so, where would that happen > if not in 6.39? > > Thanks. > > Bob Elgie > > It's applied at least in http://www.linuxfromscratch.org/lfs/view/stable/chapter05/perl.html When you need to look for something in the whole book, it would be helpful to download the html nochunks file, open it on a browser and search in there. -- Thanos -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
[lfs-support] LFS-SYSTEMD-20131221 broken link
The link http://www.linuxfromscratch.org/lfs/downloads/systemd/lfs-network-scripts-20131222.tar.bz2 seems to be broken. Does anybody know where can I get that? -- Thanos -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: [lfs-support] LFS-SYSTEMD-20131221 broken link
On 12/29/2013 04:03 PM, Armin K. wrote: > On 12/29/2013 01:26 PM, Thanos Baloukas wrote: >> The link >> http://www.linuxfromscratch.org/lfs/downloads/systemd/lfs-network-scripts-20131222.tar.bz2 >> seems to be broken. Does anybody know where can I get that? >> > > http://www.linuxfromscratch.org/~krejzi/lfs-network-scripts-20131221.tar.bz2 > > 03f9a8fd1f01bd2b6572ec4c47963cfe lfs-network-scripts-20131221.tar.bz2 > > Matt seems to be on vacation and he is responsible for book generation > so there's nothing I can do to fix it just yet. The book rendered online > is an old snapshot and doesn't contain any latest fixes. I recommend > cloning the book from svn, running make will generate the mentioned > tarball, too. > Thanks Armin. I'm glad you 're back. Actually I've built revision 10419 with jhalfs. The broken link is from the generated html. There were two more in wget-list and found the tarballs elsewhere, but I don't remember them. I'm not sure what you mean by >running make will generate the mentioned tarball, too. -- Thanos -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: [lfs-support] LFS-SYSTEMD-20131221 broken link
On 12/29/2013 06:59 PM, Armin K. wrote: > On 12/29/2013 05:09 PM, Thanos Baloukas wrote: >> On 12/29/2013 04:03 PM, Armin K. wrote: >>> On 12/29/2013 01:26 PM, Thanos Baloukas wrote: >>>> The link >>>> http://www.linuxfromscratch.org/lfs/downloads/systemd/lfs-network-scripts-20131222.tar.bz2 >>>> seems to be broken. Does anybody know where can I get that? >>>> >>> >>> http://www.linuxfromscratch.org/~krejzi/lfs-network-scripts-20131221.tar.bz2 >>> >>> 03f9a8fd1f01bd2b6572ec4c47963cfe lfs-network-scripts-20131221.tar.bz2 >>> >>> Matt seems to be on vacation and he is responsible for book generation >>> so there's nothing I can do to fix it just yet. The book rendered online >>> is an old snapshot and doesn't contain any latest fixes. I recommend >>> cloning the book from svn, running make will generate the mentioned >>> tarball, too. >>> >> Thanks Armin. I'm glad you 're back. Actually I've built revision 10419 >> with jhalfs. The broken link is from the generated html. There were >> two more in wget-list and found the tarballs elsewhere, >> but I don't remember them. I'm not sure what you mean by >> >running make will generate the mentioned tarball, too. >> > > In the directory you got with "svn co systemd-branch-url", you can run > "make" and it will generate html pages in $HOME/lfs-book by default, and > it will generate bootscripts tarball in the directory you ran "make" from. > I wasn't aware of the tarball generation.Sorry for the noise. Thanks again and happy new year for everyone! -- Thanos -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page