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.

Linux Forum ArticlesLinux ForumsLinux Forum DownloadsLinux HostsFree MagazinesJobs
Home|Register|FAQ|Member List|Calendar|Unanswered Posts|Forum Rules|Today's Posts|Advanced Search|
SEARCH FOR IN
Go Back   Linux Forums > GNU Linux Zone > Linux On Laptops
Reload this Page eeePC - SD card mounted at /home ??
Linux Forums
Linux Forums
Welcome To The Linux Forums!
Welcome to Linux Forums. We pride ourselves in being one of the largest Linux communities on the web, we encourage you to REGISTER on our forums and participate in the community. There are over 150,000 members ready to answer your questions. JOINING US today will allow you to make new posts, get support, send messages to other members and submit downloads to our downloads directory and many other great features!

Linux On Laptops Linux on laptop machines, a great place to discuss linux/laptop specific issues.

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
__________________
Unregistered Linux user #9675486251
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
Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe
Systems Management News, the newspaper for IT systems administration and data center managers!
Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe
The Enterprise Newsweekly
eWeek is the essential technology information source for builders of e-business.
subscribe
Oracle Magazine
Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe
Total Telecom
Total Telecom is "The Economist of the communications industry".
subscribe
More free magazines »



All times are GMT. The time now is 06:16 AM.




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

Content Relevant URLs by vBSEO 3.2.0