Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
USB flash drive:The learning process
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
tisham
n00b
n00b


Joined: 25 Oct 2004
Posts: 24

PostPosted: Sat Nov 27, 2004 12:21 am    Post subject: USB flash drive:The learning process Reply with quote

I looked around in the forum, the php search being a bit shonky did not come up with much and then found my own way to make my usb drives -- flash or cased laptop drives to fit into my kernel and fstab.Here is how(2.6.9-gentoo-dev-sources):

    1: U need - > usbcore,usb-storage,*_hcd(depending on your usb sytem),scsi emulation OR low-performance usb blk driver. Please note the OR one of them superceeds the other, hence if you have ub(usb blk driver) compiled no scsi emulation for you. No familiar sd** stuff. (Should i include /devfs as a pre requisite? is there any alternative ?)
    2: I liked ub(gave less deep entrenchment in my /dev directory) but i missed the sd** symlinks.So I deselected it in my kernel config, it seems to have priority in loading over scsi emulation support. I did one thing while playing around with ub, i don't know if it is good practice, I manually edited /dev to make symlinks /dev/sda->/dev/ub/0/disc and /dev/sda1->/dev/ub/0/part1 the ub driver and the scsi driver for that matter create separate /dev entries for the disc and partions on it,rather like mounting partitions on your hda. I have a 60gb portable disc which has partitions hence i have plenty of sd** stuff :)
    3:So far with ub,scsi emulation kicked in when i used the new kernel config sans ub.Hum silly me I had left the /dev/sda* symlinks in,hence poor scsi emul got pushed to /dev/sdb* when it autosetup the devices.(Sorry anyone know how to bring it back to /dev/sda*,i will kill the symlinks :))I had to change my fstab to take care of this.
    4:Hum the file system now.Mounting one of my external drives is a bit tricky it is an ex linux+windows dual boot drive,hence has ext3+ext2+ntfs+fat32,but an auto entry in fstab will fix all that.Make sure you compile in vfat and ntfs support into the kernel otherwise you may have to load it my hand the first time using mount -t vfat .......But I have a problem here still.My mount -t auto mounts the fat32 as fat, hence no long file names,how can I get it to mount as vfat/fat32,i have to it by hand now (they are the same thing rite? or is there fat16 in vfat too).
    5:All done then i have /dev/sdb* 4 partitions happily mounted and rw(except ofcourse the ntfs one).Next stage i want my windows to boot from USB,hum did windows think they will be externalized when they started with the locked into hardware manufacturers deal.Anyway,good for MS i don't know if my bios can have usb devices as boot devices.I reckon i need a laptop or bios upgrade :D.Anyone with ideas about old dell cpx-H bios?mine is revision A14,and i have a single usb slot,hehe.

All done then, i hope that i have managed to cache my questions in a small tutorial and pretend to actually know something.Tell me how it works for you.
By the way when will project utopia be in portage and make life easier?
Cheers,
Tisham.
Back to top
View user's profile Send private message
hakkikt
n00b
n00b


Joined: 24 Jun 2004
Posts: 21

PostPosted: Sat Nov 27, 2004 1:45 am    Post subject: Re fat/fat32/vfat driver Reply with quote

If you put vfat instead of auto you will get the long names. Or, if you need to have support for multiple fs types just list them separated by commas. The vfat fstype covers win95 modified fat16 and fat32, pure fat16 and fat12 are handled by the msdos fstype, or at least this is what I understand things to be and it appears to match reality closesly enough.

if you want to stick with auto this snippet from man mount should help
Code:

Creating a file /etc/filesystems can be  useful  to  change  the probe  order (e.g., to try vfat before msdos) or if you use a kernel  module  autoloader.   Warning:  the  probing  uses  a heuristic  (the  presence  of appropriate `magic'), and could recognize the wrong  filesystem  type,  possibly  with  catastrophic  consequences.  If  your data is valuable, don't ask mount to guess.
Back to top
View user's profile Send private message
BlackEdder
Advocate
Advocate


Joined: 26 Apr 2004
Posts: 2588
Location: Dutch enclave in Egham, UK

PostPosted: Tue Dec 07, 2004 3:08 pm    Post subject: Reply with quote

Hi, I've got a problem with scsi emulation. I activated scsi device support and usb storage support, but it doesn't seem to work. When I plug in the usb drive dmesg reports it being found, but scsi emulation doesn't kick in. Do I need to enable anything else.. I loaded the usb_storage module and build the scsi module into the kernel... You know if I'm missing anything?
Back to top
View user's profile Send private message
BlackEdder
Advocate
Advocate


Joined: 26 Apr 2004
Posts: 2588
Location: Dutch enclave in Egham, UK

PostPosted: Tue Dec 07, 2004 3:34 pm    Post subject: Reply with quote

Hmm well it seems the usb stick is broken after a bad unmount yesterday (have had probz with unmounting before, but the usb stick survived then). But windowz also doesn't recognize him anymore (thinks it's some kind of security device).

Anyone an idea how I can force linux to see it as an scsi drive and then just reformat it, hope it works.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum