Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Other Things Gentoo
  • Search

Magicdev and USB pen

Still need help with Gentoo, and your question doesn't fit in the above forums? Here is your last bastion of hope.
Post Reply
Advanced search
8 posts • Page 1 of 1
Author
Message
vhkristof
Apprentice
Apprentice
Posts: 211
Joined: Sat Jun 21, 2003 5:35 am
Location: Achel, Limburg, Belgium

Magicdev and USB pen

  • Quote

Post by vhkristof » Sun Nov 02, 2003 6:24 pm

Hey,

Recently I bought myself a USB stick.
I was browsing the forums and read something about magicdev.
Emerged it, and it works for my cdrom, but is there a way it automounts
my usbstick (/dev/sda1) whenever I plug it in?

Thx!
Top
RedBeard0531
Guru
Guru
User avatar
Posts: 415
Joined: Sat Sep 21, 2002 11:51 pm
Location: maryland

  • Quote

Post by RedBeard0531 » Sun Nov 02, 2003 9:36 pm

I'd look into automounter/autofs.

First check to ensure that you have this enamble or modularized in the kernel. File systems -> Kernel automounter version 4 support. Then emerge autofs.
When that finishes modify /etc/autofs/auto.misc and possaply auto.master. I'm about to modyfy mine to take over my /mnt/directoy and ill post them shortly.
OH MY GOD! Kenny just killed Kenny!
That Basterd!
Top
vhkristof
Apprentice
Apprentice
Posts: 211
Joined: Sat Jun 21, 2003 5:35 am
Location: Achel, Limburg, Belgium

  • Quote

Post by vhkristof » Sun Nov 02, 2003 10:15 pm

Ok, I'll be waiting here...
Thanks for the post !
Top
RedBeard0531
Guru
Guru
User avatar
Posts: 415
Joined: Sat Sep 21, 2002 11:51 pm
Location: maryland

:

  • Quote

Post by RedBeard0531 » Sun Nov 02, 2003 10:33 pm

Sorry for the delay, Ive rewritten them a couple of time trying to get it the way i like it, I think i got it now, Ill post when im sure.

Ok Ive got it:

/etc/autofs/auto.master

Code: Select all

 # $Id: auto.master,v 1.1 2000/08/08 17:53:33 achim Exp $
# Sample auto.master file
# Format of this file:
# mountpoint map options
# For details of the format look at autofs(8).
/auto/short     /etc/autofs/auto.short  --timeout 1
/auto/long      /etc/autofs/auto.long   --timeout 30
/etc/autofs/auto.short

Code: Select all

# $Id: auto.misc,v 1.2 2002/10/27 05:21:15 bcowan Exp $
# This is an automounter map and it has the following format
# key [ -mount-options-separated-by-comma ] location
# Details may be found in the autofs(5) manpage
floppy          -fstype=auto            :/dev/fd0
boot            -fstype=ext2            :/dev/hda4
/etc/autofs/auto.long

Code: Select all

# $Id: auto.misc,v 1.2 2002/10/27 05:21:15 bcowan Exp $
# This is an automounter map and it has the following format
# key [ -mount-options-separated-by-comma ] location
# Details may be found in the autofs(5) manpage
cd              -fstype=auto,ro         :/dev/hdc
files           -fstype=smbfs,username=XXX,password=XXX   ://server/full
print           -fstype=nfs             print:/
Notice the : is in the middle for the nfs mount

Ok... auto.master tells the autofs init script (/etc/init.d/autofs) what to mout and the mapfiles to assossiate them with. In this setup auto.short is for things i want unmounted immediatly after using. I sugest putting your keychain on there. This adds unneeded latency, espcialy for netmounts which have negotiation stuff todo, so they go in auto.long.

to get this started run /etc/init.d/autofs start. This mounts /auto/short and /auto/long. note that ls /auto/long is empty. You have to aactualy type ls /auto/long/cd to see inside. This is by design, dont worry. to get arround that, make synlinks your friend. :wink:. I link /auto/short/boot to /boot, and everything else to its respective /mnt/ spot.

If this workss for you, run rc-update add autofs default. If you run into problems feel free to IM me at redbeard0531(aim and irc). If you think this is usefull i might cleean it up and put itin docs and tricks. lemme know
OH MY GOD! Kenny just killed Kenny!
That Basterd!
Top
vhkristof
Apprentice
Apprentice
Posts: 211
Joined: Sat Jun 21, 2003 5:35 am
Location: Achel, Limburg, Belgium

  • Quote

Post by vhkristof » Sun Nov 02, 2003 11:14 pm

I'll try it tomorrow, going to bed now (0:14 PM here).

Are you positive this will work with a USB memory stick?
Top
RedBeard0531
Guru
Guru
User avatar
Posts: 415
Joined: Sat Sep 21, 2002 11:51 pm
Location: maryland

  • Quote

Post by RedBeard0531 » Mon Nov 03, 2003 12:04 am

vhkristof wrote:Are you positive this will work with a USB memory stick?
No, but if you'll buy me one, ill be glad to test it :D

Seriosly though I think it will b/c it is designed to be a universal tool. note that mounts and unmouns are based on accessing the directory, not on plugging and unpluging,
OH MY GOD! Kenny just killed Kenny!
That Basterd!
Top
vhkristof
Apprentice
Apprentice
Posts: 211
Joined: Sat Jun 21, 2003 5:35 am
Location: Achel, Limburg, Belgium

  • Quote

Post by vhkristof » Mon Nov 03, 2003 12:06 pm

RedBeard0531 wrote:
vhkristof wrote:Are you positive this will work with a USB memory stick?
No, but if you'll buy me one, ill be glad to test it :D

Seriosly though I think it will b/c it is designed to be a universal tool. note that mounts and unmouns are based on accessing the directory, not on plugging and unpluging,
With magicdev my cdrom get automounted when I pop a cd in my drive,
without having to access it.

Appreciate your help

Greetz kristof
Top
RedBeard0531
Guru
Guru
User avatar
Posts: 415
Joined: Sat Sep 21, 2002 11:51 pm
Location: maryland

  • Quote

Post by RedBeard0531 » Mon Nov 03, 2003 1:56 pm

vhkristof wrote: With magicdev my cdrom get automounted when I pop a cd in my drive,
without having to access it.

Appreciate your help

Greetz kristof
There is something called supermount that would work with cd's, but it is considered by some to be a bad thing. The reson these wont work with the usb keychain is that a device is being created and destroyed. IIRC supermount never really mounts the disc, it accesses it seporately each time. magic dev apearently checks the status of the cdrom frequently, and doesnt cleanly unmount but that isnt nessesary with a ro cdrom.

There is something called hotplug that may workfor the usbkeycahin, but i dont think it would cleanly unmount. emerge hotplug and search the forums for more info.
OH MY GOD! Kenny just killed Kenny!
That Basterd!
Top
Post Reply

8 posts • Page 1 of 1

Return to “Other Things Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic