LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-17-2007, 02:23 PM   #1
linux_e
LQ Newbie
 
Registered: Jan 2007
Posts: 5

Rep: Reputation: 0
Post 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.
 
Old 09-17-2007, 02:57 PM   #2
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
What do you mean by 'unlinking'? Perhaps you mean you unmounted it?
 
Old 09-18-2007, 03:24 AM   #3
linux_e
LQ Newbie
 
Registered: Jan 2007
Posts: 5

Original Poster
Rep: Reputation: 0
i was trying to unmount it temporarily

Quote:
Originally Posted by gnashley View Post
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
 
Old 09-18-2007, 07:32 AM   #4
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
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.
 
Old 09-19-2007, 01:36 AM   #5
linux_e
LQ Newbie
 
Registered: Jan 2007
Posts: 5

Original Poster
Rep: Reputation: 0
using slackware 11.0

Quote:
Originally Posted by gnashley View Post
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
 
Old 09-19-2007, 02:32 AM   #6
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,515

Rep: Reputation: 239Reputation: 239Reputation: 239
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.
 
Old 09-19-2007, 04:05 AM   #7
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
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
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
/dev/hda5 already mounted?? krussell Slackware 8 07-30-2006 05:23 AM
URGENT "dev/hda5: no such device" - not booting cde Ubuntu 4 07-10-2006 01:27 PM
/dev/hda5?? soulxcavtor Linux - Software 7 05-23-2006 06:59 PM
Ubuntu screwed up my second Windows (/dev/hda5 HPFS/NTFS) partition howyen Ubuntu 5 04-12-2005 12:11 PM
what is /dev/hda5 lil'boomer Linux - Newbie 3 02-27-2005 07:19 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:33 AM.

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