LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   i have unlinked /dev/hda5 how to link (https://www.linuxquestions.org/questions/programming-9/i-have-unlinked-dev-hda5-how-to-link-585352/)

linux_e 09-17-2007 02:23 PM

i have unlinked /dev/hda5 how to link
 
i have unlinked /dev/hda5 my windows hard disk partition from linux how to link it again.

gnashley 09-17-2007 02:57 PM

What do you mean by 'unlinking'? Perhaps you mean you unmounted it?

linux_e 09-18-2007 03:24 AM

i was trying to unmount it temporarily
 
Quote:

Originally Posted by gnashley (Post 2894964)
What do you mean by 'unlinking'? Perhaps you mean you unmounted it?

i have added it during installation of linux. but later on i have also mounted it to /mnt/tmp .
then i have used command "unlink" , after the execution of this commmand it is removed permanently and whenever i try to mount it
message is shown no susc device or directory

gnashley 09-18-2007 07:32 AM

You don't say which distro and version you are using so it is difficult to say what is happening.
unlink is similar to 'rm'. Sounds like you have removed the device file /dev/hda5 in which case you'd need to recreate it or copy it from some exiting installation.
It would help if you post the full commands that you used and the order in which you executed them.

linux_e 09-19-2007 01:36 AM

using slackware 11.0
 
Quote:

Originally Posted by gnashley (Post 2895687)
You don't say which distro and version you are using so it is difficult to say what is happening.
unlink is similar to 'rm'. Sounds like you have removed the device file /dev/hda5 in which case you'd need to recreate it or copy it from some exiting installation.
It would help if you post the full commands that you used and the order in which you executed them.

i have used commands in following order

mount /dev/hda5 /mnt/tmp

here i checked contents of /mnt/tmp copied files into linux

then i in order to unmount it typed

unlink /dev/hda5

here it removed it permanently

bigearsbilly 09-19-2007 02:32 AM

oh dear, the perils of messing about as root

does it not come back after reboot?
search for info on udev (google?)

another way to recreate it is to use the mknod
command.

gnashley 09-19-2007 04:05 AM

Ouch! As I said 'unlink' is basically the same as 'rm'. The command you need to use is 'umount /dev/hda5', not 'unlink /dev/hda5'.

You say you are running slack-11.0 which is the same thing I am running. We need to know which kernel you are running -actually we need to know if you are using the udev, which implies a 2.6 kernel. But you can also run a 2.6 kernel and not use udev. If you are using udev, then the special device file /dev/hda5 should be recreated when you reboot. If you are not using udev (I don't), then the command you used has removed the special device file /dev/hda5 from the system permanently. You can use the mknod tool to re-create it, or you can copy it from somewhere else. For instance, you could reboot with the installer CD, mount the partition and then copy device file (/dev/hda5) from the /dev directory of the running installer into /mnt/tmp/dev/hda5. You could also use the Slackware 'explodepkg' command to unpack the devs-2.3.1-noarch-25.tgz package somewhere and then copy the device file from there into your /dev directory.
You should also be able to cd into the /dev dir of your system and run this command to recreate all the device files for hda:
'./MAKEDEV hda'
The mknod command is something like this:
mknod --mode=660 /dev/hda5 b 3 5


All times are GMT -5. The time now is 09:37 PM.