LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 04-09-2005, 08:21 PM   #1
thew00t
LQ Newbie
 
Registered: Feb 2004
Distribution: Slackware 9.1 and BSD 5.2
Posts: 28

Rep: Reputation: 16
Solved: Disappearing devices in /dev/


Ok, so I used resize_reiserfs to resize a partition and then I used fdisk to rewrite the table. The only problem is that I can't mount the partitions. Here is the rundown:

--------------------START-------------------
---before resize
-- /dev/hdh1 = 39999.54M

#resize_reiserfs -s -10G /dev/hdh1

--reboot--
--(please note that the first print-out from fdisk has the wrong blocks, i didn't write them down)

#fdisk /dev/hdh
Command (m for help) p
Device Boot Start End Blocks Id System
/dev/hdh1 1 4136 3195948 83 Linux

Command (m for help) d
Partition number (1-4): 1

Command (m for help) p
Device Boot Start End Blocks Id System

Command (m for help) n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-4863, default 1):1
Last cylinder or +size or +sizeM or +sizeK (1-4863, default 4863): +30000M

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (3649-4863, default 3649):
Using default value 3649
Last cylinder or +size or +sizeM or +sizeK (3649-4863, default 4863):
Using default value 4863

Command (m for help): p
Device Boot Start End Blocks Id System
/dev/hdh1 1 3648 29302528+ 83 Linux
/dev/hdh2 3649 4863 9759487+ 83 Linux

Command (m for help): w
--writing

#mount /dev/hdh1 /mnt/hdh
mount: special device /dev/hdh1 does not exist

#tail /var/log/messag
Apr 9 20:54:58 localhost kernel: hdh: hdh1 hdh2
Apr 9 20:55:01 localhost udev[2736]: removing device node '/dev/hdh1'
Apr 9 20:55:01 localhost udev[2738]: removing device node '/dev/hdh2'

--------------------------END---------------------------------
so there we go, for some reason /dev/hdh1 and /dev/hdh2 are getting removed. can anyone help?

Last edited by thew00t; 04-11-2005 at 02:02 AM.
 
Old 04-10-2005, 03:18 PM   #2
sludink
Member
 
Registered: Jan 2005
Location: Brabant, the Netherlands
Distribution: Gentoo 2004.x (2.6.10 hardened)
Posts: 91

Rep: Reputation: 15
Maybe try:
Code:
#MAKEDEV -n /dev/hda
See if the results are satisfying, and if they are, remove the -n.
This should make the /dev/hda devices, but I can't grant this resolves your problem.
The -n ensures the command does nothing, only print what it would have done without -n.
 
Old 04-11-2005, 02:01 AM   #3
thew00t
LQ Newbie
 
Registered: Feb 2004
Distribution: Slackware 9.1 and BSD 5.2
Posts: 28

Original Poster
Rep: Reputation: 16
Solved!

Well, I found my solution in a thread similar to this, yet it seems no one has had any quite like mine but this solution did the trick:

First, I got the partitions from /proc/partitions
~ #cat /proc/partitions
3 0 13339844 hda
3 1 13339336 hda1
33 0 13339844 hde
33 1 12835903 hde1
33 2 498015 hde2
33 64 6353235 hdf
33 65 6353203 hdf1
34 0 10022040 hdg
34 1 10022008 hdg1
34 64 39062500 hdh
34 65 29302528 hdh1
34 66 9759487 hdh2

And then used mknod to add the hdh partitions
! Useage: mknod [OPTION]. . . NAME TYPE [MAJOR MINOR]
~ #cd /dev
/dev #mknod b hdh1 34 65
/dev #mknod b hdh2 34 66

and then set the permissions to the same as your other hard disk devices and you're set!
 
Old 04-11-2005, 07:09 AM   #4
sludink
Member
 
Registered: Jan 2005
Location: Brabant, the Netherlands
Distribution: Gentoo 2004.x (2.6.10 hardened)
Posts: 91

Rep: Reputation: 15
I'm happy for you!

the MAKEDEV I mentioned is a script that uses mknod. I thought it would be easier than using mknod, but you managed it anyway!

A good advice is to make a backup of important HD-data is:
Code:
sfdisk -d /dev/hda > /somewhere/hda.prt
dd if=/dev/hda of=/somewhere/hda.mbr count=1
This saves the partition table in format suitable for later input to the file hda.prt and the masterboot-record to the file hda.mbr. That way you always have a back up of some inportant data.
I once needed it, and if I didn't had it, I had lost my filesystem.
 
  


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
USB devices disappearing bradmatic Linux - Hardware 3 03-28-2005 04:01 PM
/dev/modem and /dev/ttyLT0 keep disappearing (ltmodem) himm Linux - Hardware 1 12-15-2004 02:17 PM
Things disappearing from /dev drr104 Debian 1 12-04-2004 11:04 AM
mounting 2 ide-scsi devices /dev/cdrom and /dev/cdrom1 issue penguin123 Linux - Hardware 3 09-26-2003 08:36 PM
/dev/modem Keeps Disappearing cam34 Linux - Software 1 09-01-2003 04:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 06:42 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