Results 1 to 3 of 3
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 04-25-2008 #1Just 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
- 05-22-2008 #2Just 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
- 05-26-2008 #3Just 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


Reply With Quote

