Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Write an article for LinuxForums Today! Win Great Prizes!
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > GNU Linux Zone > Linux On Laptops / Netbooks / Minibooks > eeePC - SD card mounted at /home ??

Forgot Password?
 Linux On Laptops / Netbooks / Minibooks   Linux on laptop machines, netbooks, minibooks, and anything else tiny! A great place to discuss linux on smaller devices.

Site Navigation
Linux Articles
Linux Forums
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
RSS Feeds
Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
Reply
 
Thread Tools Display Modes
Old 04-25-2008   #1 (permalink)
Just Joined!
 
Join Date: Feb 2005
Location: UK
Posts: 67
eeePC - SD card mounted at /home ??

Asus eeePC with default install (Xandros I think)

Has anyone managed to get an SD card to mount as /home ?

Steps tried so far:

fdisk /dev/sdb1
mkfs.ext2 /dev/sdb1
mount /dev/sdb1 /tmp/newhome
cp -a /home/* /tmp/newhome
umount /dev/sdb1
mount /dev/sdb1 /home

edited fstab to include: /dev/sdb1 /home rw,uid=user

All that works fine for the current session, but as soon as I reboot, /home is back on the onboard storage. I can re-mount /dev/sdb1 /home and it will work again, but only until a reboot.

Any ideas how to get it to stay forever?

tnx

Nick
NikTheGeek is offline  



Reply With Quote
Old 05-22-2008   #2 (permalink)
Just Joined!
 
Join Date: May 2008
Posts: 3
RE: eeePC - SD card mounted at /home ??

Hi Nik

I was able to get successfully get my SD card to mount as /home on my 4G EeePC.

Here's what I did.

I started with your steps.
fdisk /dev/sdb1
mkfs.ext2 /dev/sdb1
mount /dev/sdb1 /tmp/newhome
cp -a /home/* /tmp/newhome
umount /dev/sdb1

Next I went to the eeeuser.com wiki
Auto-Mount USB Storage Devices [EeeUser Eee PC Wiki]

I followed most of the steps there.

Find out the serial number of your device

1. Insert your SD card or USB thumb drive
2. Open the terminal (Ctrl-Alt-T in Easy mode, run konsole in Advanced). All actions below are performed in a terminal window. You may note some commands end with an ”&”. This makes them run in background, so that if you say run a GUI editor like KWrite, you can get your terminal prompt back for further commands, even with KWrite still running.
3. Save the contents of a virtual file /proc/bus/usb/devices into a real file in your home directory

cat /proc/bus/usb/devices > /home/user/usb_devices.txt

4. Open /home/user/usb_devices.txt in an editor

kwrite /home/user/usb_devices.txt &

5. Find your device and serial number. Look for sections where the I: line ends with Driver=usb-storage, a few lines above you will find the serial number of the card reader. Some devices will also have a product name you might recognise. It is this name that prevents some of them mount properly, preventing you to access them. Look for a line with Product=USB DISK 2.0 (note this is just an example, and your name may be different or not there at all).

T: Bus=05 Lev=01 Prnt=01 Port=04 Cnt=02 Dev#= 2 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=0cf2 ProdID=6225 Rev= 1.00
S: Manufacturer=ENE
S: Product=UB6225
S: SerialNumber=146030377350
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=498mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms

Configure device detection

1.
Make note of the serial number, or just keep the file open for cut and paste.
2.
Edit /etc/udev/rules.d/50-xandros-udev.rules. You need to be root to do it:

sudo kwrite /etc/udev/rules.d/50-xandros-udev.rules &

3.
Find the comment

# usb, removable storage

4.
Immediately after this comment, so that it will replace the Asus dialog, add the following line, changing the serial number to match your device and optionally changing the name sdcard1 (in both places)

BUS=="usb", KERNEL=="sd*", SYSFS{serial}=="146030377350", NAME="sdcard1", OPTIONS+="last_rule", RUN+="/bin/mount /dev/sdcard1"

5.
Make sure the above line is correct, especially taking care the number and placement of ”=” signs is matching. Probably the best thing to do is to copy and paste the line above, then change sdcard1 if required.



Here's where I deviate...

I edited my fstab and added the following line.
/dev/sdcard1 /home ext2 rw 0 0

I saved the file and rebooted..

It worked like a charm.

Good Luck
Dean
Muad_Dib is offline   Reply With Quote
Old 05-26-2008   #3 (permalink)
Just Joined!
 
Join Date: May 2008
Posts: 3
I discovered a small bug in my previous post where if I tried to unmount another removable usb storage device that is detected as /dev/sdc1, or even unplug that device, my /home SDcard was unmounted also. The unmount script will unmount all devices named /dev/sdc* so this included /dev/sdc1 and /dev/sdcard1

To fix this I made the following changes.

When editing the /etc/udev/rules.d/50-xandros-udev.rules file
use the following line instead.

BUS=="usb", KERNEL=="sd*", SYSFS{serial}=="146030377350", NAME="%k", OPTIONS+="last_rule", RUN+="/bin/mount /dev/%k /home"

Only edit the Serial number if needed. This will then automount the SDcard at /home no matter what device the kernel detects it as. and won't get unmounted when you try to remove other usb devices.

I also removed all entires for this device from /etc/fstab they are not needed any longer.

Cheers
Dean



Quote:
Originally Posted by Muad_Dib View Post
Hi Nik

I was able to get successfully get my SD card to mount as /home on my 4G EeePC.

Here's what I did.

I started with your steps.
fdisk /dev/sdb1
mkfs.ext2 /dev/sdb1
mount /dev/sdb1 /tmp/newhome
cp -a /home/* /tmp/newhome
umount /dev/sdb1

Next I went to the eeeuser.com wiki
Auto-Mount USB Storage Devices [EeeUser Eee PC Wiki]

I followed most of the steps there.

Find out the serial number of your device

1. Insert your SD card or USB thumb drive
2. Open the terminal (Ctrl-Alt-T in Easy mode, run konsole in Advanced). All actions below are performed in a terminal window. You may note some commands end with an ”&”. This makes them run in background, so that if you say run a GUI editor like KWrite, you can get your terminal prompt back for further commands, even with KWrite still running.
3. Save the contents of a virtual file /proc/bus/usb/devices into a real file in your home directory

cat /proc/bus/usb/devices > /home/user/usb_devices.txt

4. Open /home/user/usb_devices.txt in an editor

kwrite /home/user/usb_devices.txt &

5. Find your device and serial number. Look for sections where the I: line ends with Driver=usb-storage, a few lines above you will find the serial number of the card reader. Some devices will also have a product name you might recognise. It is this name that prevents some of them mount properly, preventing you to access them. Look for a line with Product=USB DISK 2.0 (note this is just an example, and your name may be different or not there at all).

T: Bus=05 Lev=01 Prnt=01 Port=04 Cnt=02 Dev#= 2 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=0cf2 ProdID=6225 Rev= 1.00
S: Manufacturer=ENE
S: Product=UB6225
S: SerialNumber=146030377350
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=498mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms

Configure device detection

1.
Make note of the serial number, or just keep the file open for cut and paste.
2.
Edit /etc/udev/rules.d/50-xandros-udev.rules. You need to be root to do it:

sudo kwrite /etc/udev/rules.d/50-xandros-udev.rules &

3.
Find the comment

# usb, removable storage

4.
Immediately after this comment, so that it will replace the Asus dialog, add the following line, changing the serial number to match your device and optionally changing the name sdcard1 (in both places)

*Error was here*
Use the following line instead.

BUS=="usb", KERNEL=="sd*", SYSFS{serial}=="146030377350", NAME="%k", OPTIONS+="last_rule", RUN+="/bin/mount /dev/%k /home"


5.
Make sure the above line is correct, especially taking care the number and placement of ”=” signs is matching. Probably the best thing to do is to copy and paste the line above, just change the Serial number if required.

That's it. No need to edit fstab at this point.

I saved the file and rebooted..

It worked like a charm.

Good Luck
Dean
Muad_Dib is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Free Magazines
A Newbie's Getting Started Guide to Linux
Learn the basics of the Linux operating systems. Get to know what it is all about, and familiarize yourself with the practical side. Basically, if you're a complete Linux newbie and looking for a quick and easy guide to get you started this is it.
subscribe
Run Your Own Web Server Using Linux & Apache - Free 191 Page Preview
Learn about everything you'll need to build and maintain your Linux servers, and to deploy Web applications to them.
subscribe
Open Source Security Myths Dispelled
Dispel the five major myths surrounding Open Source Security and gain the tools necessary to make a truly informed decision for your IT organization
subscribe
InformationWeek
InformationWeek is the only newsweekly you'll need to stay on top of the latest developments in information technology.
subscribe



All times are GMT. The time now is 09:16 PM.






© 2000 - - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.3.1