Linux From ScratchThis Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi everybody and thanks a lot for your replies
There are threads with people asking how to do certain things with their USB devices, which means they managed to create/install them.
As for me, I don't know how to see my USB stick. LFS system definitely recognizes it - "dmesg" says usb_uhci module [or something similar] gets loaded. Shall I mount it somehow? A thread says it's about /dev/sda1 device, but I don't seem to have it. Shall I create it? How does one create files in /dev?
I do believe you use LFS 6.1 (with 2.6 kernel). If that is the case: The sda entries are created when needed (take a look at /etc/udev/rules.d/25-lfs.rules).
When inserting a USB device (memory stick in your case) it should be recognized:
Before inserting usb stick:
$ ls -l /dev/sd*
ls: /dev/sd*: No such file or directory
After inserting USB stick:
$ ls -l /dev/sd*
brw-rw---- 1 root disk 8, 0 Nov 11 12:59 /dev/sda
brw-rw---- 1 root disk 8, 1 Nov 11 12:59 /dev/sda1
In the logfile (I log everything in /var/log/allmessages, dmesg shows only part of the text below) you should see this:
Nov 11 12:58:55 inferno kernel: usb 1-6: new high speed USB device using ehci_hcd and address 2
Nov 11 12:58:55 inferno kernel: scsi0 : SCSI emulation for USB Mass Storage devices
Nov 11 12:58:55 inferno kernel: usb-storage: device found at 2
Nov 11 12:58:55 inferno kernel: usb-storage: waiting for device to settle before scanning
Nov 11 12:59:00 inferno kernel: Vendor: USB Model: BAR Rev: 2.00
Nov 11 12:59:00 inferno kernel: Type: Direct-Access ANS I SCSI revision: 02
Nov 11 12:59:00 inferno kernel: sda: Unit Not Ready, sense:
Nov 11 12:59:00 inferno kernel: : Current: sense key=0x6
Nov 11 12:59:00 inferno kernel: ASC=0x28 ASCQ=0x0
Nov 11 12:59:00 inferno kernel: sda : READ CAPACITY failed.
Nov 11 12:59:00 inferno kernel: sda : status=1, message=00, host=0, driver=08
Nov 11 12:59:00 inferno kernel: sd: Current: sense key=0x6
Nov 11 12:59:00 inferno kernel: ASC=0x28 ASCQ=0x0
Nov 11 12:59:00 inferno kernel: sda: assuming Write Enabled
Nov 11 12:59:00 inferno kernel: sda: assuming drive cache: write through
Nov 11 12:59:00 inferno kernel: SCSI device sda: 512000 512-byte hdwr sectors (262 MB)
Nov 11 12:59:00 inferno kernel: sda: assuming Write Enabled
Nov 11 12:59:00 inferno kernel: sda: assuming drive cache: write through
Nov 11 12:59:00 inferno kernel: sda: sda1
Nov 11 12:59:00 inferno kernel: Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0
Nov 11 12:59:00 inferno kernel: Attached scsi generic sg0 at scsi0, channel 0, id 0, lun 0, type 0
Nov 11 12:59:00 inferno kernel: usb-storage: device scan complete
Nov 11 12:59:00 inferno scsi.agent[3307]: disk at /devices/pci0000:00/0000:00:1d.7/usb1/1-6/1-6:1.0/host0/target0:0:0/0:0:0:0 Nov 11 12:59:00 inferno udev[3319]: creating device node '/dev/sg0'
Nov 11 12:59:00 inferno udev[3317]: creating device node '/dev/sda'
Nov 11 12:59:00 inferno udev[3353]: creating device node '/dev/sda1'
For easy mounting you need an entry like this in your /etc/fstab:
/dev/sda1 /mnt/usb_01 auto noauto,rw,user 0 0
/mnt/usb_01 is a mountpoint created by me, you are free to change usb_01 into whatever you want (do change the fstab entry accordingly).
Thank you very much, druuna!
Funny enough, but mostly none of your advice applied.
1. /etc/udev/rules.d/25-lfs.rules file is OK. I never edited it, so it contains exactly what it should. sda entries are there.
2. /dev directory does not contain any sd* files - neither before, nor after inserting the USB stick.
3. I don't have /var/log/allmessages, so I still have to limit myself to "dmesg".
But I solved it! And it's definitely your merit.
dmesg says that after I plug my memory stick in the kernel module gets loaded, but no /dev entries get created. That made me think there's something with my kernel configuration. After some google search, I found out what exactly was wrong - I did not enable "SCSI drive support" in the kernel. Recompiling the kernel solved the whole issue.
For some reason udev [udev is taking care of it all, isn't it?] creates /dev/uba1 instead of /dev/sda1, but the name probably doesn't matter so much.
Wait, there's something I used almost "mot-a-mot" - I copied your /etc/fstab entry! It's great to see an shortcut to my memory stick created automatically in Gnome desktop!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.