LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-24-2008, 03:05 PM   #1
Gins
Senior Member
 
Registered: Jul 2004
Location: Germany
Distribution: open SUSE 11.0, Fedora 7 and Mandriva 2007
Posts: 1,662

Rep: Reputation: 47
I created a link but it doesn't work.


I am running opensuse 11.0 nowadays

I have folder called 'Temp121' on a USB module.

I inserted the module and make a symlink to it.

ni@linux-j5q7:~> ln -s /media/sdd1/Temp121 Temp121

When I wrote the 'ls' command it showed the link 'Temp121'

So the creation of the link was fine.


ni@linux-j5q7:~> cd Temp121
bash: cd: Temp121: No such file or directory
ni@linux-j5q7:~>

I expected the 'cd' command to work.

Why is the error message?

........................................................
ni@linux-j5q7:~> file Temp121
Temp121: broken symbolic link to `/media/sdd1/Temp121'
ni@linux-j5q7:~>

Your thoughts are welcome.


I could read and copy all the files inside this particular folder because the USB module automatically gets mounted.
 
Old 09-24-2008, 04:52 PM   #2
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
Is /media/sdd1/Temp121 mounted? If you mount it does the link work?
 
Old 09-24-2008, 05:54 PM   #3
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
Try this:

Quote:
ln -s /media/sdd1/Temp121 .
or

Quote:
ln -s ../../media/ssd1/Temp121 .
 
Old 09-25-2008, 07:16 AM   #4
Gins
Senior Member
 
Registered: Jul 2004
Location: Germany
Distribution: open SUSE 11.0, Fedora 7 and Mandriva 2007
Posts: 1,662

Original Poster
Rep: Reputation: 47
Thanks XaiverP for taking time to reply me.

When I insert the module,I get a message to open it on a new window. If I click OK, I can see all the files and folders. I could copy, read, etc.
I believe it gets mounted because I see everything inside the module. Am I wrong?


However, I tried in vain to mount it.

ni@linux-j5q7:~> mount /dev/sdd1
mount: according to mtab, /dev/sdd1 is already mounted on /media/KINGSTON
mount failed
ni@linux-j5q7:~>


I will try jay73s suggestion later on.
I must go to the gym now.
 
Old 09-25-2008, 11:54 AM   #5
Gins
Senior Member
 
Registered: Jul 2004
Location: Germany
Distribution: open SUSE 11.0, Fedora 7 and Mandriva 2007
Posts: 1,662

Original Poster
Rep: Reputation: 47
Our friend jay73 has written 'ssd1'.

I don't know what he means.

I need clarification from him.
 
Old 09-25-2008, 12:05 PM   #6
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
Originally Posted by Gins View Post
Our friend jay73 has written 'ssd1'.

I don't know what he means.

I need clarification from him.
That's most likely a typo on his part.
 
Old 09-25-2008, 12:18 PM   #7
david1941
Member
 
Registered: May 2005
Location: St. Louis, MO
Distribution: CentOS7
Posts: 267

Rep: Reputation: 58
Evidently, your stick is mounted by your system to /media/KINGSTON when you insert it. Try linking to the mount point as displayed by mtab like this:
ln -s /media/KINGSTON/Temp121 Temp121
This assumes that Temp121 exists on the Kingston stick. When the stick is not inserted, of course the link is broken.

Dave.
 
Old 09-25-2008, 02:05 PM   #8
Gins
Senior Member
 
Registered: Jul 2004
Location: Germany
Distribution: open SUSE 11.0, Fedora 7 and Mandriva 2007
Posts: 1,662

Original Poster
Rep: Reputation: 47
david1941

You knew the trick.

Now it works.

ni@linux-j5q7:~> ln -s /media/KINGSTON/Temp121 Temp121
ni@linux-j5q7:~> ls


ni@linux-j5q7:~> cd Temp121
ni@linux-j5q7:~


ni@linux-j5q7:~/Temp121> ls
cups
grub_menu_lst
My Bookmarks.odt
fstab
modprobe_conf
ni@linux-j5q7:~
 
Old 09-26-2008, 02:23 PM   #9
Gins
Senior Member
 
Registered: Jul 2004
Location: Germany
Distribution: open SUSE 11.0, Fedora 7 and Mandriva 2007
Posts: 1,662

Original Poster
Rep: Reputation: 47
Making a file system on a USB module

I want to format a newly bought USB module and make 'ext2' file system.

The system recognized the USB module as 'sdd1'.

First I used 'fdisk' command to format it.

I think it worked fine.

Because there were no error message.

ni@linux-j5q7:~> su root
Password:
linux-j5q7:/home/ni # fdisk -l /media/sdd1
linux-j5q7:/home/ni # mkfs -t ext2 /dev/sdd1
mke2fs 1.40.8 (13-Mar-2008)
/dev/sdd1 is mounted; will not make a filesystem here!
linux-j5q7:/home/ni #

Why did it give me the above error message?
Please help me.
 
Old 09-26-2008, 02:32 PM   #10
Gins
Senior Member
 
Registered: Jul 2004
Location: Germany
Distribution: open SUSE 11.0, Fedora 7 and Mandriva 2007
Posts: 1,662

Original Poster
Rep: Reputation: 47
I unmounted it first.

linux-j5q7:/home/ni # umount /media/KINGSTON
linux-j5q7:/home/ni #
.............................................................
Afterwards, I used the command to create an 'ext2' file system.

linux-j5q7:/home/ni # mkfs -t ext2 /dev/sdd1
mke2fs 1.40.8 (13-Mar-2008)
Warning: 256-byte inodes not usable on older systems
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
123392 inodes, 493025 blocks
24651 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=507510784
16 block groups
32768 blocks per group, 32768 fragments per group
7712 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912

Writing inode tables: done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 36 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
linux-j5q7:/home/ni #

Have I successfully created an 'ext2' file system on the USB module?
Please tell me.
 
Old 09-26-2008, 03:11 PM   #11
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
It looks like it, yes. If not sure, run df -Th in a terminal.
 
Old 09-26-2008, 03:23 PM   #12
Gins
Senior Member
 
Registered: Jul 2004
Location: Germany
Distribution: open SUSE 11.0, Fedora 7 and Mandriva 2007
Posts: 1,662

Original Poster
Rep: Reputation: 47
Thanks jay73

Is it fine?

I badly need your help.


ni@linux-j5q7:~> df -Th
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda5 ext3 25G 5.0G 19G 22% /
udev tmpfs 1007M 200K 1007M 1% /dev
/dev/sda8 ext3 84G 9.6G 70G 12% /media
/dev/sda1 fuseblk 45G 5.4G 40G 12% /windows/C
/dev/sdd1 ext2 1.9G 2.9M 1.8G 1% /media/disk
ni@linux-j5q7:~>
nilinux-j5q7:~>

ni@linux-j5q7:~> su root
Password:
linux-j5q7:/home/ni # df -Th
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda5 ext3 25G 5.0G 19G 22% /
udev tmpfs 1007M 200K 1007M 1% /dev
/dev/sda8 ext3 84G 9.6G 70G 12% /media
/dev/sda1 fuseblk 45G 5.4G 40G 12% /windows/C
/dev/sdd1 ext2 1.9G 2.9M 1.8G 1% /media/disk
linux-j5q7:/home/ni #
----------------------------------------
Afterwards, I ran the fsck command on the USB module.
Quote:
ni@linux-j5q7:~> su root
Password:
linux-j5q7:/home/ni # fsck.ext2 /dev/sdd1
e2fsck 1.40.8 (13-Mar-2008)
/dev/sdd1 is mounted.

WARNING!!! Running e2fsck on a mounted filesystem may cause
SEVERE filesystem damage.

Do you really want to continue (y/n)? yes

/dev/sdd1 was not cleanly unmounted, check forced.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/sdd1: 11/123392 files (9.1% non-contiguous), 8482/493025 blocks
linux-j5q7:/home/ni #


------------------------------------------------------------------------------------------------

I unmounted it ran the fsck command again.

Quote:
linux-j5q7:/home/ni # umount /dev/sdd1
linux-j5q7:/home/ni # fsck.ext2 /dev/sdd1
e2fsck 1.40.8 (13-Mar-2008)
/dev/sdd1: clean, 11/123392 files, 8482/493025 blocks
linux-j5q7:/home/ni #

I am waiting to read your comments.

Last edited by Gins; 09-26-2008 at 04:06 PM.
 
Old 09-26-2008, 08:33 PM   #13
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
Quote:
/dev/sdd1 ext2 1.9G 2.9M 1.8G 1% /media/disk
Looks OK to me. Just don't run fsck on mounted filesystems, you can mess up your data if you do.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do i access the Symbolic link on windows which is created in Solaris mukunth Solaris / OpenSolaris 1 02-23-2008 05:26 PM
getElementById doesn't work in IE when element is created after page load mohtasham1983 Programming 2 02-09-2008 05:18 AM
Newly created DNS zones do not work? Help! Kreshna Linux - Server 6 02-28-2007 11:08 AM
created ~/.bashrc doesn't work Alfexy Slackware 7 09-06-2004 01:58 PM
How does VC link a dll created by cygwin? chuanyung Programming 1 02-25-2004 12:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration